/* catalog.css - Estilos del Catálogo Interactivo, Cards, Filtros, Modal y Carrusel Táctil */

/* Grid del Catálogo */
.catalog-header-section {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-input-group {
  position: relative;
  background: #ffffff;
  border-radius: 50rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.25rem 0.5rem 0.25rem 1.25rem;
  display: flex;
  align-items: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-group:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.15);
}

.search-input-group input {
  border: none;
  outline: none;
  font-size: 1rem;
  width: 100%;
  background: transparent;
  padding: 0.5rem 0.5rem;
}

/* Category Pills Filter */
.category-pills-wrap {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.category-pills-wrap::-webkit-scrollbar {
  height: 4px;
}

.category-pills-wrap::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.cat-pill-btn {
  white-space: nowrap;
  border-radius: 50rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #4b5563;
  transition: all 0.2s ease;
  cursor: pointer;
}

.cat-pill-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #111827;
}

.cat-pill-btn.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* Product Card */
.product-card {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: #ffffff;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
  border-color: rgba(13, 110, 253, 0.25);
}

.product-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 85%; /* Aspect ratio agradable */
  background: #f8fafc;
  overflow: hidden;
}

.product-card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img-wrap img {
  transform: scale(1.05);
}

.product-badge-stock {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 50rem;
  backdrop-filter: blur(8px);
}

.product-badge-mayoreo {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #111827;
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: 50rem;
  letter-spacing: 0.03em;
}

.product-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category-name {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.65rem;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.product-price-section {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed #e5e7eb;
}

.product-price-retail {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.product-price-retail-label {
  font-size: 0.72rem;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 600;
}

.product-price-wholesale-tag {
  font-size: 0.8rem;
  color: #059669;
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ========================================================
   MODAL DE PRODUCTO Y CARRUSEL TÁCTIL / SCROLL DESLIZABLE
   ======================================================== */
.product-modal-dialog {
  max-width: 900px;
}

.product-modal-content {
  border-radius: 20px;
  border: none;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Carrusel Deslizable */
.carousel-viewport-wrap {
  position: relative;
  background-color: #f8fafc;
  border-radius: 14px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Ocultar scrollbar estándar */
  scroll-behavior: smooth;
  height: 380px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

/* Flechas Minimalistas de Navegación */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 10;
}

.carousel-arrow:hover {
  background: #ffffff;
  color: var(--primary-color);
  transform: translateY(-50%) scale(1.08);
}

.carousel-arrow.prev {
  left: 12px;
}

.carousel-arrow.next {
  right: 12px;
}

/* Miniaturas / Indicadores */
.carousel-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
}

.carousel-thumb-item {
  width: 55px;
  height: 55px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  background: #ffffff;
}

.carousel-thumb-item.active {
  border-color: var(--primary-color);
}

.carousel-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tabla de Precios Mayoreo en Modal */
.pricing-table-modal {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.pricing-table-modal table {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.pricing-table-modal th {
  background: #f9fafb;
  font-weight: 600;
  color: #4b5563;
}

/* Botón Me Interesa (WhatsApp CTA) */
.btn-me-interesa {
  background-color: var(--whatsapp-color);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 12px;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transition: all 0.25s ease;
  width: 100%;
  text-decoration: none;
}

.btn-me-interesa:hover {
  background-color: var(--whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
}
