/* Brisa · demo de tienda de ropa y accesorios */

/* Fuentes alojadas en el sitio (subconjunto latino) */
@font-face { font-family: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/dmserif-latin.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/manrope-latin.woff2") format("woff2"); }

:root {
  --bg: #FBF8F4;
  --paper: #FFFFFF;
  --soft: #F3EAE3;
  --ink: #2A2421;
  --muted: #6B5F58;
  --line: #E8DDD4;
  --accent: #A8473E;
  --accent-dark: #8A372F;
  --sage: #5E7A63;
  --wa: #25D366;
  --radius: 14px;
  --shadow: 0 24px 48px -28px rgba(42, 36, 33, .4);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  color-scheme: light;
}
@media (min-width: 640px)  { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.no-scroll { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.1; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 8px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }
.icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }
.muted { color: var(--muted); }

.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; padding: 8px var(--gutter); background: var(--ink); color: #E5DAD2; font-size: .82rem; text-align: center; }
.demo-bar p { margin: 0; }
.demo-bar strong { color: #fff; }
.demo-bar a { color: #F2B8A8; font-weight: 700; text-decoration: none; }
.demo-bar a:hover { text-decoration: underline; }
.promo { margin: 0; padding: 7px var(--gutter); background: var(--soft); font-size: .82rem; text-align: center; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.25rem; border: 1.5px solid transparent; border-radius: 999px; font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .15s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .9rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-wa { background: var(--wa); color: #06331A; }
.btn-wa:hover { background: #1FBE5A; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; }

/* Header */
.header { position: sticky; top: 0; z-index: 40; background: rgba(251, 248, 244, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 10px; height: 68px; }
.logo { margin-right: auto; font-family: var(--serif); font-size: 2rem; line-height: 1; text-decoration: none; letter-spacing: -.01em; }
.logo span { color: var(--accent); }
.logo-sm { font-size: 1.3rem; margin-right: .3rem; }
.cart-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; line-height: 20px; text-align: center; }
.cart-count.is-empty { display: none; }
.cart-btn.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.15); } }

.menu-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; }
.menu-btn .i-close { display: none; }
.header.is-open .menu-btn .i-open { display: none; }
.header.is-open .menu-btn .i-close { display: block; }
.nav { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; padding: 8px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s; }
.header.is-open .nav { opacity: 1; visibility: visible; transform: none; }
.nav a { padding: .8rem .25rem; border-bottom: 1px solid var(--line); font-weight: 600; text-decoration: none; }
@media (min-width: 860px) {
  .menu-btn { display: none; }
  .nav { position: static; flex-direction: row; gap: 4px; padding: 0; margin-right: 8px; background: none; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: .5rem .85rem; border: 0; border-radius: 999px; color: var(--muted); }
  .nav a:hover { background: var(--soft); color: var(--ink); }
}

/* Hero */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(28px, 4vw, 48px); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; } }
.eyebrow { margin: 0 0 .8rem; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { max-width: 12ch; margin-bottom: 1rem; font-size: clamp(2.6rem, 1.6rem + 4.6vw, 4.8rem); }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lead { max-width: 32em; margin: 0 0 1.75rem; font-size: clamp(1.02rem, 1rem + .3vw, 1.15rem); color: var(--muted); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 459px) { .hero-ctas .btn { flex: 1 1 100%; } }
.hero-media { position: relative; }
.hero-media img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 24px 24px 120px 24px; box-shadow: var(--shadow); }
.hero-badge { position: absolute; left: -10px; bottom: 28px; margin: 0; padding: .7rem 1rem; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); font-size: .88rem; }
.hero-badge strong { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; color: var(--accent); }
@media (max-width: 899px) { .hero-media img { max-height: 420px; } .hero-badge { left: 12px; } }

.perks { display: grid; gap: 10px; margin: 0 auto; padding-top: 0; padding-bottom: 0; list-style: none; }
@media (min-width: 760px) { .perks { grid-template-columns: repeat(3, 1fr); } }
.perks li { display: flex; align-items: center; gap: .8rem; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: .9rem; color: var(--muted); }
.perks strong { color: var(--ink); }
.perks .icon { width: 26px; height: 26px; color: var(--sage); }

/* Secciones */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--soft); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 18px; }
.section-head h2, .two-col h2, .narrow h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.section-head p { margin: 0; }

/* Catálogo */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: .9rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.toolbar-right { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
@media (min-width: 900px) { .toolbar-right { width: auto; } }
.search { display: flex; flex: 1; align-items: center; gap: .5rem; min-width: 180px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.search .icon { color: var(--muted); }
.search input { width: 100%; padding: .6rem 0; border: 0; background: none; outline: none; }
.select { position: relative; }
.select select { height: 100%; padding: .6rem 2.4rem .6rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); appearance: none; cursor: pointer; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 28px 18px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.product { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.product-media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.product-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s; }
.product:hover .product-media img { transform: scale(1.03); }
.badge { position: absolute; top: 10px; left: 10px; padding: .2rem .6rem; border-radius: 999px; background: var(--paper); font-size: .72rem; font-weight: 800; }
.badge-sale { background: var(--accent); color: #fff; }
.product h3 { font-family: var(--sans); font-size: .98rem; font-weight: 700; line-height: 1.3; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; margin: 0; font-weight: 800; }
.price s { color: var(--muted); font-size: .85rem; font-weight: 500; }
.price.is-sale span { color: var(--accent); }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size { min-width: 36px; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: .78rem; font-weight: 700; cursor: pointer; }
.size:hover { border-color: var(--ink); }
.size[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.add { margin-top: auto; padding: .6rem .8rem; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; font-size: .88rem; font-weight: 700; cursor: pointer; }
.add:hover { background: var(--ink); color: #fff; }
.size-hint { margin: 0; color: var(--accent); font-size: .8rem; font-weight: 600; }
.empty { padding: 40px 0; color: var(--muted); text-align: center; }

/* Tallas */
.two-col { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1.1fr; gap: 56px; } }
.two-col .muted { margin: .8rem 0 1.4rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.size-table { width: 100%; border-collapse: collapse; font-size: .95rem; text-align: center; }
.size-table th, .size-table td { padding: .75rem .6rem; border-bottom: 1px solid var(--line); }
.size-table thead th { background: var(--bg); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.size-table tbody th { font-weight: 800; }
.size-table tr:last-child th, .size-table tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq { display: grid; gap: 10px; margin-top: 20px; }
.faq details { padding: 4px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.faq summary { padding: 14px 0; font-weight: 700; cursor: pointer; }
.faq p { margin: 0 0 16px; color: var(--muted); }

/* Footer */
.footer { padding: 28px 0 96px; border-top: 1px solid var(--line); font-size: .88rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.footer p { display: flex; align-items: baseline; margin: 0; }
.footer a { color: var(--accent); }

/* Carrito */
.drawer { width: min(440px, 100vw); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--bg); color: var(--ink); }
.drawer::backdrop { background: rgba(42, 36, 33, .45); }
.drawer[open] { display: flex; flex-direction: column; animation: slide-in .25s ease-out; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.6rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 28px; }
.cart-empty { margin: 32px 0; color: var(--muted); text-align: center; }
.cart-items { display: grid; gap: 14px; margin: 0 0 18px; padding: 0; list-style: none; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; }
.cart-item img { width: 64px; height: 80px; object-fit: cover; border-radius: 10px; }
.cart-item h3 { font-family: var(--sans); font-size: .92rem; font-weight: 700; }
.cart-item p { margin: 0; color: var(--muted); font-size: .82rem; }
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.qty button { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; }
.qty .icon { width: 14px; height: 14px; }
.qty span { min-width: 22px; font-weight: 700; text-align: center; }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-weight: 800; }
.remove { padding: 4px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.remove:hover { color: var(--accent); }
.free-ship { margin: 0 0 12px; padding: .6rem .8rem; border-radius: 10px; background: color-mix(in srgb, var(--sage) 14%, var(--paper)); color: #3F5A45; font-size: .86rem; font-weight: 600; }
.cart-totals dl { display: grid; gap: 8px; margin: 0 0 22px; }
.cart-totals dl div { display: flex; justify-content: space-between; }
.cart-totals dt { color: var(--muted); }
.cart-totals dd { margin: 0; font-weight: 700; }
.cart-totals .total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.1rem; }
.cart-totals .total dd { font-weight: 800; }
.checkout { display: grid; gap: 12px; }
.checkout h3 { font-size: 1.35rem; }
.field { display: grid; gap: 5px; font-size: .85rem; font-weight: 700; }
.field input { padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-weight: 400; }
.field input:focus { outline: none; border-color: var(--ink); }
.field input[aria-invalid="true"] { border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; border: 0; font-size: .92rem; }
.pay legend { width: 100%; margin-bottom: 6px; font-size: .85rem; font-weight: 700; }
.pay label { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.pay input { accent-color: var(--ink); }
.form-error { margin: 0; padding: .6rem .8rem; border-radius: 10px; background: #FCE8E6; color: #8A2A22; font-size: .86rem; }

.toast { position: fixed; left: 50%; bottom: 88px; z-index: 60; padding: .7rem 1.1rem; border-radius: 999px; background: var(--ink); color: #fff; font-size: .9rem; font-weight: 600; transform: translateX(-50%); box-shadow: var(--shadow); }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .6); }
.wa-float .icon { width: 28px; height: 28px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
