/* =========================================================================
   MAISON COMTESSE — Hoja de estilos
   Paleta y tipografías tomadas del Brandbook oficial.
   ========================================================================= */

/* ---------- Fuentes de marca ---------- */
@font-face { font-family: 'Cormorant'; src: url('fonts/CormorantGaramond.ttf') format('truetype'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('fonts/CormorantGaramond-Italic.ttf') format('truetype'); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'AvenirNext'; src: url('fonts/AvenirNext-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'AvenirNext'; src: url('fonts/AvenirNext-DemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Faith'; src: url('fonts/Faith.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- Variables de marca ---------- */
:root {
  --burgundy: #2B040F;
  --burgundy-soft: #3d0a18;
  --ivory: #EDEAE8;
  --ivory-deep: #e3ded9;
  --ink: #1A1A1A;
  --black: #000000;
  --white: #FFFFFF;
  --silver: #b9b4ae;
  --line: rgba(43, 4, 15, 0.16);
  --line-light: rgba(237, 234, 232, 0.22);
  --serif: 'Cormorant', Georgia, serif;
  --sans: 'AvenirNext', 'Helvetica Neue', Arial, sans-serif;
  --script: 'Faith', 'Cormorant', cursive;
  --maxw: 1240px;
  --radius: 2px;
  --shadow: 0 18px 50px rgba(26, 4, 10, 0.14);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: .01em; }
.eyebrow { font-family: var(--sans); font-weight: 600; font-size: .7rem; letter-spacing: .32em; text-transform: uppercase; }
.script { font-family: var(--script); font-weight: 400; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(237, 234, 232, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup .logo-mark { height: 32px; width: auto; }
.brand-lockup .logo-wm { height: 17px; width: auto; }
.brand-lockup .logo-light { display: none; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--burgundy); transition: opacity .2s, color .25s; }
.nav-links a:hover { opacity: .55; }
.btn-quote-top { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--burgundy); padding: 9px 18px; border-radius: var(--radius); font-size: .7rem !important; transition: all .25s; }
.btn-quote-top:hover { background: var(--burgundy); color: var(--ivory) !important; opacity: 1 !important; }
.btn-quote-top .badge { background: var(--burgundy); color: var(--ivory); border-radius: 50%; font-size: .62rem; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; font-family: var(--sans); font-weight: 600; }
.btn-quote-top:hover .badge { background: var(--ivory); color: var(--burgundy); }
.nav-toggle { display: none; font-size: 1.5rem; color: var(--burgundy); }

/* Header transparente sobre el hero, sólido al bajar */
.site-header.transparent:not(.scrolled) { background: transparent; backdrop-filter: none; border-bottom-color: transparent; }
.site-header.transparent:not(.scrolled) .brand-name,
.site-header.transparent:not(.scrolled) .nav-links a,
.site-header.transparent:not(.scrolled) .nav-toggle { color: var(--ivory); }
.site-header.transparent:not(.scrolled) .logo-dark { display: none; }
.site-header.transparent:not(.scrolled) .logo-light { display: block; }
.site-header.transparent:not(.scrolled) .btn-quote-top { border-color: rgba(237,234,232,.7); color: var(--ivory); }
.site-header.transparent:not(.scrolled) .btn-quote-top:hover { background: var(--ivory); color: var(--burgundy) !important; border-color: var(--ivory); }
.site-header { transition: background .3s, border-color .3s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  padding: 15px 30px; border-radius: var(--radius); transition: all .25s ease; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--burgundy); color: var(--ivory); }
.btn-primary:hover { background: var(--burgundy-soft); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--burgundy); border-color: var(--burgundy); }
.btn-ghost:hover { background: var(--burgundy); color: var(--ivory); }
.btn-ivory { background: var(--ivory); color: var(--burgundy); }
.btn-ivory:hover { background: var(--white); }
.btn-sm { padding: 10px 18px; font-size: .66rem; }
.btn-wa { background: #1f7a45; color: #fff; }
.btn-wa:hover { background: #196638; }

/* ---------- Hero (banner de marca) ---------- */
.hero { position: relative; margin-top: -72px; height: 100vh; min-height: 560px; max-height: 940px; overflow: hidden; background: #1a1416; }
.hero-media { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.hero-actions { position: absolute; left: 0; right: 0; bottom: 16%; display: flex; justify-content: center; z-index: 3; }
.hero-actions .btn { box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3; color: var(--ivory); font-size: 1.8rem; line-height: 1; opacity: .8; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }

/* ---------- Section base ---------- */
.section { padding: 92px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.section-head .eyebrow { color: var(--burgundy); opacity: .7; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3rem); color: var(--burgundy); margin: 14px 0 10px; }
.section-head p { color: rgba(26,26,26,.7); }
.rule { width: 46px; height: 1px; background: var(--burgundy); opacity: .4; margin: 18px auto 0; }

/* ---------- Concept ---------- */
.concept { background: var(--ivory-deep); }
.concept .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 20px; }
.concept .card { text-align: center; padding: 34px 24px; background: var(--ivory); border: 1px solid var(--line); }
.concept .card .val { font-family: var(--serif); font-size: 1.5rem; color: var(--burgundy); letter-spacing: .04em; }
.concept .card p { font-size: .9rem; color: rgba(26,26,26,.72); margin-top: 8px; }

/* ---------- Catálogo / filtros ---------- */
.catalog { background: var(--ivory); }
.controls { position: sticky; top: 72px; z-index: 40; background: var(--ivory); padding: 18px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.search-row { display: flex; gap: 12px; align-items: center; max-width: 560px; margin: 0 auto 18px; }
.search-row input {
  flex: 1; font-family: var(--sans); font-size: .92rem; padding: 13px 18px; border: 1px solid var(--line);
  background: var(--white); color: var(--ink); border-radius: var(--radius); outline: none;
}
.search-row input:focus { border-color: var(--burgundy); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  font-family: var(--sans); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 9px 16px; border: 1px solid var(--line); color: var(--burgundy); background: transparent;
  border-radius: 40px; transition: all .2s; white-space: nowrap;
}
.chip:hover { border-color: var(--burgundy); }
.chip.active { background: var(--burgundy); color: var(--ivory); border-color: var(--burgundy); }

/* ---------- Category block ---------- */
.cat-block { margin-bottom: 68px; scroll-margin-top: 150px; }
.cat-title { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.cat-title img { height: 46px; width: auto; }
.cat-title .txt h3 { font-size: 1.9rem; color: var(--burgundy); }
.cat-title .txt span { font-family: var(--sans); font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(26,26,26,.55); }

/* ---------- Product grid ---------- */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .25s, transform .25s;
}
.product:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.product .ph {
  position: relative; aspect-ratio: 1 / 1; background: var(--white);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
}
.product .ph img.photo { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.product .ph .ph-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background:
   repeating-linear-gradient(135deg, #fff, #fff 12px, #fcfbfa 12px, #fcfbfa 24px); }
.product .ph .ph-empty img { width: 42%; opacity: .10; }
.product .badge-ribbon { position: absolute; top: 10px; left: 10px; background: var(--burgundy); color: var(--ivory); font-family: var(--sans); font-size: .54rem; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 2px; }
.product .body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.product .body h4 { font-size: 1.16rem; color: var(--burgundy); line-height: 1.14; }
.product .body .desc { font-size: .8rem; color: rgba(26,26,26,.66); margin-top: 6px; flex: 1; }
.product .price-row { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.product .price { font-family: var(--serif); font-size: 1.28rem; color: var(--ink); font-weight: 600; }
.product .price small { font-family: var(--sans); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(26,26,26,.5); font-weight: 600; }
.product select.variant { margin-top: 12px; width: 100%; font-family: var(--sans); font-size: .82rem; padding: 9px 12px; border: 1px solid var(--line); background: var(--ivory); border-radius: var(--radius); color: var(--ink); }
.product .add { margin-top: 12px; width: 100%; }
.product.sold-out { opacity: .55; }
.product.sold-out .add { pointer-events: none; }
.soldout-tag { font-family: var(--sans); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: #8a6b6b; text-align: center; padding: 12px 0 2px; }

.empty-state { text-align: center; padding: 60px 0; color: rgba(26,26,26,.55); font-style: italic; font-family: var(--serif); font-size: 1.3rem; }

/* ---------- Gift box teaser ---------- */
.giftteaser { background: var(--burgundy); color: var(--ivory); }
.giftteaser .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.giftteaser .ph { aspect-ratio: 4/3; background: repeating-linear-gradient(135deg, #350713, #350713 14px, #2b040f 14px, #2b040f 28px); border: 1px solid var(--line-light); display: flex; align-items: center; justify-content: center; }
.giftteaser .ph img { width: 40%; opacity: .5; }
.giftteaser h2 { color: var(--ivory); font-size: clamp(2rem,4vw,2.8rem); }
.giftteaser .eyebrow { color: var(--silver); }
.giftteaser p { color: rgba(237,234,232,.82); margin: 18px 0 26px; }

/* ---------- Domicilio / info band ---------- */
.infoband { background: var(--ink); color: var(--ivory); }
.infoband .container { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; text-align: center; }
.infoband .item .eyebrow { color: var(--silver); }
.infoband .item h4 { color: var(--ivory); font-size: 1.4rem; margin: 10px 0 6px; }
.infoband .item p { color: rgba(237,234,232,.72); font-size: .88rem; }

/* ---------- Contacto ---------- */
.contact { background: var(--ivory-deep); }
.contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; }
.contact form { display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-family: var(--sans); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--burgundy); margin-bottom: 7px; }
.field input, .field textarea { width: 100%; font-family: var(--sans); font-size: .95rem; padding: 13px 16px; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); outline: none; color: var(--ink); }
.field input:focus, .field textarea:focus { border-color: var(--burgundy); }
.field textarea { min-height: 120px; resize: vertical; }
.contact .aside h3 { font-size: 1.8rem; color: var(--burgundy); margin-bottom: 16px; }
.contact .aside .line { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact .aside .line .k { font-family: var(--sans); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(26,26,26,.55); width: 92px; }
.contact .aside .line .v { font-family: var(--serif); font-size: 1.15rem; color: var(--burgundy); }

/* ---------- Footer ---------- */
.site-footer { background: var(--burgundy); color: var(--ivory); padding: 60px 0 30px; text-align: center; }
.site-footer img.emblem { width: 70px; margin: 0 auto 18px; opacity: .95; }
.site-footer .fname { font-family: var(--serif); font-size: 1.6rem; letter-spacing: .18em; }
.site-footer .fsub { font-family: var(--sans); font-size: .58rem; letter-spacing: .4em; text-transform: uppercase; color: var(--silver); margin-top: 6px; }
.site-footer .flinks { display: flex; gap: 26px; justify-content: center; margin: 26px 0 18px; flex-wrap: wrap; }
.site-footer .flinks a { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(237,234,232,.8); }
.site-footer .flinks a:hover { color: var(--ivory); }
.site-footer .copy { font-size: .68rem; color: rgba(237,234,232,.5); letter-spacing: .06em; margin-top: 14px; }

/* ---------- Cotizador (drawer) ---------- */
.fab { position: fixed; right: 22px; bottom: 22px; z-index: 70; display: flex; flex-direction: column; gap: 12px; }
.fab button { box-shadow: var(--shadow); border-radius: 50px; }
.fab .fab-quote { background: var(--burgundy); color: var(--ivory); padding: 15px 22px; display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-weight: 600; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.fab .fab-quote .badge { background: var(--ivory); color: var(--burgundy); border-radius: 50%; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: .66rem; }

.drawer-overlay { position: fixed; inset: 0; background: rgba(26,4,10,.5); opacity: 0; visibility: hidden; transition: .3s; z-index: 80; }
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw; background: var(--ivory);
  z-index: 90; transform: translateX(100%); transition: transform .32s ease; display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(0,0,0,.2);
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 22px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { font-size: 1.5rem; color: var(--burgundy); }
.drawer-head .x { font-size: 1.5rem; color: var(--burgundy); line-height: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 24px; }
.drawer-empty { text-align: center; color: rgba(26,26,26,.5); font-family: var(--serif); font-style: italic; font-size: 1.2rem; padding: 50px 10px; }
.q-item { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.q-item .qi-main { flex: 1; }
.q-item .qi-name { font-family: var(--serif); font-size: 1.08rem; color: var(--burgundy); line-height: 1.1; }
.q-item .qi-var { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(26,26,26,.5); margin-top: 2px; }
.q-item .qi-price { font-family: var(--serif); font-weight: 600; margin-top: 4px; }
.q-item .qi-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.q-item .qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 40px; }
.q-item .qty button { width: 28px; height: 28px; font-size: 1rem; color: var(--burgundy); }
.q-item .qty span { min-width: 26px; text-align: center; font-family: var(--sans); font-size: .85rem; }
.q-item .remove { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: #9a6a6a; }
.drawer-foot { border-top: 1px solid var(--line); padding: 20px 24px; background: var(--ivory-deep); }
.sumline { display: flex; justify-content: space-between; font-size: .9rem; padding: 4px 0; color: rgba(26,26,26,.75); }
.sumline.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.sumline.total .k { font-family: var(--serif); font-size: 1.15rem; color: var(--burgundy); }
.sumline.total .v { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--burgundy); }
.drawer-foot .btn { width: 100%; margin-top: 14px; }
.drawer-foot .mini { font-size: .68rem; color: rgba(26,26,26,.55); text-align: center; margin-top: 10px; }
.incentive { background: #e8f0e8; border: 1px solid #c9ddc9; color: #1f5c37; font-size: .72rem; padding: 10px 12px; border-radius: 4px; margin-bottom: 12px; text-align: center; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--ivory); padding: 12px 22px; border-radius: 40px; font-size: .8rem; letter-spacing: .04em; z-index: 100; opacity: 0; visibility: hidden; transition: .3s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------- Simple page hero (gift box / interiores) ---------- */
.page-hero { background: var(--burgundy); color: var(--ivory); padding: 60px 0; text-align: center; }
.page-hero .eyebrow { color: var(--silver); }
.page-hero h1 { color: var(--ivory); font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 12px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--silver); margin-bottom: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .concept .grid { grid-template-columns: 1fr; }
  .giftteaser .container, .contact .wrap { grid-template-columns: 1fr; }
  .infoband .container { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 720px) {
  .hero { height: 82vh; min-height: 460px; }
  .hero-actions { bottom: 12%; }
  .nav-links { position: fixed; top: 72px; right: 0; width: 74vw; height: calc(100vh - 72px); background: var(--ivory); flex-direction: column; align-items: flex-start; gap: 4px; padding: 26px; transform: translateX(100%); transition: transform .3s; border-left: 1px solid var(--line); }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); font-size: .9rem; }
  /* En el menú móvil abierto, los enlaces siempre en burdeos (aunque el header esté transparente) */
  .site-header.transparent:not(.scrolled) .nav-links.open a { color: var(--burgundy); }
  .nav-toggle { display: block; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product .body h4 { font-size: 1rem; }
  .section { padding: 62px 0; }
  .container { padding: 0 18px; }
  .controls { top: 72px; }
  .cat-title img { height: 36px; }
  .fab .fab-quote span.label { display: none; }
}
@media (max-width: 420px) {
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product .body { padding: 12px; }
}

/* Desplazamiento de anclas para no quedar bajo el header fijo */
section[id] { scroll-margin-top: 84px; }
