/* ==========================================================================
   EvoGolf Shop — Light Theme Stylesheet
   ========================================================================== */

/* ---------- 1. Custom Properties ---------- */
:root {
  /* Brand colors */
  --color-primary: #F03A00;
  --color-primary-hover: #D93300;

  /* Background scale (cool gray surfaces) */
  --bg-deepest: #E2E8F0;
  --bg-base: #F5F7FA;
  --bg-raised: #FFFFFF;
  --bg-surface: #F1F5F9;

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #1E293B;
  --text-tertiary: #334155;
  --text-muted: #64748B;
  --text-faint: #94A3B8;

  /* Borders */
  --border-color: #E2E8F0;
  --border-color-hover: #CBD5E1;

  /* Dark surfaces (header/footer) */
  --bg-dark: #0B1120;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: rgba(255, 255, 255, 0.45);
  --text-on-dark-faint: rgba(255, 255, 255, 0.35);
  --border-dark: rgba(255, 255, 255, 0.1);
  --focus-ring-dark: rgba(240, 58, 0, 0.7);

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Spacing */
  --container-max: 1140px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Z-index scale */
  --z-header: 100;
  --z-overlay: 200;
  --z-drawer: 300;
  --z-toast: 400;
}

/* ---------- 2. Reset + Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  color: var(--text-tertiary);
  background: var(--bg-base);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.cart-open {
  overflow: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.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;
}

.is-hidden {
  display: none !important;
}

/* ---------- 3. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

main {
  flex: 1;
}

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--bg-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-header__logo {
  display: flex;
  flex-direction: column;
}

.site-header__logo:hover {
  opacity: 0.9;
}

.site-header__logo-img {
  width: 240px;
  height: auto;
  display: block;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__tagline {
  color: var(--text-on-dark-faint);
  font-size: 8px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.06em;
}

.site-header__divider {
  width: 1px;
  height: 24px;
  background: var(--border-dark);
}

.site-header__shop-badge {
  color: var(--color-primary);
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
}

.cart-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.cart-toggle:hover {
  color: rgba(255, 255, 255, 0.9);
}

.cart-toggle:focus-visible {
  outline: 2px solid var(--focus-ring-dark);
  outline-offset: 2px;
}

.cart-toggle svg {
  width: 24px;
  height: 24px;
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.6875rem;
  font-weight: var(--font-weight-bold);
  line-height: 18px;
  text-align: center;
  color: #FFFFFF;
  background: var(--color-primary);
  border-radius: 9px;
}

.cart-badge:empty,
.cart-badge.is-hidden {
  display: none;
}

.site-header__logo:focus-visible {
  outline: 2px solid var(--focus-ring-dark);
  outline-offset: 2px;
}

@media (max-width: 639px) {
  .site-header__tagline {
    display: none;
  }
  .site-header__logo-img {
    width: 180px;
  }
}

/* ---------- 5. Hero ---------- */
.hero {
  text-align: center;
  padding: 56px var(--space-md) 36px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(240, 58, 0, 0.08);
  border: 1px solid rgba(240, 58, 0, 0.14);
  border-radius: 999px;
}

.hero__title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin-bottom: 12px;
}

.hero__subtitle {
  font-size: clamp(1.02rem, 2vw, 1.28rem);
  color: var(--text-tertiary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

@media (max-width: 639px) {
  .hero {
    padding: 44px var(--space-md) 28px;
  }

  .hero__subtitle {
    max-width: 32ch;
  }
}

/* ---------- 6. Product Grid ---------- */
.products-section {
  padding: var(--space-lg) 0 var(--space-3xl);
}

/* Product toolbar (filters + view toggle) */
.product-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

/* Category filters */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* View toggle */
.view-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.view-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.view-toggle__icon {
  width: 18px;
  height: 18px;
}

/* Show grid icon in list mode, list icon in grid mode */
.view-toggle__icon--list { display: none; }
.view-toggle__icon--grid { display: block; }

.product-grid.grid-view ~ .product-toolbar .view-toggle__icon--list,
.grid-view .view-toggle__icon--list { display: block; }
.grid-view .view-toggle__icon--grid { display: none; }

/* JS toggles these via parent class on body */
body.grid-mode .view-toggle__icon--grid { display: none; }
body.grid-mode .view-toggle__icon--list { display: block; }

.filter-btn {
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.filter-btn.is-active {
  color: var(--text-primary);
  border-color: var(--color-primary);
  background: rgba(240, 58, 0, 0.1);
}

.product-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ---------- 7. Product Cards (List Layout) ---------- */
.product-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: center;
  transition: border-color var(--transition-base);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.product-card:hover {
  border-color: var(--border-color-hover);
}

.product-card__image {
  width: 88px;
  height: 88px;
  min-height: auto;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  margin: 8px;
  border-radius: var(--radius-sm);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__placeholder {
  color: var(--text-faint);
  font-size: 0.75rem;
}

.product-card__body {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 1;
  gap: var(--space-lg);
  min-width: 0;
}

.product-card__info {
  flex: 1;
  min-width: 0;
}

.product-card__name {
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  line-height: 1.3;
  text-wrap: balance;
}

.product-card__description {
  font-size: 0.8125rem;
  color: var(--text-faint);
  line-height: 1.5;
  margin-top: var(--space-xs);
}

.product-card__price {
  font-size: 15px;
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  flex-shrink: 0;
}

.product-card .btn {
  flex-shrink: 0;
  width: auto;
}

.product-card .btn--primary {
  padding: 8px 14px;
  font-size: 0.8125rem;
}

.product-card__name-link {
  text-decoration: none;
  color: inherit;
}

.product-card__name-link:hover .product-card__name {
  color: var(--text-primary);
}

.product-card__buttons {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
  align-items: center;
}


/* Stack vertically on mobile (list view) */
@media (max-width: 639px) {
  .product-card {
    flex-direction: column;
    align-items: stretch;
  }

  .product-card__image {
    width: 100%;
    height: 160px;
    min-height: auto;
    margin: 8px;
    border-radius: var(--radius-sm);
  }

  .product-card__body {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
    padding: var(--space-md);
  }
}

/* ---------- Grid View (toggle) ---------- */
.product-grid.grid-view {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

@media (min-width: 1024px) {
  .product-grid.grid-view {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-grid.grid-view .product-card {
  flex-direction: column;
  align-items: stretch;
}

.product-grid.grid-view .product-card__image {
  width: auto;
  height: auto;
  aspect-ratio: 1;
  min-height: auto;
  margin: 8px;
  border-radius: var(--radius-sm);
}

.product-grid.grid-view .product-card__body {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-sm);
  padding: var(--space-md);
}

.product-grid.grid-view .product-card__price {
  margin-top: auto;
}

.product-grid.grid-view .product-card .btn {
  width: 100%;
}

/* On mobile, grid view goes to 1 column */
@media (max-width: 639px) {
  .product-grid.grid-view {
    grid-template-columns: 1fr;
  }
}

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast);
  min-height: 44px;
}

.btn--primary {
  color: #FFFFFF;
  background: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--secondary {
  color: var(--text-tertiary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}

.btn--secondary:hover {
  border-color: var(--border-color-hover);
  color: var(--text-primary);
}

.btn--full {
  width: 100%;
}

.btn--loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.btn--loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ---------- 9. Cart Overlay + Drawer ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.26);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 100%;
  background: #FFFFFF;
  border-left: 1px solid var(--border-color);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-base);
}

.cart-drawer.is-open {
  transform: translateX(0);
}

@media (max-width: 639px) {
  .cart-drawer {
    width: 100%;
  }
}

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.cart-drawer__title {
  font-size: 1.125rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.cart-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.cart-close:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.cart-close svg {
  width: 20px;
  height: 20px;
}

/* ---------- 10. Cart Items ---------- */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md) var(--space-lg);
}

.cart-empty-msg {
  text-align: center;
  padding: var(--space-2xl) 0;
  color: var(--text-faint);
  font-size: 0.9375rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-sm) var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item__name {
  font-size: 0.9375rem;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  grid-column: 1 / -1;
}

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.cart-item__qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.cart-item__qty-btn:hover {
  color: var(--text-primary);
  background: var(--bg-raised);
}

.cart-item__qty {
  min-width: 24px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.cart-item__total {
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.cart-item__remove {
  color: var(--text-faint);
  font-size: 0.75rem;
  transition: color var(--transition-fast);
  padding: 2px 0;
}

.cart-item__remove:hover {
  color: var(--color-primary);
}

.cart-item__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
}

/* ---------- Cart Footer ---------- */
.cart-footer {
  border-top: 1px solid var(--border-color);
  padding: var(--space-lg);
  flex-shrink: 0;
}

.cart-footer__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-sm);
}

.cart-footer__label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cart-footer__value {
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.cart-footer__row--total {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-color);
}

.cart-footer__row--total .cart-footer__label {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

.cart-footer__row--total .cart-footer__value {
  font-size: 1.125rem;
}

.cart-footer__note {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: right;
  margin-bottom: var(--space-md);
}

/* ---------- 11. Error Toast ---------- */
.error-toast {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-raised);
  border: 1px solid rgba(240, 58, 0, 0.3);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  max-width: 400px;
  transform: translateX(calc(100% + var(--space-lg)));
  opacity: 0;
  transition: transform var(--transition-base), opacity var(--transition-base);
  pointer-events: none;
}

.error-toast.is-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.error-toast__message {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  flex: 1;
}

.error-toast__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text-faint);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.error-toast__close:hover {
  color: var(--text-primary);
}

.error-toast__close svg {
  width: 16px;
  height: 16px;
}

/* ---------- 12. Loading Spinner ---------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-3xl) 0;
}

.loading-spinner__circle {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-surface);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner__text {
  font-size: 0.875rem;
  color: var(--text-faint);
}

/* ---------- 13. Success Page ---------- */
.success-section {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.success-section .container {
  max-width: 600px;
}

/* Loading state */
.success-loading {
  padding: var(--space-3xl) 0;
}

/* Error fallback */
.success-error {
  padding: var(--space-2xl) 0;
}

.success-error__title {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.success-error__text {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* Order details */
.success-checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: var(--space-lg);
  color: #22C55E;
}

.success-checkmark svg {
  width: 64px;
  height: 64px;
}

.success-title {
  font-size: 1.75rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.success-subtitle {
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.success-email {
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  font-size: 0.875rem;
}

/* Order summary table */
.order-summary {
  background: var(--bg-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  text-align: left;
  overflow: hidden;
}

.order-summary__heading {
  padding: var(--space-md) var(--space-lg);
  font-size: 0.9375rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.order-summary table {
  width: 100%;
  border-collapse: collapse;
}

.order-summary th,
.order-summary td {
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
}

.order-summary th {
  color: var(--text-faint);
  font-weight: var(--font-weight-medium);
  text-align: left;
}

.order-summary td {
  color: var(--text-tertiary);
}

.order-summary td:last-child {
  text-align: right;
}

.order-summary tbody tr {
  border-bottom: 1px solid var(--border-color);
}

.order-summary tfoot tr:first-child td {
  padding-top: var(--space-md);
}

.order-summary tfoot td {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.order-summary tfoot td:last-child {
  color: var(--text-tertiary);
}

.order-summary__total td {
  font-weight: var(--font-weight-bold);
  font-size: 1rem !important;
  color: var(--text-primary) !important;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
}

/* Shipping address */
.shipping-address {
  text-align: left;
  margin-bottom: var(--space-xl);
}

.shipping-address__label {
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.shipping-address__content {
  font-size: 0.9375rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* Support line */
.success-support {
  font-size: 0.875rem;
  color: var(--text-faint);
  margin-bottom: var(--space-xl);
}

.success-support a {
  color: var(--color-primary);
}

/* CTAs */
.success-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  background: var(--bg-dark);
  margin-top: var(--space-3xl);
  padding: 18px var(--space-md);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.site-footer__icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F03A00, #FF6A3D);
  flex-shrink: 0;
}

.site-footer__copy {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer__links a {
  font-size: 11px;
  font-weight: var(--font-weight-regular);
  color: var(--text-on-dark-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  min-height: auto;
}

.site-footer__links a:hover {
  color: rgba(255, 255, 255, 0.7);
}

.site-footer__links a:focus-visible {
  outline: 2px solid var(--focus-ring-dark);
  outline-offset: 2px;
}

@media (max-width: 639px) {
  .site-footer .container {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .site-footer__links {
    justify-content: center;
    order: 0;
  }

  .site-footer__brand {
    order: 1;
  }
}

/* ---------- 15. Refund Policy Page ---------- */
.refund-section,
.policy-section {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.refund-section .container,
.policy-section .container {
  max-width: 1080px;
}

.policy-shell {
  display: grid;
  gap: 22px;
}

.policy-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.policy-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.88rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(19, 32, 43, 0.05);
}

.policy-back:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.policy-back svg {
  width: 16px;
  height: 16px;
}

.policy-hero {
  padding: 34px 36px 32px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(240, 58, 0, 0.12), transparent 28%),
    linear-gradient(180deg, #13202B 0%, #1C2B38 100%);
  color: #FFFFFF;
}

.policy-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.74rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FF6A3D;
}

.policy-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.policy-intro {
  max-width: 72ch;
  color: rgba(255, 255, 255, 0.98);
  line-height: 1.75;
  font-size: 1.03rem;
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.policy-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 999px;
}

.policy-topbar .policy-chip {
  background: rgba(255, 255, 255, 0.7);
}

.policy-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(19, 32, 43, 0.06);
}

.policy-block {
  padding: 24px 28px;
  border-top: 1px solid var(--border-color);
}

.policy-block:first-child {
  border-top: 0;
}

.policy-block--muted {
  background: #F8FAFC;
}

.policy-card h2,
.refund-section h2,
.policy-section h2 {
  font-size: 1.125rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.policy-card p,
.policy-card li,
.refund-section p,
.policy-section p,
.refund-section li,
.policy-section li {
  color: var(--text-tertiary);
  line-height: 1.72;
}

.policy-card p,
.refund-section p,
.policy-section p {
  margin-bottom: var(--space-md);
}

.policy-card ul,
.refund-section ul,
.policy-section ul {
  list-style: disc;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.policy-card li,
.refund-section li,
.policy-section li {
  margin-bottom: var(--space-xs);
}

.policy-card a,
.refund-section a,
.policy-section a {
  color: var(--color-primary);
}

.policy-card a:hover,
.refund-section a:hover,
.policy-section a:hover {
  color: var(--color-primary-hover);
}

.policy-todo {
  font-size: 0.875rem;
  color: var(--text-faint);
}

@media (max-width: 767px) {
  .policy-hero,
  .policy-block {
    padding-left: 20px;
    padding-right: 20px;
  }

  .policy-intro {
    font-size: 0.98rem;
  }
}

/* ---------- 16. Product Detail Page ---------- */
.product-detail-section {
  padding: var(--space-lg) 0 var(--space-3xl);
}

/* Breadcrumb */
.product-detail__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.product-detail__breadcrumb-back {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.product-detail__breadcrumb-back svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.product-detail__breadcrumb-back:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.product-detail__breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.product-detail__breadcrumb a:hover {
  color: var(--text-primary);
}

.product-detail__breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Error state */
.product-detail__error {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.product-detail__error-title {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.product-detail__error-text {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* Two-column layout */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

@media (max-width: 767px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* Gallery */
.product-detail__gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.product-detail__image-main {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail__image-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail__image-main video.carousel-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Carousel arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-primary);
  border-radius: 50%;
  transition: background var(--transition-fast);
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 1);
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
}

.carousel-arrow--prev {
  left: 12px;
}

.carousel-arrow--next {
  right: 12px;
}

/* Carousel thumbnails */
.carousel-thumbs {
  display: flex;
  gap: var(--space-sm);
}

.carousel-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border-color);
  background: var(--bg-surface);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition-fast);
}

.carousel-thumb:hover {
  border-color: var(--border-color-hover);
}

.carousel-thumb.is-active {
  border-color: var(--color-primary);
}

.carousel-thumb img,
.carousel-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info column */
.product-detail__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.product-detail__name {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.product-detail__price {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.product-detail__description {
  font-size: 0.9375rem;
  color: var(--text-tertiary);
  line-height: 1.7;
}

.product-detail__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-detail__features li {
  position: relative;
  padding-left: var(--space-lg);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.product-detail__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* Variant Selector */
.variant-selector {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.variant-selector__label {
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
}

.variant-selector__options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.variant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 44px;
  padding: 0 var(--space-md);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.variant-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.variant-btn.is-active {
  color: var(--text-primary);
  border-color: var(--color-primary);
  background: rgba(240, 58, 0, 0.1);
}

/* Actions (qty + button) */
.product-detail__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  margin-top: var(--space-lg);
}

.product-detail__qty {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.product-detail__qty-value {
  min-width: 36px;
  text-align: center;
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

/* ---------- Related Products ---------- */
.related-products {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--border-color);
}

.related-products__heading {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.related-products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 767px) {
  .related-products__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 479px) {
  .related-products__grid {
    grid-template-columns: 1fr;
  }
}

.related-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-base);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.related-card:hover {
  border-color: var(--border-color-hover);
  color: inherit;
}

.related-card__image {
  aspect-ratio: 4 / 3;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card__name {
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-sm) var(--space-xs);
  line-height: 1.3;
}

.related-card__price {
  font-size: 0.875rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  padding: 0 var(--space-sm) var(--space-sm);
}

/* Card buttons — stack on mobile in list view */
@media (max-width: 639px) {
  .product-card__buttons {
    flex-direction: column;
  }

  .product-card__buttons .btn {
    width: 100%;
  }
}

/* Grid view card buttons */
.product-grid.grid-view .product-card__buttons {
  flex-direction: column;
}

.product-grid.grid-view .product-card__buttons .btn {
  width: 100%;
}

/* ── Product Badge (e.g. "Most Popular") ── */
.product-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(240, 58, 0, 0.12);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.product-badge--placeholder {
  visibility: hidden;
}

.product-detail__badge {
  margin-bottom: 12px;
}
