/* ==========================================================================
   CITURLAN USA — storefront styles
   Palette is calm and warm on purpose: this is a dignity category, and the
   design should feel like everyday underwear, not like medical supplies.
   ========================================================================== */

:root {
  --ink: #1b2a2f;
  --ink-soft: #4d5f66;
  --ink-mute: #7c8b90;
  --paper: #fcfaf7;
  --surface: #ffffff;
  --sand: #f4efe8;
  --line: #e6dfd6;
  --line-soft: #f0eae2;

  --brand: #2f6e68;
  --brand-dark: #22524d;
  --brand-tint: #e9f3f1;
  --accent: #c26b57;
  --accent-tint: #fbeee9;

  --ok: #2f7d4f;
  --warn: #9a6a12;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(27, 42, 47, .06), 0 2px 8px rgba(27, 42, 47, .04);
  --shadow: 0 2px 6px rgba(27, 42, 47, .06), 0 14px 34px rgba(27, 42, 47, .08);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  --wrap: 1180px;
  --gap: clamp(1rem, 2.5vw, 2rem);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.18; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- language switching ----------
   Both languages ship in the HTML so search engines and the payment reviewer
   can read either one; CSS reveals only the active locale. */
html[lang="en"] .l-es, html[lang="es"] .l-en { display: none !important; }

/* ---------- layout ---------- */
.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--tint { background: var(--sand); }
.section--brand { background: var(--brand-tint); }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.eyebrow {
  font: 600 .74rem/1 var(--sans);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .9rem;
  display: block;
}
.lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--ink-soft); max-width: 62ch; }
.section-head { max-width: 60ch; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .82rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: transparent; color: var(--brand-dark); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); background: var(--brand-tint); }
.btn--light { background: #fff; color: var(--brand-dark); }
.btn--light:hover { background: var(--brand-tint); }
.btn--block { width: 100%; }
.btn--lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- header ---------- */
.topbar {
  background: var(--brand-dark);
  color: #dcece9;
  font-size: .8rem;
  text-align: center;
  padding: .55rem 1rem;
}
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 250, 247, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.25rem; padding: .85rem 0; }
.logo {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 600;
  letter-spacing: .04em; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.logo span { color: var(--brand); }
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .93rem; font-weight: 500;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand-dark); border-bottom-color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: .6rem; }

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.lang-switch button {
  border: 0; background: transparent; padding: .35rem .7rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--ink-mute); cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--brand); color: #fff; }

.cart-link {
  position: relative; display: inline-flex; align-items: center; gap: .4rem;
  text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 600;
  border: 1px solid var(--line); border-radius: 999px; padding: .42rem .85rem; background: #fff;
}
.cart-link:hover { border-color: var(--brand); }
.cart-count {
  min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem;
  display: inline-grid; place-items: center;
  background: var(--brand); color: #fff; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
}
.cart-count[data-empty="true"] { background: var(--ink-mute); }

.menu-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .45rem .6rem; cursor: pointer; }

@media (max-width: 900px) {
  /* Toggle sits at the far left so it can never be squeezed off-screen by the
     logo, language switch and bag competing for a narrow header. */
  .header-inner { gap: .7rem; flex-wrap: wrap; }
  .menu-toggle { display: block; order: -1; }
  .nav {
    /* flex-basis rather than width: as a flex item it would otherwise shrink
       to fit the row instead of wrapping onto its own line. */
    order: 4; flex: 0 0 100%; margin-left: 0; display: none;
    flex-direction: column; gap: 0; padding-bottom: .5rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
  .header-actions { margin-left: auto; }
}

@media (max-width: 420px) {
  .logo { font-size: 1.15rem; }
  .cart-link { padding: .42rem .6rem; }
  .cart-link .l { display: none !important; }
  .topbar { font-size: .72rem; }
}

/* ---------- hero ---------- */
.hero { background: linear-gradient(170deg, var(--sand) 0%, var(--paper) 72%); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: .6rem; }
.hero .lede { margin-bottom: 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.8rem; }
.hero-img { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.hero-img img { aspect-ratio: 4/3.4; object-fit: contain; padding: 1.5rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; font-size: .85rem; color: var(--ink-soft); }
.trust-row span { display: inline-flex; align-items: center; gap: .45rem; }
.trust-row svg { color: var(--brand); flex: none; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-img { order: -1; } }

/* ---------- product cards ---------- */
.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.9rem); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #d8cfc2; }
.card-media { position: relative; background: #fff; border-bottom: 1px solid var(--line-soft); }
.card-media img { aspect-ratio: 1/1; object-fit: contain; padding: 1rem; }
.card-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { color: var(--brand-dark); }
.card-tagline { font-size: .88rem; color: var(--ink-soft); margin-bottom: .9rem; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }

.badge {
  position: absolute; top: .75rem; left: .75rem; z-index: 2;
  background: var(--brand); color: #fff;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: 999px;
}
.badge--accent { background: var(--accent); }
.pill {
  display: inline-block; background: var(--brand-tint); color: var(--brand-dark);
  font-size: .74rem; font-weight: 700; letter-spacing: .05em;
  padding: .22rem .55rem; border-radius: 999px;
}

.price { font-weight: 700; font-size: 1.08rem; white-space: nowrap; }
.price s { color: var(--ink-mute); font-weight: 400; font-size: .85em; margin-right: .35rem; }

/* ---------- product detail ---------- */
.pdp { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(1.75rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; } }

.gallery { position: sticky; top: 96px; }
@media (max-width: 900px) { .gallery { position: static; } }
.gallery-main {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: .8rem;
}
.gallery-main img { aspect-ratio: 1/1; object-fit: contain; padding: 1.5rem; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: .5rem; }
.gallery-thumbs button {
  padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer; aspect-ratio: 1/1;
}
.gallery-thumbs button[aria-current="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; padding: .3rem; }

.pdp-title { margin-bottom: .35rem; font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
.pdp-tagline { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 1.25rem; }
.pdp-price { display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1.5rem; }
.pdp-price .price { font-size: 1.7rem; }

.option-group { margin-bottom: 1.35rem; }
.option-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: .55rem;
}
.option-label a { font-size: .8rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
.choices { display: flex; flex-wrap: wrap; gap: .55rem; }
.choice {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: .55rem 1.05rem; cursor: pointer; font-size: .92rem; font-weight: 500;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.choice:hover { border-color: var(--brand); }
.choice[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden; }
.qty button { border: 0; background: transparent; width: 2.5rem; height: 2.7rem; font-size: 1.15rem; cursor: pointer; color: var(--ink-soft); }
.qty button:hover { background: var(--brand-tint); color: var(--brand-dark); }
.qty output { min-width: 2.2rem; text-align: center; font-weight: 600; }

.add-row { display: flex; gap: .75rem; align-items: center; margin-bottom: 1.25rem; }
.add-row .btn { flex: 1; }

.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { position: relative; padding-left: 1.7rem; margin-bottom: .85rem; color: var(--ink-soft); font-size: .95rem; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--brand); opacity: .5;
}
.feature-list strong { color: var(--ink); }

.spec-box { background: var(--sand); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-top: 1.5rem; }
.spec-box h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .5rem; }
.spec-box p { margin: 0; font-size: .93rem; }

/* ---------- layers diagram ---------- */
.layers { display: grid; gap: .6rem; counter-reset: layer; }
.layer {
  display: grid; grid-template-columns: 2.35rem 1fr; gap: 1rem; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem;
}
.layer::before {
  counter-increment: layer; content: counter(layer);
  display: grid; place-items: center;
  width: 2.35rem; height: 2.35rem; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; font-size: .95rem;
}
.layer h4 { font-family: var(--sans); font-size: 1rem; margin-bottom: .15rem; }
.layer p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* ---------- generic content pages ---------- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; font-size: 1.12rem; }
.prose ul, .prose ol { padding-left: 1.25rem; color: var(--ink-soft); }
.prose li { margin-bottom: .5rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .93rem; }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.prose th { background: var(--sand); font-weight: 600; }
.page-head { background: var(--sand); padding: clamp(2.25rem, 5vw, 3.5rem) 0; border-bottom: 1px solid var(--line); }
.page-head p { margin: 0; color: var(--ink-soft); max-width: 60ch; }
.updated { font-size: .85rem; color: var(--ink-mute); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 520px; }

/* ---------- accordion ---------- */
details.faq {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin-bottom: .7rem;
}
details.faq[open] { border-color: #d8cfc2; box-shadow: var(--shadow-sm); }
details.faq summary {
  cursor: pointer; font-weight: 600; list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--brand); font-size: 1.35rem; line-height: 1; flex: none; }
details.faq[open] summary::after { content: "−"; }
details.faq .faq-body { padding-top: .8rem; color: var(--ink-soft); font-size: .95rem; }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- forms ---------- */
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .72rem .9rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: .95rem;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-tint); }
.field textarea { min-height: 110px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.req { color: var(--accent); }

/* ---------- cart & checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 1.9rem); }
.panel + .panel { margin-top: 1.25rem; }
.panel h2 { font-size: 1.25rem; }

.summary { position: sticky; top: 96px; }
@media (max-width: 900px) { .summary { position: static; } }

.line-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.line-item:last-of-type { border-bottom: 0; }
.line-item img { width: 72px; height: 72px; object-fit: contain; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: .3rem; }
.line-item h4 { font-family: var(--sans); font-size: .95rem; font-weight: 600; margin-bottom: .2rem; }
.line-item .meta { font-size: .84rem; color: var(--ink-mute); }
.line-remove { background: none; border: 0; padding: 0; color: var(--ink-mute); font-size: .82rem; text-decoration: underline; cursor: pointer; margin-top: .35rem; }
.line-remove:hover { color: var(--accent); }

.totals { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.totals div { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; font-size: .95rem; color: var(--ink-soft); }
.totals .grand { border-top: 1px solid var(--line); margin-top: .75rem; padding-top: .75rem; font-size: 1.15rem; font-weight: 700; color: var(--ink); }

.notice { border-radius: var(--radius); padding: 1rem 1.15rem; font-size: .92rem; margin-bottom: 1.25rem; }
.notice--info { background: var(--brand-tint); color: var(--brand-dark); }
.notice--warn { background: #fdf4e3; color: var(--warn); }
.notice--error { background: var(--accent-tint); color: #8f3f2c; }
.notice--ok { background: #e9f5ee; color: var(--ok); }
.notice p:last-child { margin-bottom: 0; }

.empty-state { text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem) 1rem; }
.empty-state svg { color: var(--ink-mute); margin-bottom: 1rem; }

.payment-methods { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; }
.payment-methods span {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  padding: .35rem .7rem; font-size: .78rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .02em;
}

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #c3d1d4; padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; margin-top: clamp(3rem, 6vw, 5rem); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; margin-bottom: 2.5rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: #c3d1d4; text-decoration: none; font-size: .92rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .logo { color: #fff; display: inline-block; margin-bottom: .75rem; }
.site-footer .logo span { color: #7fb8b0; }
.footer-about { font-size: .9rem; line-height: 1.7; color: #9fb2b6; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between;
  font-size: .82rem; color: #8da0a4;
}
.footer-contact { font-size: .9rem; color: #9fb2b6; }
.footer-contact strong { color: #fff; font-weight: 600; }

/* ---------- misc ---------- */
.breadcrumb { font-size: .85rem; color: var(--ink-mute); padding: 1rem 0 0; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(1rem);
  background: var(--ink); color: #fff; padding: .8rem 1.3rem; border-radius: 999px;
  font-size: .9rem; box-shadow: var(--shadow); z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media print { .site-header, .site-footer, .topbar { display: none; } }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
