:root{
  --navy: #153E6A;
  --navy-deep: #0E2C4E;
  --blue: #3872A2;
  --orange: #C15829;
  --orange-light: #E88A55;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --ink: #16233A;
  --muted: #5B6B7A;
  --line: #E3E8EE;
  --radius: 14px;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:'Inter', sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.5;
}
h1,h2,h3,.brand-word{
  font-family:'Sora', sans-serif;
  margin:0;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
.wrap{max-width:1160px;margin:0 auto;padding:0 24px;}
button{font-family:inherit;cursor:pointer;border:none;background:none;}

/* ---------- Header / navegación ---------- */
header{
  position:sticky; top:0; z-index:50;
  background:rgba(245,247,250,0.94);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  display:flex; align-items:center; gap:14px;
  padding:12px 24px;
  max-width:1160px; margin:0 auto;
}
.logo-lockup{display:flex; align-items:center; gap:10px; margin-right:auto; flex-shrink:0;}
.logo-lockup img{height:40px; width:40px;}
.brand-word{font-size:1.22rem; font-weight:700; color:var(--navy-deep); letter-spacing:-0.01em; white-space:nowrap;}
.brand-word span{color:var(--orange);}

.main-nav{display:flex; align-items:center; gap:1px; flex-shrink:1; min-width:0;}
.main-nav a{
  padding:8px 9px; border-radius:8px; font-size:0.84rem; font-weight:600;
  color:var(--ink); white-space:nowrap;
}
.main-nav a:hover{background:#E9EEF3; color:var(--navy-deep);}
.main-nav a.active{color:var(--orange);}

.menu-toggle{
  display:none; margin-left:auto;
  width:38px; height:38px; align-items:center; justify-content:center;
  border-radius:9px; background:#fff; border:1px solid var(--line);
}
.menu-toggle svg{width:20px;height:20px;}

.mobile-nav{
  display:none;
  flex-direction:column;
  border-top:1px solid var(--line);
  background:#fff;
}
.mobile-nav a{
  padding:14px 24px; font-size:0.98rem; font-weight:600; color:var(--ink);
  border-bottom:1px solid var(--line);
}
.mobile-nav a.active{color:var(--orange);}
.mobile-nav.open{display:flex;}

@media (max-width:1080px){
  .main-nav{display:none;}
  .menu-toggle{display:flex;}
}

/* ---------- Breadcrumb ---------- */
.breadcrumb{
  font-size:0.85rem; color:var(--muted); padding:18px 24px 0;
  max-width:1160px; margin:0 auto;
}
.breadcrumb a{color:var(--blue); font-weight:600;}
.breadcrumb a:hover{text-decoration:underline;}

/* ---------- Hero (inicio) ---------- */
.hero{position:relative; padding:56px 24px 48px; overflow:hidden;}
.hero-inner{
  max-width:1160px; margin:0 auto;
  display:grid; grid-template-columns:1.1fr 0.9fr; gap:40px; align-items:center;
}
.hero-route{display:flex; align-items:center; gap:8px; font-size:0.82rem; font-weight:600; color:var(--blue); margin-bottom:18px;}
.hero-route .dot{width:5px;height:5px;border-radius:50%;background:var(--orange);}
.hero h1{font-size:2.5rem; font-weight:800; color:var(--navy-deep); line-height:1.12; letter-spacing:-0.02em; max-width:560px;}
.hero p.lead{margin-top:18px; font-size:1.05rem; color:var(--muted); max-width:480px;}
.hero-actions{display:flex; gap:14px; margin-top:26px; flex-wrap:wrap;}
.btn-primary{background:var(--orange); color:#fff; padding:13px 26px; border-radius:10px; font-weight:600; font-size:0.95rem; display:inline-block;}
.btn-primary:hover{background:#a94a1f;}
.btn-ghost{padding:13px 22px; border-radius:10px; font-weight:600; font-size:0.95rem; color:var(--navy-deep); border:1px solid var(--line); background:#fff; display:inline-block;}
.btn-ghost:hover{border-color:var(--blue); color:var(--blue);}
.hero-art{position:relative; background:var(--card); border:1px solid var(--line); border-radius:20px; padding:28px; display:flex; flex-direction:column; gap:14px;}
.hero-art .badge{display:inline-flex; align-items:center; gap:6px; font-size:0.75rem; font-weight:600; color:var(--orange); background:#FBEAE0; padding:5px 10px; border-radius:999px; width:fit-content;}
.hero-art .stat-row{display:flex; gap:24px; margin-top:6px;}
.hero-art .stat b{display:block; font-family:'Sora',sans-serif; font-size:1.6rem; color:var(--navy-deep);}
.hero-art .stat span{font-size:0.8rem; color:var(--muted);}
.hero-art .track{margin-top:8px; height:6px; border-radius:999px; background:var(--line); position:relative; overflow:hidden;}
.hero-art .track i{position:absolute; left:0; top:0; bottom:0; width:70%; background:linear-gradient(90deg, var(--blue), var(--orange)); border-radius:999px;}
.hero-art .track-labels{display:flex; justify-content:space-between; font-size:0.72rem; color:var(--muted);}

/* ---------- Hero de categoría (más compacto) ---------- */
.cat-hero{padding:32px 24px 8px;}
.cat-hero .wrap{display:flex; flex-direction:column; gap:6px;}
.cat-hero h1{font-size:1.9rem; font-weight:800; color:var(--navy-deep);}
.cat-hero p{color:var(--muted); font-size:1rem;}

/* ---------- Secciones ---------- */
.section{padding:52px 24px;}
.section-head{display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:26px; flex-wrap:wrap;}
.section-head h2{font-size:1.55rem; font-weight:700; color:var(--navy-deep);}
.section-head p{color:var(--muted); font-size:0.95rem; margin-top:6px;}

/* ---------- Categorías (inicio) ---------- */
.categories-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:18px;}
.category-card{
  background:var(--card); border:1px solid var(--line); border-radius:16px; padding:22px;
  display:flex; flex-direction:column; gap:8px; transition:border-color .15s ease, transform .15s ease;
}
.category-card:hover{border-color:var(--blue); transform:translateY(-2px);}
.category-card .cat-icon{
  width:42px;height:42px;border-radius:11px;background:#EAF1F7;
  display:flex; align-items:center; justify-content:center; color:var(--blue);
}
.category-card h3{font-size:1.05rem; font-weight:700; color:var(--navy-deep); margin-top:6px;}
.category-card p{font-size:0.85rem; color:var(--muted);}
.category-card .go{font-size:0.82rem; font-weight:600; color:var(--orange); margin-top:auto; padding-top:10px;}

/* ---------- Promos / destacados ---------- */
.destacados{background:var(--navy-deep);}
.destacados .section-head h2, .destacados .section-head p{color:#fff;}
.destacados .section-head p{color:#B9C6D6;}
.destacados-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:18px;}
.destacado-card{background:#1D4A78; border:1px solid #2A5A8C; border-radius:16px; padding:20px; color:#fff; position:relative; display:flex; flex-direction:column;}
.destacado-card .dest-top{display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-bottom:14px;}
.destacado-card .tag{display:inline-block; font-size:0.72rem; font-weight:700; color:var(--navy-deep); background:var(--orange-light); padding:4px 10px; border-radius:999px;}
.destacado-card .dest-footer{margin-top:auto; padding-top:16px;}
.destacado-card .btn-whatsapp{background:var(--orange); font-size:0.84rem; padding:11px 8px; gap:6px; white-space:nowrap;}
.destacado-card .btn-whatsapp:hover{background:#a94a1f;}
.destacado-card .ph-img{height:110px; border-radius:10px; background:#0E2C4E; display:flex; align-items:center; justify-content:center; color:#5C7EA3; font-size:0.78rem; margin-bottom:14px; border:1px dashed #3A6690;}
.destacado-card h3{font-size:1.0rem; font-weight:600; margin-bottom:4px;}
.destacado-card .price{font-family:'Sora',sans-serif; font-size:1.25rem; font-weight:700; color:var(--orange-light); margin-top:8px;}
.destacado-card .cat-label{font-size:0.72rem; color:#9FB4CB; margin-top:2px;}

/* ---------- Filtro de catálogo ---------- */
.filter-bar{display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:26px;}
#searchForm{flex:1 1 220px; max-width:280px;}
.search-wrap{position:relative; width:100%;}
#searchInput{
  width:100%; padding:10px 36px 10px 14px; border:1px solid var(--line); border-radius:999px;
  background:#fff; font-size:0.92rem; color:var(--ink);
}
#searchInput::-webkit-search-cancel-button{display:none;}
#searchInput:focus{outline:2px solid var(--blue); outline-offset:1px;}
#clearSearch{
  display:none; position:absolute; right:6px; top:50%; transform:translateY(-50%);
  width:24px; height:24px; border-radius:50%; background:var(--line); color:var(--muted);
  font-size:1.05rem; line-height:1; align-items:center; justify-content:center; padding:0;
}
#clearSearch.show{display:flex;}
#clearSearch:hover{background:var(--blue); color:#fff;}
#subcategoryFilter{
  padding:10px 14px; border:1px solid var(--line); border-radius:999px; background:#fff;
  font-size:0.92rem; color:var(--ink); flex:0 0 auto;
}
.result-count{font-size:0.85rem; color:var(--muted); margin-left:auto;}

/* ---------- Catálogo (tarjetas de producto) ---------- */
.catalog-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:20px;}
.product-card{background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden; display:flex; flex-direction:column; transition:border-color .15s ease;}
.product-card:hover{border-color:var(--blue);}
.product-ph{position:relative; height:170px; background:#EDF1F5; display:flex; align-items:center; justify-content:center; color:#8FA1B3; font-size:0.8rem; gap:6px; border-bottom:1px solid var(--line);}

/* Etiquetas de estado: "Apartado" (ámbar) y "Vendido" (gris oscuro) */
.status-badge{display:inline-block; font-size:0.72rem; font-weight:700; padding:4px 10px; border-radius:999px; letter-spacing:.02em;}
.status-badge.apartado{background:#FFE9B8; color:#7A4E00;}
.status-badge.vendido{background:#3B4756; color:#fff;}
.product-ph .status-badge{position:absolute; top:10px; right:10px;}
/* Producto vendido: se atenúa y el precio se tacha; apartado: botón secundario */
.product-card.is-vendido .product-ph, .product-card.is-vendido .product-body{opacity:.55;}
.product-card.is-vendido .product-price{text-decoration:line-through;}
.product-card.is-apartado .btn-whatsapp{background:#fff; color:var(--navy); box-shadow:inset 0 0 0 1.5px var(--navy);}
.product-card.is-apartado .btn-whatsapp:hover{background:#EAF1F7;}
.product-body{padding:18px; display:flex; flex-direction:column; gap:8px; flex:1;}
.product-top{display:flex; justify-content:space-between; align-items:flex-start; gap:10px;}
.product-cat{font-size:0.72rem; font-weight:600; color:var(--blue); text-transform:uppercase; letter-spacing:.04em;}
.product-condition{font-size:0.74rem; color:var(--muted);}
.product-title{font-size:1.02rem; font-weight:600; color:var(--navy-deep); margin-top:2px;}
.product-example{font-size:0.7rem; color:var(--orange); font-weight:600;}
.product-price{font-family:'Sora',sans-serif; font-size:1.25rem; font-weight:700; color:var(--navy-deep); margin-top:6px;}
.product-footer{padding:0 18px 18px; margin-top:auto;}
.btn-whatsapp{display:flex; align-items:center; justify-content:center; gap:8px; width:100%; background:var(--navy); color:#fff; padding:11px 14px; border-radius:9px; font-weight:600; font-size:0.9rem;}
.btn-whatsapp:hover{background:var(--navy-deep);}
.btn-whatsapp svg{width:16px;height:16px;flex:none;}
.btn-whatsapp.btn-disabled, .product-card.is-vendido .btn-whatsapp.btn-disabled{background:#E3E8EE; color:#6B7A89; box-shadow:none; cursor:not-allowed; pointer-events:none;}
#emptyState{display:none; text-align:center; padding:48px 20px; color:var(--muted);}
#emptyState p{margin:0 0 16px; font-size:0.95rem;}

/* ---------- Confianza ---------- */
.trust{background:var(--card); border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.trust-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:28px;}
.trust-item{display:flex; flex-direction:column; gap:10px;}
.trust-icon{width:44px; height:44px; border-radius:11px; background:#EAF1F7; display:flex; align-items:center; justify-content:center; color:var(--blue);}
.trust-item h3{font-size:1.05rem; font-weight:600; color:var(--navy-deep);}
.trust-item p{font-size:0.92rem; color:var(--muted);}

/* ---------- Nosotros / FAQ ---------- */
.about-block{max-width:720px;}
.about-block h1{font-size:2.1rem; font-weight:800; color:var(--navy-deep); margin-bottom:18px;}
.about-block p{font-size:1.02rem; color:var(--muted); margin-bottom:14px;}
.faq-item{border-bottom:1px solid var(--line); padding:18px 0;}
.faq-question{display:flex; justify-content:space-between; align-items:center; gap:12px; cursor:pointer; font-weight:600; color:var(--navy-deep); font-size:1rem;}
.faq-question svg{flex:none; width:18px; height:18px; transition:transform .2s ease; color:var(--blue);}
.faq-item.open .faq-question svg{transform:rotate(45deg);}
.faq-answer{max-height:0; overflow:hidden; transition:max-height .2s ease;}
.faq-item.open .faq-answer{max-height:240px;}
.faq-answer p{margin:12px 0 0; color:var(--muted); font-size:0.95rem;}

/* ---------- Footer ---------- */
footer{background:var(--navy-deep); color:#CBD8E6; padding:44px 24px 26px;}
.footer-inner{max-width:1160px;margin:0 auto; display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; border-bottom:1px solid #234A72; padding-bottom:26px;}
.footer-brand{display:flex; align-items:center; gap:10px;}
.footer-brand img{height:32px;width:32px;}
.footer-brand span{font-family:'Sora',sans-serif; font-weight:700; color:#fff; font-size:1.1rem;}
.footer-links{display:flex; gap:34px; flex-wrap:wrap;}
.footer-col h4{font-size:0.82rem; color:#89A0B8; margin-bottom:10px; font-weight:600;}
.footer-col a{display:block; font-size:0.88rem; padding:4px 0; color:#D7E1EC;}
.footer-col a:hover{color:#fff;}
.footer-bottom{max-width:1160px;margin:0 auto; padding-top:18px; font-size:0.8rem; color:#7D93AB; display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px;}

@media (max-width:860px){
  .hero-inner{grid-template-columns:1fr;}
  .hero h1{font-size:2.05rem;}
  .destacados-grid, .categories-grid, .trust-grid{grid-template-columns:repeat(2,1fr);}
  .catalog-grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:600px){
  .header-inner{padding:12px 16px;}
  .destacados-grid, .categories-grid, .trust-grid, .catalog-grid{grid-template-columns:1fr;}
  .hero{padding:40px 16px 36px;}
  .section{padding:40px 16px;}
  .cat-hero{padding:26px 16px 4px;}
  .breadcrumb{padding:14px 16px 0;}
  .filter-bar{flex-direction:column; align-items:stretch;}
  #searchForm{max-width:none;}
  .result-count{margin-left:0;}
}

/* ---- Fotos reales, aviso de stock y galería ---- */
.product-ph{overflow:hidden;}
.prod-img{width:100%; height:100%; object-fit:cover; display:block; cursor:zoom-in;}
.destacado-card .ph-img{overflow:hidden; position:relative;}
.destacado-card .ph-img:has(.prod-img){border:none; background:#0E2C4E;}
.photo-count{position:absolute; left:10px; bottom:10px; background:rgba(0,0,0,.6); color:#fff; font-size:.7rem; padding:3px 8px; border-radius:999px; pointer-events:none;}
.stock-note{display:inline-block; margin-top:6px; font-size:.75rem; font-weight:600; color:#B45309; background:#FEF3C7; padding:2px 8px; border-radius:999px;}
.lightbox{position:fixed; inset:0; z-index:100; background:rgba(0,0,0,.88); display:flex; align-items:center; justify-content:center; padding:20px;}
.lightbox img{max-width:100%; max-height:86vh; border-radius:10px;}
.lb-close,.lb-prev,.lb-next{position:absolute; background:rgba(255,255,255,.15); color:#fff; border:none; width:44px; height:44px; border-radius:50%; font-size:1.8rem; line-height:1; cursor:pointer;}
.lb-close{top:14px; right:14px;} .lb-prev{left:12px; top:50%;} .lb-next{right:12px; top:50%;}
.lb-count{position:absolute; bottom:16px; left:0; right:0; text-align:center; color:#fff; font-size:.85rem;}

/* ---- Fotos: se ven completas (sin recorte), centradas sobre fondo blanco ---- */
.product-ph{height:auto; aspect-ratio:4/3; background:#fff;}
.prod-img{position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#fff;}
.destacado-card .ph-img{height:170px; background:#fff; border:1px solid #3A6690;}
.destacado-card .ph-img:has(.prod-img){border:1px solid #3A6690; background:#fff;}
.destacado-card .ph-img .prod-img{object-fit:contain;}
