/* ==========================================================================
   KeyBrainer Bookstore Stylesheet
   Theme: Premium Medical Light Style
   ========================================================================== */

:root {
  --primary: hsl(238, 96%, 71%);       /* High-yield Indigo */
  --primary-hover: hsl(238, 96%, 66%);
  --primary-glow: hsla(238, 96%, 71%, 0.15);
  
  --accent: hsl(160, 84%, 39%);        /* Clinical Emerald */
  --accent-hover: hsl(160, 84%, 33%);
  --accent-glow: hsla(160, 84%, 39%, 0.2);
  
  --text-primary: hsl(220, 40%, 13%);
  --text-secondary: hsl(215, 20%, 45%);
  --text-muted: hsl(215, 16%, 65%);
  
  --bg-primary: hsl(210, 25%, 98%);    /* Clinical Cool White Background */
  --bg-secondary: #ffffff;
  --border-light: rgba(226, 232, 240, 1);
  --border-glow: rgba(110, 114, 252, 0.2);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  
  --shadow-sm: 0 4px 10px rgba(9, 14, 36, 0.02);
  --shadow-md: 0 10px 30px rgba(9, 14, 36, 0.05);
  --shadow-lg: 0 25px 60px rgba(9, 14, 36, 0.1);
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section-padding {
  padding: var(--spacing-xl) 0;
}

/* Typography styles */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.2rem;
  letter-spacing: -0.01em;
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem auto;
}

.section-header h2 {
  margin-bottom: var(--spacing-xs);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #5a5df5);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #0f9f72);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--border-light);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
}

/* Header & Nav */
#site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  padding: 1rem 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.logo span {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-primary);
}

.logo-sub {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: var(--accent) !important;
  background: var(--accent-glow);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-sm);
  margin-left: var(--spacing-lg);
  flex-grow: 1;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  background: var(--primary-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Header Cart Button */
.header-cart-btn {
  position: relative;
}

.cart-btn-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: hsl(0, 84%, 55%);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

/* Lang Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-dropbtn {
  background: transparent;
  border: 1px solid var(--border-light);
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.lang-dropbtn:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.lang-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  min-width: 140px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  z-index: 110;
  margin-top: 6px;
  padding: 4px;
}

.lang-dropdown-content.show {
  display: block;
}

.lang-dropdown-content button {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-dropdown-content button:hover {
  background: var(--primary-glow);
  color: var(--primary);
}

/* ==========================================================================
   Hero Section styling
   ========================================================================== */
.hero-section {
  padding: var(--spacing-xl) 0;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  background: radial-gradient(circle at 80% 20%, rgba(110, 114, 252, 0.05) 0%, transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-tagline {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.5rem;
}

.hero-content h1 {
  margin-bottom: var(--spacing-sm);
  font-size: 3.2rem;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.hero-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: 2rem;
}

.trust-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 30px;
}

/* Hero visuals book stack */
.hero-stack-container {
  position: relative;
  height: 380px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stack-img {
  position: absolute;
  width: 170px;
  height: 230px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.stack-1 {
  transform: rotate(-10deg) translateX(-60px) translateY(10px);
  z-index: 10;
}

.stack-2 {
  transform: rotate(5deg) translateX(60px) translateY(10px);
  z-index: 12;
}

.stack-3 {
  transform: rotate(-1deg) translateY(-20px);
  z-index: 15;
  width: 190px;
  height: 260px;
}

.hero-stack-container:hover .stack-1 {
  transform: rotate(-18deg) translateX(-100px) translateY(20px) scale(1.05);
}

.hero-stack-container:hover .stack-2 {
  transform: rotate(15deg) translateX(100px) translateY(20px) scale(1.05);
}

.hero-stack-container:hover .stack-3 {
  transform: translateY(-30px) scale(1.05);
  box-shadow: 0 30px 70px rgba(110, 114, 252, 0.15);
}

/* ==========================================================================
   Catalog styling
   ========================================================================== */
.controls-container {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

#catalog-search {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 0.95rem;
  outline: none;
  background: rgba(0,0,0,0.005);
  color: var(--text-primary);
  transition: var(--transition);
}

#catalog-search:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 12px var(--primary-glow);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 10px var(--primary-glow);
}

/* Catalog Grid & Cards */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.catalog-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  text-align: left;
}

.catalog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-glow);
}

.card-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.card-visual-box {
  background: rgba(0,0,0,0.01);
  height: 240px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.02);
}

.card-book-cover {
  width: 140px;
  height: 190px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.catalog-card:hover .card-book-cover {
  transform: translateY(-8px) scale(1.04) rotate(-1deg);
  box-shadow: 0 15px 25px rgba(0,0,0,0.12);
}

.card-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-info h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.35;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: var(--spacing-sm);
  flex-grow: 1;
}

/* Formatting tiers selector inside card */
.card-formats {
  border-top: 1px solid var(--border-light);
  padding-top: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.format-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.01);
  border: 1px solid var(--border-light);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.format-option:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
}

.format-option.active {
  background: var(--primary-glow);
  border-color: var(--primary);
}

.format-label-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.format-radio {
  accent-color: var(--primary);
}

.format-label-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.format-price-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
}

/* ==========================================================================
   Publishing Security section
   ========================================================================== */
.publishing-section {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: radial-gradient(circle at 10% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
}

.publishing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.publishing-content .tagline {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.5rem;
}

.publishing-content h2 {
  margin-bottom: var(--spacing-sm);
}

.publishing-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.publishing-features {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.pub-feature-card {
  display: flex;
  gap: var(--spacing-sm);
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: var(--spacing-sm);
  border-radius: 16px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.pub-feat-icon {
  font-size: 1.8rem;
  background: var(--primary-glow);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pub-feature-card h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.pub-feature-card p {
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.4;
}

/* Stamping Live Demo Visualizer */
.publishing-demo-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.demo-card-header {
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-light);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.demo-dot:nth-child(1) { background: #ef4444; }
.demo-dot:nth-child(2) { background: #eab308; }
.demo-dot:nth-child(3) { background: #22c55e; }

.demo-card-body {
  padding: 1.5rem;
  background: #cbd5e1;
}

.demo-pdf-page {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  padding: 1.5rem;
  min-height: 250px;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.demo-stamp-text {
  font-family: monospace;
  font-size: 0.55rem;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 4px;
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
}

.demo-pdf-content {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.demo-pdf-content strong {
  color: var(--text-primary);
  font-size: 0.8rem;
  display: block;
  margin-bottom: var(--spacing-xs);
}

.demo-pdf-content p {
  font-size: 0.75rem;
  margin-bottom: var(--spacing-sm);
}

.demo-choices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: monospace;
  font-size: 0.7rem;
}

/* ==========================================================================
   Shopping Cart Drawer Styles
   ========================================================================== */
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 6, 23, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

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

.cart-drawer-panel {
  position: absolute;
  top: 0;
  right: -450px;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: #ffffff;
  box-shadow: -10px 0 35px rgba(9, 14, 36, 0.1);
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1060;
  border-left: 1px solid var(--border-light);
}

.cart-drawer-overlay.open .cart-drawer-panel {
  right: 0;
}

.cart-drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-header h3 {
  font-size: 1.25rem;
}

.close-drawer-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.close-drawer-btn:hover {
  color: var(--text-primary);
}

.cart-drawer-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.empty-cart-message {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.empty-cart-message p {
  margin-bottom: var(--spacing-md);
  font-size: 1.05rem;
}

.cart-item {
  display: flex;
  gap: var(--spacing-sm);
  padding: 1rem;
  background: rgba(110, 114, 252, 0.01);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  position: relative;
  align-items: center;
  text-align: left;
}

.cart-item-img {
  width: 50px;
  height: 65px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.cart-item-info {
  flex-grow: 1;
}

.cart-item-info h4 {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
  font-weight: 700;
  line-height: 1.35;
}

.cart-item-edition {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 2px;
  display: block;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 800;
}

.btn-remove-item {
  background: transparent;
  border: none;
  color: hsl(0, 84%, 55%);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-remove-item:hover {
  background: hsla(0, 84%, 60%, 0.05);
}

/* Drawer Footer */
.cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-light);
  background: rgba(110, 114, 252, 0.005);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.cart-summary-row strong, #cart-subtotal {
  font-weight: 800;
  color: var(--text-primary);
}

.promo-row {
  font-size: 0.85rem;
}

/* ==========================================================================
   Checkout Modal & Success Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 6, 23, 0.6);
  backdrop-filter: blur(5px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.modal-container {
  width: 100%;
  max-width: 820px;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  transition: var(--transition);
  max-height: 90vh;
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.25rem;
}

.close-modal-btn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.close-modal-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
}

/* Grid Layout for Checkout modal */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.checkout-summary-col {
  border-right: 1px solid var(--border-light);
  padding-right: 2.5rem;
  text-align: left;
}

.checkout-summary-col h4, .checkout-payment-col h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.review-items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-height: 170px;
  overflow-y: auto;
}

.review-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.review-item-title {
  font-weight: 700;
  color: var(--text-primary);
  max-width: 70%;
}

.review-totals {
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  margin-bottom: 1.5rem;
}

.review-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  margin-bottom: 4px;
}

.discount-row {
  font-size: 0.9rem;
}

.review-total-row strong {
  font-weight: 900;
  color: var(--primary);
  font-size: 1.2rem;
}

/* DRM Safety Card Banner */
.drm-safety-badge {
  display: flex;
  gap: 0.75rem;
  background: rgba(16, 185, 129, 0.04);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  padding: 1rem;
  border-radius: 12px;
  align-items: flex-start;
}

.badge-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.drm-safety-badge strong {
  display: block;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 2px;
}

.drm-safety-badge p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Payment Tabs Options */
.payment-tabs {
  display: flex;
  background: rgba(0,0,0,0.03);
  padding: 4px;
  border-radius: 10px;
  gap: 2px;
  margin-bottom: 1.5rem;
}

.pay-tab {
  flex-grow: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.55rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition);
}

.pay-tab.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.payment-panels {
  position: relative;
}

.payment-panel {
  display: none;
}

.payment-panel.active {
  display: block;
}

.panel-instruction {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.4;
  text-align: left;
}

/* PromptPay QR Code Visual Mockup */
.qr-code-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  border-radius: 16px;
}

.mock-qr-code {
  width: 150px;
  height: 150px;
  background-color: #f7f9fc;
  border: 4px solid #113566;
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.qr-pattern-box {
  width: 120px;
  height: 120px;
  background-image: 
    linear-gradient(45deg, #113566 25%, transparent 25%), 
    linear-gradient(-45deg, #113566 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #113566 75%), 
    linear-gradient(-45deg, transparent 75%, #113566 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0px;
  opacity: 0.85;
}

.mock-qr-code::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border: 5px solid #113566;
  background: #f7f9fc;
  box-sizing: border-box;
}

.mock-qr-code::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 5px solid #113566;
  background: #f7f9fc;
  box-sizing: border-box;
}

.qr-logo-overlay {
  position: absolute;
  background: #113566;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 900;
  padding: 3px 5px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  text-transform: uppercase;
  z-index: 10;
}

.mock-qr-code::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: qrScan 3s linear infinite;
  z-index: 8;
}

@keyframes qrScan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.qr-timer {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.qr-timer span {
  color: hsl(0, 84%, 55%);
  font-family: monospace;
}

.qr-payment-info {
  width: 100%;
  background: rgba(0,0,0,0.01);
  border-radius: 12px;
  padding: 0.75rem var(--spacing-sm);
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border-light);
  text-align: left;
}

/* Credit Card Form */
.form-group {
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-group input {
  padding: 0.7rem var(--spacing-sm);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.88rem;
  outline: none;
  background: rgba(0,0,0,0.005);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 8px var(--primary-glow);
}

.form-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--spacing-sm);
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap input {
  width: 100%;
  padding-right: 2.2rem;
}

.card-brand-icon {
  position: absolute;
  right: 12px;
  font-size: 1.1rem;
}

/* PayPal Form buttons */
.paypal-buttons-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.btn-paypal-checkout {
  background: #FFC439;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-paypal-checkout:hover {
  background: #F2BA36;
}

.paypal-logo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-style: italic;
  color: #003087;
  font-size: 1.05rem;
}

.btn-paypal-card-checkout {
  background: #2C2E2F;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}

.btn-paypal-card-checkout:hover {
  background: #202223;
}

/* ==========================================================================
   Success Delivery Simulator
   ========================================================================== */
.success-container {
  max-width: 580px;
  text-align: center;
}

.success-header {
  background: linear-gradient(to bottom, rgba(16, 185, 129, 0.04), transparent);
  padding: 2.2rem 2rem 0.75rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-icon-badge {
  width: 68px;
  height: 68px;
  background: var(--accent);
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px var(--accent-glow);
  margin-bottom: 1rem;
}

.success-header h3 {
  font-size: 1.45rem;
  margin-bottom: 4px;
}

.success-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.success-body {
  padding: 0.75rem 2rem 2.2rem 2rem;
}

.success-main-p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  text-align: left;
}

.delivery-box {
  background: rgba(110, 114, 252, 0.01);
  border: 1px solid var(--border-light);
  padding: 1.25rem;
  border-radius: 16px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.delivery-box h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.delivery-warning {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.85rem;
}

.stamped-info-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 1.25rem;
}

.stamped-info-card strong {
  color: var(--text-primary);
}

/* Download list for purchased books */
.download-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.download-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 0.75rem;
  border-radius: 10px;
}

.download-link-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.download-link-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.download-link-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
}

.btn-download-action {
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
#bookstore-footer {
  background: hsl(220, 25%, 95%);
  border-top: 1px solid var(--border-light);
  padding: var(--spacing-xl) 0 var(--spacing-lg) 0;
  text-align: left;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.footer-logo-col p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 10px;
  max-width: 320px;
}

.footer-links-col h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-links-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links-col a, .footer-links-col li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: var(--spacing-md);
  display: flex;
  justify-content: center;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Overrides
   ========================================================================== */
@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.8rem; }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-trust-badges {
    justify-content: center;
  }
  
  .publishing-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .logo span, .logo-sub {
    display: none;
  }
  
  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .nav-links {
    margin-left: 8px;
    gap: 0;
    flex-grow: 0;
    display: flex !important;
  }
  
  .nav-secondary-item {
    display: none;
  }
  
  .nav-back-link {
    font-size: 0.72rem !important;
    padding: 6px 10px !important;
    background: var(--primary-glow) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(26, 86, 219, 0.15);
    white-space: nowrap;
    border-radius: 6px;
  }
  
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .checkout-summary-col {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--spacing-md);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* 5-Language Selection Pill */
.lang-pill {
  background: #ffffff;
  border: 1px solid var(--border-light);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.lang-pill:hover, .lang-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.lang-pill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(0,0,0,0.02);
  border-color: var(--border-light);
  color: var(--text-muted);
  box-shadow: none;
}

