:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --ph: #f1efec;
  --ph-ink: #a19d97;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --gutter: 24px;
  --gap: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 56px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .6; }
button { font: inherit; color: inherit; cursor: pointer; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px var(--gutter);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
}
.header__brand { font-size: 10px; letter-spacing: .06em; justify-self: start; white-space: nowrap; }
.header__meta { font-size: 10px; letter-spacing: .06em; color: var(--ink); }
.header__nav { display: flex; justify-content: flex-end; gap: 22px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.cart-btn { background: none; border: 0; padding: 0; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Placeholders de imagen ---------- */
.ph {
  position: relative;
  background: var(--ph);
  overflow: hidden;
}
.ph span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ph-ink);
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph--hero { aspect-ratio: 16 / 9; }
.ph--product { aspect-ratio: 4 / 5; }
.ph--tall { aspect-ratio: 3 / 4; }
.ph--square { aspect-ratio: 1 / 1; }

/* ---------- Hero ---------- */
.hero { padding: 56px var(--gutter) 0; }
.hero__head {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  margin-bottom: 20px;
}
.hero__title { line-height: 0; }
.hero__title img { height: clamp(40px, 6vw, 80px); width: auto; max-width: 100%; }

/* ---------- Intro 3 columnas ---------- */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding: 28px var(--gutter) 96px;
}
.intro__col p { max-width: 36ch; margin-bottom: 1.2em; }
.intro__list { list-style: none; margin: 0; padding: 0; justify-self: end; }
.intro__list li { line-height: 1.7; }
.link-arrow { border-bottom: 1px solid currentColor; }

/* ---------- Encabezado de sección ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1;
}
.section-head__meta { font-size: 10px; letter-spacing: .06em; }
.section-head__sub {
  margin-left: 6px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Productos ---------- */
.products { padding: 0 var(--gutter) 96px; }
.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.product { display: flex; flex-direction: column; }
.product__info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0 14px;
}
.product__name { font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.2; }
.product__desc { color: var(--muted); }
.product__price { white-space: nowrap; }

.btn {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: #333; }
.btn--full { width: 100%; }
.btn.is-added { background: var(--ink); color: var(--bg); }


/* ---------- Galería editorial ---------- */
.gallery { display: flex; flex-direction: column; gap: var(--gap); padding: 80px var(--gutter) 96px; }
.gallery__row { display: grid; gap: var(--gap); }
.gallery__row--3 { grid-template-columns: repeat(3, 1fr); }
.gallery__row--2 { grid-template-columns: repeat(2, 1fr); width: 66.66%; }
.gallery__row--mix { grid-template-columns: 1fr 2fr 1fr; }
.ph--wide { aspect-ratio: auto; }
.gallery__cta { display: flex; justify-content: center; margin-top: 32px; }
.gallery__cta .btn:hover { opacity: 1; }

/* ---------- FAQ ---------- */
.faq { padding: 0 var(--gutter) 96px; }
.faq__list { max-width: 720px; margin-left: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  cursor: pointer;
  font-size: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 60ch; }

/* ---------- Newsletter ---------- */
.newsletter {
  margin: 0 var(--gutter);
  padding: 72px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.newsletter__title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 8px; }
.newsletter__form { display: flex; justify-content: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.newsletter__form input {
  width: min(320px, 100%);
  padding: 11px 14px;
  border: 1px solid var(--ink);
  font: inherit;
  background: transparent;
}
.newsletter__ok { margin-top: 20px; }
.newsletter__msg { margin-top: 12px; min-height: 1.5em; color: #a33; }
.newsletter__form .btn:disabled { opacity: .5; cursor: wait; }

/* ---------- Footer ---------- */
.footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  padding: 48px var(--gutter) 28px;
  border-top: 1px solid var(--line);
}
.footer__logo { width: 220px; height: auto; }
.footer__cols { display: flex; gap: 56px; }
.footer__cols ul { list-style: none; margin: 0; padding: 0; line-height: 1.8; }
.footer__copy { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 25;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  transition: transform .2s;
}
.wa-float:hover { opacity: 1; transform: scale(1.06); }

/* ---------- Carrito ---------- */
.cart-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .25); z-index: 30; }
.cart {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(400px, 100%);
  height: 100%;
  padding: 20px var(--gutter);
  background: var(--bg);
  transform: translateX(100%);
  transition: transform .3s ease;
}
.cart.is-open { transform: none; }
.cart__head { display: flex; justify-content: space-between; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cart__close { background: none; border: 0; padding: 0; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.cart__items { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; }
.cart__item { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart__item-name { font-family: var(--serif); font-size: 18px; }
.cart__qty { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.cart__qty button { background: none; border: 1px solid var(--line); width: 24px; height: 24px; padding: 0; }
.cart__remove { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; justify-self: end; font-size: 11px; }
.cart__empty { flex: 1; padding-top: 20px; color: var(--muted); }
.cart__total { display: flex; justify-content: space-between; padding: 16px 0; font-size: 15px; }

/* ---------- Login ---------- */
.account { display: inline-flex; gap: 22px; }
.account[hidden] { display: none; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .25); z-index: 50; }
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 60;
  width: min(400px, calc(100% - 32px));
  padding: 32px 28px 24px;
  background: var(--bg);
  transform: translate(-50%, -50%);
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: 0;
  padding: 0;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.modal__title { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; }
.auth-form label[hidden] { display: none; }
.auth-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-form__row[hidden] { display: none; }
.auth-form__row input { width: 100%; min-width: 0; }
.auth-form label span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.auth-form input {
  padding: 11px 12px;
  border: 1px solid var(--line);
  font: inherit;
  background: transparent;
}
.auth-form input:focus { outline: none; border-color: var(--ink); }
.auth-form__msg { min-height: 1.5em; color: var(--muted); }
.auth-form__msg.is-error { color: #a33; }
.auth-form .btn:disabled { opacity: .5; cursor: wait; }
.auth-form[hidden], .auth-links[hidden], .auth-sent[hidden] { display: none; }
.auth-sent { display: flex; flex-direction: column; gap: 14px; }
.auth-sent strong { font-weight: 500; word-break: break-all; }
.auth-sent__hint { color: var(--muted); }
.auth-sent__resend { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: 12px; }
.auth-sent__resend:disabled { opacity: .5; cursor: default; }
.auth-links { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 8px; }
.auth-links button:not(.btn) { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: 12px; }
.auth-links .btn { margin-bottom: 8px; }
.auth-links button[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .header { grid-template-columns: 1fr auto; }
  .header__meta { display: none; }
  .intro { grid-template-columns: 1fr 1fr; }
  .intro__list { justify-self: start; }
  .gallery__row--2 { width: 100%; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .header { gap: 12px; }
  .header__nav { gap: 12px; white-space: nowrap; font-size: 10px; }
  .cart-btn { font-size: 10px; }
  .header__nav a:not(.nav-keep) { display: none; }
  .hero { padding-top: 32px; }
  .ph--hero { aspect-ratio: 4 / 5; }
  .intro,
  .products__grid { grid-template-columns: 1fr; gap: 28px; }
  .intro__col p { max-width: none; }
  .gallery__row--3 { grid-template-columns: 1fr 1fr; }
  .gallery__row--3 > :first-child { grid-column: 1 / -1; }
  .gallery { padding-top: 56px; }
  .gallery__row--mix { grid-template-columns: 1fr 1fr; }
  .gallery__row--mix .ph--wide { grid-column: 1 / -1; grid-row: 1; aspect-ratio: 3 / 2; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer { grid-template-columns: 1fr; }
  .footer__cols { gap: 32px; }
}
