/* ============================================================
   CARMA Indumentaria — estilos
   Estructura inspirada en ASOS: barra negra, fila de categorías
   gris, franja de promo, grilla de fotos 3:4 y ficha con talles.
   ============================================================ */
:root {
  --ink: #111111;
  --ink-2: #2d2d2d;      /* fila de categorías */
  --muted: #666666;
  --line: #dddddd;
  --soft: #eeeeee;
  --paper: #ffffff;
  --carmin: #a3172c;     /* acento de marca */
  --sale: #d01345;       /* precios en oferta */
  --go: #018849;         /* botón principal (verde ASOS / WhatsApp) */
  --go-dark: #016d3a;
  --radius: 0px;
  --wrap: 1280px;
  --font: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
svg { flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: #fff; padding: 8px 12px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid #0770cf; outline-offset: 2px; }

/* ---------- Barra superior ---------- */
.topstrip { background: #f5f5f5; border-bottom: 1px solid var(--line); font-size: 12px; color: #444; }
.topstrip-in { display: flex; justify-content: space-between; align-items: center; min-height: 30px; gap: 12px; }
.topstrip nav { display: flex; }
.topstrip nav a { text-decoration: none; padding: 6px 12px; border-left: 1px solid var(--line); }
.topstrip nav a:hover { text-decoration: underline; }
@media (max-width: 640px) { .topstrip nav { display: none; } .topstrip-in { justify-content: center; } }

/* ---------- Encabezado negro ---------- */
.bar { background: var(--ink); color: #fff; }
.bar-in { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.logo { display: block; color: #fff; line-height: 0; }
.logo svg { width: 96px; height: 45px; }
.bar-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 0 16px; align-self: stretch; display: flex; align-items: center; background: #222;
}
.search { flex: 1; display: flex; align-items: center; background: #fff; border-radius: 999px; height: 38px; padding: 0 6px 0 18px; max-width: 760px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font-size: 14px; }
.search input::-webkit-search-cancel-button { display: none; }
.search button { border: 0; background: none; color: var(--ink); width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.search svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; }
.bar-icons { display: flex; gap: 4px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: inherit; cursor: pointer; text-decoration: none; }
.icon-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .bar-in { flex-wrap: wrap; gap: 4px 8px; padding-bottom: 10px; }
  .menu-btn { display: grid; margin-left: -8px; }
  .bar-tag { display: none; }
  .logo svg { width: 84px; height: 40px; }
  .bar-icons { margin-left: auto; margin-right: -8px; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
}

/* ---------- Categorías ---------- */
.catnav { background: var(--ink-2); color: #fff; }
.catnav-in { display: flex; overflow-x: auto; scrollbar-width: none; min-height: 40px; }
.catnav-in::-webkit-scrollbar { display: none; }
.catnav a { display: flex; align-items: center; padding: 0 14px; font-size: 13px; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.catnav a:hover, .catnav a.active { background: #474747; }
.catnav a.hot { background: var(--sale); font-weight: 600; }
.catnav a.hot:hover, .catnav a.hot.active { background: #a80e37; }
.catnav a.active { border-bottom-color: #fff; }
@media (max-width: 860px) { .catnav { display: none; } }

/* ---------- Menú mobile ---------- */
.menu-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: .2s; }
.menu-overlay.open { opacity: 1; visibility: visible; }
.menu-panel { position: absolute; inset: 0 auto 0 0; width: min(86vw, 340px); background: #fff; display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .25s; }
.menu-overlay.open .menu-panel { transform: none; }
.menu-head { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; padding: 8px 8px 8px 16px; }
.menu-logo { width: 80px; height: 38px; }
.menu-list { overflow-y: auto; flex: 1; }
.menu-list a { display: flex; justify-content: space-between; align-items: center; padding: 15px 16px; border-bottom: 1px solid var(--soft); text-decoration: none; font-weight: 500; }
.menu-list a.active { font-weight: 700; box-shadow: inset 4px 0 0 var(--carmin); }
.menu-list svg { width: 18px; height: 18px; stroke: #999; stroke-width: 2; }
.menu-foot { display: flex; gap: 8px; padding: 16px; border-top: 1px solid var(--line); }
.menu-foot a { flex: 1; text-align: center; padding: 10px; border: 2px solid var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Franja de promo ---------- */
.promo-strip { display: grid; grid-template-columns: 1fr 1fr; text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.promo-strip a { display: flex; flex-direction: column; justify-content: center; padding: 8px 12px; min-height: 48px; text-decoration: none; }
.promo-strip b { font-weight: 700; }
.promo-strip span { font-size: 11px; text-transform: none; letter-spacing: .02em; }
.promo-a { background: var(--carmin); color: #fff; }
.promo-b { background: #f2efe9; color: var(--ink); }
@media (max-width: 560px) { .promo-b { display: none !important; } .promo-strip { grid-template-columns: 1fr; } }

/* ---------- Hero ---------- */
.hero { background: #f6f6f6; border-bottom: 1px solid var(--soft); }
.hero-in { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center; padding-top: 32px; padding-bottom: 32px; }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--carmin); }
.hero-title { margin: 0; font-size: clamp(34px, 5vw, 60px); line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; }
.hero-sub { margin: 14px 0 22px; max-width: 42ch; color: #444; font-size: 16px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-pics img { width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; background: var(--soft); }
.hero-pics img:nth-child(2) { transform: translateY(18px); }
@media (max-width: 760px) {
  .toolbar { flex-wrap: wrap; }
  .chips { flex-basis: 100%; }
  #sort { margin-left: auto; }
  .hero-in { grid-template-columns: 1fr; gap: 20px; padding-top: 22px; padding-bottom: 30px; }
  .hero-pics img:nth-child(2) { transform: translateY(10px); }
}

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 24px; border: 2px solid var(--ink); background: none; text-decoration: none; font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333; border-color: #333; }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-mini { border: 0; background: var(--soft); padding: 6px 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.btn-mini:hover { background: var(--line); }

/* ---------- Catálogo ---------- */
.catalog { padding-top: 32px; padding-bottom: 16px; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cat-head .section-title { font-size: 22px; letter-spacing: .02em; }
.toolbar { display: flex; gap: 12px; align-items: center; margin: 14px 0 20px; padding: 10px 0; border-top: 1px solid var(--soft); border-bottom: 1px solid var(--soft); }
.chips { flex: 1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: #fff; padding: 7px 16px; border-radius: 999px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
#sort { border: 1px solid var(--line); background: #fff; padding: 7px 10px; font-size: 13px; border-radius: 0; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 12px; }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1024px) { .grid, .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid, .grid-5 { grid-template-columns: repeat(2, 1fr); gap: 22px 8px; } }

/* ---------- Tarjeta ---------- */
.card { position: relative; min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 3/4; background: var(--soft); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .thumb img { transform: scale(1.03); }
.thumb.is-empty, .pd-stage.is-empty { display: grid; place-items: center; color: #bbb; }
.thumb.is-empty svg, .pd-stage.is-empty svg { width: 34%; height: auto; }
.tag { position: absolute; left: 0; bottom: 12px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; }
.tag-out { background: var(--ink); color: #fff; }
.card-wa {
  position: absolute; right: 8px; top: calc((100% - 70px) * 0 + 8px);
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink);
  display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.card-wa:hover { background: var(--go); color: #fff; }
.card-wa svg { width: 19px; height: 19px; }
.card-price { margin-top: 8px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.price { font-weight: 700; }
.price.is-sale, .off { color: var(--sale); }
.off { font-size: 13px; }
.was { color: var(--muted); font-size: 13px; flex-basis: 100%; }
.card-title { margin: 2px 0 0; font-size: 13px; font-weight: 400; color: #444; line-height: 1.35; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* toda la tarjeta clickeable */
.card-wa { z-index: 2; }

/* ---------- Info ---------- */
.info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 40px; padding-bottom: 48px; }
.info-card { background: #f6f6f6; padding: 22px; }
.info-card svg { width: 28px; height: 28px; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.info-card h2 { margin: 10px 0 6px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.info-card p { margin: 0; color: #444; font-size: 14px; }
@media (max-width: 760px) { .info { grid-template-columns: 1fr; } }

.empty { grid-column: 1 / -1; text-align: center; padding: 56px 16px; display: grid; gap: 14px; justify-items: center; }
.empty p { margin: 0; }
.empty-big { font-size: 64px; font-weight: 700; line-height: 1; }

/* ---------- Ficha de producto ---------- */
.product-page { padding-top: 14px; padding-bottom: 32px; min-height: 60vh; }
.pd-loading { aspect-ratio: 3/1; background: linear-gradient(90deg, #f3f3f3, #fafafa, #f3f3f3); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { text-decoration: none; color: var(--ink); }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }

.pd { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px 48px; align-items: start; }
.pd-gallery { display: grid; gap: 12px; position: sticky; top: 16px; width: 100%; max-width: 640px; justify-self: end; }
.pd-gallery.has-thumbs { grid-template-columns: 64px minmax(0, 1fr); }
.pd-thumbs { display: flex; flex-direction: column; gap: 10px; }
.pd-thumb { padding: 0; border: 0; background: var(--soft); cursor: pointer; aspect-ratio: 3/4; outline: 1px solid transparent; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.pd-thumb[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.pd-thumb[aria-pressed="true"] img, .pd-thumb:hover img { opacity: 1; }
.pd-stage { position: relative; aspect-ratio: 3/4; background: var(--soft); overflow: hidden; touch-action: pan-y; }
.pd-track { display: flex; height: 100%; transition: transform .3s ease; }
.pd-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.pd-arrow { position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.pd-arrow svg { width: 30px; height: 30px; stroke: var(--ink); stroke-width: 1.4; filter: drop-shadow(0 0 2px #fff); }
.pd-arrow.prev { left: 6px; }
.pd-arrow.next { right: 6px; transform: scaleX(-1); }
.pd-dots { position: absolute; bottom: 12px; left: 50%; translate: -50% 0; display: none; gap: 6px; }
.pd-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(0,0,0,.25); }
.pd-dots span.on { background: var(--ink); }
.pd-share { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.pd-share svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pd-share.done { background: var(--go); }
.pd-share.done svg { stroke: #fff; }

.pd-info { max-width: 420px; }
.pd-title { margin: 0; font-size: 20px; font-weight: 400; line-height: 1.3; }
.pd-price { margin: 10px 0 16px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.pd-price .price { font-size: 20px; }
.pd-price .was { flex-basis: auto; font-size: 15px; }
.pd-color { margin: 0 0 14px; font-size: 14px; }
.pd-color b, .pd-sizes legend b { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.pd-sizes { border: 0; padding: 0; margin: 0 0 18px; }
.pd-sizes legend { padding: 0; margin-bottom: 8px; font-size: 14px; }
.size-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.size { position: relative; }
.size input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.size span { display: grid; place-items: center; min-width: 52px; height: 42px; padding: 0 10px; border: 1px solid #bbb; font-size: 14px; background: #fff; }
.size:hover span { border-color: var(--ink); }
.size input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.size input:focus-visible + span { outline: 2px solid #0770cf; outline-offset: 2px; }
.size.is-out span { color: #aaa; background: repeating-linear-gradient(135deg, #fff 0 6px, #f4f4f4 6px 12px); text-decoration: line-through; }
.size.is-out input { cursor: not-allowed; }
.pd-error { margin: 8px 0 0; min-height: 0; color: var(--sale); font-size: 13px; font-weight: 500; }
.pd-error:empty { display: none; }

.pd-cta { display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; background: var(--go); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.pd-cta:hover { background: var(--go-dark); }
.pd-cta svg { width: 22px; height: 22px; }
.pd-cta.is-off { background: var(--ink); }
.pd-perks { border: 1px solid var(--line); padding: 12px 16px; margin: 16px 0 20px; font-size: 13px; }
.pd-perks p { margin: 4px 0; display: flex; align-items: center; gap: 10px; }
.pd-perks svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }

.acc { border-top: 1px solid var(--line); }
.acc:last-of-type { border-bottom: 1px solid var(--line); }
.acc summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.acc summary::-webkit-details-marker { display: none; }
.acc-ico { position: relative; width: 14px; height: 14px; }
.acc-ico::before, .acc-ico::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; background: var(--ink); transition: transform .2s; }
.acc-ico::after { transform: rotate(90deg); }
.acc[open] .acc-ico::after { transform: rotate(0); }
.acc-body { padding: 0 0 16px; font-size: 14px; }
.acc-body p { margin: 0 0 10px; }
.acc-body ul { margin: 0 0 10px; padding-left: 18px; }
.acc-body li { margin: 3px 0; }
.acc-cat a { font-weight: 700; }
.size-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.size-table th, .size-table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--soft); }
.size-table th { font-weight: 700; background: #f7f7f7; }

@media (max-width: 860px) {
  .pd { grid-template-columns: 1fr; gap: 20px; }
  .pd-gallery, .pd-gallery.has-thumbs { position: static; grid-template-columns: 1fr; margin: 0 -16px; }
  .pd-thumbs { display: none; }
  .pd-dots { display: flex; }
  .pd-arrow { display: none; }
  .pd-gallery { max-width: none; width: auto; justify-self: stretch; }
  .pd-info { max-width: none; }
}

.more { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--soft); }
.more .section-title { margin-bottom: 18px; text-align: center; }
.more-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.more-head .section-title { margin: 0; text-align: left; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 5); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.row-scroll .card { scroll-snap-align: start; }
@media (max-width: 860px) { .row-scroll { grid-auto-columns: 40%; } }

/* ---------- Footer ---------- */
.foot { background: #eeeeee; margin-top: 24px; font-size: 13px; }
.foot-pay { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.foot-pay-in { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.pay-chip { border: 1px solid var(--line); padding: 4px 12px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #444; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.foot h2 { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #555; }
.foot-cols a, .foot-cols span { display: block; color: #555; text-decoration: none; padding: 3px 0; }
.foot-cols a:hover { color: var(--ink); text-decoration: underline; }
.foot-brand svg { width: 110px; height: 52px; color: var(--ink); }
.foot-brand p { margin: 8px 0 0; color: #555; max-width: 32ch; }
.foot-legal { border-top: 1px solid #ddd; padding: 12px 0; color: #777; font-size: 12px; }
@media (max-width: 640px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; order: -1; } }

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

/* Mobile: chips en su propia fila, orden debajo */
@media (max-width: 760px) {
  .toolbar { flex-wrap: wrap; }
  .chips { flex: 1 1 100%; }
  #sort { margin-left: auto; }
}
