/* Salitre — atelier de lino mediterráneo */

:root {
  --paper: #f4efe7;
  --paper-deep: #ebe3d6;
  --ink: #1f1b16;
  --ink-soft: #5a5148;
  --line: rgba(31, 27, 22, 0.14);
  --clay: #9b4f2e;
  --clay-deep: #7d3e22;
  --sand: #d9cbb6;
  --white: #fbf8f3;

  --font-display: "Bodoni Moda", "Times New Roman", serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--sand) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--clay);
  color: var(--white);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Marca y navegación ---------- */

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  color: var(--white);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
}

.site-nav {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.site-nav a {
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out);
}

@media (hover: hover) {
  .site-nav a:hover {
    border-color: currentColor;
  }
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 0.9375rem/1 var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition:
    background-color 200ms var(--ease-out),
    color 200ms var(--ease-out),
    border-color 200ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 200ms var(--ease-out);
}

.btn-light {
  background: var(--white);
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
}

.btn-outline {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

@media (hover: hover) {
  .btn-light:hover {
    background: var(--paper-deep);
  }
  .btn-dark:hover {
    background: var(--clay-deep);
  }
  .btn-outline:hover {
    border-color: var(--ink);
  }
  .btn:hover svg {
    transform: translateX(3px);
  }
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Inicio: portada ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  animation: hero-settle 2400ms var(--ease-out) both;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.35) 0%, rgba(20, 16, 12, 0) 28%),
    linear-gradient(0deg, rgba(20, 16, 12, 0.62) 0%, rgba(20, 16, 12, 0) 58%);
}

.hero-content {
  padding-block: 0 clamp(40px, 8vh, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px 48px;
}

.hero-title {
  font-size: clamp(4.5rem, 15vw, 13rem);
  letter-spacing: -0.035em;
  line-height: 0.86;
  animation: hero-title 1400ms var(--ease-out) 200ms both;
}

.hero-side {
  max-width: 34ch;
  display: grid;
  gap: 24px;
  justify-items: start;
  animation: fade-up 1000ms var(--ease-out) 700ms both;
}

.hero-lede {
  font-size: 1.0625rem;
  line-height: 1.55;
}

@keyframes hero-settle {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

@keyframes hero-title {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Inicio: estilo ---------- */

.section {
  padding-block: clamp(80px, 12vw, 160px);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.style-intro {
  grid-column: 1 / span 6;
  display: grid;
  gap: 28px;
}

.style-intro h2 {
  font-size: clamp(2.5rem, 5.4vw, 4.75rem);
}

.style-intro h2 em {
  font-style: italic;
  color: var(--clay);
}

.style-intro p {
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.style-figure {
  grid-column: 8 / span 5;
  grid-row: span 2;
  margin: 0;
}

.style-figure img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}

.style-figure figcaption,
.look figcaption {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.pillars {
  grid-column: 1 / span 6;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.pillars li {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) 1.6fr;
  gap: 8px 32px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

.pillars h3 {
  font-size: 1.5rem;
}

.pillars p {
  color: var(--ink-soft);
}

/* ---------- Inicio: lookbook ---------- */

.lookbook-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 40px;
}

.lookbook-head h2 {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
}

.looks {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1fr;
  gap: clamp(12px, 2vw, 24px);
  align-items: start;
}

.look {
  margin: 0;
}

.look:nth-child(2) {
  margin-top: clamp(40px, 8vw, 120px);
}

.look-media {
  overflow: hidden;
  background: var(--paper-deep);
}

.look img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}

@media (hover: hover) {
  .look:hover img {
    transform: scale(1.03);
  }
}

/* ---------- Pie ---------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: 72px 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}

.footer-grid h3 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 12px;
}

.footer-grid p,
.footer-grid li {
  color: #cfc4b4;
  font-size: 0.9375rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-note {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(244, 239, 231, 0.14);
  font-size: 0.8125rem;
  color: #a99d8d;
}

/* ---------- Tienda: cabecera ---------- */

.shop-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 239, 231, 0.88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.shop-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--ink-soft);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.cart-btn {
  position: relative;
  min-height: 44px;
  padding: 0 20px;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--clay);
  color: var(--white);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.cart-count.bump {
  animation: bump 360ms var(--ease-out);
}

@keyframes bump {
  40% {
    transform: scale(1.25);
  }
}

/* ---------- Tienda: introducción y oferta ---------- */

.shop-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
  padding-block: clamp(56px, 8vw, 104px) 48px;
}

.shop-intro h1 {
  font-size: clamp(2.75rem, 6.4vw, 5.5rem);
}

.shop-intro p {
  color: var(--ink-soft);
  font-size: 1.0625rem;
  max-width: 46ch;
}

.offer-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 32px;
  padding: 28px clamp(20px, 3vw, 40px);
  background: var(--clay);
  color: var(--white);
}

.offer-band h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.offer-band p {
  color: #f3dfd3;
  margin-top: 6px;
}

.offer-band .btn-light {
  color: var(--clay-deep);
}

/* ---------- Tienda: filtros ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px 24px;
  margin-block: 56px 32px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  scroll-margin-top: 104px;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.sort select {
  min-height: 40px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f1b16' stroke-width='1.5'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 12px center / 16px;
  color: var(--ink);
  font: 500 0.875rem var(--font-body);
  appearance: none;
  cursor: pointer;
}

.empty-filter {
  padding: 48px 0 96px;
  color: var(--ink-soft);
  text-align: center;
}

.filter {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 0.875rem/1 var(--font-body);
  cursor: pointer;
  transition:
    background-color 200ms var(--ease-out),
    color 200ms var(--ease-out),
    border-color 200ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.filter:active {
  transform: scale(0.97);
}

.filter[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

@media (hover: hover) {
  .filter:not([aria-pressed="true"]):hover {
    border-color: var(--ink);
  }
}

.filter-count {
  margin-left: 6px;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

/* ---------- Tienda: productos ---------- */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 48px clamp(16px, 2vw, 28px);
  padding-bottom: 120px;
}

.product {
  display: grid;
  gap: 14px;
  align-content: start;
}

.product[hidden] {
  display: none;
}

.product-media {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
}

.product-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}

@media (hover: hover) {
  .product:hover .product-media img {
    transform: scale(1.03);
  }
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--white);
  color: var(--clay-deep);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-set {
  top: auto;
  bottom: 12px;
  color: var(--ink);
  font-weight: 500;
}

.product-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.product h3 {
  font-size: 1.5rem;
}

.price {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 500;
}

.price s {
  margin-right: 6px;
  color: var(--ink-soft);
  font-weight: 400;
}

.price .now {
  color: var(--clay);
}

.product-desc {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 0;
  margin: 0;
  padding: 0;
}

.sizes legend {
  float: left;
  width: 100%;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.size {
  position: relative;
}

.size input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.size span {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.8125rem;
  transition:
    background-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    border-color 160ms var(--ease-out);
}

.size input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.size input:focus-visible + span {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

@media (hover: hover) {
  .size input:not(:checked):hover + span {
    border-color: var(--ink);
  }
}

.product .btn {
  width: 100%;
}

.product-error {
  min-height: 1.25em;
  margin-top: -6px;
  font-size: 0.8125rem;
  color: var(--clay-deep);
}

/* ---------- Tienda: información de recogida ---------- */

.pickup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--paper-deep);
}

.pickup .reveal-img,
.pickup img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.pickup-body {
  padding: clamp(32px, 6vw, 88px);
  display: grid;
  gap: 28px;
  align-content: center;
}

.pickup-body h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  color: var(--ink-soft);
}

.steps svg {
  width: 22px;
  height: 22px;
  color: var(--clay);
  margin-top: 2px;
}

.steps strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Tienda: panel de reserva ---------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(20, 16, 12, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out);
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: -12px 0 40px rgba(20, 16, 12, 0.16);
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform 420ms var(--ease-drawer),
    visibility 0s linear 420ms;
}

body.drawer-open {
  overflow: hidden;
}

body.drawer-open .scrim {
  opacity: 1;
  pointer-events: auto;
}

body.drawer-open .drawer {
  transform: none;
  visibility: visible;
  transition:
    transform 420ms var(--ease-drawer),
    visibility 0s;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  font-size: 1.75rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.icon-btn:active {
  transform: scale(0.94);
}

@media (hover: hover) {
  .icon-btn:hover {
    background: var(--paper-deep);
  }
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 24px 24px;
}

.empty {
  padding-block: 48px;
  text-align: center;
  display: grid;
  gap: 16px;
  justify-items: center;
  color: var(--ink-soft);
}

.empty svg {
  width: 40px;
  height: 40px;
  color: var(--sand);
}

.line-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.line-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: start;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.line-item img {
  width: 72px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.line-item h3 {
  font-size: 1.125rem;
}

.line-item p {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.line-item .price {
  font-size: 0.9375rem;
}

.line-item .icon-btn {
  width: 36px;
  height: 36px;
  margin: -6px -8px 0 0;
}

.totals {
  display: grid;
  gap: 6px;
  padding-block: 20px;
  font-variant-numeric: tabular-nums;
}

.totals div {
  display: flex;
  justify-content: space-between;
}

.totals .saving {
  color: var(--clay);
}

.totals .grand {
  font-size: 1.125rem;
  font-weight: 500;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.reserve-form {
  display: grid;
  gap: 16px;
  padding-top: 8px;
}

.reserve-form h3 {
  font-size: 1.5rem;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 500;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: 1rem var(--font-body);
  caret-color: var(--clay);
  transition: border-color 160ms var(--ease-out);
}

.field input::placeholder {
  color: #8a7f72;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(155, 79, 46, 0.18);
}

.field input[aria-invalid="true"] {
  border-color: var(--clay-deep);
}

.field-error {
  font-size: 0.8125rem;
  color: var(--clay-deep);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.confirm {
  padding-block: 40px;
  display: grid;
  gap: 16px;
  justify-items: start;
  animation: fade-up 500ms var(--ease-out) both;
}

.confirm > svg {
  width: 40px;
  height: 40px;
  color: var(--clay);
}

.confirm h3 {
  font-size: 2rem;
}

.confirm p {
  color: var(--ink-soft);
}

.code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Aviso flotante ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 12px 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.9375rem;
  box-shadow: 0 10px 30px rgba(20, 16, 12, 0.24);
  opacity: 0;
  transform: translate(-50%, 12px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 260ms var(--ease-out),
    transform 260ms var(--ease-out);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: 500 0.8125rem var(--font-body);
  white-space: nowrap;
  cursor: pointer;
}

/* ---------- Movimiento ---------- */

/* Aparición al entrar en pantalla (solo con JavaScript activo) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Fotos que se descubren como una cortina de abajo arriba */
.js .reveal-img {
  overflow: hidden;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1300ms var(--ease-in-out);
  transition-delay: var(--delay, 0ms);
}

.js .reveal-img img {
  scale: 1.18;
  transition:
    scale 1800ms var(--ease-out),
    transform 900ms var(--ease-out);
  transition-delay: var(--delay, 0ms), 0ms;
}

.js .reveal-img.is-in {
  clip-path: inset(0 0 0 0);
}

.js .reveal-img.is-in img {
  scale: 1;
}

/* Cinta que se desliza bajo la portada */
.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  user-select: none;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 48s linear infinite;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  padding: 18px 20px;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-style: italic;
  white-space: nowrap;
}

.ticker-track span::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (hover: hover) {
  .ticker:hover .ticker-track {
    animation-play-state: paused;
  }
}

/* Indicador de scroll en la portada */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 1px;
  height: 48px;
  overflow: hidden;
  background: rgba(251, 248, 243, 0.25);
}

.scroll-cue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--white);
  animation: scroll-cue 2200ms var(--ease-in-out) 1600ms infinite;
  transform: translateY(-100%);
}

@keyframes scroll-cue {
  0% {
    transform: translateY(-100%);
  }
  55%,
  100% {
    transform: translateY(100%);
  }
}

.hero-media {
  will-change: transform;
}

/* Filtros: la pastilla oscura se desliza hasta el filtro activo */
.filters {
  position: relative;
}

.filter {
  position: relative;
  z-index: 1;
}

.filter-pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 40px;
  border-radius: 999px;
  background: var(--ink);
  pointer-events: none;
  transition:
    transform 480ms var(--ease-out),
    width 480ms var(--ease-out);
}

.filters.has-pill .filter[aria-pressed="true"] {
  background: transparent;
  border-color: transparent;
}

/* Botón de reservar: confirma con un check dibujado */
.reserve-btn {
  overflow: hidden;
}

.reserve-btn span {
  display: inline-block;
}

.reserve-btn.is-done {
  background: var(--clay);
}

.reserve-btn.is-done span {
  animation: label-in 360ms var(--ease-out) both;
}

@keyframes label-in {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px);
  }
}

.check-draw circle,
.check-draw path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 520ms var(--ease-out) forwards;
}

.check-draw circle + path {
  animation-delay: 380ms;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Talla no elegida: un pequeño temblor que señala dónde mirar */
.sizes.shake {
  animation: shake 420ms var(--ease-out);
}

@keyframes shake {
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

/* Foto que vuela hasta «Mi reserva» */
.fly {
  position: fixed;
  z-index: 70;
  object-fit: cover;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(20, 16, 12, 0.25);
  will-change: transform;
}

/* Prendas recién añadidas al abrir el panel */
.line-item.is-new {
  animation: line-in 600ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Inicio: opiniones ---------- */

.reviews {
  padding-top: 0;
}

.reviews-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px 32px;
  margin-bottom: 48px;
}

.reviews-head h2 {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
}

.rating {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.rating strong {
  color: var(--ink);
  font-weight: 600;
}

.stars {
  display: inline-flex;
  gap: 2px;
}

.stars svg {
  width: 18px;
  height: 18px;
  fill: var(--clay);
}

.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.quote {
  margin: 0;
  padding: 32px clamp(16px, 3vw, 40px) 0 0;
  display: grid;
  gap: 20px;
  align-content: start;
}

.quote + .quote {
  padding-left: clamp(16px, 3vw, 40px);
  border-left: 1px solid var(--line);
}

.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.35;
  text-wrap: pretty;
}

.quote figcaption {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.quote figcaption strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Inicio: tiendas ---------- */

.visit {
  background: var(--paper-deep);
}

.visit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 48px clamp(32px, 6vw, 96px);
  align-items: start;
}

.visit-intro {
  display: grid;
  gap: 20px;
}

.visit-intro h2 {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
}

.visit-intro p {
  color: var(--ink-soft);
  max-width: 40ch;
}

.stores {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.store {
  display: grid;
  gap: 6px;
  align-content: start;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.store h3 {
  font-size: 2rem;
  margin-bottom: 6px;
}

.store p {
  color: var(--ink-soft);
}

.store-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.9375rem;
}

.store-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sand);
}

.store-status.is-open {
  color: #3f5a2e;
}

.store-status.is-open .dot {
  background: #4f7a35;
  box-shadow: 0 0 0 0 rgba(79, 122, 53, 0.5);
  animation: live 2s var(--ease-out) infinite;
}

@keyframes live {
  70% {
    box-shadow: 0 0 0 8px rgba(79, 122, 53, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 122, 53, 0);
  }
}

.text-link {
  justify-self: start;
  margin-top: 10px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--sand);
  transition: text-decoration-color 200ms var(--ease-out);
}

@media (hover: hover) {
  .text-link:hover {
    text-decoration-color: var(--clay);
  }
}

/* ---------- Inicio: preguntas frecuentes ---------- */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: start;
}

.faq-grid h2 {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
}

.faq-list {
  border-top: 1px solid var(--line);
  interpolate-size: allow-keywords;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 22px;
  font-size: 1.0625rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 100% no-repeat;
  transition: transform 300ms var(--ease-out);
}

.faq-list details[open] summary::after {
  transform: rotate(135deg);
}

.faq-list details::details-content {
  height: 0;
  overflow: clip;
  transition:
    height 400ms var(--ease-out),
    content-visibility 400ms allow-discrete;
}

.faq-list details[open]::details-content {
  height: auto;
}

.faq-list details p {
  padding-bottom: 22px;
  max-width: 60ch;
  color: var(--ink-soft);
}

/* ---------- Bloque para pedir una web así ---------- */

.maker {
  background: var(--clay);
  color: var(--white);
  padding-block: clamp(56px, 8vw, 96px);
}

.maker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px 64px;
}

.maker h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 16px;
}

.maker p {
  max-width: 56ch;
  color: #f3dfd3;
}

.maker-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.maker-points li {
  padding: 6px 14px;
  border: 1px solid rgba(251, 248, 243, 0.35);
  border-radius: 999px;
  font-size: 0.875rem;
}

.maker .btn-light {
  color: var(--clay-deep);
}

/* ---------- Botón flotante de WhatsApp ---------- */

.wa-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0;
  height: 56px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(20, 16, 12, 0.28);
  animation: float-in 700ms var(--ease-out) 1200ms both;
  transition:
    gap 300ms var(--ease-out),
    background-color 200ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.wa-float svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.wa-float span {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: max-width 400ms var(--ease-out);
}

.wa-float:active {
  transform: scale(0.96);
}

@media (hover: hover) {
  .wa-float:hover {
    gap: 10px;
    background: var(--clay-deep);
  }
  .wa-float:hover span {
    max-width: 180px;
  }
}

.wa-float:focus-visible {
  gap: 10px;
}

.wa-float:focus-visible span {
  max-width: 180px;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
  }
}

body.drawer-open .wa-float {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Tienda: cuenta atrás ---------- */

.countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 16px;
  font-size: 0.875rem;
  color: #f3dfd3;
}

.countdown-units {
  display: flex;
  gap: 6px;
}

.countdown-units > span {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(20, 16, 12, 0.18);
}

.countdown b {
  display: inline-block;
  min-width: 2ch;
  color: var(--white);
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.countdown b.flip {
  animation: flip 400ms var(--ease-out);
}

@keyframes flip {
  from {
    opacity: 0.2;
    filter: blur(2px);
    transform: translateY(-6px);
  }
}

/* ---------- Tienda: favoritos, existencias y guía de tallas ---------- */

.fav {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 248, 243, 0.92);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms var(--ease-out);
}

.fav svg {
  width: 22px;
  height: 22px;
}

.fav path {
  fill: transparent;
  transition:
    fill 200ms var(--ease-out),
    stroke 200ms var(--ease-out);
}

.fav[aria-pressed="true"] path {
  fill: var(--clay);
  stroke: var(--clay);
}

.fav:active {
  transform: scale(0.9);
}

.fav.pop svg {
  animation: pop 450ms var(--ease-out);
}

@keyframes pop {
  30% {
    transform: scale(1.3);
  }
  60% {
    transform: scale(0.92);
  }
}

@media (hover: hover) {
  .fav:hover {
    background: var(--white);
  }
}

.stock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--clay-deep);
}

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--clay);
  animation: ping 1800ms var(--ease-out) infinite;
}

@keyframes ping {
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

.sizes legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guide-link {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--sand);
  text-underline-offset: 0.25em;
  cursor: pointer;
}

.size-guide {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(20, 16, 12, 0.3);
}

.size-guide[open] {
  animation: aviso-in 450ms var(--ease-out) both;
}

.size-guide::backdrop {
  background: rgba(20, 16, 12, 0.45);
  backdrop-filter: blur(4px);
}

.size-guide-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 0 28px;
}

.size-guide-head h2 {
  font-size: 2rem;
}

.size-guide-note {
  padding: 8px 28px 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.size-tables {
  display: grid;
  gap: 24px;
  padding: 20px 28px 28px;
}

.size-tables table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
}

.size-tables caption {
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.375rem;
  padding-bottom: 8px;
}

.size-tables th,
.size-tables td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.size-tables thead th {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.size-tables tbody th {
  font-weight: 600;
}

/* ---------- Aviso de página ficticia ---------- */

.aviso-open body {
  overflow: hidden;
}

/* La entrada de la portada espera a que se cierre el aviso */
.aviso-open .hero-media img,
.aviso-open .hero-title,
.aviso-open .hero-side {
  animation-play-state: paused;
}

.aviso {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 16, 12, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: aviso-fade 400ms var(--ease-out) both;
}

.aviso-card {
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
  justify-items: start;
  padding: clamp(28px, 5vw, 40px);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(20, 16, 12, 0.3);
  animation: aviso-in 600ms var(--ease-out) 80ms both;
}

.aviso-icon {
  width: 32px;
  height: 32px;
  color: var(--clay);
}

.aviso-card h2 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
}

#aviso-text {
  display: grid;
  gap: 10px;
  color: var(--ink-soft);
}

#aviso-text strong {
  color: var(--clay-deep);
  font-weight: 600;
}

.aviso-card .btn {
  margin-top: 8px;
}

.aviso-link {
  font-size: 0.875rem;
  color: var(--clay-deep);
  font-weight: 500;
}

.aviso.is-leaving {
  animation: aviso-out 300ms var(--ease-out) forwards;
}

.aviso.is-leaving .aviso-card {
  animation: aviso-card-out 300ms var(--ease-out) forwards;
}

@keyframes aviso-fade {
  from {
    opacity: 0;
  }
}

@keyframes aviso-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
}

@keyframes aviso-out {
  to {
    opacity: 0;
  }
}

@keyframes aviso-card-out {
  to {
    opacity: 0;
    transform: scale(0.97);
  }
}

@media (max-width: 600px) {
  .aviso-card .btn {
    width: 100%;
  }
}

/* ---------- Adaptación ---------- */

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .scroll-cue {
    display: none;
  }

  .style-intro,
  .pillars,
  .style-figure {
    grid-column: 1 / -1;
  }

  .style-figure {
    grid-row: auto;
  }

  .looks {
    grid-template-columns: 1fr 1fr;
  }

  .look:nth-child(2) {
    margin-top: 48px;
  }

  .look:nth-child(3) {
    grid-column: 1 / -1;
  }

  .look:nth-child(3) img {
    aspect-ratio: 16 / 10;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .shop-intro,
  .pickup,
  .visit-grid,
  .faq-grid,
  .maker-grid {
    grid-template-columns: 1fr;
  }

  .quotes {
    grid-template-columns: 1fr;
    border-top: 0;
  }

  .quote,
  .quote + .quote {
    padding: 28px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .maker .btn {
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .site-nav {
    display: none;
  }

  .pillars li {
    grid-template-columns: 1fr;
  }

  .lookbook-head {
    flex-direction: column;
    align-items: start;
  }

  .offer-band {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .back-link span {
    display: none;
  }

  .shop-header .brand {
    font-size: 1.25rem;
  }

  .toast {
    width: calc(100% - 32px);
    justify-content: space-between;
    bottom: 88px;
  }

  .stores {
    grid-template-columns: 1fr;
  }

  .sort {
    width: 100%;
  }

  .sort select {
    flex: 1;
  }

  .maker .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  /* Las animaciones infinitas se detienen en lugar de acelerarse */
  .ticker-track,
  .scroll-cue::after,
  .pulse::after,
  .store-status.is-open .dot {
    animation: none !important;
  }

  .ticker {
    overflow-x: auto;
    scrollbar-width: none;
  }
}
