/* =====================================================
   LIGHT PAGES BASE (Cream + Burgundy + Gold)
   Applies when body has .pp-light
   ===================================================== */

:root {
  --pp-bg-color: #fbf6f5;
  --pp-bg-gradient:
    radial-gradient(1200px 520px at 70% 20%, rgba(92, 46, 46, 0.12), transparent 60%),
    radial-gradient(1100px 520px at 18% 10%, rgba(197, 142, 79, 0.18), transparent 55%),
    radial-gradient(900px 520px at 65% 90%, rgba(197, 142, 79, 0.12), transparent 60%),
    linear-gradient(180deg, #fbf6f5 0%, #f3eaea 100%);
}

html {
  background: var(--pp-bg-color) !important;
}

/* Ensure the root canvas is always the light gradient */
html,
body {
  background: var(--pp-bg-gradient) !important;
  background-color: var(--pp-bg-color) !important;
}

/* Hard guard: every light page uses the creamy gradient, even if other CSS leaks */
html:not([data-theme="dark"]) body {
  background: var(--pp-bg-gradient) !important;
  background-color: var(--pp-bg-color) !important;
  color: #3d1f1f !important;
}

/* Extra guard against any stray dark backgrounds */
html:not([data-theme="dark"]) body.pp-light,
html:not([data-theme="dark"]) body.pp-home,
html:not([data-theme="dark"]) body.pp-products,
html:not([data-theme="dark"]) body.pp-product-detail,
html:not([data-theme="dark"]) body.pp-cart,
html:not([data-theme="dark"]) body.pp-checkout {
  background: var(--pp-bg-gradient) !important;
  background-color: var(--pp-bg-color) !important;
  color: #3d1f1f !important;
}

body.pp-light {
  --pp-text: #3d1f1f;
  --pp-muted: #5a3b3b;
  --pp-accent: #5c2e2e;
  --pp-accent-strong: #7a4545;
  --pp-gold: #c58e4f;
  --pp-surface: rgba(255, 255, 255, 0.92);
  --pp-surface-soft: rgba(255, 255, 255, 0.78);
  --pp-border: rgba(92, 46, 46, 0.16);
  --pp-shadow: 0 22px 44px rgba(61, 31, 31, 0.12);
  --pp-radius: 20px;
  --bg-primary: #fbf6f5;
  --bg-secondary: #f3eaea;
  --pp-bg-color: #fbf6f5;
  --pp-bg-gradient: var(--pp-bg-gradient);
  --text-primary: #3d1f1f;
  --text-secondary: #5a3b3b;
  position: relative;
  background: var(--pp-bg-gradient) !important;
  background-color: var(--pp-bg-color) !important;
  color: var(--pp-text) !important;
}

/* Disable any extra page-bg overlays so all light pages share one background */
body.pp-light.pp-page-bg::before,
body.pp-light.pp-page-bg::after {
  content: none !important;
}

/* Hard fallback: force light background on key public pages even if pp-light is missing */
body.pp-home,
body.pp-products,
body.pp-product-detail,
body.pp-pricing,
body.pp-support,
body.pp-auth,
body.pp-track,
body.pp-track-order,
body.pp-notfound,
body.pp-verify {
  background: var(--pp-bg-gradient) !important;
  background-color: #fbf6f5 !important;
  color: var(--pp-text, #3d1f1f) !important;
}

body.pp-light::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../images/bg.3063284e012a.png") center/cover no-repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

/* Guard against system dark mode or persisted dark theme on light pages */
html[data-theme="dark"] body.pp-light {
  background: var(--pp-bg-gradient) !important;
  background-color: var(--pp-bg-color) !important;
  color: #3d1f1f !important;
}

html[data-theme="dark"] body.pp-light::before {
  opacity: 0.06;
}

body.pp-light > *:not(.pp-site-header):not(.pp-cart-drawer):not(.pp-cart-backdrop):not(.nav-overlay) {
  position: relative;
  z-index: 1;
}

/* Body-level link color reset.
   Scoped away from buttons (pp-btn, btn, btn-gold, btn-outline-primary)
   because those components set their own foreground for contrast. */
body.pp-light a:not(.pp-btn):not(.btn):not(.btn-gold):not(.btn-outline-primary):not(.pp-cart-toggle):not(.pp-wishlist-toggle):not(.pp-account-btn):not(.pp-login-btn) {
  color: inherit !important;
  text-decoration: none;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

/* Body-level link hover/focus: underline and accent color for discoverability */
body.pp-light main a:not(.pp-btn):not(.btn):not(.btn-gold):not(.btn-outline-primary):not(.pp-cart-toggle):not(.pp-wishlist-toggle):not(.pp-account-btn):not(.pp-login-btn):not([aria-current="page"]):hover,
body.pp-light main a:not(.pp-btn):not(.btn):not(.btn-gold):not(.btn-outline-primary):not(.pp-cart-toggle):not(.pp-wishlist-toggle):not(.pp-account-btn):not(.pp-login-btn):not([aria-current="page"]):focus-visible {
  color: var(--pp-accent) !important;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* Solid primary/accent CTAs keep white text on burgundy/gold bg */
body.pp-light a.pp-btn--primary,
body.pp-light a.pp-btn.primary {
  color: #fff !important;
}

body.pp-light a.pp-btn--accent,
body.pp-light a.pp-btn.accent,
body.pp-light a.btn-gold {
  color: var(--pp-charcoal) !important;
}

body.pp-light a.pp-btn--primary:hover,
body.pp-light a.pp-btn--primary:focus-visible,
body.pp-light a.pp-btn.primary:hover,
body.pp-light a.pp-btn.primary:focus-visible {
  color: #fff !important;
}

body.pp-light .site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--pp-border);
  backdrop-filter: blur(10px);
}

body.pp-light .main-nav a {
  color: var(--pp-text);
}

body.pp-light .main-nav a:hover,
body.pp-light .main-nav a:focus-visible,
body.pp-light .main-nav a.is-active {
  background: rgba(92, 46, 46, 0.1);
  color: var(--pp-accent);
}

body.pp-light .theme-toggle {
  background: var(--pp-accent);
  border-color: var(--pp-accent);
  color: #fff;
}

body.pp-light .nav-toggle {
  background: var(--pp-accent);
  border-color: var(--pp-accent);
}

body.pp-light .nav-toggle__bar {
  background: #fff;
}

body.pp-light .pp-cart-toggle,
body.pp-light .pp-wishlist-toggle {
  background: var(--pp-surface);
  border-color: var(--pp-border);
  color: var(--pp-accent);
}

body.pp-light .card {
  background: var(--pp-surface) !important;
  border: 1px solid var(--pp-border) !important;
  box-shadow: var(--pp-shadow);
  backdrop-filter: none !important;
}

body.pp-light .text-muted,
body.pp-light .text-secondary {
  color: var(--pp-muted) !important;
}

.pp-shell {
  padding: 1rem 0 3rem;
}

.pp-section-title {
  font-size: clamp(30px, 4.2vw, 44px);
  margin-bottom: 8px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.pp-section-subtitle {
  color: var(--pp-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

body.pp-light .pp-card,
body.pp-light .pp-panel {
  background: var(--pp-surface-soft);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  box-shadow: var(--pp-shadow);
  backdrop-filter: blur(10px);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

/* Subtle hover lift on interactive cards */
body.pp-light .pp-card.is-interactive:hover,
body.pp-light .pp-card.is-interactive:focus-within,
body.pp-light .pp-info-card:hover,
body.pp-light .pp-info-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 28px 56px rgba(61, 31, 31, 0.16);
  border-color: rgba(92, 46, 46, 0.22);
}

body.pp-light .pp-card.soft {
  background: var(--pp-surface);
}

.pp-card__body {
  padding: 20px;
}

body.pp-light .pp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(92, 46, 46, 0.14);
  color: var(--pp-accent);
  font-weight: 600;
  font-size: 0.82rem;
}

body.pp-light .pp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(92, 46, 46, 0.12);
  color: var(--pp-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

body.pp-light .pp-badge.is-gold {
  background: rgba(197, 142, 79, 0.25);
  color: #8a4b00;
}

body.pp-light .pp-badge.is-success {
  background: rgba(92, 146, 92, 0.18);
  color: #3f6b3f;
}

body.pp-light .pp-input,
body.pp-light .pp-select,
body.pp-light .pp-textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--pp-border);
  background: var(--pp-surface);
  padding: 10px 14px;
  color: var(--pp-text);
}

body.pp-light .pp-input:focus-visible,
body.pp-light .pp-select:focus-visible,
body.pp-light .pp-textarea:focus-visible {
  outline: none;
  border-color: var(--pp-accent);
  box-shadow: 0 0 0 3px rgba(92, 46, 46, 0.14);
}

body.pp-light .pp-btn-primary,
body.pp-light .pp-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
}

body.pp-light .pp-btn-primary {
  background: linear-gradient(135deg, var(--pp-accent), var(--pp-accent-strong));
  color: #fff;
  box-shadow: 0 14px 26px rgba(92, 46, 46, 0.22);
}

body.pp-light .pp-btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--pp-border);
  color: var(--pp-accent);
}

body.pp-light .pp-muted {
  color: var(--pp-muted);
}

/* Ensure navbar text is readable on light header */
body.pp-light .site-header {
  background: rgba(255, 255, 255, 0.92);
}

body.pp-light .main-nav a {
  color: #3d1f1f !important;
}

body.pp-light .main-nav a:hover,
body.pp-light .main-nav a:focus-visible,
body.pp-light .main-nav a.is-active {
  color: #5c2e2e !important;
  background: rgba(92, 46, 46, 0.10);
}

body.pp-light .pp-divider {
  height: 1px;
  background: var(--pp-border);
  margin: 18px 0;
}

.pp-grid-2 {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

@media (max-width: 980px) {
  .pp-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Mobile-safe layout guardrails */
body.pp-light .container,
body.pp-light section,
body.pp-light .pp-card {
  min-width: 0;
}

body.pp-light main#main-content > .content-wrapper > :first-child,
body.pp-light main#main-content > .content-wrapper > :first-child > :first-child,
body.pp-light main#main-content > .content-wrapper > div > section:first-child,
body.pp-light main#main-content > .content-wrapper > section:first-child {
  margin-top: 0 !important;
}

body.pp-light .pp-card,
body.pp-light .pp-card * {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  body.pp-light .container {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
}

/* ===== 404 PAGE ===== */
.pp-notfound__card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(92, 46, 46, 0.12);
  border-radius: 28px;
  box-shadow: 0 28px 56px rgba(61, 31, 31, 0.12);
  backdrop-filter: blur(10px);
}

.pp-notfound__illustration {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
}

.pp-notfound__box {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.18), rgba(92, 46, 46, 0.12));
  border-radius: 50%;
  color: var(--pp-accent, #5c2e2e);
  font-size: 3rem;
  border: 2px dashed rgba(92, 46, 46, 0.18);
}

.pp-notfound__sparkle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pp-gold, #c58e4f);
  opacity: 0.7;
  animation: pp-notfound-sparkle 2.4s ease-in-out infinite;
}

.pp-notfound__sparkle--1 { top: 8px; right: 22px; animation-delay: 0s; }
.pp-notfound__sparkle--2 { bottom: 18px; left: 10px; animation-delay: 0.6s; }
.pp-notfound__sparkle--3 { top: 50px; right: -6px; animation-delay: 1.2s; width: 9px; height: 9px; }

@keyframes pp-notfound-sparkle {
  0%, 100% { transform: scale(0.6); opacity: 0.3; }
  50% { transform: scale(1); opacity: 0.9; }
}

.pp-notfound__code {
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  margin: 0 0 0.25rem;
  background: linear-gradient(135deg, var(--pp-accent, #5c2e2e), var(--pp-gold, #c58e4f));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.pp-notfound__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--pp-text, #3d1f1f);
}

.pp-notfound__lede {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  line-height: 1.55;
}

.pp-notfound__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.pp-notfound__back {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.pp-notfound__back a {
  color: var(--pp-muted, #5a3b3b);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pp-notfound__back a:hover {
  color: var(--pp-accent, #5c2e2e);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .pp-notfound__sparkle {
    animation: none;
  }
}

@media (max-width: 480px) {
  .pp-notfound__actions a {
    width: 100%;
    text-align: center;
  }
}
