:root {
  color-scheme: light;
  --ink: #171a15;
  --paper: #f8f6ef;
  --muted: #55584e;
  --line: #dedbd0;
  --green: #00a37d;
  --violet: #6028a6;
  font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }
.skip { position: absolute; z-index: 2; padding: 12px; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 76px; padding: 10px clamp(16px, 5vw, 78px); border-bottom: 1px solid var(--line); }
.logo { width: clamp(132px, 25vw, 227px); height: auto; }
nav { display: flex; gap: clamp(14px, 3vw, 38px); font-size: .86rem; }
nav a { text-decoration: none; padding-block: 8px; }
nav a:hover, footer a:hover { text-decoration: underline; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; font-weight: 700; }
h1, h2, h3, p { margin: 0; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; text-decoration: none; padding: 13px 17px; min-height: 46px; font-size: .9rem; font-weight: 600; }
.dark { background: var(--ink); color: var(--paper); }
.dark:hover { background: #34382f; }
.gallery { max-width: 1330px; margin: auto; padding: clamp(40px, 7vw, 104px) clamp(18px, 6vw, 74px); scroll-margin-top: 12px; }
.gallery-top { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
h2 { font-size: clamp(1.9rem, 4vw, 3.5rem); line-height: 1.1; letter-spacing: -.045em; font-weight: 650; }
.gallery-top p { margin-top: 12px; color: var(--muted); font-size: .92rem; }
.controls { display: inline-flex; flex-shrink: 0; border: 1px solid var(--line); width: fit-content; }
.controls button { background: transparent; border: 0; padding: 9px 13px; min-height: 42px; font-size: .8rem; }
.controls button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 47%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
.rail.all { grid-auto-flow: row; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; }
.product { scroll-snap-align: start; min-width: 0; }
.product a { display: block; text-decoration: none; }
.product img { width: 100%; height: auto; background: #deded4; }
.caption { display: flex; justify-content: space-between; gap: 8px; padding: 14px 1px; border-bottom: 1px solid var(--line); }
.caption h3 { font-size: clamp(.88rem, 2vw, 1.15rem); font-weight: 650; }
.caption p { color: var(--muted); font-size: .78rem; margin-top: 5px; }
.product a:hover h3 { text-decoration: underline; }
.arrows { display: flex; justify-content: end; gap: 8px; margin-top: 10px; }
.arrows[hidden] { display: none; }
.arrows button, .close { width: 44px; height: 44px; background: var(--paper); border: 1px solid var(--line); }
.arrows button:disabled { opacity: .4; cursor: default; }
footer { display: flex; justify-content: space-between; gap: 25px; padding: 35px clamp(18px, 6vw, 80px); border-top: 1px solid var(--line); background: #eeece1; }
footer h2 { font-size: 1rem; letter-spacing: 0; }
footer p, footer a { margin-top: 8px; font-size: .88rem; }
footer a { display: inline-block; }
dialog { width: min(880px, calc(100% - 24px)); max-height: calc(100dvh - 24px); border: 0; padding: 0; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #161914a8; }
body:has(dialog[open]) { overflow: hidden; }
.sheet { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.close { position: sticky; top: 8px; z-index: 1; display: block; margin: 8px 8px -52px auto; font-size: 1.45rem; }
.media { padding: 14px; }
.media .controls { margin-top: 10px; }
.photo { overflow: hidden; display: block; width: 100%; border: 0; padding: 0; background: #deded4; cursor: zoom-in; }
.photo img { width: 100%; height: auto; aspect-ratio: 850/1003; object-fit: cover; }
.photo[aria-expanded="true"] { cursor: zoom-out; }
.photo[aria-expanded="true"] img { transform: scale(1.55); }
.info { padding: 35px 28px 25px; }
.info h2 { margin: 8px 0 4px; font-size: clamp(1.5rem, 3vw, 2.4rem); }
.info p { color: var(--muted); line-height: 1.45; }
#product-description { margin: 9px 0 16px; }
.stock { margin: 18px 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .88rem; }
#share { display: block; background: none; border: 0; padding: 11px 0; text-decoration: underline; font-size: .84rem; }
#share-status:empty { display: none; }
#share-status { font-size: .8rem; }
@media (max-width: 660px) {
  h1 { font-size: clamp(2.15rem, 9vw, 3.6rem); line-height: .99; margin-top: 8px; }
  .gallery-top { flex-wrap: wrap; }
  .rail { grid-auto-columns: 76%; }
  .sheet { grid-template-columns: 1fr; }
  .info { padding: 10px 17px 20px; }
  .photo img { max-height: 52dvh; object-fit: contain; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.bar { background: #000; color: var(--paper); border-bottom: 0; position: relative; }
.bar::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: linear-gradient(90deg, var(--green) 50%, var(--violet) 50%); }
.brand { display: block; flex-shrink: 0; }
.shop { padding-top: clamp(26px, 4.5vw, 62px); }
.shop h1 { max-width: 16ch; font-size: clamp(2.2rem, 5.8vw, 5rem); line-height: .96; letter-spacing: -.07em; font-weight: 650; }
.gallery-top .origin { color: var(--muted); margin: 0 0 11px; font-size: .78rem; font-weight: 600; }
.collections { display: block; border-top: 1px solid var(--line); }
.collection-groups, .collection-options { display: flex; flex-wrap: wrap; gap: 0 clamp(10px, 3vw, 30px); }
.collection-options { border-top: 1px solid var(--line); }
.collection-options[hidden] { display: none; }
.collections a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; border-bottom: 2px solid transparent; scroll-margin-top: 12px; }
.collection-groups a { font-weight: 650; }
.collection-options a { color: var(--muted); scroll-margin-top: 64px; }
.collection-options a[aria-current] { color: var(--ink); font-weight: 650; }
.collections a[aria-current] { border-image: linear-gradient(90deg, var(--green) 50%, var(--violet) 50%) 1; }
.rack-instructions { color: var(--muted); }
.rack-instructions { font-size: .84rem; margin: 8px 0 13px; }
.rack-stage { container-type: inline-size; position: relative; }
.rail { --card-width: min(57cqw, 510px); --rack: #eee8da; position: relative; grid-auto-columns: var(--card-width); gap: 0; padding: 0 calc((100cqw - var(--card-width)) / 2); background: radial-gradient(ellipse at 50% 46%, #f7f2e6 15%, var(--rack) 68%, #e0d8c8 100%); border: 1px solid #ddd4c3; }
.rack-stage:has(.rail:not(.all))::after { content: ""; z-index: 1; pointer-events: none; position: absolute; inset: clamp(10px, 1.5cqw, 16px) 0 auto; height: 6px; background: linear-gradient(#343630, #121410 55%, #060705); box-shadow: 0 2px 4px #26201955; }
.product { scroll-snap-align: center; }
.product a { position: relative; }
.product .rack-photo { width: 100%; height: min(48vw, 520px); object-fit: contain; background: transparent; position: relative; z-index: 2; transform-origin: center 3%; transform: rotate(var(--swing, 0deg)); filter: drop-shadow(9px 15px 12px #32271945); }
.caption { padding: 13px clamp(13px, 3vw, 36px); background: var(--paper); border-right: 1px solid var(--line); }
.rail:not(.all) { touch-action: manipulation; }
.rail::-webkit-scrollbar { display: none; }
.rail.all { padding: 0; gap: 12px; background: transparent; border: 0; }
.rail.all .product a { background: var(--rack); }
.rail.all .rack-photo { transform: none; filter: none; padding: clamp(9px, 2vw, 25px); }
.rail.all .caption { border-right: 0; }
.rack-progress { align-self: center; margin-right: auto; font-size: .82rem; color: var(--muted); }
@media (max-width: 660px) {
  .bar { min-height: 62px; padding: 7px 12px; gap: 8px; }
  .bar .logo { width: clamp(116px, 33vw, 169px); }
  .bar nav { gap: 9px; font-size: .76rem; }
  .bar nav a, .bar .order-link { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; }
  .bar .order-link { gap: 3px; }
  .shop .gallery-top { margin-bottom: 16px; gap: 14px; }
  .rail:not(.all) {
    --card-width: 70cqw;
    gap: 8px;
    padding-inline: 10px calc(100cqw - var(--card-width) - 10px);
    scroll-padding-inline-start: 10px;
  }
  .rail:not(.all) .product { scroll-snap-align: start; }
  .product .rack-photo { height: 84cqw; }
  .rail.all .rack-photo { height: 54cqw; }
}
@media (prefers-reduced-motion: reduce) { .product .rack-photo { transform: none; } }

/* Portada y secciones editoriales */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "copy photo";
  align-items: center;
  color: #f5f5f5;
  background: #000;
}
.hero-photo {
  grid-area: photo;
  width: 100%;
  height: clamp(450px, 48vw, 760px);
  object-fit: cover;
  object-position: center 40%;
}
.hero-copy {
  grid-area: copy;
  padding: 40px clamp(24px, 5vw, 96px);
}
.hero-monogram { width: 50px; height: auto; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 4.5vw, 5rem); line-height: .99; letter-spacing: -.07em; font-weight: 750; }
.brand-line { display: block; width: 88px; height: 3px; margin: 24px 0; background: linear-gradient(90deg,var(--green) 50%,var(--violet) 50%); }
.hero-link { color: #f5f5f5; border: 1px solid #f5f5f5aa; background: #0004; }
.hero-link:hover { background: #f5f5f5; color: #171a15; }
.hero .hero-link { background: #fff; color: #000; border-color: #fff; }
.hero .hero-link:hover { background: #f5f5f5; }
.hero-shipping { font-size: .82rem; margin-top: 12px; color: #d6d4cb; }
.rack-stage:has(.rail:not(.all))::after { content: none; }
.rail { background: #eee8df; }
.product .rack-photo { height: auto; aspect-ratio: 920 / 740; object-fit: contain; filter: none; transform-origin: center 10%; }
.photo img { aspect-ratio: 1; object-fit: contain; background: var(--paper); }
.editorial { max-width: 1330px; margin: 0 auto; padding: 0 clamp(18px, 6vw, 74px) clamp(44px, 8vw, 100px); }
.editorial-copy { margin-bottom: clamp(16px, 2.4vw, 28px); }
.editorial-copy p { color: var(--muted); margin-top: 7px; line-height: 1.45; }
.editorial img { width: 100%; height: auto; }
.workshop {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  grid-template-areas: "photos copy";
  max-width: 1330px;
  margin: 0 auto;
  padding: 0 clamp(18px, 6vw, 74px) clamp(44px, 8vw, 100px);
}
.workshop-copy {
  grid-area: copy;
  align-self: stretch;
  align-content: center;
  padding: clamp(24px, 5vw, 72px);
  background: #f0ede6;
}
.workshop-copy .eyebrow { color: var(--muted); margin-bottom: 12px; }
.workshop-copy p { line-height: 1.55; }
.workshop-copy p + p { margin-top: 14px; }
.workshop-photos {
  grid-area: photos;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-content: start;
  gap: 3px;
}
.workshop-photos img { width: 100%; height: auto; object-fit: cover; }
.workshop-main { grid-column: 1 / -1; }
.workshop-cut, .workshop-sew { aspect-ratio: 4 / 3; }
.workshop-cut { object-position: center 68%; }
.workshop-sew { object-position: center 79%; }
.visit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 42px);
  max-width: 1330px;
  margin: 0 auto;
  padding: clamp(8px, 1.5vw, 20px) clamp(18px, 6vw, 74px) clamp(24px, 3vw, 40px);
}
.visit-heading .eyebrow { margin-bottom: 10px; color: var(--muted); }
.visit-heading .brand-line { margin: 14px 0; }
.visit p { line-height: 1.55; }
.visit-metro { display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.visit-metro svg { flex-shrink: 0; }
.visit-hours { margin-bottom: 14px; }
.visit .hero-link { background: #000; color: #fff; border-color: #000; justify-content: center; min-width: min(100%, 200px); }
.visit .hero-link:hover { background: var(--ink); }
footer { align-items: center; }

@media (max-width: 660px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "photo" "copy"; }
  .hero-photo { height: auto; aspect-ratio: 1.1; object-position: center 44%; }
  .hero-copy { padding: 22px 22px 28px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3.4rem); }
  .hero h1 br { display: initial; }
  .hero-copy .brand-line { margin: 14px 0 17px; }
  .rail.all .rack-photo { height: auto; }
  .workshop { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "photos"; }
  .visit { grid-template-columns: minmax(0, 1fr); }
  .visit .hero-link { width: 100%; }
  .media .photo img { max-height: 36dvh; }
  .info { padding-bottom: 14px; }
}

.rack-stage:has(.rail:not(.all)) {
  --rack-top: clamp(24px, 4vw, 52px);
  --hanger-height: clamp(25px, 4vw, 43px);
  background: #5e5947 url("assets/fondo-perchero.webp?v=2x") center center / cover no-repeat;
}
.rack-stage .rail:not(.all) { background: transparent; border-color: #423d32; }
.rack-stage:has(.rail:not(.all))::after {
  content: "";
  inset: var(--rack-top) 0 auto;
  height: 7px;
  z-index: 0;
}
.rail:not(.all) .rack-item {
  position: relative;
  padding: calc(var(--rack-top) + var(--hanger-height)) 0 12px;
  transform-origin: center var(--rack-top);
  transform: rotate(var(--swing, 0deg));
}
.rail:not(.all) .rack-item::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(var(--rack-top) - 3px);
  left: calc(50% - 7px);
  width: 13px;
  height: var(--hanger-height);
  border: 2px solid #a8a399;
  border-left-color: transparent;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  transform: rotate(7deg);
}
.rail:not(.all) :is([data-family="jockey-aguayo"], [data-family="five-panel"]) .rack-item::before {
  content: none;
}
.rail:not(.all) .rack-photo {
  transform: none;
  aspect-ratio: 920 / 740;
  filter: drop-shadow(6px 10px 8px #1e1a1066);
}
.rail:not(.all) :is([data-family="triada"], [data-family="dualidad"], [data-family="fine"]) .rack-item::before {
  height: calc(var(--hanger-height) + clamp(13px, 2.4cqw, 25px));
}
@media (prefers-reduced-motion: reduce) {
  .rail:not(.all) .rack-item { transform: none; }
}

/* Pedido por WhatsApp */
.order-link { padding: 8px 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; }
.bar .order-link { color: inherit; text-decoration: none; white-space: nowrap; }
.bar .order-link:hover { text-decoration: underline; }
.bar nav { flex-wrap: wrap; row-gap: 0; justify-content: flex-end; }
.size-field { display: block; margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
.size-field legend { padding: 0; margin-bottom: 7px; font-size: .9rem; font-weight: 650; }
.size-field legend span { color: var(--muted); font-weight: 400; }
.size-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.size-options:has(#size-xxl:not([hidden])) { grid-template-columns: repeat(5,minmax(0,1fr)); }
.size-options label { position: relative; display: grid; min-height: 46px; cursor: pointer; }
.size-options label[hidden] { display: none; }
.size-options input { position: absolute; opacity: 0; }
.size-options span { display: grid; place-items: center; border: 1px solid var(--line); font-weight: 600; }
.size-options input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.size-options input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.custom-size { display: flex; align-items: center; gap: 9px; margin-top: 9px; font-size: .86rem; }
.custom-size[hidden] { display: none; }
.custom-size input, .item-quantity { border: 1px solid var(--line); color: var(--ink); background: var(--paper); font: inherit; padding: 8px; }
.custom-size input { width: min(100%, 132px); min-height: 40px; font-size: 1rem; }
.product-primary { width: 100%; justify-content: center; border: 0; }
.product-primary[data-added] { background: var(--green); color: #000; }
.product-note { margin-top: 12px; font-size: .79rem; }
.product-actions { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: center; }
.product-actions .order-link, .product-actions #share { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; }
.info #product-price { margin: 0; font-size: 1.12rem; font-weight: 700; color: var(--ink); }
.caption .caption-price { color: var(--ink); font-weight: 650; }
#order { width: min(555px, calc(100% - 24px)); }
.order-content { padding: 27px clamp(15px, 5vw, 30px) 28px; }
.order-content h2 { padding-right: 42px; margin-bottom: 18px; }
.order-items { list-style: none; margin: 0; padding: 0; }
.order-items li { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 12px 0; }
.order-items li:last-child { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.item-quantity { display: block; max-width: 64px; }
.item-meta, #order-note, #order-status { font-size: .85rem; color: var(--muted); }
.item-remove { justify-self: start; grid-column: 1; }
#order-note, #order-status:not(:empty) { margin-top: 9px; }
#order-status[data-added] {
  padding: 9px 11px;
  border-inline-start: 3px solid var(--green);
  color: var(--ink);
  font-weight: 650;
}
#order-contact[hidden] { display: none; }

.collection-note { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.size-field[hidden] { display: none; }
#cap-fit { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }

.site-footer {
  background: #000;
  color: #f5f5f5;
  align-items: start;
  padding-block: clamp(38px, 4vw, 48px);
  gap: 28px;
}
.site-footer img { width: 56px; height: auto; }
.site-footer .footer-motto { margin-top: 17px; font-size: 1rem; font-weight: 650; }
.site-footer .brand-line { margin: 19px 0 0; }
.site-footer nav { flex-wrap: wrap; gap: 4px 14px; }
.site-footer a { margin: 0; }
.footer-actions { display: grid; gap: 8px; width: min(100%, 345px); }
.footer-instagram { display: inline-flex; align-items: center; gap: 6px; }
.site-footer .footer-whatsapp { justify-content: center; min-height: 52px; background: #fff; color: #000; }
.site-footer .footer-whatsapp:hover { background: #f5f5f5; text-decoration: none; }

.site-footer .footer-secondary { color: #d6d4cb; font-weight: 400; margin-top: 6px; }

.people > .eyebrow { color: var(--muted); margin-bottom: 10px; }
.people > .brand-line { margin: 14px 0 clamp(16px, 2.8vw, 30px); }
.people-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * var(--people-gap)) / 3);
  --people-gap: clamp(8px, 1.3vw, 16px);
  gap: var(--people-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.people-carousel::-webkit-scrollbar { display: none; }
.people-carousel figure { min-width: 0; margin: 0; scroll-snap-align: start; }
.people-carousel img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.people-carousel figure:nth-child(1) img { object-position: 45% center; }
.people-carousel figure:nth-child(2) img { object-position: center 100%; }
.people-carousel figure:nth-child(3) img { object-position: center 22%; }
.people-carousel figcaption { padding-top: 9px; color: var(--muted); font-size: 14px; font-weight: 400; }
@media (max-width: 660px) {
  .people-carousel { grid-auto-columns: 43%; }
}

/* Páginas de catálogo con URLs propias */
.catalog-page > .eyebrow { margin-bottom: 12px; }
.catalog-page h1 { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05; }
.catalog-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; margin-top: 24px; }
.catalog-cards img, .catalog-sheet > img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; background: var(--paper); }
.catalog-cards h2 { font-size: 1rem; line-height: 1.25; letter-spacing: normal; }
.catalog-sheet { max-width: 880px; margin: 0 auto; }
.catalog-sheet .catalog-price { margin-top: 8px; color: var(--ink); font-weight: 700; }
.catalog-sheet .product-actions { margin-top: 14px; }
