/* css/estilo.css - Versión Final Corregida */
:root {
  --bg: #f6f0e4;
  --card: #ffffff;
  --accent: #000000;
  --accent-light: #333333;
  --muted: #6b7280;
  --gray-light: #f0f0f0;
  --shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
  --shadow-hover: 0 30px 50px -15px rgba(0,0,0,0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-sans: 'Montserrat', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: #111;
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* HEADER FIJO */
header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 24px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 20px rgba(0,0,0,0.02);
}

main {
  padding-top: 180px;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-link img {
  height: 70px; /* Logo más grande en el sitio principal */
  width: auto;
  transition: transform 0.3s;
  object-fit: contain;
}

.logo-link img:hover {
  transform: scale(1.05);
}

.header-text {
  font-size: 16px;
  font-weight: 500;
  color: #000;
  text-align: center;
  flex: 1;
  padding: 0 20px;
  letter-spacing: 0.5px;
}

/* CARRITO EN HEADER */
.cart-header-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  border-radius: 30px;
}

.cart-header-btn:hover {
  color: var(--accent);
  background: rgba(0,0,0,0.02);
}

.cart-header-btn svg {
  width: 24px;
  height: 24px;
  stroke: #000;
  fill: none;
  stroke-width: 2;
  transition: var(--transition);
}

.cart-header-btn:hover svg {
  stroke: var(--accent);
  transform: scale(1.05);
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #000;
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.cart-badge.show {
  opacity: 1;
  transform: scale(1);
}

/* DROPDOWN */
.dropdown {
  position: relative;
  font-size: 14px;
}

.dropdown-btn {
  background: #ffffff;
  color: #000000;
  padding: 8px 20px;
  border-radius: 30px;
  cursor: pointer;
  border: 1px solid #e0e0e0;
  transition: var(--transition);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.dropdown-btn:hover {
  border-color: #000;
  background: #f9f9f9;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.dropdown-list {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  list-style: none;
  padding: 8px 0;
  margin: 8px 0 0;
  width: 180px;
  z-index: 100;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.dropdown-list li {
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.dropdown-list li:hover {
  background: #f5f5f5;
  padding-left: 25px;
}

.dropdown-list li.selected {
  background: #000;
  color: #fff;
}

.dropdown.open .dropdown-list {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* BARRA ENVÍO GRATIS */
.envio-gratis {
  background: #000;
  color: #fff;
  padding: 12px 0;
  overflow: hidden;
  white-space: nowrap;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-sizing: border-box;
}

.marquee {
  display: inline-flex;
  animation: scroll 60s linear infinite;
  will-change: transform;
}

.marquee span {
  padding: 0 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* HERO INICIAL */
.hero-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-height: 450px;
  overflow: hidden;
  margin-top: 0;
  gap: 0;
}

.hero-item {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
}

.hero-item img,
.hero-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s;
}

.hero-item:hover img,
.hero-item:hover video {
  transform: scale(1.05);
}

/* ===== CATÁLOGO DE PRODUCTOS ===== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.product-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.product-wrapper:hover {
  transform: translateY(-8px);
}

.product-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.02);
}

.product-image {
  position: relative;
  width: 100%;
  height: 100%;
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
  border-radius: 16px;
}

.product-image img.primary {
  opacity: 1;
  z-index: 1;
}

.product-image img.hover-img {
  opacity: 0;
  z-index: 2;
}

.product-card:hover .hover-img {
  opacity: 1;
}

.product-card:hover .primary {
  opacity: 0;
}

/* INFO PRODUCTO */
.product-info {
  text-align: center;
  margin-top: 15px;
  width: 100%;
}

.product-name {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 8px;
  color: #111;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.product-price {
  color: #000;
  font-weight: 700;
  font-size: 18px;
  margin: 0;
}

.add-cart-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #000;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.8);
}

.product-wrapper:hover .add-cart-icon {
  opacity: 1;
  transform: scale(1);
}

.add-cart-icon:hover {
  background: #333;
  transform: scale(1.1);
}

.add-cart-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* No results */
.no-results {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  color: var(--muted);
  font-size: 16px;
}

.no-results.show {
  display: block;
}

/* ===== VIDEO HERO ENTRE PRODUCTOS ===== */
.video-hero-section {
  grid-column: 1 / -1;
  width: 100%;
  background: #000;
  padding: 100px 0;
  margin: 100px 0;
  border-radius: 0;
}

.video-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.video-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 80px;
  width: 100%;
}

.video-hero-item {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 20px 30px rgba(0,0,0,0.5);
}

.video-hero-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.video-hero-item:hover video {
  transform: scale(1.05);
}

.video-hero-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

/* CARRUSEL INSTAGRAM */
.instagram-section {
  margin: 80px 0;
  overflow: hidden;
}

.instagram-header {
  text-align: center;
  margin-bottom: 40px;
}

.instagram-header h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: var(--muted);
}

.instagram-header a {
  color: #000;
  text-decoration: none;
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 2px;
  transition: var(--transition);
  font-family: 'Playfair Display', serif;
}

.instagram-header a:hover {
  color: #333;
  letter-spacing: 3px;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
}

.carousel {
  overflow: hidden;
  width: 100%;
  cursor: grab;
}

.carousel:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  transition: transform 0s linear;
  will-change: transform;
}

.carousel-item {
  flex: 0 0 280px;
  height: 280px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.carousel-item:hover img {
  transform: scale(1.1);
}

/* MODAL CARRITO (código existente) */
.cart-modal {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 450px;
  height: 100vh;
  background: white;
  z-index: 2000;
  box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}

.cart-modal.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s;
  backdrop-filter: blur(3px);
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-header {
  padding: 25px 30px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.close-cart {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.close-cart:hover {
  background: #f5f5f5;
  color: #000;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 30px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.cart-empty svg {
  width: 60px;
  height: 60px;
  stroke: #ddd;
  margin-bottom: 20px;
  fill: none;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 20px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 5px 10px rgba(0,0,0,0.05);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-item-price {
  color: #000;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 12px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #e0e0e0;
  background: white;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: var(--transition);
  font-weight: 600;
}

.qty-btn:hover {
  background: #000;
  color: white;
  border-color: #000;
}

.remove-item {
  margin-left: auto;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  transition: var(--transition);
}

.remove-item:hover {
  color: #ff4444;
}

.cart-footer {
  padding: 25px 30px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #000;
}

.checkout-btn {
  width: 100%;
  background: #000;
  color: white;
  border: none;
  padding: 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 50px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.checkout-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.checkout-btn:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.checkout-btn:hover::before {
  left: 100%;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #000;
  color: white;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  z-index: 4000;
  opacity: 0;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast::before {
  content: "✓";
  width: 24px;
  height: 24px;
  background: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* FOOTER */
.site-footer {
  background: #111;
  color: #fff;
  padding: 70px 20px 40px;
  text-align: center;
  margin-top: 80px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.footer-container p {
  margin: 0;
  font-size: 14px;
  color: #999;
  letter-spacing: 0.5px;
}

.footer-socials {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.footer-socials a {
  width: 50px;
  height: 50px;
  border: 1px solid #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-socials a:hover {
  background: white;
  border-color: white;
  transform: translateY(-5px);
}

.footer-socials a img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: filter 0.3s;
}

.footer-socials a:hover img {
  filter: none;
}
/* ===== VIDEO HERO - VIDEOS TIKTOK (9:16) COMPLETOS ===== */
.video-hero-section {
    width: 100%;
    background: transparent;
    padding: 0;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.video-hero-container {
    max-width: 1200px; /* Limitar ancho para que no se estiren demasiado */
    margin: 0 auto;
    padding: 0 20px;
}

.video-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; /* Espacio entre videos tipo galería */
    width: 100%;
    align-items: start; /* Alinea arriba para que no se estiren */
}

.video-hero-item {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16; /* Relación TikTok vertical */
    overflow: hidden;
    background: transparent;
    border-radius: 12px; /* Bordes suaves estilo TikTok */
}

.video-hero-item video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cubre todo manteniendo proporción */
    object-position: center center;
    border-radius: 12px;
}

/* ===== CATÁLOGO DE PRODUCTOS - MÁS CERCANO ===== */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

section.catalog-grid {
    margin-top: 10px;
    margin-bottom: 10px;
}

.product-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-bottom: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .video-hero-container {
        padding: 0 15px;
    }
    
    .video-hero-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin: 15px auto;
    }
}

@media (max-width: 768px) {
    .video-hero-container {
        padding: 0 10px;
    }
    
    .video-hero-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 videos por fila en móvil */
        gap: 10px;
    }
    
    .video-hero-item {
        border-radius: 8px;
    }
    
    .video-hero-item video {
        border-radius: 8px;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 15px;
        margin: 10px auto;
    }
    
    .product-wrapper {
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .video-hero-grid {
        gap: 8px;
    }
    
    .video-hero-item {
        border-radius: 6px;
    }
    
    .video-hero-item video {
        border-radius: 6px;
    }
    
    .catalog-grid {
        gap: 8px;
        padding: 0 10px;
    }
}
/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  
  .video-hero-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .hero-line {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    max-height: 600px;
  }
  
  .hero-item {
    height: 300px;
  }
  
  .hero-item:nth-child(1) { grid-column: 1; grid-row: 1; }
  .hero-item:nth-child(2) { grid-column: 2; grid-row: 1; }
  .hero-item:nth-child(3) { grid-column: 1; grid-row: 2; }
  .hero-item:nth-child(4) { grid-column: 2; grid-row: 2; }
  
  .carousel-item {
    flex: 0 0 240px;
    height: 240px;
  }
}

@media (max-width: 768px) {
  main {
    padding-top: 160px;
  }
  
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 15px;
  }
  
  .video-hero-section {
    padding: 30px 0;
  }
  
  .video-hero-grid {
    gap: 10px;
  }
  
  .hero-line {
    max-height: 400px;
  }
  
  .hero-item {
    height: 200px;
  }
  
  .header-text {
    display: none;
  }
  
  .logo-link img {
    height: 50px;
  }
  
  .add-cart-icon {
    opacity: 1;
    transform: scale(1);
  }
  
  .cart-modal {
    max-width: 100%;
  }
  
  .dropdown-btn {
    padding: 6px 15px;
    font-size: 13px;
  }
  
  .instagram-header a {
    font-size: 22px;
  }
  
  .carousel-item {
    flex: 0 0 200px;
    height: 200px;
  }
  
  .envio-gratis {
    padding: 10px 0;
  }
  
  .marquee span {
    padding: 0 20px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  main {
    padding-top: 150px;
  }
  
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .video-hero-section {
    padding: 20px 0;
  }
  
  .product-name {
    font-size: 12px;
  }
  
  .product-price {
    font-size: 14px;
  }
  
  .hero-line {
    max-height: 300px;
  }
  
  .hero-item {
    height: 150px;
  }
  
  .instagram-header a {
    font-size: 20px;
  }
  
  .carousel-item {
    flex: 0 0 160px;
    height: 160px;
  }
  
  .cart-header,
  .cart-items,
  .cart-footer {
    padding: 20px;
  }
  
  .envio-gratis {
    padding: 8px 0;
  }
  
  .marquee span {
    padding: 0 15px;
    font-size: 10px;
    letter-spacing: 1.5px;
  }
}

@media (max-width: 360px) {
  .hero-item {
    height: 120px;
  }
  
  .hero-line {
    max-height: 240px;
  }
}