/* RahuShop — hoja unica, sin dependencias externas. */

:root {
  --cream:      #fbf8f4;
  --cream-deep: #f3ece3;
  --ink:        #23201d;
  --ink-soft:   #6b635b;
  --line:       #e6ded3;
  --accent:     #d9622f;
  /* Naranja de casa. A diferencia de --accent, ninguna tienda lo sobrescribe:
     es lo que hace que la central y los subdominios se reconozcan como lo
     mismo aunque cada tienda tenga su color. */
  --brand:      #d9622f;
  --accent-dark:#b34e22;
  --sage:       #4e7a6b;
  --sage-tint:  #e3ede9;
  --white:      #fff;
  --radius:     18px;
  --radius-lg:  28px;
  --shadow:     0 2px 4px rgba(35,32,29,.04), 0 12px 28px rgba(35,32,29,.07);
  --edge:       clamp(20px, 5vw, 64px);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

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

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--edge); }

/* Aviso del volcado estatico: sin servidor no hay pago ni portes, y mas vale
   decirlo que dejar que alguien lo descubra pulsando. */
.static-note {
  background: var(--ink); color: var(--cream);
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  text-align: center; padding: 9px 16px;
}

/* ─── Cabecera ─────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251,248,244,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 24px;
  min-height: 68px;
}
.brand {
  font-weight: 800; font-size: 20px; letter-spacing: -.02em;
  text-decoration: none; margin-right: auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { color: var(--brand); flex: 0 0 auto; display: block; }
.site-nav { display: flex; gap: 22px; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .site-nav { display: none; } }

/* Destino: es una decision de compra, no un ajuste escondido en el pie */
.shipto { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); }
.shipto > span { white-space: nowrap; font-weight: 600; }
.shipto select {
  width: auto; font: inherit; font-size: 13px; font-weight: 650; color: var(--ink);
  padding: 6px 26px 6px 10px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--white) no-repeat right 9px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b635b' stroke-width='1.5'/%3E%3C/svg%3E");
  appearance: none;
}
@media (max-width: 720px) { .shipto > span { display: none; } }

.lang { display: flex; gap: 6px; font-size: 13px; font-weight: 600; }
.lang a {
  text-decoration: none; color: var(--ink-soft);
  padding: 4px 9px; border-radius: 999px;
}
.lang a[aria-current="true"] { background: var(--ink); color: var(--cream); }

/* ─── Botones ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650; line-height: 1;
  padding: 15px 26px; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-soft); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Hero / ficha de producto ─────────────────────────────────────────── */
.product {
  display: grid; gap: clamp(28px, 5vw, 64px);
  grid-template-columns: 1.05fr .95fr;
  align-items: start;
  padding: clamp(24px, 4vw, 48px) 0 clamp(32px, 5vw, 64px);
}
@media (max-width: 900px) { .product { grid-template-columns: 1fr; } }
/* Sin esto la tira de miniaturas (8 x 76px) fija el ancho minimo de su
   columna y estrangula la caja de compra: los tracks de un grid no bajan
   de su min-content salvo que se les diga. */
.product > * { min-width: 0; }

.gallery-main {
  background: var(--cream-deep); border-radius: var(--radius-lg);
  overflow: hidden; aspect-ratio: 1 / 1;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: flex; gap: 10px; margin-top: 12px; overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumbs button {
  flex: 0 0 76px; width: 76px; height: 76px; padding: 0; cursor: pointer;
  border-radius: 12px; overflow: hidden;
  border: 2px solid transparent; background: var(--cream-deep);
}
.gallery-thumbs button[aria-current="true"] { border-color: var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sage); background: var(--sage-tint);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
h1 {
  font-size: clamp(32px, 4.2vw, 50px); line-height: 1.1;
  letter-spacing: -.03em; font-weight: 800; margin: 0 0 18px;
}
h1 .soft { color: var(--ink-soft); display: block; }
.lede { font-size: 18px; color: var(--ink-soft); margin: 0 0 28px; max-width: 46ch; }

.price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 26px; }
.price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.price-note { font-size: 14px; color: var(--ink-soft); }

.field-label {
  display: block; font-size: 13px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 10px;
}
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
[data-axis="pack"] .swatch { min-width: 52px; justify-content: center; }
.swatch {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 9px 15px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white);
  font: inherit; font-size: 15px; font-weight: 600;
}
.swatch:hover { border-color: var(--ink-soft); }
.swatch[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--cream); }
.swatch:has(.dot) { padding-left: 9px; }
.swatch .dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid rgba(35,32,29,.15); background: var(--cream-deep);
}
.swatch:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
/* Existe, pero no con lo elegido en el otro eje: se atenua sin tacharlo,
   porque pulsarlo es valido y reajusta la otra opcion. */
.swatch.is-unavailable:not(:disabled) { opacity: .45; }
.swatch.is-unavailable[aria-pressed="true"] { opacity: 1; }

.qty { display: flex; align-items: center; gap: 0; margin-bottom: 24px; width: max-content;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); }
.qty button {
  width: 42px; height: 44px; border: 0; background: none; cursor: pointer;
  font-size: 20px; color: var(--ink-soft); border-radius: 999px;
}
.qty button:hover { color: var(--ink); }
.qty output { min-width: 34px; text-align: center; font-weight: 700; }

.stock { font-size: 14px; color: var(--sage); margin: 14px 0 0; font-weight: 600; }
.stock.out { color: var(--accent-dark); }

.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px;
  font-size: 14px; color: var(--ink-soft); }
.trust span { display: inline-flex; align-items: center; gap: 7px; }

/* ─── Central ──────────────────────────────────────────────────────────── */
.hub-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(24px, 3vw, 40px); }
.hub-hero h1 { font-size: clamp(34px, 5vw, 58px); max-width: 18ch; }
.hub-hero .lede { font-size: 19px; max-width: 54ch; }

.store-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.store-card {
  display: flex; flex-direction: column; text-decoration: none; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--white);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.store-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow);
  border-color: var(--card-accent, var(--accent));
}
.store-card-img { position: relative; aspect-ratio: 3 / 2; background: var(--cream-deep); }
.store-card-img img { width: 100%; height: 100%; object-fit: cover; }
.store-card-emoji {
  position: absolute; left: 18px; bottom: -22px;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 25px;
  background: var(--white); border: 1px solid var(--line);
}
.store-card-body { padding: 34px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.store-card-body h3 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.store-card-body p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.store-card-meta {
  margin-top: auto; padding-top: 16px;
  display: flex; align-items: baseline; gap: 10px; justify-content: space-between;
  font-size: 13px; font-weight: 650; color: var(--card-accent, var(--accent));
}
.store-card-meta em { font-style: normal; color: var(--ink-soft); font-weight: 400; }

/* ─── Portada ──────────────────────────────────────────────────────────── */
.home-hero { padding: clamp(36px, 5vw, 72px) 0 clamp(28px, 4vw, 56px); }
.home-hero-grid {
  display: grid; gap: clamp(28px, 5vw, 56px);
  grid-template-columns: 1fr 1fr; align-items: center;
}
.home-hero-grid > * { min-width: 0; }
@media (max-width: 860px) { .home-hero-grid { grid-template-columns: 1fr; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.home-hero-card {
  position: relative; display: block; text-decoration: none;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--cream-deep); aspect-ratio: 1 / 1;
}
.home-hero-card img { width: 100%; height: 100%; object-fit: cover; }
.home-hero-tag {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  background: rgba(251, 248, 244, .94); backdrop-filter: blur(6px);
  border-radius: 999px; padding: 12px 20px;
}
.home-hero-tag strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-hero-tag span { font-weight: 800; white-space: nowrap; }

.cat-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cat-card {
  display: block; text-decoration: none; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); transition: border-color .15s ease, transform .15s ease;
}
.cat-card:hover { border-color: var(--ink-soft); transform: translateY(-2px); }
.cat-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--cream-deep); }
.cat-card-body { padding: 18px 20px 20px; }
.cat-card-body h3 { margin: 0 0 4px; font-size: 18px; }
.cat-card-body span { font-size: 14px; color: var(--ink-soft); }

/* ─── Rejilla de productos ─────────────────────────────────────────────── */
.pgrid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pcard {
  display: flex; flex-direction: column; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.pcard:hover { border-color: var(--ink-soft); transform: translateY(-2px); }
.pcard-img { position: relative; aspect-ratio: 1 / 1; background: var(--cream-deep); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard-flag {
  position: absolute; top: 12px; left: 12px;
  background: var(--ink); color: var(--cream);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
}
.pcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.pcard-body h3 {
  margin: 0; font-size: 16px; line-height: 1.35; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard-meta { margin: 0; font-size: 13px; color: var(--ink-soft); }
.pcard-price { margin: 6px 0 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }

.home-trust { background: var(--cream-deep); }

/* ─── Migas ────────────────────────────────────────────────────────────── */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding-top: 26px; font-size: 14px; color: var(--ink-soft);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs strong {
  font-weight: 600; color: var(--ink);
  max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── Secciones ────────────────────────────────────────────────────────── */
section { padding: clamp(44px, 6vw, 84px) 0; }
section + section { border-top: 1px solid var(--line); }
h2 {
  font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15;
  letter-spacing: -.025em; font-weight: 800; margin: 0 0 34px;
}
h3 { font-size: 20px; letter-spacing: -.015em; margin: 0 0 8px; }

.cards { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.card p { margin: 0; color: var(--ink-soft); font-size: 16px; }

.steps { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; }
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--sage-tint); color: var(--sage);
  font-weight: 800; font-size: 19px; margin-bottom: 14px;
}
.step p { margin: 0; color: var(--ink-soft); }

.specs { border-top: 1px solid var(--line); }
.specs div {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.specs dt { color: var(--ink-soft); margin: 0; }
.specs dd { margin: 0; font-weight: 600; text-align: right; }

/* Descripcion que viene de CJ: se le impone la tipografia de la tienda,
   porque el HTML original trae estilos de su propio panel. */
.rte {
  max-width: 68ch; color: var(--ink-soft);
  /* Cinturon y tirantes: el HTML de los proveedores trae de todo, y ninguna
     descripcion puede volver a ensanchar la pagina. */
  overflow-wrap: anywhere;
}
.rte p { margin: 0 0 16px; }
.rte h3, .rte h4 { color: var(--ink); margin: 28px 0 10px; font-size: 18px; }
.rte ul, .rte ol { margin: 0 0 16px; padding-left: 22px; }
.rte li { margin-bottom: 8px; }
.rte strong, .rte b { color: var(--ink); }

details.faq {
  border-bottom: 1px solid var(--line); padding: 6px 0;
}
details.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 18px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 24px; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 0 0 18px; color: var(--ink-soft); max-width: 62ch; }

/* ─── Formularios ──────────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

label.field { display: block; }
label.field > span {
  display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 13px 15px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--white);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.checkout-layout { display: grid; gap: 40px; grid-template-columns: 1.25fr .75fr; align-items: start; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }

.summary {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; position: sticky; top: 92px;
}
.summary-line { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; }
.summary-line.total {
  border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px;
  font-size: 20px; font-weight: 800;
}
.summary-line .muted { color: var(--ink-soft); }

.ship-option {
  display: flex; align-items: center; gap: 13px;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer; background: var(--white);
}
.ship-option:has(input:checked) { border-color: var(--ink); }
.ship-option input { width: auto; }
.ship-option .name { font-weight: 650; }
.ship-option .meta { font-size: 13px; color: var(--ink-soft); }
.ship-option .cost { margin-left: auto; font-weight: 700; }

.notice { border-radius: 12px; padding: 14px 16px; font-size: 15px; margin: 16px 0; }
.notice.error { background: #fdeee7; color: var(--accent-dark); }
.notice.info { background: var(--sage-tint); color: var(--sage); }

/* ─── Pie ──────────────────────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--line); padding: 34px 0;
  font-size: 14px; color: var(--ink-soft);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
}

.center-narrow { max-width: 560px; margin: 0 auto; text-align: center; padding: 80px 0; }

/* ─── Paginas legales ──────────────────────────────────────────────────── */
.site-legal {
  display: flex; flex-wrap: wrap; gap: 10px 20px;
  padding: 0 0 34px; font-size: 13px;
}
.site-legal a { color: var(--ink-soft); text-decoration: none; }
.site-legal a:hover { color: var(--ink); text-decoration: underline; }

.legal-doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding: 56px 0 72px; }
@media (max-width: 820px) { .legal-doc { grid-template-columns: 1fr; gap: 28px; } }

.legal-nav { display: flex; flex-direction: column; gap: 4px; align-self: start; position: sticky; top: 24px; }
@media (max-width: 820px) { .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; } }
.legal-nav a {
  padding: 8px 12px; border-radius: var(--radius); font-size: 14px;
  color: var(--ink-soft); text-decoration: none;
}
.legal-nav a:hover { background: var(--cream-deep); color: var(--ink); }
.legal-nav a.is-current { background: var(--ink); color: var(--white); font-weight: 650; }

.legal-doc article { max-width: 68ch; }
.legal-doc h1 { font-size: clamp(28px, 3.4vw, 38px); margin: 0 0 28px; }
.legal-doc h2 { font-size: 19px; margin: 36px 0 12px; }
.legal-doc p, .legal-doc li { line-height: 1.7; color: var(--ink-soft); }
.legal-doc ul, .legal-doc ol { padding-left: 22px; margin: 12px 0; }
.legal-doc li { margin-bottom: 8px; }
.legal-doc strong { color: var(--ink); }
.legal-doc a { color: var(--ink); }
.legal-doc code {
  background: var(--cream-deep); padding: 2px 6px;
  border-radius: 5px; font-size: 13px;
}
.legal-doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.legal-doc th, .legal-doc td {
  border-bottom: 1px solid var(--line); padding: 10px 12px 10px 0;
  text-align: left; vertical-align: top; color: var(--ink-soft);
}
.legal-doc th { color: var(--ink); font-weight: 650; }
.legal-doc blockquote {
  margin: 16px 0; padding: 18px 20px;
  background: var(--cream-deep); border-radius: var(--radius);
}
.legal-doc blockquote p { margin: 0 0 10px; }
.legal-doc blockquote p:last-child { margin-bottom: 0; }
