:root {
  --color-bg: #fdf6f2;
  --color-bg-soft: #fbeef1;
  --color-card: #ffffff;
  --color-text: #4a3a3a;
  --color-muted: #8d7876;
  --color-accent: #d98fa8;
  --color-accent-dark: #b96d88;
  --color-accent-light: #f8e3ea;
  --color-gold: #c9a876;
  --color-border: #f2dfe4;
  --shadow-soft: 0 10px 30px -12px rgba(184, 109, 136, 0.25);
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header / Footer ---------- */

.site-header {
  padding: 1.5rem 0;
}

.site-header-inner {
  display: flex;
  align-items: center;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-logo-img {
  display: block;
  height: 42px;
  width: auto;
}

.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0 3rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.site-footer-legal-links {
  margin-bottom: 0.75rem;
}

.site-footer-legal-links a {
  color: var(--color-muted);
}

/* ---------- Legal pages (terms.php, privacy.php) ---------- */

.legal-page {
  max-width: 720px;
  padding-top: 3rem;
  padding-bottom: 4rem;
  line-height: 1.6;
}

.legal-page h2 {
  margin-top: 2rem;
}

/* ---------- Product (simple) ---------- */

/* Single column, media stacked above info, on mobile ("por supuesto" — expected). Becomes a
   two-column grid (media left, info right) at desktop widths, matching the reference layout. */
.product-layout {
  max-width: 980px;
  padding-top: 1rem;
}

@media (min-width: 860px) {
  .product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
  }
}

.product-media {
  margin-bottom: 2rem;
}

@media (min-width: 860px) {
  .product-media {
    margin-bottom: 0;
  }
}

.product-info {
  text-align: left;
}

.product-info h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.1rem;
  line-height: 1.25;
  margin: 0 0 0.6rem;
  color: #3a2c2c;
}

.product-info .subtitle {
  font-size: 1.05rem;
  color: var(--color-muted);
  margin: 0 0 1.5rem;
}

.product-image {
  width: 100%;
  max-width: 420px;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: var(--color-card);
}

@media (min-width: 860px) {
  .product-image {
    max-width: 100%;
    margin: 0;
  }
}

.product-rating {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.product-rating .stars {
  color: var(--color-gold);
  letter-spacing: 1px;
  font-size: 1.05rem;
}

.offer-price-block {
  margin: 0 0 0.85rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.offer-price-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.75rem;
}

.offer-price-compare {
  text-decoration: line-through;
  color: var(--color-muted);
  font-size: 1.1rem;
}

.offer-price-sale {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  color: #3a2c2c;
}

.offer-discount-badge {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.3rem 0.9rem;
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 999px;
}

.viewers-now {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  color: #1a1414;
  font-weight: 700;
  font-size: 1rem;
}

.viewers-count {
  color: #d32f2f;
}

.viewers-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex-shrink: 0;
  background: #2e9e4c;
  border-radius: 50%;
  animation: viewers-pulse 1.6s ease-in-out infinite;
}

@keyframes viewers-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.urgency-timer {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--color-accent-dark), var(--color-accent));
  color: #fff;
  border-radius: var(--radius-lg);
  text-align: center;
}

.urgency-timer-label {
  margin: 0 0 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.urgency-timer-clock {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.urgency-timer-clock > div {
  min-width: 56px;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
}

.urgency-timer-clock span {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.urgency-timer-clock small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.buy-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(185, 109, 136, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.buy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(185, 109, 136, 0.6);
}

.trust-badges {
  margin-top: 1.5rem;
}

.trust-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
  font-weight: 700;
  color: #3a2c2c;
}

.trust-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  background: #2e9e4c;
  color: #fff;
  font-size: 0.75rem;
  border-radius: 50%;
}

.payment-icons {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}

.payment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 34px;
  padding: 6px 8px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e3e8ee;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.payment-badge-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Sections ---------- */

.section-block {
  margin-top: 3.5rem;
}

.section-block h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: #3a2c2c;
  margin: 0 0 1.25rem;
  position: relative;
  display: inline-block;
}

.section-block h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 3px;
  margin-top: 0.5rem;
}

/* ---------- Testimonials ---------- */

.testimonials-section .product-rating {
  justify-content: flex-start;
  margin-bottom: 1.5rem;
}

.testimonial-list {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .testimonial-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial {
  margin: 0;
  padding: 1.25rem 1.4rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.testimonial-quote {
  margin: 0 0 0.6rem;
  font-weight: 700;
  color: #3a2c2c;
}

.testimonial-body {
  margin: 0 0 0.9rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.testimonial-author {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-accent-dark);
}

/* ---------- Mid-page CTA ---------- */

.mid-cta {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.mid-cta-label {
  margin: 0 0 1rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: #3a2c2c;
}

/* ---------- FAQ ---------- */

.faq-list details {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.7rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.faq-list summary::after {
  content: "+";
  color: var(--color-accent-dark);
  font-size: 1.2rem;
  font-weight: 700;
  margin-left: 1rem;
  transition: transform 0.15s ease;
}

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

.faq-list p {
  margin: 0.75rem 0 0;
  color: var(--color-muted);
}

/* ---------- Custom checkout (Stripe-like, own branding per product) ---------- */

.checkout-page {
  --checkout-accent: #0570de;
  --checkout-accent-ring: rgba(5, 112, 222, 0.35);
  --checkout-text: #30313d;
  --checkout-text-subdued: #6d7175;
  --checkout-border: #e3e8ee;
  --checkout-bg: #ffffff;
  --checkout-bg-subdued: #f5f5f5;
  --checkout-error: #df1b41;
  --checkout-radius-small: 8px;
  --checkout-radius-base: 12px;
  --checkout-shadow-small: 0 1px 2px -0.5px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.08),
    0 3px 6px -1.5px rgba(0, 0, 0, 0.08), 0 -0.5px 1.5px 0 rgba(0, 0, 0, 0.09);
  --checkout-shadow-base: 0 1px 2px -0.5px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.08),
    0 3px 6px -1.5px rgba(0, 0, 0, 0.08), 0 8px 16px -6px rgba(0, 0, 0, 0.06), 0 -0.5px 2px 0 rgba(0, 0, 0, 0.09);

  /* Plain block stacking on mobile — no grid. A grid container forced to min-height:100vh
     with only auto-sized rows stretches those rows to fill the leftover space by default
     (align-content: normal behaves as stretch for grid), which pushed .checkout-right taller
     than its content and threw off where the pay button landed relative to the address fields
     once the Address Element expanded. Plain flow has no such stretch behavior. */
  display: block;
  /* Real checkouts (e.g. Shopify's) don't stretch the form edge-to-edge on a wide screen —
     the whole thing is a compact, centered block. Matches that instead of a full 50/50 split. */
  max-width: 920px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--checkout-bg);
  color: var(--checkout-text);
}

@media (min-width: 860px) {
  .checkout-page {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    margin-top: 3rem;
    margin-bottom: 3rem;
    border: 1px solid var(--checkout-border);
    border-radius: var(--checkout-radius-base);
    box-shadow: var(--checkout-shadow-base);
    overflow: hidden;
  }
}

.checkout-left {
  padding: 2rem 2.25rem;
  background: var(--checkout-bg-subdued);
}

.checkout-right {
  padding: 2rem 2.25rem;
}

.checkout-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.checkout-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: var(--checkout-radius-small);
}

.checkout-product-name {
  color: var(--checkout-text-subdued);
  margin: 0 0 0.4rem;
}

.checkout-price {
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.checkout-bump {
  background: var(--checkout-bg);
  border: 1px solid var(--checkout-border);
  border-radius: var(--checkout-radius-base);
  box-shadow: var(--checkout-shadow-small);
  padding: 0.85rem 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.checkout-bump:has(:checked) {
  border-color: var(--checkout-accent);
}

.checkout-bump:has(:focus-visible) {
  border-color: var(--checkout-accent);
  box-shadow: 0 0 0 3px var(--checkout-accent-ring);
}

.checkout-bump-label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
  cursor: pointer;
}

.checkout-bump-label small {
  display: block;
  color: var(--checkout-text-subdued);
  font-size: 0.85rem;
  font-weight: 400;
}

.checkout-bump-price {
  font-weight: 600;
  white-space: nowrap;
}

/* Custom checkbox (native element, just restyled) — bordered square that fills with the
   accent color and shows a checkmark once checked, with a focus ring to match the inputs. */
.checkout-bump-label input[type="checkbox"] {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border: 1.5px solid var(--checkout-border);
  border-radius: 5px;
  background: var(--checkout-bg);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.checkout-bump-label input[type="checkbox"]:checked {
  background: var(--checkout-accent);
  border-color: var(--checkout-accent);
}

.checkout-bump-label input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.15rem;
  width: 0.3rem;
  height: 0.6rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkout-bump-label input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--checkout-accent-ring);
}

.checkout-right h2 {
  font-size: 0.9rem;
  margin: 1.25rem 0 0.5rem;
}

.checkout-right h2:first-child {
  margin-top: 0;
}

/* Fields are unlabeled inputs — the field name lives as the placeholder text inside the field
   itself (plus an aria-label for screen readers) instead of a separate <label> above it. Spacing
   between stacked fields is therefore owned by the input/select's own margin-top, reset to 0
   right after a section heading since the heading already carries its own margin-bottom. */
.checkout-right input[type="email"],
.checkout-right input[type="text"],
.checkout-right select {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--checkout-border);
  border-radius: var(--checkout-radius-small);
  font-size: 0.9rem;
  font-family: var(--font-body);
  color: var(--checkout-text);
  background: var(--checkout-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.checkout-right h2 + input[type="email"],
.checkout-right h2 + input[type="text"],
.checkout-right h2 + select {
  margin-top: 0;
}

.checkout-right input[type="email"]:focus,
.checkout-right input[type="text"]:focus,
.checkout-right select:focus {
  outline: none;
  border-color: var(--checkout-accent);
  box-shadow: 0 0 0 3px var(--checkout-accent-ring);
}

/* The split Stripe card fields (number/expiry/CVC) mount into these divs; give each the same
   bordered/focus treatment as the email input so every field reads as one consistent form.
   Stripe.js adds .StripeElement--focus/--invalid to the mounted div itself by default. */
.checkout-field {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--checkout-border);
  border-radius: var(--checkout-radius-small);
  background: var(--checkout-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.checkout-field.StripeElement--focus {
  border-color: var(--checkout-accent);
  box-shadow: 0 0 0 3px var(--checkout-accent-ring);
}

.checkout-field.StripeElement--invalid {
  border-color: var(--checkout-error);
}

/* Card number on its own row; expiry + CVC share a row below it, per explicit request (not
   combined into a single field like Stripe's default monolithic card element). Also reused for
   the postal-code/city pair in the billing address form below. */
.checkout-field-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.checkout-right h2 + .checkout-field-row {
  margin-top: 0;
}

.checkout-field-row > div,
.checkout-field-row > input {
  flex: 1;
  min-width: 0;
}

/* The row itself owns the top spacing (margin-top above) — an input's own margin-top would
   otherwise stack on top of that and double the gap versus the card-field divs beside it, which
   have no margin of their own. Needs to match the specificity of the ".checkout-right
   input[type]" rule above (class + attribute selector) to actually win the cascade. */
.checkout-right .checkout-field-row > input[type="text"] {
  margin-top: 0;
}

.checkout-pay-btn {
  width: 100%;
  /* Spacing owned by the button itself (margin-top), not the address field above it — simpler
     and avoids the address element's box interacting oddly with the gap on mobile. */
  margin-top: 2.5rem;
  padding: 0.8rem;
  background: var(--checkout-accent);
  color: #fff;
  border: none;
  border-radius: var(--checkout-radius-small);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--checkout-shadow-base);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.checkout-pay-btn:hover:not(:disabled) {
  filter: brightness(0.94);
}

.checkout-pay-btn:focus-visible {
  outline: none;
  box-shadow: var(--checkout-shadow-base), 0 0 0 3px var(--checkout-accent-ring);
}

.checkout-pay-btn:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

.checkout-error {
  color: var(--checkout-error);
  font-size: 0.9rem;
  min-height: 1.2rem;
  margin-top: 0.75rem;
}

.checkout-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.25rem 0 0.5rem;
}

.checkout-section-heading h2 {
  margin: 0;
}

.checkout-right .checkout-section-heading:first-child {
  margin-top: 0;
}

.checkout-payment-icons {
  justify-content: flex-start;
  margin: 0;
}

.checkout-payment-icons .payment-badge {
  width: 38px;
  height: 26px;
  padding: 4px 6px;
}

.checkout-trust-secure {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
}
