Theme Name: rodeo-autopartes-theme
Theme URI: https://autopartesrodeodelmedio.ar
Author: Agustín Spitaleri
Author URI: https://agustinspitaleri.com.ar
Description: Landing catálogo rápido + buscador para Autopartes Rodeo del Medio – Suc. Dorrego.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: rodeo-autopartes-theme
*/

/* ==============================
   Base + Variables
================================ */
:root{
  --yellow:#F3B11A;   /* marca */
  --ink:#151515;      /* texto */
  --bg:#ffffff;       /* fondo */
  --muted:#60646c;    /* texto secundario */
  --line:#e8e8e8;     /* bordes */
  --soft:#f8f8f8;     /* fondos suaves */
  --radius:14px;
  --wa:#25D366;       /* WhatsApp */
  --shadow:0 8px 24px rgba(16,24,40,.06);

  --ml:#FFF159;
  --ml-hover:#FFE44D;
}

*{box-sizing:border-box;}

html,body{
  max-width:100%;
  overflow-x:hidden;
}

body{
  margin:0;
  font-family:'Montserrat',system-ui,-apple-system,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.5;
}

img{max-width:100%;height:auto;}
a{text-decoration:none;color:inherit;}

/* Aplasta contenedores del theme WP */
#page,
.site,
.site-content,
.content-area,
.primary,
main{
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
}

/* ==============================
   Animaciones
================================ */
@keyframes fadeUpSoft{
  from{opacity:0;transform:translateY(12px);}
  to{opacity:1;transform:translateY(0);}
}

.items-grid .item,
.product-grid .p-card,
.info-card{
  opacity:0;
  transform:translateY(12px);
  animation:fadeUpSoft .55s ease forwards;
}

.product-grid .p-card:nth-child(1),
.items-grid .item:nth-child(1),
.info-card:nth-child(1){animation-delay:.05s;}
.product-grid .p-card:nth-child(2),
.items-grid .item:nth-child(2),
.info-card:nth-child(2){animation-delay:.12s;}
.product-grid .p-card:nth-child(3),
.items-grid .item:nth-child(3),
.info-card:nth-child(3){animation-delay:.19s;}
.product-grid .p-card:nth-child(4),
.items-grid .item:nth-child(4),
.info-card:nth-child(4){animation-delay:.26s;}
.items-grid .item:nth-child(5){animation-delay:.33s;}
.items-grid .item:nth-child(6){animation-delay:.40s;}
.items-grid .item:nth-child(7){animation-delay:.47s;}
.items-grid .item:nth-child(8){animation-delay:.54s;}
.items-grid .item:nth-child(9){animation-delay:.61s;}
.items-grid .item:nth-child(10){animation-delay:.68s;}

@media (prefers-reduced-motion: reduce){
  .items-grid .item,
  .product-grid .p-card,
  .info-card{
    animation:none;
    opacity:1;
    transform:none;
  }
}

/* ==============================
   HEADER
================================ */

/* Solo tocamos .site-header, para no pisar otros headers del theme */
.site-header{
  background:#ffffff;
  color:#111;
  border-bottom:3px solid var(--yellow);
  width:100%;
}
/* ===== FIX: separación hero vs header sticky (todas las vistas) ===== */

:root{
  --ap-header-h: 72px;   /* altura aprox header desktop */
  --ap-hero-gap: 18px;   /* aire visual entre header y hero */
}

/* tablet / mobile el header cambia un poco */
@media (max-width:1024px){
  :root{ --ap-header-h: 76px; }
}
@media (max-width:768px){
  :root{ --ap-header-h: 78px; --ap-hero-gap: 14px; }
}
@media (max-width:430px){
  :root{ --ap-header-h: 74px; --ap-hero-gap: 12px; }
}

/* si estás logueado, WP suma admin bar */
body.admin-bar{
  --ap-adminbar-h: 32px;
}
@media (max-width:782px){
  body.admin-bar{
    --ap-adminbar-h: 46px;
  }
}

/* aplica el offset real */
.hero{
  padding-top: calc(var(--ap-header-h) + var(--ap-hero-gap) + var(--ap-adminbar-h, 0px)) !important;
  margin-top: 0 !important;
}

/* extra: que los anchors no queden tapados por el header */
#catalogo, #quienes-somos, #ubicacion, #top{
  scroll-margin-top: calc(var(--ap-header-h) + var(--ap-hero-gap) + var(--ap-adminbar-h, 0px)) !important;
}

/* barra principal */
.site-header .topbar{
  max-width:1180px;
  margin:0 auto;
  padding:10px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
}

/* bloque marca */
.site-header .brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.site-header .brand-mark{
  background:#111;
  color:#fff;
  padding:7px 12px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  box-shadow:0 6px 16px rgba(0,0,0,.18);
  white-space:nowrap;
}

.site-header .brand-mark-main{color:#fff;}
.site-header .brand-mark-sub{color:var(--yellow);}

.site-header .title{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.site-header .brand-kicker{
  font-size:.65rem;
  text-transform:uppercase;
  letter-spacing:.15em;
  color:var(--muted);
}

.site-header .title strong{
  font-size:.95rem;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.site-header .title small{
  font-size:.7rem;
  opacity:.75;
}

/* lado derecho (nav desktop + btn + hamburguesa) */
.site-header .header-right{
  display:flex;
  align-items:center;
  gap:10px;
}

/* NAV DESKTOP */
.header-nav{
  display:flex;
  align-items:center;
  gap:14px;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.header-nav a{
  position:relative;
  padding:4px 0;
  color:#4b5563;
}
.header-nav a::after{
  content:'';
  position:absolute;
  left:0;
  bottom:-3px;
  width:0;
  height:2px;
  background:var(--yellow);
  border-radius:999px;
  transition:width .18s ease-out;
}
.header-nav a:hover::after{
  width:100%;
}

/* botón wa de header (desktop) */
.btn-ml.header-wa{
  max-width:210px;
  font-size:.8rem;
  padding:9px 14px;
  white-space:nowrap;
}

/* Toggle mobile (hamburguesa) */
.mobile-toggle{
  border:none;
  background:#111;
  color:#fff;
  border-radius:999px;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(0,0,0,.25);
}
.mobile-toggle span{
  position:relative;
  display:block;
  width:18px;
  height:2px;
  border-radius:999px;
  background:#fff;
}
.mobile-toggle span::before,
.mobile-toggle span::after{
  content:'';
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  border-radius:999px;
  background:#fff;
  transition:transform .18s ease, top .18s ease, opacity .18s ease;
}
.mobile-toggle span::before{top:-6px;}
.mobile-toggle span::after{top:6px;}
.mobile-toggle.is-open span{
  background:transparent;
}
.mobile-toggle.is-open span::before{
  top:0;
  transform:rotate(45deg);
}
.mobile-toggle.is-open span::after{
  top:0;
  transform:rotate(-45deg);
}

/* Drawer lateral mobile */
.mobile-menu{
  position:fixed;
  inset:0;
  z-index:9999;
  pointer-events:none;
}
.mobile-menu__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.4);
  opacity:0;
  transition:opacity .22s ease-out;
}
.mobile-menu__drawer{
  position:absolute;
  top:0;
  right:0;
  width:78%;
  max-width:320px;
  height:100%;
  background:#111827;
  color:#f9fafb;
  transform:translateX(100%);
  transition:transform .24s ease-out;
  padding:18px 18px 24px;
  display:flex;
  flex-direction:column;
  gap:16px;
  box-shadow:-10px 0 30px rgba(0,0,0,.45);
}
.mobile-menu__header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.mobile-menu__title{
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.14em;
  opacity:.7;
}
.mobile-menu__close{
  border:none;
  background:transparent;
  color:#f9fafb;
  font-size:1.6rem;
  line-height:1;
  cursor:pointer;
}
.mobile-menu__nav{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.mobile-menu__nav a{
  display:block;
  padding:10px 0;
  border-bottom:1px solid rgba(249,250,251,.06);
  font-size:.9rem;
}
.mobile-menu__nav a span{
  display:block;
  font-size:.7rem;
  text-transform:uppercase;
  letter-spacing:.12em;
  opacity:.6;
}
.mobile-menu__footer{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.mobile-menu__footer .btn-ml{
  width:100%;
  justify-content:center;
}
.mobile-menu.is-open{
  pointer-events:auto;
}
.mobile-menu.is-open .mobile-menu__backdrop{
  opacity:1;
}
.mobile-menu.is-open .mobile-menu__drawer{
  transform:translateX(0);
}
body.menu-open{
  overflow:hidden;
  touch-action:none;
}

/* ==============================
   Hero (desktop/tablet)
================================ */
.hero{
  max-width:1180px;
  margin:0 auto;
  padding:22px 16px 8px;
  display:grid;
  grid-template-columns:1.02fr .98fr;
  gap:26px;
  align-items:flex-start;
  background:radial-gradient(circle at top left,#fff9d7 0,#ffffff 45%,#f5f7fb 100%);
}

.hero-left h1{
  font-size:clamp(1.9rem,3.2vw,2.6rem);
  margin:.2rem 0 .4rem;
  letter-spacing:-.01em;
  text-transform:uppercase;
  font-weight:800;
}

.hero-left p{
  max-width:620px;
  margin:.2rem 0 1rem;
  color:var(--muted);
}

.badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:.5rem 0 1rem;
}

.badge{
  background:#f3f4f6;
  border:1px solid var(--line);
  border-radius:999px;
  padding:7px 12px;
  font-size:.75rem;
}

.metrics{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:12px 0 16px;
}

.metric{
  background:linear-gradient(145deg,#1f1f1f,#111);
  color:#fff;
  border:1px solid rgba(243,177,26,.35);
  border-radius:14px;
  padding:10px 14px;
  min-width:130px;
}

.metric small{
  display:block;
  opacity:.75;
  font-size:.62rem;
  text-transform:uppercase;
}

.metric strong{font-size:1.05rem;}

.hero-ctas{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.btn-secondary{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px 14px;
  font-weight:700;
  font-size:.8rem;
}

/* Cards */
.card{
  background:#fff;
  border:1px solid #efefef;
  border-radius:16px;
  padding:18px;
  box-shadow:0 18px 35px rgba(0,0,0,.03);
}

.hero-right h2{
  margin:0 0 4px;
  text-transform:uppercase;
  letter-spacing:.05em;
  font-size:.95rem;
}

.hero-right small{opacity:.6;font-size:.7rem;}

/* Top grid */
.product-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:14px;
  margin-top:10px;
}

.p-card{
  background:#fff;
  border:1px solid #e3e6ea;
  border-radius:12px;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:115px;
  position:relative;
  overflow:hidden;
  box-shadow:var(--shadow);
  transition:transform .15s ease, box-shadow .15s ease;
}

.p-card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 28px rgba(16,24,40,.08);
}

.p-card img{
  width:100%;
  height:86px;
  object-fit:cover;
  border-radius:8px;
  background:#f6f8fb;
  cursor:pointer;
}

.p-cat{font-size:.6rem;text-transform:uppercase;opacity:.55;}
.p-name{font-weight:800;font-size:.82rem;}
.p-price{font-size:.7rem;color:#666;}

/* ==============================
   Hero Search
================================ */
.hero-search{
  margin-top:12px;
  background:#fff;
  border-radius:16px;
  border:1px solid var(--line);
  padding:14px 14px 12px;
  box-shadow:0 10px 24px rgba(0,0,0,.04);
}

.hero-search-header{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:8px;
  margin-bottom:6px;
}

.hero-search-label{
  font-size:.65rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:800;
  color:#9ca3af;
}

.hero-search-meta{
  font-size:.7rem;
  color:#888;
}

.hero-search-row{
  display:flex;
  gap:8px;
  margin-bottom:6px;
}

.hero-search-input-wrap{
  flex:1;
  position:relative;
}

.hero-search-input-wrap input{
  width:100%;
  border-radius:999px;
  border:1px solid var(--line);
  padding:10px 38px 10px 12px;
  font-size:.8rem;
  font-weight:600;
  background:#f8f8f8;
}

.hero-search-input-wrap input:focus{
  outline:none;
  border-color:var(--yellow);
  background:#fff;
  box-shadow:0 0 0 2px rgba(243,177,26,.2);
}

.hero-search-input-wrap .icon{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  font-size:.9rem;
  opacity:.5;
}

.hero-search-btn{
  border:none;
  border-radius:999px;
  padding:10px 14px;
  background:var(--yellow);
  font-size:.75rem;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}

.hero-search-help{
  font-size:.7rem;
  color:#777;
  margin-bottom:4px;
}

.hero-search-help span{
  font-weight:700;
  color:#444;
}

.hero-results{
  margin-top:4px;
  border-radius:14px;
  border:1px dashed #e5e5e5;
  max-height:220px;
  overflow-y:auto;
  background:#f9fafb;
}

.hero-results.empty{border-style:solid;}

.result-item{
  padding:10px 12px;
  border-bottom:1px solid #e5e7eb;
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:.78rem;
}

.result-item:last-child{border-bottom:none;}

.result-title{
  font-size:.82rem;
  font-weight:800;
}

.result-meta{
  font-size:.74rem;
  color:#6b7280;
}

.result-bottom-row{
  margin-top:6px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.price-tag{
  font-size:.78rem;
  font-weight:700;
}

.price-tag small{
  display:inline-block;
  font-weight:400;
  color:#6b7280;
  margin-left:4px;
}

.wa-mini-btn{
  border-radius:999px;
  background:#111;
  color:#f9fafb;
  padding:6px 11px;
  font-size:.72rem;
  font-weight:700;
  border:1px solid #e6e9ee;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.search-empty-message{
  padding:10px 12px;
  font-size:.74rem;
  color:#6b7280;
}

/* ==============================
   Sections
================================ */
.section{
  max-width:1180px;
  margin:0 auto;
  padding:24px 16px 10px;
}

.section-title{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
  margin-bottom:16px;
}

.section-title h2{
  font-size:1.15rem;
  text-transform:uppercase;
  letter-spacing:.03em;
  margin:0;
  font-weight:800;
}

.section-title small{font-size:.7rem;opacity:.6;}

/* Toolbar */
.toolbar{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-bottom:12px;
}

.searchbox{position:relative;}

.searchline{
  display:flex;
  gap:8px;
}

.searchline input{
  flex:1;
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:12px 14px;
  font-weight:600;
}

.btn{
  border:none;
  border-radius:999px;
  padding:12px 14px;
  font-weight:800;
  cursor:pointer;
}

.btn-search{background:#111;color:#fff;}

.btn-filter{
  background:var(--soft);
  border:1px solid var(--line);
  font-weight:800;
}

/* Panel */
.panel{
  position:absolute;
  left:0;
  right:0;
  top:110%;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 16px 36px rgba(0,0,0,.08);
  padding:14px;
  z-index:10;
  display:none;
}

.panel.open{display:block;}

.panel .row{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

.panel label{
  font-size:.75rem;
  color:#555;
  font-weight:800;
  text-transform:uppercase;
}

.panel select{
  width:100%;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.chip{
  background:var(--soft);
  border:1px solid var(--line);
  border-radius:999px;
  padding:7px 12px;
  font-size:.75rem;
  cursor:pointer;
}

.chip.active{
  background:var(--yellow);
  border-color:#f6d178;
  color:#111;
}

.panel .apply{
  display:flex;
  gap:8px;
  justify-content:flex-end;
}

.panel .apply .btn{padding:10px 14px;}

/* Items grid */
.items-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(208px,1fr));
  gap:16px;
}

.item{
  background:#fff;
  border:1px solid #e3e6ea;
  border-radius:14px;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  position:relative;
  box-shadow:var(--shadow);
  transition:transform .15s ease, box-shadow .15s ease;
}

.item:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 28px rgba(16,24,40,.08);
}

.item img{
  width:100%;
  height:152px;
  border-radius:10px;
  object-fit:cover;
  background:#f6f8fb;
  cursor:pointer;
}

.item small{
  font-size:.62rem;
  text-transform:uppercase;
  opacity:.6;
}

.item h3{
  font-size:.94rem;
  margin:.1rem 0 0;
  font-weight:800;
  letter-spacing:-.01em;
}

.item p{
  font-size:.78rem;
  margin:0;
  color:#4b5563;
}

.item .tag{
  position:absolute;
  top:10px;
  right:10px;
  background:rgba(243,177,26,.13);
  color:#9a6e08;
  padding:4px 9px;
  font-size:.58rem;
  border-radius:999px;
  text-transform:uppercase;
}

/* Info cards */
.info-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:16px;
  margin-top:12px;
}

.info-card{
  border:1px solid var(--line);
  border-radius:14px;
  padding:18px 16px;
  background:#fff;
}

.info-card h3{
  margin:0 0 8px;
  font-size:.95rem;
  text-transform:uppercase;
  display:flex;
  gap:6px;
  align-items:center;
}

/* Footer */
footer{
  background:#111;
  color:#fff;
  padding:26px 16px;
  margin-top:28px;
  width:100%;
}

footer .foot{
  max-width:1180px;
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  font-size:.72rem;
}

/* Placeholder */
img.ph{
  background:linear-gradient(180deg,#f6f8fb,#eef1f5);
  border:1px dashed #d4dae3;
}

/* Botones ML + WA */
.btn-ml{
  background:var(--ml);
  color:#111;
  border:1px solid #f1e04b;
  border-radius:12px;
  padding:12px 16px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  width:100%;
  max-width:100%;
  line-height:1.1;
  text-wrap:balance;
  white-space:normal;
  word-break:keep-all;
  font-size:clamp(.82rem,1.6vw,.95rem);
  min-height:44px;
}

.product-grid .btn-ml,
.items-grid .btn-ml{
  font-size:clamp(.78rem,1.4vw,.9rem);
  padding:10px 12px;
  min-height:40px;
}

.btn-ml:hover{background:var(--ml-hover);}
.btn-wa svg{
  width:18px;
  height:18px;
  display:inline-block;
  flex:0 0 18px;
}

/* ==============================
   Tablet
================================ */
@media (max-width:920px){
  body{background:#f5f5f7;}

  .hero{
    grid-template-columns:1fr;
    padding:16px 16px 10px;
    gap:18px;
  }

  .hero-right{order:2;margin-top:4px;}

  .hero-left h1{
    font-size:1.6rem;
    line-height:1.18;
  }

  .section{padding:20px 16px 10px;}

  .items-grid,
  .product-grid{gap:14px;}
}

/* ==============================
   Mobile <= 620px (modo app)
   + FIX HEADER MOBILE
================================ */
@media (max-width:620px){
  html,body{
    margin:0;
    padding:0;
    width:100%;
    max-width:100%;
    overflow-x:hidden;
    background:#f5f5f7;
  }

  .site-header,
  footer{
    width:100%;
    max-width:100%;
    margin:0;
  }

  .topbar,
  .section,
  footer .foot{
    width:100%;
    max-width:100%;
    margin:0 auto;
    padding-left:14px;
    padding-right:14px;
  }

  /* HEADER MOBILE: fuerza 2 columnas, izquierda brand / derecha botón */
  .site-header .topbar{
    display:flex !important;
    flex-direction:row !important;
    justify-content:space-between !important;
    align-items:center !important;
    gap:10px !important;
    flex-wrap:nowrap !important;
    padding:8px 12px !important;
  }

  .site-header .brand{
    flex:1 1 auto !important;
    min-width:0 !important;
    gap:10px;
  }

  .site-header .title strong{
    font-size:.9rem;
    white-space:normal !important;
  }

  .site-header .title small{
    display:none;
  }

  .site-header .header-right{
    flex:0 0 auto !important;
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
  }

  /* nav y botón wa ocultos en mobile, solo queda hamburguesa */
  .site-header .header-nav,
  .site-header .header-wa{
    display:none !important;
  }

  .hero{
    display:block;
    width:100%;
    max-width:100%;
    margin:10px auto 8px;
    padding:16px 16px 14px;
    border-radius:18px;
    background:linear-gradient(180deg,#fff9e6 0,#ffffff 45%,#f9fafb 100%);
    box-shadow:0 18px 40px rgba(15,23,42,.20);
    grid-template-columns:1fr;
    gap:0;
  }

  .hero-right{
    margin-top:14px;
  }

  .hero-left h1{
    font-size:1.38rem;
    line-height:1.16;
    word-break:break-word;
    margin-bottom:6px;
  }

  .hero-left p{
    font-size:.86rem;
    margin-bottom:10px;
  }

  .badges{
    gap:6px;
    margin-bottom:10px;
  }

  .metrics{
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    gap:8px;
    padding-bottom:4px;
    margin-bottom:14px;
  }

  .metrics::-webkit-scrollbar{display:none;}
  .metric{min-width:140px;}

  .hero-ctas{
    flex-direction:column;
    margin-top:6px;
  }

  .hero-ctas .btn-ml,
  .hero-ctas .btn-secondary{
    width:100%;
    justify-content:center;
    text-align:center;
  }

  .hero-search{
    margin-top:12px;
  }

  .hero-search-row{
    flex-direction:column;
  }

  .hero-search-btn{
    width:100%;
    text-align:center;
  }

  .hero-mobile-cta{
    margin-top:16px;
    border-radius:14px;
    background:#020617;
    color:#f9fafb;
    border:1px solid rgba(15,23,42,.7);
  }

  .hero-mobile-cta h2{
    font-size:.9rem;
    letter-spacing:.08em;
    color:#fde68a;
  }

  .hero-mobile-cta p{
    color:#e5e7eb;
    font-size:.8rem;
  }

  .hero-mobile-cta .btn-ml{
    background:var(--ml);
    color:#111;
  }

  .hero-mobile-cta .btn-secondary{
    border-color:#4b5563;
    color:#e5e7eb;
    background:transparent;
  }

  .items-grid,
  .product-grid{
    grid-template-columns:1fr;
    gap:14px;
  }

  .item,
  .p-card,
  .card,
  .info-card{
    width:100%;
    max-width:100%;
    margin:0;
  }

  .searchline{
    flex-direction:column;
    gap:6px;
  }

  .searchline input,
  .searchline .btn{
    width:100%;
  }

  .panel{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    top:auto;
    border-radius:20px 20px 0 0;
    padding:18px 18px calc(18px + env(safe-area-inset-bottom));
    z-index:9999;
  }

  .panel .apply{
    position:sticky;
    bottom:0;
    padding-top:6px;
    background:#fff;
  }

  footer{
    padding-top:22px;
    padding-bottom:22px;
  }

  .item h3{
    font-size:1rem;
  }
  .item p{
    font-size:.8rem;
  }
}

/* ===== EXTRA SMALL ( <= 430px ) ===== */
@media (max-width:430px){
  html, body{
    margin:0;
    padding:0;
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  .topbar,
  .section,
  footer .foot{
    padding-left:12px;
    padding-right:12px;
  }

  .site-header .topbar{
    gap:8px;
  }

  .site-header .title strong{
    font-size:.86rem;
  }

  .hero{
    margin-top:8px;
    padding:14px 14px 12px;
  }

  .hero-left h1{
    font-size:1.3rem;
    line-height:1.15;
  }

  .hero-left p{
    font-size:.84rem;
  }
}

/* ===== VISIBILIDAD POR DISPOSITIVO ===== */
.only-desktop{display:block;}
.only-mobile{display:none;}

@media (max-width:480px){
  .only-desktop{display:none;}
  .only-mobile{display:block;}
}

/* ===== BOTÓN FLOTANTE WHATSAPP MOBILE ===== */
.wa-fab-mobile{
  position:fixed;
  left:12px;
  right:12px;
  bottom:12px;
  z-index:9999;
  background:var(--wa);
  color:#fff;
  text-align:center;
  padding:12px 14px;
  border-radius:999px;
  font-weight:800;
  font-size:.88rem;
  box-shadow:0 10px 24px rgba(0,0,0,.25);
  display:none;
}

/* solo móviles */
@media (max-width:620px){
  .wa-fab-mobile{
    display:block;
  }

  body{
    padding-bottom:64px;
  }
}

/* ocultar en escritorio */
@media (min-width:621px){
  .wa-fab-mobile{display:none;}
}
/* ===== FIX FINAL VISIBILIDAD HEADER ===== */
.site-header .only-desktop{
  display:flex;
}
.site-header .only-mobile{
  display:none;
}

@media (max-width:768px){
  .site-header .only-desktop{
    display:none !important;
  }
  .site-header .only-mobile{
    display:inline-flex !important;
  }
}

/* ===== FIX FINAL LAYOUT HEADER MOBILE: 2 columnas ===== */
@media (max-width:768px){
  .site-header .topbar{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }

  .site-header .brand{
    flex:1 1 auto;
    min-width:0;
  }

  .site-header .header-right{
    flex:0 0 auto;
  }

  /* que el título pueda quebrar en 2 líneas y no empuje todo */
  .site-header .title strong{
    white-space:normal;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  /* texto chico extra fuera en mobile para que no ensanche */
  .site-header .title small{
    display:none;
  }
} ENTREGA COMPLETA sin alterar lo que no hay que alterar. 

/* ===== REVIEWS (FIX) ===== */
.reviews-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:16px;
}

.review-card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  box-shadow:0 10px 26px rgba(16,24,40,.06);
}

.review-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.review-card .badge{
  background:rgba(245,158,33,.14);
  border:1px solid rgba(245,158,33,.35);
  color:#8a5b0b;
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
  font-size:.68rem;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.review-card .stars{
  color:#f59e0b;
  letter-spacing:.18em;
  font-weight:900;
  font-size:.95rem;
  white-space:nowrap;
}

.review-name{
  margin:0 0 6px;
  font-weight:900;
  font-size:.92rem;
}

.review-text{
  margin:0;
  font-size:.82rem;
  color:#374151;
  line-height:1.45;
}

.review-cta .btn-secondary{
  display:inline-flex;
  margin-top:10px;
}
/* ===== REVIEWS (FIX v2 - compatible con TU theme) ===== */
#opiniones .reviews-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:16px;
}

#opiniones .review-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  box-shadow:0 10px 26px rgba(16,24,40,.06);
}

#opiniones .review-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

#opiniones .review-card .badge{
  background:rgba(243,177,26,.14);
  border:1px solid rgba(243,177,26,.35);
  color:#9a6e08;
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
  font-size:.68rem;
  text-transform:uppercase;
  letter-spacing:.08em;
}

#opiniones .review-card .stars{
  color:#f59e0b;
  letter-spacing:.18em;
  font-weight:900;
  font-size:.95rem;
  white-space:nowrap;
}

#opiniones .review-name{
  margin:0 0 6px;
  font-weight:900;
  font-size:.92rem;
}

#opiniones .review-text{
  margin:0;
  font-size:.82rem;
  color:#374151;
  line-height:1.45;
}

#opiniones .review-cta .btn-secondary{
  display:inline-flex;
  margin-top:10px;
}
/* ===== FIX: separación hero vs header sticky (todas las vistas) ===== */

:root{
  --ap-header-h: 72px;   /* altura aprox header desktop */
  --ap-hero-gap: 18px;   /* aire visual entre header y hero */
}

/* tablet / mobile el header cambia un poco */
@media (max-width:1024px){
  :root{ --ap-header-h: 76px; }
}
@media (max-width:768px){
  :root{ --ap-header-h: 78px; --ap-hero-gap: 14px; }
}
@media (max-width:430px){
  :root{ --ap-header-h: 74px; --ap-hero-gap: 12px; }
}
/* ==========================
   SUBNAV + SCROLL PROGRESS
   ========================== */
:root{
  --ap-subnav-h: 52px;
}

.ap-scroll-progress{
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:3px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}

.ap-scroll-progress-bar{
  width:0%;
  height:100%;
  background:linear-gradient(90deg, var(--ap-brand), var(--ap-brand-2));
  box-shadow:0 0 14px rgba(243,177,26,.55);
  transition:width .12s linear;
}

.ap-subnav{
  position:sticky;
  top: calc(var(--ap-adminbar) + var(--ap-safe-top) + 0px);
  z-index:9997;
  width:100%;
  background:rgba(11,15,20,.92);
  border-bottom:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(10px);
}

.ap-subnav-inner{
  max-width:1180px;
  margin:0 auto;
  min-height:var(--ap-subnav-h);
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 18px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}

.ap-subnav-inner::-webkit-scrollbar{
  display:none;
}

.ap-subnav-link{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 14px;
  border-radius:999px;
  text-decoration:none;
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.04em;
  color:rgba(255,255,255,.78);
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.07);
  transition:all .16s ease;
  white-space:nowrap;
}

.ap-subnav-link:hover{
  color:#fff;
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.12);
}

.ap-subnav-link.is-active{
  color:#111827;
  background:linear-gradient(180deg, #f7c446, #f3b11a);
  border-color:rgba(243,177,26,.65);
  box-shadow:0 10px 22px rgba(243,177,26,.18);
}

@media (max-width:920px){
  .ap-subnav-inner{
    padding:8px 12px;
    gap:8px;
  }

  .ap-subnav-link{
    font-size:.73rem;
    min-height:34px;
    padding:0 12px;
  }
}
/* si estás logueado, WP suma admin bar */
body.admin-bar{
  --ap-adminbar-h: 32px;
}
@media (max-width:782px){
  body.admin-bar{
    --ap-adminbar-h: 46px;
  }
}

/* aplica el offset real */
.hero{
  padding-top: calc(var(--ap-header-h) + var(--ap-hero-gap) + var(--ap-adminbar-h, 0px)) !important;
  margin-top: 0 !important;
}

/* extra: que los anchors no queden tapados por el header */
#catalogo, #quienes-somos, #ubicacion, #top{
  scroll-margin-top: calc(var(--ap-header-h) + var(--ap-hero-gap) + var(--ap-adminbar-h, 0px)) !important;
}
