/* ========================================
   PayBook2Luxe.com — Bene2Luxe Design System
   Premium Ebook Marketplace Redesign
   ======================================== */

/* ---------- GOOGLE FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* ---------- DESIGN TOKENS ---------- */
:root {
  --bg: #F7F6F2;
  --panel: #FFFFFF;
  --panel2: #FAFAF8;
  --text: #1A1A1A;
  --muted: #737373;
  --muted2: #A3A3A3;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.12);
  --primary: #D93025;
  --primary-glow: rgba(217,48,37,0.35);
  --primary-hover: #C42920;
  --danger: #EF4444;
  --success: #22C55E;
  --warning: #F59E0B;
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.10);
  --shadow-panel: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-btn: 0 4px 14px rgba(217,48,37,0.35);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-pill: 9999px;
  --font: 'Poppins', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Subtle texture overlay on page background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.92; }
img { max-width: 100%; display: block; }

/* ---------- CONTAINER ---------- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ---------- HEADER — LIGHT, NOT DARK ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}
.site-header.compact {
  background: rgba(255,255,255,0.92);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

/* Brand */
.brand {
  font-weight: 900;
  letter-spacing: -0.3px;
  font-size: 20px;
  color: var(--text);
  transition: opacity 0.2s ease;
}
.brand:hover { opacity: 0.85; }
.brand-dot {
  color: var(--primary);
}

/* Navigation */
.nav {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}
.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  transition: all 0.2s ease;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(0,0,0,0.04);
}
.nav a.active {
  font-weight: 600;
  color: var(--primary);
  background: rgba(217,48,37,0.06);
}

/* Cart Pill in Header */
.cart-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
}
.cart-pill:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}
.cart-pill.static { cursor: default; }
.cart-pill-count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--primary);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* ---------- HERO SECTION ---------- */
.hero {
  padding: 48px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: stretch;
}
.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.08;
  letter-spacing: -1.2px;
  font-weight: 900;
  color: var(--text);
}
.lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hero Badges */
.hero-badges {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.badge {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  min-width: 120px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.badge-kpi {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}
.badge-label {
  font-size: 12px;
  color: var(--muted2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero Card */
.hero-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 28px;
  box-shadow: var(--shadow-panel);
  transition: box-shadow 0.3s ease;
}
.hero-card:hover {
  box-shadow: var(--shadow-card-hover);
}
.hero-card-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.hero-card-title {
  font-weight: 700;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.hero-card-sub {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}
.checklist {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.checklist li {
  position: relative;
  padding-left: 28px;
  line-height: 1.5;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: 800;
  font-size: 16px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34,197,94,0.1);
  border-radius: 50%;
}
.hero-card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn.primary {
  border: none;
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-btn);
  font-weight: 700;
}
.btn.primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(217,48,37,0.45);
  transform: translateY(-2px);
}
.btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--primary);
  text-transform: none;
  font-weight: 600;
}
.btn.ghost:hover {
  background: rgba(217,48,37,0.06);
  transform: translateY(-1px);
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 32px 0 48px;
}
.section-head {
  margin-bottom: 20px;
}
.section-head h1,
.section-head h2 {
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: var(--text);
}
.section-head h1 { font-size: 32px; }
.section-head h2 { font-size: 28px; }
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.section-foot {
  margin-top: 20px;
}

/* ---------- GRID-2 (Payment page layout) ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ---------- PANELS ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-panel);
}
.panel-title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
  color: var(--text);
}

/* ---------- FILTERS (Products page) ---------- */
.filters {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 14px;
  margin: 16px 0 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 12px;
  color: var(--muted2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.input {
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.input::placeholder {
  color: var(--muted2);
  font-weight: 400;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217,48,37,0.12);
}
select.input {
  appearance: auto;
  -webkit-appearance: auto;
  background-image: none;
  cursor: pointer;
  padding-right: 36px;
}

/* ---------- PRODUCT GRID ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

/* ---------- PRODUCT CARDS — MAJOR REDESIGN ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.card-top {
  height: 110px;
  position: relative;
  overflow: hidden;
}
.card-top::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.08) 100%);
}
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--text);
  font-weight: 700;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}
.card-badge.template {
  left: auto;
  right: 10px;
  background: rgba(59,130,246,0.92);
  border-color: rgba(59,130,246,0.3);
  color: #fff;
  font-size: 10px;
  animation: pulse-soft 2s ease-in-out infinite;
}
.cover-badge {
  position: absolute;
  z-index: 2;
}
.cover-badge.template {
  top: 16px;
  right: 16px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(59,130,246,0.92);
  border: 1px solid rgba(59,130,246,0.3);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.pill.template-pill {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.25);
  color: #2563EB;
  font-weight: 700;
}
.card-body {
  padding: 16px;
}
.card-title {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.3px;
  line-height: 1.3;
  color: var(--text);
}
.card-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted2);
  margin-bottom: 8px;
}
.card-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
  font-weight: 500;
}
.stars {
  color: var(--warning);
  font-weight: 700;
}
.dot {
  opacity: 0.5;
}
.card-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.price {
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
  letter-spacing: -0.3px;
}
.small {
  font-size: 12px;
  color: var(--muted2);
  font-weight: 500;
}
/* "Add to cart" button on card — small pill */
.card-row .btn {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.card-row .btn.primary {
  padding: 8px 16px;
  font-size: 12px;
}

/* ---------- PRODUCT DETAIL PAGE ---------- */
.product-page {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  margin-top: 16px;
}
.product-cover {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  min-height: 320px;
  background: linear-gradient(135deg, rgba(139,92,246,0.45), rgba(34,211,238,0.25));
  box-shadow: var(--shadow-panel);
  position: relative;
  overflow: hidden;
}
.product-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.06) 100%);
}
.product-info {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-panel);
}
.product-info h1 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.2;
  color: var(--text);
}
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.pill {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--panel2);
  font-weight: 600;
  transition: all 0.2s ease;
}
.pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.product-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin: 4px 0 16px;
}
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}
.backlink:hover {
  color: var(--primary);
  transform: translateX(-2px);
}

/* ---------- TEAM CARDS ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.team-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.team-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 26px;
  border: 3px solid var(--panel);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.team-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -0.2px;
}
.team-title {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.team-bio {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- CART DRAWER ---------- */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
}
.cart-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cart-drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(440px, 92vw);
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,0.1);
  animation: slideInRight 0.3s var(--ease);
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.cart-drawer-title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.icon-btn {
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--muted);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--panel);
  border-color: var(--border-strong);
}
.cart-drawer-body {
  padding: 16px 20px;
  overflow: auto;
  display: grid;
  gap: 12px;
  flex: 1;
}
.cart-drawer-foot {
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 14px;
}
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--panel2);
  transition: border-color 0.2s ease;
}
.cart-item:hover {
  border-color: var(--border-strong);
}
.cart-item-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}
.cart-item-meta {
  font-size: 12px;
  color: var(--muted2);
  font-weight: 500;
}
.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty button {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: var(--font);
}
.qty button:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(217,48,37,0.04);
}
.qty div {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

/* Cart Totals */
.cart-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}
.cart-total-row strong {
  color: var(--text);
  font-weight: 800;
  font-size: 16px;
}

/* ---------- DIVIDER ---------- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ---------- SUMMARY (checkout totals) ---------- */
.summary .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
}
.summary .row.total {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.summary .row.fx-row {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}
.fx-rate-info {
  font-size: 12px;
  color: var(--muted2);
  margin-top: 6px;
  font-style: italic;
}

/* ---------- FORM ---------- */
.form {
  display: grid;
  gap: 16px;
}

/* ---------- NOTICE ---------- */
.notice {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  color: var(--muted);
  background: var(--panel2);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- PAYMENT SECURE BLOCK ---------- */
.payment-secure {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(34,197,94,0.06), rgba(16,185,129,0.06));
  border: 1px solid rgba(34,197,94,0.18);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  transition: all 0.2s ease;
}
.payment-secure:hover {
  background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(16,185,129,0.08));
  border-color: rgba(34,197,94,0.25);
}
.payment-secure svg.lock-icon {
  width: 20px;
  height: 20px;
  color: var(--success);
  flex-shrink: 0;
}
.payment-secure span {
  font-size: 14px;
  font-weight: 600;
  color: #065F46;
}
.payment-secure .card-logos {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.payment-secure .card-logo {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.payment-secure .card-logo:hover {
  border-color: var(--border-strong);
}
.payment-secure .card-logo.visa { color: #1A1F71; }
.payment-secure .card-logo.mastercard { color: #EB001B; }
.payment-secure .card-logo.amex { color: #006FCF; }

/* ---------- CHECKOUT ITEMS ---------- */
.checkout-items {
  display: grid;
  gap: 10px;
}

/* ---------- PROSE ---------- */
.prose h1 { margin-top: 0; }
.prose p, .prose li { color: var(--muted); line-height: 1.65; }
.prose code {
  background: var(--panel2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}

/* ---------- CHART ---------- */
.chart {
  width: 100%;
  height: auto;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* ---------- MUTED UTILITY ---------- */
.muted { color: var(--muted); }

/* ---------- ANIMATIONS ---------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ---------- FOOTER — LIGHT ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: var(--panel);
  font-size: 13px;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
}
.footer-brand {
  font-weight: 800;
  color: var(--text);
  font-size: 14px;
}
.footer-sep {
  opacity: 0.5;
  user-select: none;
}
.footer-support a {
  color: var(--primary);
  font-weight: 600;
  transition: opacity 0.2s ease;
}
.footer-support a:hover { opacity: 0.8; }
.footer-company {
  font-size: 12px;
  opacity: 0.8;
}
.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: var(--text);
}
.footer-copy {
  color: var(--muted2);
  font-size: 12px;
  font-weight: 500;
}

/* ========================================
   PAYMENT SUCCESS / FAILED PAGES
   ======================================== */
.success-banner,
.failed-banner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 40px 32px;
  text-align: center;
  max-width: 560px;
  margin: 24px auto 0;
  box-shadow: var(--shadow-panel);
  animation: scale-in 0.4s var(--ease);
}
.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--success), #16A34A);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(34,197,94,0.3);
}
.failed-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--danger), #DC2626);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(239,68,68,0.3);
}
.success-banner h1,
.failed-banner h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--text);
}
.order-details {
  background: var(--panel2);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 28px 0;
  text-align: left;
  border: 1px solid var(--border);
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child {
  border-bottom: none;
}
.detail-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.detail-value {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.success-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 28px;
}
.failed-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 28px;
}
.fail-reasons {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  text-align: left;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
}
.fail-reasons li {
  position: relative;
  padding-left: 24px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.fail-reasons li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--danger);
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  top: 2px;
}

/* ---------- PAGINATION ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 36px 0 12px;
}
.pagination-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  font-family: var(--font);
  transition: all 0.2s ease;
}
.pagination-btn:hover:not([disabled]) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn);
}
.pagination-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.pagination-info {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

/* ========================================
   PAYMENT SUCCESS PAGE INLINE STYLES
   Override with new design system
   ======================================== */
.ebook-list { margin: 20px 0; text-align: left; }
.ebook-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 8px 0;
  background: var(--panel2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.ebook-item:hover {
  border-color: var(--border-strong);
  background: var(--panel);
}
.ebook-icon { font-size: 22px; flex-shrink: 0; }
.ebook-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.ebook-qty {
  font-size: 12px;
  color: var(--muted2);
  font-weight: 600;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  margin-top: 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow-btn);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.download-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217,48,37,0.45);
}
.download-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.download-btn .loading-spinner {
  border-color: rgba(255,255,255,0.3);
  border-top-color: #fff;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.status-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-completed {
  background: rgba(34,197,94,0.12);
  color: #16A34A;
}
.status-pending {
  background: rgba(245,158,11,0.12);
  color: #D97706;
}
.status-failed {
  background: rgba(239,68,68,0.12);
  color: var(--danger);
}
.error-box {
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.18);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
}

/* Payment failed status check */
.status-check {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: #3B82F6;
  font-weight: 500;
}
.status-check.success {
  background: rgba(34,197,94,0.06);
  border-color: rgba(34,197,94,0.18);
  color: #16A34A;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */
@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .product-page {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .hero-copy h1 {
    font-size: 32px;
  }
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }
  .header-inner {
    padding: 12px 0;
  }
  .brand {
    font-size: 18px;
  }
  .hero {
    padding: 32px 0 28px;
  }
  .hero-copy h1 {
    font-size: 26px;
    letter-spacing: -0.6px;
  }
  .lead {
    font-size: 14px;
  }
  .hero-cta {
    flex-direction: column;
  }
  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }
  .hero-badges {
    gap: 8px;
  }
  .badge {
    min-width: auto;
    flex: 1;
    text-align: center;
    padding: 12px;
  }
  .section-head h1 { font-size: 26px; }
  .section-head h2 { font-size: 22px; }
  .filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cart-drawer-panel {
    width: 100vw;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-left {
    flex-direction: column;
    gap: 6px;
  }
  .success-actions,
  .failed-actions {
    flex-direction: column;
  }
  .success-actions .btn,
  .failed-actions .btn {
    width: 100%;
    text-align: center;
  }
  .pagination {
    gap: 12px;
  }
  .pagination-btn {
    padding: 10px 18px;
  }
  .success-banner,
  .failed-banner {
    padding: 32px 20px;
    margin: 16px auto 0;
  }
  .success-icon,
  .failed-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }
  .success-banner h1,
  .failed-banner h1 {
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 14px;
  }
  .card-body {
    padding: 14px;
  }
  .card-top {
    height: 96px;
  }
  .panel {
    padding: 18px;
  }
}
