:root{
  --bg:#ffffff;
  --soft:#f5f5f5;
  --line:#e5e5e5;
  --text:#1c1c1c;
  --muted:#6b6b6b;

  /* Dorado sutil (matching logo) */
  --gold-soft:#C2A14D;
  --gold-glow: rgba(194,161,77,.25);
}

*{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial;
  color:var(--text);
  background:var(--bg);
}

a{ color:inherit; }

.container{
  max-width:1200px;
  margin:auto;
  padding:0 20px;
}

/* =========================
   HEADER
========================= */
.header{
  position:sticky;
  top:0;
  background:#fff;
  border-bottom:1px solid var(--line);
  z-index:20;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:16px;
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  min-width:160px;
}

.logo-img{
  height:42px;
  width:auto;
  display:block;
  border-radius:10px;
}

.brand-name{
  font-weight:800;
  letter-spacing:.5px;
  line-height:1.1;
}

.brand-sub{
  font-size:12px;
  color:var(--muted);
  line-height:1.1;
}

.nav{
  display:flex;
  gap:18px;
  justify-content:center;
  flex:1;
}

.nav a{
  color:var(--muted);
  text-decoration:none;
  font-weight:600;
  padding:8px 10px;
  border-radius:10px;
  transition: background .15s ease, color .15s ease;
}

.nav a:hover{
  color:var(--text);
  background:rgba(0,0,0,.03);
}

.actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.actions input{
  padding:8px 12px;
  border-radius:10px;
  border:1px solid var(--line);
  outline:none;
}

.actions input:focus{
  border-color: rgba(194,161,77,.55);
  box-shadow: 0 0 0 3px rgba(194,161,77,.16);
}

.cart-btn{
  border:1px solid var(--line);
  background:#fff;
  border-radius:10px;
  padding:8px 12px;
  cursor:pointer;
  transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}

.cart-btn:hover{
  border-color: rgba(194,161,77,.45);
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

.cart-btn:active{
  transform: translateY(1px);
}

/* =========================
   HERO
========================= */
.hero--image{
  padding:24px 0 28px;  /* menos espacio arriba/abajo */
}

.hero-img-full{
  width:100%;
  max-height:420px;           /* 👈 controla la altura aquí */
  border-radius:32px;
  overflow:hidden;
  box-shadow: 0 24px 50px rgba(0,0,0,.12);
}

.hero-img-full img{
  width:100%;
  height:100%;
  object-fit:cover;           /* recorta sin deformar */
  object-position:center;     /* centra el logo */
}

/* En móvil se ve un poco más compacta */
@media(max-width:900px){
  .hero--image{
    padding:20px 0 40px;
  }
  .hero-img-full{
    border-radius:24px;
  }
}
/* =========================
   BUTTONS
========================= */
.btn{
  padding:12px 18px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.btn.primary{
  background:#000;
  color:#fff;
  border:1px solid var(--gold-soft);
  transition: box-shadow .2s ease, transform .2s ease;
}

.btn.primary:hover{
  box-shadow:0 10px 24px rgba(0,0,0,.16), 0 0 0 3px rgba(194,161,77,.22);
  transform: translateY(-1px);
}

.btn.primary:active{
  transform: translateY(0);
}

.btn.ghost{
  background:transparent;
}

.full{ width:100%; }

/* =========================
   SECTIONS
========================= */
#cats.section{
  padding-top:5px;  /* antes era 60px */
}

.section.light{
  background:var(--soft);
}

/* Encabezado de sección con link (para Lo más vendido) */
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.section-link{
  color:var(--muted);
  text-decoration:none;
  font-weight:700;
  padding:8px 10px;
  border-radius:10px;
  transition: background .15s ease, color .15s ease;
}

.section-link:hover{
  color:var(--text);
  background:rgba(0,0,0,.03);
}

/* Títulos premium (barra + línea centrada) */
.section h2{
  font-size:32px;
  letter-spacing:-.3px;
  margin:0 0 28px;
  position:relative;
  padding-left:14px;
}

/* Barrita dorada vertical */
.section h2::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  width:4px;
  height:28px;
  border-radius:999px;
  background: linear-gradient(
    to bottom,
    rgba(194,161,77,0),
    rgba(194,161,77,.85),
    rgba(194,161,77,0)
  );
}

/* Línea dorada centrada */
.section h2::after{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:-12px;
  width:70px;
  height:3px;
  border-radius:999px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(194,161,77,.95),
    transparent
  );
  opacity:.9;
}

/* =========================
   QUICK ACCESS (ACCESOS RÁPIDOS)
========================= */
.quick-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
}

.quick-card{
  display:flex;
  gap:12px;
  align-items:center;
  padding:18px;
  border-radius:18px;
  border:1px solid var(--line);
  background:#fff;
  text-decoration:none;
  color:var(--text);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.quick-card:hover{
  border-color: rgba(194,161,77,.55);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,.10), 0 0 0 2px rgba(194,161,77,.16);
}

.quick-ico{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:var(--soft);
  font-weight:900;
}

.quick-title{ font-weight:900; }
.quick-sub{ color:var(--muted); font-size:13px; }

/* =========================
   CATEGORIES
========================= */
.categories{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:16px;
}

.cat{
  padding:30px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  text-align:center;
  font-weight:700;
  cursor:pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.cat:hover{
  border-color: rgba(194,161,77,.55);
  transform: translateY(-3px);
  box-shadow:
    0 12px 28px rgba(0,0,0,.10),
    0 0 0 2px rgba(194,161,77,.16);
}

/* Estado activo (cuando das clic) */
.cat.active{
  background: linear-gradient(180deg, rgba(194,161,77,.08), transparent);
  border-color: rgba(194,161,77,.70);
  box-shadow:
    0 12px 28px rgba(0,0,0,.10),
    0 0 0 2px rgba(194,161,77,.22);
}

/* =========================
   PRODUCTS
========================= */
.products{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:20px;
}

.product{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  display:flex;
  flex-direction:column;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.product:hover{
  border-color: rgba(194,161,77,.55);
  transform: translateY(-3px);
  box-shadow:
    0 12px 28px rgba(0,0,0,.10),
    0 0 0 2px rgba(194,161,77,.18);
}

.product-img{
  height:180px;
  background:var(--soft);
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.product-img img{
  width:100%;
  height:100%;
  object-fit:contain; /* no recorta */
  padding:12px;
  transform: scale(1);
  transition: transform .25s ease;
}

.product:hover .product-img img{
  transform: scale(1.04);
}

.product h3{
  margin:14px 0 6px;
}

.product p{
  color:var(--muted);
  font-size:14px;
  margin:0 0 8px;
  line-height:1.4;
  min-height: 38px; /* ayuda a alinear cards cuando hay desc vacía */
}

.price{
  font-weight:800;
  font-size:18px;
  margin:0 0 10px;
}

.price.accent{
  color: var(--gold-soft);
}

.reviews{
  color:var(--muted);
  font-size:13px;
  margin-top:6px;
}

.reviews .star{
  color:var(--gold-soft);
  font-weight:900;
}

/* =========================
   SUPPORT
========================= */
.support{
  text-align:center;
}

.support p{
  color:var(--muted);
  max-width:65ch;
  margin:10px auto 0;
  line-height:1.5;
}

.support-badges{
  display:flex;
  gap:14px;
  justify-content:center;
  margin-top:14px;
  flex-wrap:wrap;
}

.support-badges span{
  border:1px solid var(--line);
  padding:8px 14px;
  border-radius:999px;
  font-size:13px;
  color:var(--muted);
  background:#fff;
}

/* =========================
   FOOTER
========================= */
.footer{
  border-top:1px solid var(--line);
  padding:20px 0;
  color:var(--muted);
  text-align:center;
}

/* =========================
   CART
========================= */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  display:none;
  z-index:30;
}

.cart{
  position:fixed;
  right:0;
  top:0;
  width:360px;
  height:100%;
  background:#fff;
  border-left:1px solid var(--line);
  transform:translateX(100%);
  transition:.3s;
  display:flex;
  flex-direction:column;
  z-index:40;
}

.cart header{
  padding:16px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.cart header h3{
  margin:0;
}

#closeCart{
  border:1px solid var(--line);
  background:#fff;
  border-radius:10px;
  padding:6px 10px;
  cursor:pointer;
}

#closeCart:hover{
  border-color: rgba(194,161,77,.45);
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

.cart-body{
  padding:16px;
  flex:1;
  overflow:auto;
}

.cart footer{
  padding:16px;
  border-top:1px solid var(--line);
}

.cart.open{
  transform:translateX(0);
}

.overlay.show{
  display:block;
}

/* =========================
   RESPONSIVE
========================= */
@media(max-width:900px){
  .hero-grid{ grid-template-columns:1fr; }
  .nav{ display:none; }
  .actions input{ width:180px; }
  .quick-grid{ grid-template-columns:repeat(2,1fr); }
}

@media(max-width:520px){
  .actions input{ display:none; }
  .hero h1{ font-size:34px; }
  .section h2{ font-size:28px; }
  .cart{ width:92vw; max-width:360px; }
}

/* Separación visual entre Categorías y Lo más vendido */

#featured.section{
  padding-top:20px;
}

#featured h2{
  margin-top:10px;
}

/* Separación visual real entre Categorías y Lo más vendido */
#featured.section.light{
  padding-top:20px;   /* espacio blanco antes del fondo */
}

#featured{
  margin-top:24px;
}

#support.section{
  padding-top:72px;
}

/* Espacio real entre cards de productos y siguiente sección */
.products{
  margin-bottom:10px;
}

#support{
  margin-top:24px;
}

/* Dar más aire al final de la sección gris */
#featured.section.light{
  padding-bottom:50px;
}

/* Header de Categorías con botón burger */
.cats-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}

.cats-toggle{
  display:none; /* desktop oculto */
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
  align-items:center;
  gap:10px;
  transition: box-shadow .15s ease, border-color .15s ease, transform .12s ease;
}

.cats-toggle:hover{
  border-color: rgba(194,161,77,.45);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

.cats-toggle:active{ transform: translateY(1px); }

.cats-icon{
  font-size:18px;
  line-height:1;
}

/* Mobile: convertir categorías a menú desplegable */
@media(max-width:900px){
  .cats-toggle{ display:inline-flex; }

  /* Por defecto oculto */
  #catsPanel{
    display:none;
    margin-top:12px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fff;
    box-shadow: 0 16px 34px rgba(0,0,0,.08);
  }

  /* Cuando está abierto */
  #catsPanel.open{ display:grid; }

  /* En móvil: 1 o 2 columnas según te guste */
  #catsPanel{
    grid-template-columns:1fr;
    gap:10px;
  }

  /* Botones más compactos en móvil */
  #catsPanel .cat{
    padding:14px 16px;
    text-align:left;
  }
}

/* Productos en móvil: 2 columnas */
@media (max-width: 900px){
  .products{
    grid-template-columns: repeat(2, 1fr);
    gap:14px; /* un poco más compacto en móvil */
  }

  .product{
    padding:14px;
  }

  .product h3{
    font-size:15px;
  }

  .price{
    font-size:16px;
  }
}

/* Forzar estructura vertical en productos */
.product{
  display:flex;
  flex-direction:column;
}

/* El bloque de texto puede crecer */
.product h3,
.product p,
.product .reviews{
  flex-shrink:0;
}

/* Empuja precio y botón hasta abajo */
.product .price{
  margin-top:auto;
}

.product .btn{
  margin-top:10px;
}

/* Agrupar reseñas, precio y botón al fondo */
.product .reviews{
  margin-top:auto;   /* empuja este bloque al fondo */
}

/* Espaciados internos consistentes */
.product .price{
  margin-top:6px;
}

.product .btn{
  margin-top:10px;
}