/* =============================================================
   RDECANTS — capa de rediseño (2026-11-07, dirección clara final)
   Owner decision: white base, warm ivory support, black for brand,
   titles and actions; warm editorial photographs; refined serif for
   headings, clean sans for the interface. No dominant dark brown, no
   decorative gold. The dark home of the first pass is retired; its
   markup and behaviour are kept.
   tokens.css stays the palette authority for interiors.
   ============================================================= */

.rd3-home, .rd3-page, .rd3 {
  --rd4-white: #FFFFFF;
  --rd4-ivory: #F5EFE7;
  --rd4-ivory-2: #EDE4D8;
  --rd4-ink: #111111;
  --rd4-ink-2: #5A544D;          /* secondary text: 7.1:1 on white, 6.1:1 on ivory */
  --rd4-line: rgba(17, 17, 17, .12);
  --rd4-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}
.rd3-home { background: var(--rd4-white); }
.rd3-home main { background: var(--rd4-white); }

/* ── Header ── */
.rd3-home > .infobar { display: none; }
.rd3-home > .header { background: rgba(255, 255, 255, .94); border-bottom-color: var(--rd4-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (max-width: 899px) {
  /* Logo left; search, bag and menu right. */
  .rd3-home > .header .header-logo { order: 0; margin-right: auto; }
  .rd3-home > .header .header-actions { order: 1; gap: 2px; }
  .rd3-home > .header .nav-toggle { order: 2; display: inline-flex !important; margin: 0 -6px 0 2px; }
  .rd3-home > .header .rd3-header-cart { display: inline-flex; position: relative; }
}

/* ── Hero: the approved photograph, light and warm ── */
.rd3-home .rd4-hero {
  position: relative; overflow: hidden; isolation: isolate; min-height: 0; padding: 22px 0 0;
  background: var(--rd4-ivory); color: var(--rd4-ink);
}
.rd3-home .rd4-hero .rd3-hero-photo {
  position: absolute; inset: 0 0 auto 0; width: 100%; height: calc(100% - 78px); z-index: -2;
  object-fit: cover; object-position: 64% 16%;
}
.rd3-home .rd4-hero::before {
  content: ''; position: absolute; inset: 0 0 78px; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(245,239,231,.94) 0%, rgba(245,239,231,.82) 30%, rgba(245,239,231,.28) 54%, rgba(245,239,231,0) 70%);
}
.rd3-home .rd4-hero .rd3-hero-copy { width: auto; max-width: 300px; min-width: 0; padding: 0 0 0 var(--gutter); position: relative; }
.rd3-home .rd4-hero .rd3-eyebrow { color: var(--rd4-ink); font-size: 10.5px; letter-spacing: .22em; }
.rd3-home .rd4-hero .rd3-eyebrow::after { display: block; background: var(--rd4-ink); margin: 10px 0 0; }
.rd3-home .rd4-hero .hero-title {
  margin: 14px 0 10px; color: var(--rd4-ink);
  font: 600 clamp(36px, 10.4vw, 46px)/.98 var(--rd4-serif); letter-spacing: -.005em; text-wrap: nowrap;
}
.rd3-home .rd4-hero .hero-title em { font-style: italic; font-weight: 600; color: var(--rd4-ink); }
.rd3-home .rd4-hero .hero-desc { margin: 0 0 4px; max-width: 13.5rem; font-size: 14px; line-height: 1.42; color: var(--rd4-ink); }
.rd3-home .rd4-hero .hero-actions { gap: 10px; margin: 20px 0 0; width: min(62vw, 290px); }
.rd3-home .rd4-hero .hero-cta,
.rd3-home .rd4-hero .hero-actions .btn-outline {
  display: flex; align-items: center; justify-content: flex-start; gap: 11px; width: 100%;
  min-height: 50px; padding: 7px 14px; border-radius: 12px; font: 600 15px/1.15 var(--font-sans); text-align: left;
}
.rd3-home .rd4-hero .hero-cta { background: var(--rd4-ink); color: #fff; border: 1px solid var(--rd4-ink); box-shadow: 0 12px 26px -18px rgba(17,17,17,.7); }
/* The finder route: a considered, premium choice — white, a fine black frame. */
.rd3-home .rd4-hero .hero-actions .btn-outline { background: rgba(255,255,255,.92); color: var(--rd4-ink); border: 1px solid var(--rd4-ink); box-shadow: 0 10px 24px -20px rgba(17,17,17,.6); }
.rd3-home .rd4-hero .hero-cta .rd3-arrow, .rd3-home .rd4-hero .btn-outline .rd3-arrow { margin-left: auto; width: 18px; height: 18px; }
.rd4-cta-icon { width: 19px; height: 19px; flex: none; }
.rd4-cta-copy { display: flex; flex-direction: column; gap: 3px; }
.rd3-home .rd4-hero .hero-cta-note { font-size: 11px; font-weight: 400; color: var(--rd4-ink-2); }
.rd3-home .rd4-hero .hero-cta:focus-visible, .rd3-home .rd4-hero .btn-outline:focus-visible { outline: 2px solid var(--rd4-ink); outline-offset: 3px; }

/* Benefits: a white strip of hairline icons under the photograph. */
.rd4-benefits {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; position: relative;
  margin: 22px 0 0; padding: 14px 6px 16px; background: var(--rd4-white); border-bottom: 1px solid var(--rd4-line);
}
.rd4-benefits li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 4px; text-align: center; font-size: 10.5px; line-height: 1.3; color: var(--rd4-ink-2); }
.rd4-benefits li + li { border-left: 1px solid var(--rd4-line); }
.rd4-benefits svg { width: 21px; height: 21px; color: var(--rd4-ink); }

/* ── Sections ── */
.rd3-home .rd4-section { background: var(--rd4-white); color: var(--rd4-ink); padding: 24px var(--gutter) 6px; border: 0; }
.rd4-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.rd4-section-title { margin: 0; font: 600 26px/1.05 var(--rd4-serif); color: var(--rd4-ink); white-space: nowrap; }
.rd4-section-title em { font-style: italic; }
.rd4-brand-word { font-size: .6em; letter-spacing: .18em; }
.rd4-section-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 13px; font-weight: 500; color: var(--rd4-ink); white-space: nowrap; }
.rd4-section-link .rd3-arrow { width: 15px; height: 15px; }

/* Occasions: the three side by side, no horizontal scroll (owner decision
   2026-11-08). Three equal columns from 361 px; below that two plus one wide
   card, so no option is hidden and no text drops under 11 px. */
.rd3-home .rd3-occasions { padding-right: var(--gutter); }
.rd3-home .rd3-occasions .rd4-section-head { padding-right: 0; }
.rd3-home .rd3-cards {
  display: grid; grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; gap: 8px;
  overflow: visible; padding: 0;
}
.rd3-home .rd3-card { height: auto; aspect-ratio: 3 / 4.4; border-radius: 16px; background: var(--rd4-ivory); color: #fff; border: 0; isolation: isolate; overflow: hidden; justify-content: flex-end; }
.rd3-home .rd3-card-photo { position: absolute; inset: 0; z-index: -1; background: var(--rd4-ivory-2); }
.rd3-home .rd3-card-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,17,17,0) 42%, rgba(17,17,17,.68) 100%); }
.rd3-home .rd3-card-text { position: relative; padding: 0 10px 12px; min-height: 0; }
.rd3-home .rd3-card-title { font: 600 clamp(17px, 5vw, 22px)/1.02 var(--rd4-serif); color: #fff; white-space: normal; overflow-wrap: break-word; }
.rd3-home .rd3-card-photo img { object-position: 50% 70%; }
.rd3-home .rd3-card-hint { color: rgba(255,255,255,.94); font-size: 11px; line-height: 1.3; margin-top: 5px; }
.rd3-home .rd3-go { top: 8px; right: 8px; bottom: auto; width: 30px; height: 30px; background: #fff; color: var(--rd4-ink); box-shadow: 0 4px 14px -6px rgba(0,0,0,.4); }

/* Collections: four ivory tiles from the store's ingredient set. */
.rd4-collection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; margin: 0; padding: 0; }
.rd4-collection {
  position: relative; display: flex; align-items: flex-end; min-height: 96px; padding: 12px 14px; overflow: hidden; isolation: isolate;
  border-radius: 16px; color: var(--rd4-ink); text-decoration: none;
  background: radial-gradient(90% 120% at 80% 45%, #FBF7F1 0%, var(--rd4-ivory) 60%, var(--rd4-ivory-2) 100%);
}
.rd4-collection img { position: absolute; z-index: -1; height: 74%; width: auto; right: 8px; top: 8%; filter: drop-shadow(0 8px 12px rgba(80, 56, 30, .2)); }
.rd4-collection span { font: 600 19px/1.02 var(--rd4-serif); }
.rd4-collection:focus-visible, .rd3-home .rd3-card:focus-visible, .rd4-bottles:focus-visible { outline: 2px solid var(--rd4-ink); outline-offset: 2px; }

/* Full bottles + quote: one ivory story. */
.rd3-home .rd3-also { padding: 24px var(--gutter) 26px; display: grid; gap: 0; background: var(--rd4-white); }
.rd4-bottles {
  position: relative; display: grid; grid-template-columns: 1.2fr .8fr; align-items: stretch; min-height: 176px; overflow: hidden;
  border-radius: 18px 18px 0 0; color: var(--rd4-ink); text-decoration: none; background: var(--rd4-ivory);
}
.rd4-bottles-copy { display: flex; flex-direction: column; gap: 7px; padding: 18px 0 18px 18px; position: relative; z-index: 1; }
.rd4-kicker { font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--rd4-ink-2); }
.rd4-bottles-title { font: 600 26px/1 var(--rd4-serif); }
.rd4-bottles-sub { font-size: 12.5px; line-height: 1.4; color: var(--rd4-ink-2); }
.rd4-pill { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; background: var(--rd4-ink); color: #fff; font-size: 13.5px; font-weight: 600; }
.rd4-bottles-photo { position: relative; overflow: hidden; }
.rd4-bottles-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; transform: scale(1.3); transform-origin: 50% 60%; }
.rd3-home .rd3-tile--quote {
  display: flex; flex-direction: row; align-items: center; gap: 12px; min-height: 66px; padding: 10px 16px;
  border: 0; border-top: 1px solid var(--rd4-line); border-radius: 0 0 18px 18px; background: var(--rd4-ivory); color: var(--rd4-ink);
}
.rd3-home .rd3-tile--quote .rd3-quote-icon { border: 0 !important; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--rd4-ink); }
.rd3-home .rd3-tile--quote .rd3-quote-icon svg { width: 17px; height: 17px; }
.rd3-home .rd3-tile--quote .rd3-tile-kicker { font-size: 12px; color: var(--rd4-ink-2); }
.rd3-home .rd3-tile--quote .rd3-tile-title { font: 600 19px/1.1 var(--rd4-serif); color: var(--rd4-ink); }
.rd3-home .rd3-tile--quote > .rd3-quote-arrow { margin-left: auto; width: 18px; height: 18px; }

/* Packs, Selección and the rest continue on ivory/white. */
.rd3-home .rd3-packs { background: var(--rd4-ivory); }
.rd3-home #roger-recomienda .section-title em { font-family: var(--rd4-serif); font-style: italic; font-weight: 600; letter-spacing: .02em; }

/* ── Product rails (home «Selección RDECANTS», «Nuevos») ── */
body.wa-over-rail .whatsapp-float { opacity: 0; pointer-events: none; }
body.wa-over-rail .whatsapp-float { visibility: hidden; }
.rail-grid .card-topline { flex-direction: column; align-items: flex-start; gap: 6px; }
.rail-grid .card-house { white-space: normal; overflow: visible; text-overflow: clip; max-width: none; }
.rail-grid .card-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }

/* ── Missing product photo (catalogue, cards): the brand mark, never a
   stray letter. The product stays listed; the state is honest. ── */
.rd3 .img-shell.img-failed { background: radial-gradient(120% 90% at 50% 40%, #FBF8F3 0%, var(--rd4-ivory) 70%) !important; }
.rd3 .img-shell.img-failed::before {
  content: '' !important; position: absolute; inset: 0; margin: auto; width: 34%; aspect-ratio: 240 / 171; height: auto;
  background: url('/assets/brand/rdecants-monogram.png') center / contain no-repeat; opacity: .16;
}
.rd3 .img-shell.img-failed::after {
  content: 'Foto en preparación' !important; position: absolute; inset: auto 0 12px 0 !important; display: block !important; text-align: center;
  font: 500 10px/1.2 var(--font-sans) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--rd4-ink-2) !important; background: none !important;
}

/* ── Wider screens ── */
@media (min-width: 900px) {
  .rd3-home .rd4-hero { padding: 76px 0 0; min-height: 640px; }
  .rd3-home .rd4-hero .rd3-hero-photo { left: auto; width: 62%; height: calc(100% - 96px); object-position: 50% 20%; }
  .rd3-home .rd4-hero::before { inset: 0 0 96px; background: linear-gradient(90deg, var(--rd4-ivory) 0%, var(--rd4-ivory) 38%, rgba(245,239,231,.6) 46%, rgba(245,239,231,0) 60%); }
  .rd3-home .rd4-hero .rd3-hero-copy { max-width: none; margin: 0; padding-left: max(var(--gutter), calc((100vw - 1200px) / 2)); }
  .rd3-home .rd4-hero .rd3-hero-copy > * { max-width: 470px; }
  .rd3-home .rd4-hero .hero-title { font-size: clamp(64px, 6vw, 88px); }
  .rd3-home .rd4-hero .hero-desc { font-size: 18px; max-width: 26rem; }
  .rd3-home .rd4-hero .hero-actions { width: 360px; max-width: 360px; }
  .rd4-benefits { margin-top: 56px; padding: 22px max(var(--gutter), calc((100vw - 1200px) / 2)); }
  .rd4-benefits li { font-size: 13px; }
  .rd3-home .rd4-section, .rd3-home .rd3-also { padding-left: max(var(--gutter), calc((100vw - 1200px) / 2)); padding-right: max(var(--gutter), calc((100vw - 1200px) / 2)); }
  .rd3-home .rd3-cards { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; padding-right: 0; }
  .rd3-home .rd3-occasions .rd4-section-head { padding-right: 0; }
  .rd3-home .rd3-card-title { font-size: 34px; }
  .rd3-home .rd3-card { aspect-ratio: 4 / 5; border-radius: 18px; }
  .rd3-home .rd3-card-text { padding: 0 14px 16px; }
  .rd3-home .rd3-card-hint { font-size: 13px; }
  .rd3-home .rd3-go { top: 14px; right: 14px; width: 36px; height: 36px; }
  .rd3-home .rd3-cards { gap: 12px; }
  .rd4-collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rd4-collection { min-height: 150px; }
  .rd4-collection span { font-size: 24px; }
  .rd3-home .rd3-also { grid-template-columns: 2fr 1fr; }
  .rd4-bottles { min-height: 260px; border-radius: 18px 0 0 18px; }
  .rd3-home .rd3-tile--quote { border-top: 0; border-left: 1px solid var(--rd4-line); border-radius: 0 18px 18px 0; }
  .rd4-bottles-title { font-size: 40px; }
}

/* Small phones (≤ 360 px). */
@media (max-width: 360px) {
  .rd3-home .rd3-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd3-home .rd3-cards > li:last-child { grid-column: 1 / -1; }
  .rd3-home .rd3-cards > li:last-child .rd3-card { aspect-ratio: 2 / 1; }
  .rd3-home .rd4-hero .hero-actions { width: calc(100% - var(--gutter) * 2 + 8px); max-width: 260px; }
  .rd3-home .rd4-hero .hero-cta, .rd3-home .rd4-hero .hero-actions .btn-outline { font-size: 14px; gap: 9px; padding: 7px 12px; }
  .rd3-home .rd4-hero .hero-title { font-size: 34px; }
  .rd4-benefits li { font-size: 9.5px; }
  .rd4-collection span { font-size: 16px; }
}

/* Collection tiles with the owner's editorial pictures (2026-11-09): the
   photo fills the tile; the name sits on a soft ivory veil. */
.rd4-collection--photo { min-height: 0; aspect-ratio: 16 / 11; background: var(--rd4-ivory-2); }
.rd4-collection--photo img { inset: 0; right: auto; top: auto; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: none; transition: transform 400ms ease; }
.rd4-collection--photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(255, 252, 247, 0) 38%, rgba(255, 252, 247, .92) 100%); }
.rd4-collection--photo:hover img { transform: scale(1.03); }
@media (min-width: 900px) { .rd4-collection--photo { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .rd4-collection--photo img { transition: none; } }

/* ── Reseñas (ui/reviews.js, pages/review.js) — 2026-11-09 ─────────────────
   Real, moderated reviews only. Stars in ink; «Compra verificada» in the
   store's success green, small. */
.rv-stars { color: var(--ink); letter-spacing: 1px; white-space: nowrap; }
.rv-stars-off { color: var(--line); }
.rv-verified { display: inline-block; font-size: 11px; font-weight: 600; color: var(--success); }
.pdp-reviews { margin: 28px 0 0; }
.rv-summary { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); }
.rv-summary strong { color: var(--ink); }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rv-item { padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--surface); }
.rv-item[hidden] { display: none; }
.rv-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 13px; }
.rv-name { font-weight: 600; }
.rv-date { color: var(--ink-faint); font-size: 12px; }
.rv-comment { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.rv-empty { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.rv-more { margin-top: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font: 600 13px var(--font-sans); cursor: pointer; }
.rv-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.rv-card { padding: 16px; border-radius: 16px; background: var(--rd4-ivory, var(--bg)); }
.rv-quote { margin: 8px 0; font: 500 17px/1.35 var(--font-serif); color: var(--ink); }
.rv-who { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.rv-page { display: block; max-width: 620px; margin: 0 auto; padding: 22px var(--gutter) 48px; min-height: 60vh; }
.rv-page-head h1, .rv-state h1 { margin: 4px 0 6px; font: 600 32px/1.1 var(--font-serif); }
.rv-page-head p, .rv-state p { margin: 0 0 16px; color: var(--ink-soft); font-size: 15px; }
.rv-kicker { font-size: 11px !important; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.rv-form { display: grid; gap: 14px; }
.rv-block { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--surface); }
.rv-house { margin: 0 0 -6px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.rv-rate { border: 0; margin: 0; padding: 0; min-width: 0; }
.rv-rate legend { padding: 0; margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
.rv-rate-stars { display: flex; gap: 2px; }
.rv-star { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; cursor: pointer; font-size: 30px; line-height: 1; color: var(--line); transition: color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.rv-star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-star.is-on { color: var(--ink); }
.rv-star:hover { transform: scale(1.08); }
.rv-star:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.rv-sr, .rv-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rv-field { display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.rv-field textarea, .rv-field input { width: 100%; min-height: 48px; padding: 10px 12px; font: 16px/1.4 var(--font-sans); color: var(--ink); background: var(--surface-hi, #fff); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.rv-hint { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
.rv-error { margin: 0; font-size: 13px; color: var(--danger); }
.rv-submit { min-height: 52px; border: 0; border-radius: var(--radius-pill); background: var(--action); color: var(--on-action); font: 600 15px var(--font-sans); cursor: pointer; }
.rv-submit:disabled { opacity: .6; cursor: wait; }
.rv-state { padding: 30px 0; }
.rv-link { color: var(--ink); text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .rv-star { transition: none; } }
