/* =========================
   SECTION: TOKENS (variables)
   ========================= */
:root{
  --bg:#ffffff;
  --text:#111;
  --muted:#666;
  --border:#e9e9e9;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --max: 1200px;

  --primary:#111;
  --primaryText:#fff;
}

/* =========================
   SECTION: BASE / RESET
   ========================= */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color:var(--text);
  background:var(--bg);
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

/* =========================
   SECTION: TOPBAR
   ========================= */
.topbar{
  position:sticky;
  top:0;
  z-index:60;
  background:#fff;
  border-bottom:1px solid var(--border);
}
.topbar__inner{
  max-width:var(--max);
  margin:0 auto;
  padding:14px 18px;
  display:flex;
  align-items:center;
  gap:14px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.brand__logo{ width:34px; height:34px; object-fit:contain; }
.brand__name{ font-weight:800; letter-spacing:.2px; }
.topbar__actions{
  margin-left:auto;
  display:flex;
  gap:10px;
  align-items:center;
}

/* =========================
   SECTION: BUTTONS
   ========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:10px 14px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
}
.btn--primary{
  background:var(--primary);
  color:var(--primaryText);
  border-color:var(--primary);
}
.btn--ghost{ background:#fff; }
.btn--tiny{
  padding:8px 12px;
  font-size:13px;
}

/* =========================
   SECTION: NAV (CATEGORIES)
   ========================= */
.nav{
  background:#fff;
  border-bottom:1px solid var(--border);
  position:relative;
  z-index:50;
}

/* Scroll horizontal del menú */
.nav__scroll{
  max-width:var(--max);
  margin:0 auto;
  padding:0 18px;
  overflow-x:auto;
  overflow-y:visible;
}
.nav__inner{
  display:flex;
  align-items:center;
  gap:18px;
  overflow:visible;
  padding:12px 0;
}
.nav__item{
  position:relative;
  flex:0 0 auto;
}
.nav__link{
  display:inline-flex;
  align-items:center;
  padding:10px 14px;
  border-radius:999px;
  background:#f6f6f6;
  font-weight:700;
  font-size:14px;
  white-space:nowrap;
}
.nav__item:hover .nav__link{ background:#efefef; }

/* =========================
   SECTION: DROPDOWN FIXED (PC hover)
   - se usa con el JS del dropFixed
   ========================= */
.dropFixed{
  position:fixed;
  top:0;
  left:0;
  width:320px;
  max-height:360px;
  overflow:auto;

  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);

  padding:8px;
  display:none;
  z-index:99999;
}
.dropFixed--open{ display:block; }

.dropFixed__link{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  font-size:14px;
  white-space:nowrap;
}
.dropFixed__link:hover{ background:#f6f6f6; }

/* =========================
   SECTION: BRANDS MARQUEE
   ========================= */
.brands{
  border-bottom:1px solid var(--border);
  background:#fff;
}
.brandMarquee{ overflow:hidden; }
.brandMarquee__track{
  display:flex;
  gap:26px;
  align-items:center;
  padding:14px 18px;
  animation: marquee 18s linear infinite;
  width:max-content;
}
.brandMarquee__item{
  height:34px;
  display:flex;
  align-items:center;
  opacity:.9;
}
.brandMarquee__item img{
  height:34px;
  width:auto;
  object-fit:contain;
  filter: grayscale(100%);
}
@keyframes marquee{
  from{ transform:translateX(0); }
  to{ transform:translateX(-50%); }
}

/* =========================
   SECTION: MAIN / SECTIONS
   ========================= */
.main{ padding:20px 0 60px; }

.sectionHead{
  max-width:var(--max);
  margin:0 auto;
  padding:14px 18px 12px;
}
.sectionHead h2{ margin:0 0 6px; font-size:22px; }
.sectionHead p{ margin:0; color:var(--muted); font-size:14px; }

/* =========================
   SECTION: PRODUCTS GRID
   ========================= */
.cards{
  max-width:var(--max);
  margin:0 auto;
  padding:0 18px;
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:14px;
}
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  box-shadow:var(--shadow);
}
.card__img{ display:block; aspect-ratio: 1 / 1; background:#fafafa; }
.card__img img{ width:100%; height:100%; object-fit:cover; }
.card__body{ padding:12px; }
.card__title{ font-weight:900; font-size:14px; line-height:1.25; }
.card__meta{ color:var(--muted); font-size:13px; margin-top:4px; }
.card__actions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }

/* =========================
   SECTION: FOOTER / INFO
   ========================= */
.infoEnd{
  margin-top:22px;
  padding:22px 18px;
  background:#fafafa;
  border-top:1px solid var(--border);
}

.infoEnd__inner{
  max-width:var(--max);
  margin:0 auto;
  display:flex;
  justify-content:center;
}

/* Aviso legal */
.legal{
  max-width:720px;
  width:100%;
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:18px 20px;
  box-shadow:var(--shadow);
  text-align:center;
}

.legal__title{
  font-weight:900;
  margin-bottom:8px;
}

.legal p{
  margin:0;
  color:#333;
  font-size:13px;
  line-height:1.6;
}

/* =========================
   SECTION: FLOATING WHATSAPP
   ========================= */
:root{
  --wa:#1F9D55;        /* verde elegante tipo WhatsApp */
  --wa-dark:#157347;  /* hover más sobrio */
}

.waFloat{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 12px 14px;
  border-radius: 999px;

  background: #fff;
  border: 2px solid var(--wa);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);

  text-decoration: none;
}

.waFloat__icon{
  width: 22px;
  height: 22px;
  display: block;
}

.waFloat__text{
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--wa);
  line-height: 1;
}

.waFloat:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,.14);
  border-color: var(--wa-dark);
}

.waFloat:hover .waFloat__text{
  color: var(--wa-dark);
}


/* =========================
   SECTION: RESPONSIVE
   ========================= */
@media (max-width: 980px){
  /* Tablet: 3 columnas */
  .cards{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .infoEnd__inner{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  /* Celular: 2 columnas */
  .cards{ grid-template-columns: repeat(2, minmax(0,1fr)); }

  .nav__inner{ gap:10px; }
  .nav__link{ padding:9px 12px; font-size:13px; }

  /* En móvil no hay hover; el dropFixed no se usa */
  .dropFixed{ display:none !important; }
}

/* =========================
   SECTION: BRANDS MARQUEE (imagenes/marcas)
   ========================= */

.brands{
  border-bottom:1px solid var(--border);
  background:#fff;
}

.brandMarquee{
  width:100%;
  overflow:hidden;
}

.brandMarquee__viewport{
  width:100%;
  overflow:hidden;
}

.brandMarquee__track{
  display:flex;
  align-items:center;
  gap:32px;
  width:max-content;

  /* Animación base (PC) */
  animation-name: marquee;
  animation-duration: 155s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.brandMarquee__item{
  flex:0 0 auto;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:.9;
}

.brandMarquee__item img{
  height:36px;
  width:auto;
  max-width:none; /* CLAVE: evita cortes */
  object-fit:contain;
  filter: grayscale(100%);
}

/* Animación continua REAL (sin espacios) */
@keyframes marquee{
  from{
    transform: translateX(0);
  }
  to{
    transform: translateX(-50%);
  }
}

/* Tablet */
@media (max-width:1024px){
  .brandMarquee__track{
    animation-duration: 165s;
  }
}

/* Móvil */
@media (max-width:720px){
  .brandMarquee__track{
    animation-duration: 155s;
  }

  .brandMarquee__item{
    height:32px;
  }

  .brandMarquee__item img{
    height:32px;
  }
}
