:root{
  --font-display:'Urbanist', system-ui, sans-serif;   /* una sola fuente para títulos, tarjetas y precios */
  --font-round:'Urbanist', system-ui, sans-serif;
  --font-logo:'Fraunces', Georgia, serif;   /* solo el nombre ocasia.mx */
  --font-body:'Urbanist', system-ui, sans-serif;   /* circular: textos */
  --cream:#f7f7f8;
  --cream-2:#eeeff1;
  --sky-1:#eceef0;
  --sky-2:#f5f6f7;
  --navy:#1a2440;
  --navy-2:#2a3760;
  --sage:#c1c996;
  --sage-dark:#6b7a3a;
  --ink:#1a2440;
  --ink-soft:#56607a;
  --white:#ffffff;
  --gold:#c1c996;
  --radius-lg:28px;
  --radius-md:18px;
  --radius-sm:12px;
  --shadow:0 20px 50px -20px rgba(26,36,64,0.25);
  --shadow-soft:0 10px 30px -12px rgba(26,36,64,0.18);
}

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  font-family:var(--font-body); font-weight:450;
  color:var(--ink);
  background:#ffffff;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%; display:block;}
a{text-decoration:none; color:inherit;}
button{font-family:inherit; cursor:pointer; border:none;}

h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:600;
    line-height:1.08;
  letter-spacing:-0.03em;
  color:var(--navy);
}
/* títulos grandes en letra circular; la palabra clave en letra formal */
h1,h2{ font-family:var(--font-round); letter-spacing:-0.03em; }
h1 em, h2 em{ font-family:inherit; font-style:italic; font-weight:500; letter-spacing:-0.02em; color:inherit; }

.wrap{max-width:1240px; margin:0 auto; padding:0 32px;}

/* ================= HEADER EXACTO A LANDING ================= */
header{
  position:sticky; top:0; z-index:100;
  padding:15px 0 15px 0;
}
.nav-inner{
  max-width:1240px; margin:0 auto; padding:0 32px;
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:nowrap;
}
.logo{
  display:flex; align-items:center; gap:10px;
  font-family:var(--font-logo); letter-spacing:0; font-size:19px; font-weight:500; color:var(--navy);
  /* el nombre va en su propia pastilla, igual que el menú, para que no se pierda al deslizar */
  padding:11px 20px; border-radius:999px;
  background:rgba(255,255,255,0.55); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.6);
}
.logo .mark{
  width:30px; height:30px; border-radius:8px;
  background:var(--navy);
  display:flex; align-items:center; justify-content:center;
  color:var(--cream); font-style:italic; font-size:15px; font-family:var(--font-display);
}
.nav-pill{
  display:flex; gap:6px;
  background:rgba(255,255,255,0.55);
  backdrop-filter:blur(10px);
  padding:6px; border-radius:999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}
.nav-pill a{
  padding:10px 18px; border-radius:999px; font-size:14px; font-weight:500;
  color:var(--navy); transition:background .25s ease, color .25s ease;
}
.nav-pill a.active{background:var(--navy); color:var(--white); box-shadow:0 8px 18px -8px rgba(26,36,64,0.55);}
.nav-pill a:not(.active):hover{background:rgba(193,201,150,0.35);}
.menu-toggle{display:none; width:42px; height:42px; border-radius:30%; background:var(--white); align-items:center; justify-content:center; box-shadow:var(--shadow-soft); margin:5px;}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after{
  content:''; display:block; width:16px; height:1.5px; background:var(--navy); position:relative; transition:all .25s ease;
}
.menu-toggle span::before{position:absolute; top:-5px;}
.menu-toggle span::after{position:absolute; top:5px;}
.menu-toggle.is-active span{background:transparent;}
.menu-toggle.is-active span::before{top:0; transform:rotate(45deg);}
.menu-toggle.is-active span::after{top:0; transform:rotate(-45deg);}
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:13px 22px; border-radius:999px; font-size:14px; font-weight:600;
  transition:transform .25s ease, box-shadow .25s ease, background .25s ease;
  white-space:nowrap; cursor:pointer;
}
.btn svg{transition:transform .25s ease;}
.btn:hover svg{transform:translateX(3px);}
.btn-dark{background:var(--navy); color:var(--white); box-shadow:0 12px 26px -12px rgba(26,36,64,0.7);}
.btn-dark:hover{background:var(--navy-2); box-shadow:0 16px 30px -12px rgba(26,36,64,0.75), 0 0 0 4px rgba(193,201,150,0.45); transform:translateY(-2px);}
.btn-outline{background:transparent; color:var(--navy); box-shadow:inset 0 0 0 1.5px var(--navy);}
.btn-outline:hover{background:var(--navy); color:var(--white); transform:translateY(-2px);}

/* ================= HERO DEL CATÁLOGO ================= */
.page-hero{
  position:relative;
  padding:22px 0 16px;
  background:linear-gradient(180deg, #f1f2f4 0%, #f8f8f9 55%, #ffffff 100%);
  overflow:hidden;
  text-align:left;
}
.crumbs{
  position:relative; z-index:2;
  display:flex; align-items:center; gap:8px; margin-bottom:22px;
  font-size:13px; color:var(--ink-soft);
}
.crumbs a{text-decoration:underline; text-underline-offset:2px;}
.crumbs a:hover{color:var(--navy);}
.crumbs [aria-current]{color:var(--navy); font-weight:600;}
.page-hero::before{
  content:'';
  position:absolute; inset:0;
  background:
    radial-gradient(ellipse 800px 400px at 15% 10%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(ellipse 600px 500px at 90% 30%, rgba(255,255,255,0.4), transparent 60%);
  pointer-events:none;
}
.hero-content{
  position:relative; z-index:2; max-width:760px;
}
.page-hero h1{
  font-size:clamp(32px, 4.8vw, 52px); margin-bottom:12px;
}
.page-hero p{
  font-size:16px; color:var(--ink-soft); line-height:1.6;
}

/* ================= GALERÍA DE DEMOS ================= */
.cards-section{
  background:#ffffff; padding:16px 0 60px;
}
[hidden]{display:none !important;}
select{font-family:inherit; cursor:pointer; border:none;}

/* Disposición: panel de filtros a la izquierda, resultados a la derecha */
.catalog{
  display:grid; grid-template-columns:260px minmax(0, 1fr); gap:40px; align-items:start;
}
.filters-panel{
  position:sticky; top:calc(var(--hdr, 80px) + 16px);
  max-height:calc(100vh - var(--hdr, 80px) - 32px); overflow-y:auto;
  padding-right:6px; scrollbar-width:thin;
}
.fp-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px;}
.fp-head h2{font-size:22px;}
.link-clear{
  background:none; padding:6px 0; font-size:13px; font-weight:600; color:var(--ink-soft);
  text-decoration:underline; text-underline-offset:2px;
}
.link-clear:hover{color:var(--navy);}

/* Secciones de filtros y casillas */
.fsec{border-top:1px solid rgba(26,36,64,0.10); padding:18px 0 14px;}
.fhead{
  font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-soft); margin:0 0 10px;
}
/* encabezado plegable (Ocasión, Estilo) */
.fhead-btn{
  display:flex; align-items:center; gap:8px; width:100%; min-height:32px; padding:0;
  background:none; text-align:left; font-family:inherit;
}
.fhead-btn:hover{color:var(--navy);}
.fhead-btn svg{margin-left:auto; transition:transform .25s ease;}
.fhead-n{
  min-width:20px; height:20px; padding:0 6px; border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--navy); color:var(--white); font-size:11px; letter-spacing:0;
}
.fsec.is-closed .fhead{margin-bottom:0;}
.fsec.is-closed .fhead-btn svg{transform:rotate(-90deg);}
.fsec.is-closed .fsec-body{display:none;}
.ck{
  display:flex; align-items:center; gap:10px; min-height:36px; padding:2px 6px; margin:0 -6px;
  font-size:14.5px; color:var(--navy); cursor:pointer; border-radius:10px;
}
.ck:hover{background:var(--cream);}
.ck input{width:18px; height:18px; accent-color:var(--navy); margin:0; flex-shrink:0; cursor:pointer;}
.ck .n{margin-left:auto; font-size:12.5px; color:var(--ink-soft);}
.ck.parent{font-weight:600;}
.ck.child{padding-left:34px; font-size:13.5px;}

/* Barra de resultados: conteo, orden y pastillas activas */
.results-bar{margin-bottom:26px;}
.rb-row{display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:14px;}
.gallery-count{font-size:15px; font-weight:600; color:var(--navy);}
.gallery-count-m{display:none;}
.fbtn{
  display:none; align-items:center; gap:8px; min-height:44px; padding:10px 16px;
  border-radius:999px; background:var(--navy); color:var(--white); font-size:14px; font-weight:600;
}
.fbtn .b{
  min-width:22px; height:22px; padding:0 6px; border-radius:999px;
  background:var(--sage); color:var(--navy); font-size:12px;
  display:inline-flex; align-items:center; justify-content:center;
}
.sort-wrap{display:inline-flex; align-items:center; gap:10px; font-size:13px; color:var(--ink-soft);}
.sort{
  padding:9px 34px 9px 14px; border-radius:999px; background-color:var(--cream); color:var(--navy);
  font-size:13px; font-weight:600; appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a2440' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center;
}
.pills{display:flex; flex-wrap:wrap; gap:8px; align-items:center; min-height:34px;}
.pills-none{font-size:13px; color:var(--ink-soft);}
.apill{
  display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:6px 8px 6px 13px;
  border-radius:999px; background:var(--navy); color:var(--white); font-size:13px; font-weight:600;
  transition:background .2s ease;
}
.apill .x{
  width:22px; height:22px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,0.16); transition:background .2s ease;
}
.apill:hover .x{background:rgba(255,255,255,0.32);}

/* Sin resultados */
.empty-state{
  border-radius:22px; background:var(--cream); padding:40px 28px; text-align:center; margin-bottom:26px;
}
.empty-state .empty-title{font-size:18px; font-weight:600; margin-bottom:6px;}
.empty-state .empty-sub{font-size:14px; color:var(--ink-soft); margin-bottom:16px;}

.cards-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr));
  gap:30px 20px;
}
.template-card{display:flex; flex-direction:column; gap:14px; animation:card-in .4s ease both;}
@keyframes card-in{from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:none;}}
.card-media{
  position:relative; display:block; aspect-ratio:4/5;
  border-radius:var(--radius-md); overflow:hidden; background:var(--cream-2);
  box-shadow:var(--shadow-soft);
}
.card-media img{
  width:100%; height:100%; object-fit:cover; transition:transform .5s ease;
}
.card-media::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(180deg, transparent 55%, rgba(26,36,64,0.55) 100%);
  opacity:0; transition:opacity .3s ease;
}
.card-media:hover img{transform:scale(1.04);}
.card-media:hover::after{opacity:1;}
.card-preview{
  position:absolute; left:50%; bottom:18px; z-index:2;
  transform:translate(-50%, 8px); opacity:0;
  display:inline-flex; align-items:center; gap:6px;
  background:var(--white); color:var(--navy);
  padding:9px 16px; border-radius:999px; font-size:12.5px; font-weight:600;
  white-space:nowrap; transition:opacity .3s ease, transform .3s ease;
}
.card-media:hover .card-preview{opacity:1; transform:translate(-50%, 0);}
.card-pill-tag{
  position:absolute; top:12px; left:12px; z-index:2;
  background:rgba(255,255,255,0.92); backdrop-filter:blur(8px);
  color:var(--navy); padding:5px 11px; border-radius:999px;
  font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em;
}
.card-new{
  position:absolute; top:12px; right:12px; z-index:2;
  background:var(--sage); color:var(--navy); padding:5px 10px; border-radius:999px;
  font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em;
}

.card-cat{
  position:absolute; bottom:12px; left:12px; z-index:2;
  background:rgba(26,36,64,0.78); color:var(--white); padding:5px 10px; border-radius:999px;
  font-size:11px; font-weight:600; transition:opacity .2s ease;
}
.card-media:hover .card-cat{opacity:0;}

.card-info{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
.card-info h3{font-size:21px; margin-bottom:4px;}
.card-info p{font-size:13px; color:var(--ink-soft); line-height:1.5;}
.card-colors{display:flex; gap:4px; padding-top:6px; flex-shrink:0;}
.color-dot{
  width:12px; height:12px; border-radius:50%; border:1px solid rgba(0,0,0,0.12);
}
.card-actions{display:flex; gap:8px; margin-top:auto;}
.card-actions .btn{flex:1; justify-content:center; padding:11px 14px; font-size:13px;}

/* ================= LLAMADA A LA ACCIÓN ================= */
.cta-section{padding:0 0 80px;}
.cta-callout{
  border-radius:var(--radius-lg); background:var(--navy); color:var(--white);
  padding:30px 32px; display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap;
}
.cta-callout h2{font-size:22px; color:var(--white); margin-bottom:4px; letter-spacing:-0.02em;}
.cta-callout p{font-size:14px; opacity:.8;}
.cta-callout .btn{background:var(--sage); color:var(--navy);}
.cta-callout .btn:hover{background:var(--white); transform:translateY(-2px);}

/* ================= HOJA DE FILTROS (MÓVIL) ================= */
.sheet-root{position:fixed; inset:0; z-index:200;}
.sheet-scrim{position:absolute; inset:0; background:rgba(14,19,34,0.45); animation:sheet-fade .25s ease both;}
.sheet{
  position:absolute; left:0; right:0; bottom:0; height:80vh; height:80dvh; max-height:calc(100dvh - 24px);
  background:var(--white); border-radius:26px 26px 0 0;
  display:flex; flex-direction:column; outline:none;
  animation:sheet-up .32s cubic-bezier(.2,.8,.2,1) both;
}
.sheet-root.is-closing .sheet-scrim{animation:sheet-fade-out .25s ease both;}
.sheet-root.is-closing .sheet{animation:sheet-down .25s ease both;}
.sheet-grip{display:block; width:40px; height:5px; border-radius:999px; background:#d9dbe0; margin:10px auto 2px;}
.sheet-head{display:flex; align-items:center; justify-content:space-between; padding:8px 18px 10px;}
.sheet-head h2{font-size:22px;}
.sheet-x{
  width:44px; height:44px; border-radius:50%; background:var(--cream); color:var(--navy);
  display:flex; align-items:center; justify-content:center;
}
.sheet-body{flex:1; overflow-y:auto; padding:0 18px; overscroll-behavior:contain;}
.sheet-body .ck{min-height:44px; gap:12px; font-size:15px;}
.sheet-body .ck input{width:20px; height:20px;}
.sheet-body .ck .n{font-size:13px;}
.sheet-body .ck.child{padding-left:38px; font-size:14px;}
.sheet-foot{display:flex; gap:10px; padding:12px 18px 18px; border-top:1px solid rgba(26,36,64,0.10);}
.sheet-foot .btn{flex:1; justify-content:center; min-height:48px;}
.sheet-foot .btn-dark{flex:1.6;}
@keyframes sheet-fade{from{opacity:0;} to{opacity:1;}}
@keyframes sheet-fade-out{from{opacity:1;} to{opacity:0;}}
@keyframes sheet-up{from{transform:translateY(100%);} to{transform:none;}}
@keyframes sheet-down{from{transform:none;} to{transform:translateY(100%);}}
html.sheet-open, body.sheet-open{overflow:hidden;}

/* ================= FOOTER ================= */
footer{
  background:#ffffff; border-top:1px solid rgba(26,36,64,0.08); padding:36px 0;
  text-align:center; color:var(--ink-soft); font-size:13px;
}

@media(hover:none){
  .card-media::after, .card-preview{display:none;}
}

@media(min-width:901px){
  .sheet-root{display:none !important;}
}
@media(max-width:900px){
  .catalog{grid-template-columns:minmax(0, 1fr); gap:0; --g:32px;}
  .filters-panel{display:none;}
  /* barra pegajosa: botón Filtros, orden y pastillas.
     Sube por detrás de la barra de vidrio del menú para que ambas queden pegadas, sin hueco entre ellas */
  .results-bar{
    position:sticky; top:calc(var(--hdr-bar, 64px) - 24px); z-index:20;
    margin:-24px calc(var(--g) * -1) 0; padding:34px var(--g) 0;
    background:rgba(255,255,255,0.95); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
    border-bottom:1px solid rgba(26,36,64,0.08);
  }
  .rb-row{flex-wrap:nowrap; margin-bottom:10px;}
  .rb-row .gallery-count{display:none;}
  .fbtn{display:inline-flex;}
  .sort-wrap{margin-left:auto;}
  .sort-wrap > span{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
  .sort{min-height:44px; padding-top:10px; padding-bottom:10px;}
  .pills{flex-wrap:nowrap; overflow-x:auto; min-height:0; padding-bottom:10px; scrollbar-width:none;}
  .pills::-webkit-scrollbar{display:none;}
  .pills.is-empty{display:none;}
  .apill{flex:0 0 auto; white-space:nowrap; background:var(--cream-2); color:var(--navy); font-size:12.5px; min-height:36px; padding:6px 8px 6px 12px;}
  .apill .x{width:20px; height:20px; background:rgba(26,36,64,0.1);}
  .apill:hover .x{background:rgba(26,36,64,0.2);}
  .gallery-count-m{display:block; font-size:13px; font-weight:600; color:var(--navy); padding:14px 0 14px;}
  .cta-callout{padding:24px 22px;}
}
@media(max-width:768px){
  .wrap{padding:0 20px;}
  .catalog{--g:20px;}
  .cards-section{padding-top:0;}
  .page-hero{padding:6px 0 28px;}
  .crumbs{font-size:12px; margin-bottom:12px;}
  .page-hero p{font-size:14px; line-height:1.55;}
  .cards-grid{grid-template-columns:repeat(2, minmax(0, 1fr)); gap:24px 12px;}
  .card-info h3{font-size:17px;}
  .card-info p{font-size:12.5px; line-height:1.45;}
  .card-colors{display:none;}
  .card-actions{flex-direction:column; gap:6px;}
  .card-actions .btn{min-height:40px; padding:9px 12px; font-size:12.5px;}
  .card-pill-tag, .card-new{top:8px; padding:4px 8px; font-size:9.5px; letter-spacing:0.05em;}
  .card-pill-tag{left:8px; max-width:calc(100% - 64px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .card-new{right:8px;}
  .card-cat{bottom:8px; left:8px; padding:4px 8px; font-size:10.5px;}
  .cta-section{padding-bottom:50px;}
}
/* encabezado móvil igual al del landing: barra de vidrio con botón de menú */
@media(max-width:720px){
  .nav-pill{display:none;}
  .menu-toggle{display:flex; flex-shrink:0;}
  .nav-inner{position:relative; padding:0 20px; margin:0 8px; border-radius:4rem;}
  .nav-inner::before{
    content:''; position:absolute; inset:0; z-index:-1; border-radius:inherit;
    background:rgba(255,255,255,0.62);
    backdrop-filter:blur(18px) saturate(180%);
    -webkit-backdrop-filter:blur(18px) saturate(180%);
    border:1px solid rgba(255,255,255,0.7);
    box-shadow:0 10px 30px -14px rgba(26,36,64,0.35), inset 0 1px 0 rgba(255,255,255,0.8);
  }
  .logo{font-size:16px; gap:8px; padding:0; background:none; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none;}
  .nav-pill.mobile-open{
    display:flex; flex-direction:column; align-items:stretch; gap:4px;
    position:absolute; top:63px; left:12px; right:12px;
    background:rgba(255,255,255,0.78);
    backdrop-filter:blur(22px) saturate(180%);
    -webkit-backdrop-filter:blur(22px) saturate(180%);
    padding:10px;
    border-radius:24px;
    border:1px solid rgba(255,255,255,0.75);
    box-shadow:0 24px 48px -16px rgba(26,36,64,0.4), inset 0 1px 0 rgba(255,255,255,0.85);
    z-index:200;
  }
  .nav-pill.mobile-open a{padding:13px 16px; text-align:center; background:transparent; color:var(--navy); font-weight:600;}
  .nav-pill.mobile-open a:not(.active):hover{background:rgba(255,255,255,0.6);}
  .nav-pill.mobile-open a.active{background:var(--navy); color:#fff;}
}
@media(max-width:420px){
  .logo{font-size:14.5px;}
  .menu-toggle{width:38px; height:38px;}
}
@media(max-width:340px){
  .cards-grid{grid-template-columns:1fr;}
}
@media (prefers-reduced-motion: reduce){
  .template-card, .sheet, .sheet-scrim{animation:none !important;}
  .card-media img, .card-preview, .card-media::after{transition:none !important;}
}
