/* MexFia Store — estilos de la tienda
   Monocromo: el color lo ponen los productos. El corte diagonal del bajo de las playeras
   es el único gesto gráfico de la marca y vive en la portada. */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
:root {
  --black: #000;
  --white: #fff;
  --ink-2: #5e5e5e;
  --line: #e7e5e0;
  --panel: #f7f6f3;
  --gold: #b8975a;
  --gold-light: #d6bd8a;
  --gold-deep: #8a6d36;
  --error: #b3121a;
  --ok: #1f6b3a;
  --wrap: 1360px;
  --gut: clamp(16px, 3vw, 40px);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 80px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--black); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-stretch: 112%; font-weight: 600; line-height: 1.12; letter-spacing: 0; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 3.4vw, 44px); }
h2 { font-size: clamp(20px, 2vw, 26px); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.section { padding-block: clamp(32px, 5vw, 64px); }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--black); color: var(--white); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 28px; background: var(--black); color: var(--white); border: 1px solid var(--black); border-radius: 0; font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--black); }
.btn-ghost { background: transparent; color: var(--black); }
.btn-ghost:hover { background: var(--black); color: var(--white); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 14px; }
.btn:disabled { background: var(--line); border-color: var(--line); color: var(--ink-2); cursor: not-allowed; }

/* Encabezado */
.announce { background: var(--black); color: var(--gold-light); text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 9px var(--gut); }
.site-header { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand span { font-weight: 600; font-stretch: 125%; font-size: 15px; letter-spacing: .3em; }
.main-nav { display: flex; gap: 28px; margin-left: 16px; }
.main-nav a { text-decoration: none; font-weight: 500; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color .2s; }
.main-nav a:hover { border-bottom-color: var(--gold); }
.nav-only-mobile { display: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.search input { width: 220px; height: 40px; border: 1px solid var(--line); background: var(--panel); padding: 0 14px; border-radius: 0; }
.search input:focus { background: var(--white); border-color: var(--black); outline: none; }
.lang-link { font-weight: 700; font-size: 13px; text-decoration: none; padding: 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: none; border: 0; cursor: pointer; position: relative; color: var(--black); }
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; background: var(--gold); color: var(--black); font-size: 11px; font-weight: 700; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.menu-toggle { display: none; }

.flash { padding: 12px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
.flash-ok { background: #eef6f0; color: var(--ok); }
.flash-error { background: #fbecec; color: var(--error); }

/* Portada — el corte diagonal vive aquí */
.hero { background: var(--white); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; min-height: min(80vh, 780px); }
.hero-copy { align-self: center; padding: 56px var(--gut) 56px max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut))); }
.hero h1 { font-size: clamp(36px, 4.8vw, 78px); font-stretch: 125%; font-weight: 600; line-height: 1.02; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 24px; max-width: 10ch; }
.hero-copy::before { content: ""; display: block; width: 56px; height: 2px; background: var(--gold); margin-bottom: 28px; }
.hero p { font-size: clamp(16px, 1.4vw, 19px); max-width: 38ch; color: #333; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
/* El corte diagonal del bajo de la playera, llevado al marco de la foto */
.hero-media { display: block; background: var(--panel); clip-path: polygon(0 0, 100% 0, 100% 100%, 26% 100%, 0 74%); }
.hero-media img { width: 100%; height: 100%; object-fit: contain; padding: 6% 10% 6% 14%; mix-blend-mode: multiply; }

/* Categorías */
.cat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cat-tile { position: relative; display: block; background: var(--panel); text-decoration: none; aspect-ratio: 4 / 5; overflow: hidden; }
.cat-tile img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .4s; }
.cat-tile:hover img { transform: scale(1.03); }
.cat-tile span { position: absolute; left: 12px; bottom: 12px; background: var(--white); padding: 10px 14px 8px !important; font-weight: 500; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--gold); }

/* Rejilla de productos */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 500; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; text-decoration-color: var(--gold); text-decoration-thickness: 1px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 16px; }
.card { display: flex; flex-direction: column; text-decoration: none; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--panel); overflow: hidden; margin-bottom: 12px; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: opacity .25s; }
.card-alt { opacity: 0; }
@media (hover: hover) { .card:hover .card-alt { opacity: 1; } .card:hover .card-media:has(.card-alt) img:first-child { opacity: 0; } }
.card-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.card-color { color: var(--ink-2); font-size: 14px; }
.card-price { font-size: 15px; margin-top: 4px; }
.card-price s, .pdp-price s { color: var(--ink-2); margin-left: 6px; font-weight: 400; }
.card.is-sold .card-media img { opacity: .5; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--black); color: var(--gold-light); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; }

.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.list-head h1 { margin-bottom: 4px; }
.sort select { height: 42px; border: 1px solid var(--line); padding: 0 12px; background: var(--white); border-radius: 0; }
.empty { padding: 40px 0; color: var(--ink-2); }
.search-big { display: flex; gap: 8px; margin-bottom: 32px; max-width: 560px; }
.search-big input { flex: 1; height: 48px; border: 1px solid var(--black); padding: 0 14px; border-radius: 0; }

/* Ficha de producto */
.pdp { padding-top: 16px; }
.crumbs { font-size: 13px; color: var(--ink-2); margin-bottom: 16px; }
.crumbs a { text-decoration: none; }
.pdp-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.gallery-main { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gm { display: block; background: var(--panel); }
.gallery-main img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; mix-blend-mode: multiply; }
.gm:only-child { grid-column: 1 / -1; max-width: 760px; }
.gallery-thumbs { display: none; }
.pdp-info { position: sticky; top: 92px; }
.pdp-info h1 { font-size: clamp(24px, 2.4vw, 32px); }
.pdp-price { font-size: 20px; font-weight: 500; margin-bottom: 20px; }
.tag { display: inline-block; background: var(--gold); color: var(--black); font-size: 12px; font-weight: 700; padding: 4px 8px; margin-top: -10px; }
.opt { border: 0; padding: 0; margin: 0 0 20px; }
.opt-label { font-size: 14px; margin-bottom: 10px; padding: 0; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { display: block; width: 64px; border: 1px solid var(--line); background: var(--panel); }
.swatch img { mix-blend-mode: multiply; aspect-ratio: 4 / 5; object-fit: contain; }
.swatch[aria-current] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.size { position: relative; }
.size input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.size span { display: flex; align-items: center; justify-content: center; height: 48px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.size input:checked + span { background: var(--black); color: var(--white); border-color: var(--black); }
.size input:focus-visible + span { outline: 2px solid var(--black); outline-offset: 2px; }
.size.is-out span { color: #aaa; background: linear-gradient(to top right, transparent calc(50% - .5px), #ccc, transparent calc(50% + .5px)); }
.buy { margin-bottom: 24px; }
.buy .btn { margin-top: 4px; }
.acc { border-top: 1px solid var(--line); padding: 16px 0; }
.acc:last-of-type { border-bottom: 1px solid var(--line); }
.acc summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.acc summary::after { content: "+"; font-weight: 400; color: var(--gold-deep); }
.acc[open] summary::after { content: "−"; }
.acc .prose { margin-top: 12px; }
.prose { max-width: 68ch; color: #222; }

/* Carrito lateral */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--white); z-index: 61; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s ease; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 20px; }
.drawer-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.drawer-body .lines { flex: 1; padding: 0 20px; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.drawer-empty { padding: 40px 20px; text-align: center; }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line img { background: var(--panel); aspect-ratio: 4 / 5; object-fit: contain; mix-blend-mode: multiply; }
.line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line-name { font-weight: 700; font-size: 15px; text-decoration: none; }
.line-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; grid-column: 2 / 4; }
.drawer .line { grid-template-columns: 80px 1fr; }
.line-price { font-weight: 600; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.qty button { width: 34px; height: 34px; border: 0; background: none; cursor: pointer; font-size: 18px; }
.qty button:disabled { color: #bbb; cursor: default; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 18px; }
.link-center { display: block; text-align: center; margin-top: 12px; font-size: 14px; }
.cart-page { border-top: 1px solid var(--line); margin-bottom: 24px; }
.cart-page .drawer-foot { border: 0; padding: 20px 0 0; }
.cart-page .lines { padding: 0; }

/* Formularios */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { height: 48px; border: 1px solid #c9c9c6; padding: 0 14px; border-radius: 0; background: var(--white); width: 100%; }
.field textarea { height: auto; min-height: 120px; padding: 12px 14px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--black); outline: none; box-shadow: inset 0 0 0 1px var(--black); }
.field.is-invalid input { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.field input[readonly] { background: var(--panel); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 4px; max-width: 480px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.choice { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; border: 1px solid var(--line); padding: 14px 16px; margin-bottom: -1px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--black); position: relative; z-index: 1; }
.choice small { display: block; font-size: 13px; margin-top: 2px; }
.choice input { margin-top: 4px; accent-color: var(--black); }
input[type="checkbox"] { accent-color: var(--black); width: 18px; height: 18px; }

/* Checkout */
.checkout-header { border-bottom: 1px solid var(--line); }
.checkout-header .wrap { display: flex; justify-content: space-between; align-items: center; height: 68px; }
.back-link { font-size: 14px; font-weight: 600; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: clamp(24px, 5vw, 72px); padding-block: 32px 64px; align-items: start; }
.co-form fieldset { border: 0; padding: 0; margin: 0 0 28px; }
.co-form legend { font-weight: 800; font-stretch: 112%; font-size: 20px; margin-bottom: 14px; padding: 0; }
.co-summary { background: var(--panel); padding: 24px; position: sticky; top: 24px; }
.co-summary .line { grid-template-columns: 64px 1fr auto; border-color: #dcdcd8; }
.thumb { position: relative; display: block; }
.thumb i { position: absolute; top: -8px; right: -8px; background: var(--ink-2); color: var(--white); font-style: normal; font-size: 12px; font-weight: 700; min-width: 22px; height: 22px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.coupon-form { display: flex; gap: 8px; margin: 16px 0; }
.coupon-form input { flex: 1; height: 48px; border: 1px solid #c9c9c6; padding: 0 12px; border-radius: 0; text-transform: uppercase; }

/* Pedido */
.order-page h1 { margin-top: 4px; }
.notice { background: var(--panel); padding: 20px; margin: 16px 0 24px; }
.notice-error { background: #fbecec; }
.bank { font-family: var(--font); white-space: pre-wrap; background: var(--white); padding: 12px; border: 1px solid var(--line); }
.timeline { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; counter-reset: s; }
.timeline li { position: relative; padding-top: 22px; font-size: 14px; display: flex; flex-direction: column; }
.timeline li::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line); }
.timeline li::after { content: ""; position: absolute; top: 1px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--line); }
.timeline li.done::before { background: var(--black); }
.timeline li.done::after { background: var(--black); border-color: var(--black); }
.timeline li.current b { text-decoration: underline; text-underline-offset: 4px; }
.ship-box { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; border: 1px solid var(--black); padding: 16px 20px; margin-bottom: 28px; }
.ship-box p { margin: 0; }
.addr { margin-top: 24px; }

/* Cuenta */
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 96px); max-width: 960px; }
.auth-side { border-left: 1px solid var(--line); padding-left: clamp(24px, 6vw, 96px); }
.account-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; color: var(--ink-2); font-weight: 600; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--black); }
.table td { padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); }
.pill { font-size: 12px; font-weight: 700; padding: 3px 8px; background: var(--panel); white-space: nowrap; }
.pill-paid, .pill-preparing { background: #fff3d6; }
.pill-shipped { background: #e3edff; }
.pill-delivered { background: #e3f3e7; }
.pill-cancelled { background: #f6e3e3; }

/* Pie */
.site-footer { background: var(--black); color: var(--white); margin-top: 64px; padding: 64px 0 24px; border-top: 2px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-size: 12px; font-stretch: 100%; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.site-footer a { display: block; text-decoration: none; color: #cfcfcf; font-size: 14px; padding: 4px 0; }
.site-footer a:hover { color: var(--gold-light); }
.footer-base { margin-top: 48px; padding-top: 20px; border-top: 1px solid #262626; font-size: 13px; color: #9a9a9a; }
.wa-float { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: var(--white); display: flex; align-items: center; justify-content: center; z-index: 30; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--black); color: var(--white); padding: 12px 20px; font-weight: 600; z-index: 80; }

/* Responsivo */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .search { display: none; }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .header-row { gap: 8px; }
  .brand span { display: none; }
  .main-nav { position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); background: var(--white); flex-direction: column; gap: 0; margin: 0; padding: calc(80px + env(safe-area-inset-top, 0px)) 24px 24px; z-index: 50; transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 0 100vmax transparent; }
  .main-nav.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
  .main-nav a { font-size: 14px; font-weight: 500; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav-only-mobile { display: block; font-size: 16px !important; font-weight: 600 !important; }
  .lang-link { display: none; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 36px var(--gut) 28px; }
  .hero-media { aspect-ratio: 1 / 1; clip-path: polygon(0 0, 100% 0, 100% 100%, 34% 100%, 0 84%); }
  .hero-media img { padding: 6% 12%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 24px 10px; }
  .pdp-grid, .checkout, .account-grid, .auth { grid-template-columns: 1fr; }
  .pdp-info, .co-summary { position: static; }
  .gallery-main { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; margin-inline: calc(var(--gut) * -1); scrollbar-width: none; }
  .gm { flex: 0 0 100%; scroll-snap-align: start; }
  .gallery-thumbs { display: flex; gap: 6px; margin-top: 8px; }
  .gallery-thumbs button { width: 52px; padding: 0; border: 1px solid var(--line); background: var(--panel); }
  .gallery-thumbs button[aria-current] { border-color: var(--black); }
  .checkout { display: flex; flex-direction: column-reverse; }
  .auth-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .timeline { grid-auto-flow: row; gap: 14px; }
  .timeline li { padding: 0 0 0 26px; }
  .timeline li::before { top: 14px; bottom: -14px; left: 5px; right: auto; width: 2px; height: auto; }
  .timeline li:last-child::before { display: none; }
}
@media (max-width: 480px) {
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .cat-strip { grid-template-columns: 1fr 1fr; }
  .cat-tile span { left: 8px; bottom: 8px; font-size: 11px; letter-spacing: .1em; padding: 8px 10px 6px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
