/*
Theme Name: Amble Books
Theme URI: https://amblebooks.com
Author: Amble Books Ghana
Author URI: https://amblebooks.com
Description: A modern, shadcn-inspired WooCommerce bookstore theme with clean typography, crisp borders, and a bold brand blue accent. Built for bookstores and stationery shops.
Version: 2.3.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: amblebooks
Tags: e-commerce, woocommerce, right-sidebar, custom-colors, custom-menu, featured-images, full-width-template, theme-options
WC requires at least: 8.0
WC tested up to: 9.0
*/

/* ============================================================
   DESIGN TOKENS — all UI decisions live here
   ============================================================ */
:root {
  /* Brand */
  --brand: #19398D;
  --brand-hover: #142E72;
  --brand-light: #E8ECF6;
  --brand-border: #B9C5E3;
  --brand-dark: #001B3C;

  /* Surface */
  --bg-page: #F3F5FB;
  --bg-card: #ffffff;
  --bg-muted: #F5F5F5;
  --bg-muted-hover: #EBEBEB;

  /* Text */
  --text-primary: #010101;
  --text-secondary: #454545;
  --text-tertiary: #737373;
  --text-on-brand: #ffffff;

  /* Border */
  --border-light: #E3E3E3;
  --border-mid: #D4D4D4;
  --border-strong: #A3A3A3;

  /* Feedback */
  --success: #0E7A68;
  --success-bg: #E3F6F2;
  --warning: #854f0b;
  --warning-bg: #faeeda;
  --danger: #9B0033;
  --danger-bg: #FBE6ED;
  --info: #0159B7;
  --info-bg: #E5F0FA;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-pill: 999px;

  /* Typography */
  --font-sans: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

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

  /* Layout */
  --container-max: 1280px;
  --sidebar-w: 260px;
  --nav-h: 56px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 0.9375rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--brand);
}
button,
input,
select,
textarea {
  font-family: inherit;
}
ul {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}
h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}
h2 {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
}
h3 {
  font-size: 1.25rem;
}
h4 {
  font-size: 1.0625rem;
  font-family: var(--font-sans);
  font-weight: 600;
}
h5,
h6 {
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  font-weight: 600;
}
p {
  line-height: 1.75;
}

.text-sm {
  font-size: 0.8125rem;
}
.text-xs {
  font-size: 0.75rem;
}
.text-muted {
  color: var(--text-secondary);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-8);
  }
}
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-10);
  }
}

.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.gap-1 {
  gap: var(--space-1);
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}
.gap-6 {
  gap: var(--space-6);
}
.mt-2 {
  margin-top: var(--space-2);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-6 {
  margin-bottom: var(--space-6);
}
.mb-8 {
  margin-bottom: var(--space-8);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}
.card-sm {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-5);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 0.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--brand) !important;
  color: var(--text-on-brand) !important;
  border-color: var(--brand) !important;
}
.btn-primary:hover {
  background: var(--brand-hover) !important;
  color: var(--text-on-brand) !important;
  border-color: var(--brand-hover) !important;
}
.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-mid);
}
.btn-secondary:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-bg);
}
.btn-danger:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn-lg {
  height: 48px;
  padding: 0 var(--space-8);
  font-size: 1rem;
  border-radius: var(--radius-lg);
}
.btn-sm {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: 0.8125rem;
}
.btn-xs {
  height: 26px;
  padding: 0 var(--space-2);
  font-size: 0.75rem;
}
.btn-full {
  width: 100%;
}
.btn-icon {
  width: 40px;
  padding: 0;
}
.btn-icon.btn-sm {
  width: 32px;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: var(--space-5);
}
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  letter-spacing: 0.02em;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-3);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}
.form-textarea {
  height: auto;
  padding: var(--space-3);
  resize: vertical;
  min-height: 100px;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(25, 57, 141, 0.1);
}
.form-input::placeholder {
  color: var(--text-tertiary);
}
.form-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}
.form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: var(--space-1);
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: 0.875rem;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================================
   BADGES & PILLS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.badge-brand {
  background: var(--brand);
  color: #fff;
}
.badge-light {
  background: var(--brand-light);
  color: var(--brand-dark);
  border: 0.5px solid var(--brand-border);
}
.badge-success {
  background: var(--success-bg);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge-muted {
  background: var(--bg-muted);
  color: var(--text-secondary);
}
.badge-pill {
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}

/* ============================================================
   DIVIDERS & SEPARATORS
   ============================================================ */
.divider {
  border: none;
  border-top: 0.5px solid var(--border-light);
  margin: var(--space-5) 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-tertiary);
  font-size: 0.8125rem;
}
.divider-text::before,
.divider-text::after {
  content: "";
  flex: 1;
  border-top: 0.5px solid var(--border-light);
}

/* ============================================================
   ANNOUNCEMENT BAR
   ============================================================ */
.announcement-bar {
  background: var(--brand);
  color: #fff;
  text-align: center;
  padding: 8px var(--space-5);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.announcement-bar a {
  color: #fff;
  text-decoration: underline;
}
.announcement-bar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: var(--nav-h);
}
.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.03em;
  white-space: nowrap;
  font-family: var(--font-sans);
  flex-shrink: 0;
}
.site-logo span {
  color: var(--text-primary);
}
.site-logo,
.custom-logo-link {
  display: flex;
  align-items: center;
}
.site-logo img,
.custom-logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: 100%;
}
.footer-brand .site-logo img,
.footer-brand .site-logo-img--footer {
  height: 120px;
  width: auto;
  margin-bottom: var(--space-2);
}
@media (max-width: 480px) {
  .site-logo img,
  .custom-logo {
    height: 38px;
  }
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.primary-nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 6px 10px;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  transition: color 300ms ease;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 350ms ease;
}
.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.primary-nav a:not(:hover)::after {
  transform-origin: right center;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--brand);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-muted);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0 12px;
  height: 36px;
  width: 220px;
  transition: border-color var(--transition);
}
.nav-search:focus-within {
  border-color: var(--brand);
}
.nav-search input {
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  color: var(--text-primary);
  outline: none;
  width: 100%;
}
.nav-search input::placeholder {
  color: var(--text-tertiary);
}
.nav-search .search-icon {
  color: var(--text-tertiary);
  font-size: 15px;
  flex-shrink: 0;
}

/* ── Live search dropdown ──────────────────────────── */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
  z-index: 200;
  max-height: 460px;
  overflow-y: auto;
  display: none;
  padding: var(--space-2);
}
/* Portal variant: appended to body, positioned via JS inline styles */
.search-dropdown--portal {
  position: fixed !important;
  top: auto;
  left: auto;
  transform: none !important;
  width: auto;
  z-index: 9999;
}
.search-dropdown.open {
  display: block;
  animation: fadeIn 0.15s ease;
}
.search-dropdown-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
}
.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: background var(--transition);
  cursor: pointer;
}
.search-dropdown-item:hover,
.search-dropdown-item.selected {
  background: var(--bg-muted);
}
.search-dropdown-item.selected {
  background: var(--brand-light);
}
.search-dropdown-item-img {
  width: 36px;
  height: 54px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-dropdown-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.search-dropdown-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.search-dropdown-item-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-dropdown-item-author {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 1px;
}
.search-dropdown-item-price {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand);
  margin-top: 3px;
}
.search-dropdown-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  margin-top: var(--space-1);
  border-top: 0.5px solid var(--border-light);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.search-dropdown-view-all:hover {
  background: var(--brand-light);
}

@media (max-width: 900px) {
  .search-dropdown {
    width: calc(100vw - 32px);
    left: 50%;
    transform: translateX(-50%);
    max-height: 70vh;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border-light);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
}
.nav-icon-btn:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}
.nav-icon-btn .count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--brand);
  color: #fff;
  border-radius: 99px;
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}
.nav-cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 36px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
.nav-cart-btn:hover {
  background: var(--brand-hover);
  color: #fff;
}
.nav-cart-btn .cart-count {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all var(--transition);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border-light);
  padding: 10px 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}
.breadcrumb-bar a {
  color: var(--text-secondary);
  transition: color var(--transition);
}
.breadcrumb-bar a:hover {
  color: var(--brand);
}
.breadcrumb-bar .sep {
  margin: 0 6px;
}

/* ============================================================
   BOOK CARD COMPONENT
   ============================================================ */
.book-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition:
    border-color var(--transition),
    transform var(--transition-slow);
  position: relative;
  display: flex;
  flex-direction: column;
}
.book-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-2px);
}

.book-card .cover-wrap {
  position: relative;
  aspect-ratio: 2/3;
  background: var(--bg-muted);
  overflow: hidden;
}
.book-card .cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.book-card:hover .cover-wrap img {
  transform: scale(1.03);
}

.book-card .card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.book-card .wish-btn {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 99px;
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  opacity: 0;
  transition: all var(--transition);
  z-index: 2;
}
.book-card .wish-btn {
  top: 10px;
  right: 10px;
}
.book-card:hover .wish-btn,
.book-card .wish-btn.active {
  opacity: 1;
}
.book-card .wish-btn.active {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-light);
}
.book-card .wish-btn:hover {
  color: var(--brand);
}

.book-card .qv-open-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
}
.book-card:hover .qv-open-btn {
  opacity: 1;
}
.book-card .qv-open-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.book-card .card-body {
  padding: var(--space-3) var(--space-4) var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.book-card .book-genre {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.book-card .book-title {
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-card .book-author {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.book-card .book-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.book-card .stars {
  color: var(--brand);
  font-size: 11px;
  display: flex;
  gap: 1px;
}
.book-card .card-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: auto;
}
.book-card .card-footer .btn-xs {
  width: 100%;
}
.book-card .card-footer .add-to-cart-btn {
  width: 100%;
  justify-content: center;
}
.book-card .book-price {
  font-size: 1rem;
  font-weight: 600;
}
.book-card .book-price-old {
  font-size: 0.6875rem;
  color: var(--danger);
  font-weight: 400;
  text-decoration: line-through;
}
.book-card .add-to-cart-btn {
  height: 32px;
  padding: 0 12px;
  gap: 5px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background var(--transition);
  white-space: nowrap;
}
.book-card .add-to-cart-btn:hover {
  background: var(--brand-hover);
}
.book-card .add-to-cart-btn.added {
  background: var(--success);
  pointer-events: none;
}
.book-card .add-to-cart-btn i {
  font-size: 14px;
}
.book-card .card-footer .btn-xs {
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background var(--transition);
}
.book-card .card-footer .btn-xs:hover {
  background: var(--brand-hover);
  color: #fff;
}

/* ============================================================
   BOOKS GRID
   ============================================================ */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-5);
}
@media (max-width: 640px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
}

/* ============================================================
   SIDEBAR FILTERS
   ============================================================ */
.shop-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .filters-sidebar {
    display: none;
  }
}

.filters-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

/* Mobile filter toggle */
.mobile-filter-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 40px;
  margin-bottom: var(--space-4);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  justify-content: center;
  transition: border-color var(--transition);
}
.mobile-filter-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}
@media (max-width: 900px) {
  .mobile-filter-toggle {
    display: flex;
  }
}

/* Mobile filter drawer */
.mobile-filter-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-5) var(--space-5) var(--space-8);
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 350ms ease;
}
.mobile-filter-drawer.open {
  transform: translateY(0);
}
.mobile-filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  font-size: 1.0625rem;
  font-weight: 600;
}
.mobile-filter-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 99px;
  border: none;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
}
.mobile-filter-drawer .filter-section:last-child {
  margin-bottom: 0;
}
.mobile-filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 300ms ease,
    visibility 300ms ease;
}
.mobile-filter-overlay.open {
  opacity: 1;
  visibility: visible;
}
.filter-section {
  margin-bottom: var(--space-6);
}
.filter-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  padding-bottom: var(--space-2);
  border-bottom: 0.5px solid var(--border-light);
  margin-bottom: var(--space-3);
}
.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.filter-option:hover {
  color: var(--text-primary);
}
.filter-option.active {
  color: var(--brand);
  font-weight: 500;
}
.filter-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  background: var(--bg-muted);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}
.filter-option.active .filter-count {
  background: var(--brand-light);
  color: var(--brand-dark);
}

/* Price slider */
.price-inputs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.price-input-box {
  flex: 1;
  height: 34px;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 0 var(--space-2);
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--bg-card);
  outline: none;
  width: 0;
}
.price-input-box:focus {
  border-color: var(--brand);
}
.price-sep {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* ============================================================
   SHOP TOOLBAR
   ============================================================ */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.results-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.results-count strong {
  color: var(--text-primary);
}
.toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.sort-select {
  height: 34px;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 0 var(--space-3);
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--bg-card);
  cursor: pointer;
  outline: none;
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.view-toggle {
  display: flex;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.view-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.view-btn:first-child {
  border-right: 0.5px solid var(--border-mid);
}
.view-btn:hover,
.view-btn.active {
  background: var(--bg-muted);
  color: var(--text-primary);
}

/* Active filter chips */
.active-filters {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.filter-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-light);
  color: var(--brand-dark);
  border: 0.5px solid var(--brand-border);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}
.filter-chip:hover {
  background: var(--brand-border);
}
.clear-filters-btn {
  font-size: 0.75rem;
  color: var(--brand);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

/* ============================================================
   GENRE / CATEGORY PILLS
   ============================================================ */
.genre-pills {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.genre-pill {
  font-size: 0.8125rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 0.5px solid var(--border-mid);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.genre-pill:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.genre-pill.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ============================================================
   SINGLE PRODUCT PAGE
   ============================================================ */
.product-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-12);
  align-items: start;
}
@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}

.product-gallery {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}
@media (max-width: 900px) {
  .product-gallery {
    position: static;
  }
}
.gallery-main {
  aspect-ratio: 2/3;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 0.5px solid var(--border-light);
  background: var(--bg-muted);
  margin-bottom: var(--space-3);
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumbs {
  display: flex;
  gap: var(--space-2);
}
.gallery-thumb {
  flex: 1;
  aspect-ratio: 2/3;
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border-light);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
  background: var(--bg-muted);
}
.gallery-thumb:hover,
.gallery-thumb.active {
  border-color: var(--brand);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info .genre-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.product-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
}
.product-author {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}
.product-author a {
  color: var(--brand);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.product-rating .stars {
  color: var(--brand);
  font-size: 14px;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: 6px;
}
.product-price {
  font-size: 1.75rem;
  font-weight: 700;
}
.product-price-old {
  font-size: 1.0625rem;
  color: var(--text-tertiary);
  text-decoration: line-through;
}

.product-short-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.product-short-desc p {
  margin: 0 0 var(--space-2);
}
.product-short-desc p:last-child {
  margin-bottom: 0;
}

.stock-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  margin-bottom: var(--space-5);
}
.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  flex-shrink: 0;
}
.in-stock .stock-dot {
  background: var(--success);
}
.in-stock .stock-label {
  color: var(--success);
  font-weight: 500;
}
.out-of-stock .stock-dot {
  background: var(--danger);
}
.out-of-stock .stock-label {
  color: var(--danger);
}

.request-out-of-stock-btn {
  margin-top: var(--space-4);
  width: 100%;
}

/* ============================================================
   REQUEST MODAL (out-of-stock)
   ============================================================ */
.req-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
  padding: var(--space-4);
}
.req-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.req-modal-panel {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  padding: var(--space-8);
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  transform: translateY(20px) scale(0.97);
  transition: transform 250ms ease;
}
.req-modal.open .req-modal-panel {
  transform: translateY(0) scale(1);
}
.req-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--bg-muted);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 18px;
  transition: all var(--transition);
}
.req-modal-close:hover {
  background: var(--bg-muted-hover);
  color: var(--text-primary);
}
.req-modal-icon {
  width: 44px;
  height: 44px;
  background: var(--brand-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 20px;
  margin-bottom: var(--space-4);
}
.req-modal-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.req-book-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: var(--space-5);
  line-height: 1.4;
}
.req-email-note {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}
.req-input[readonly] {
  background: var(--bg-muted);
  color: var(--text-secondary);
  cursor: default;
}
.req-field {
  margin-bottom: var(--space-4);
}
.req-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.req-optional {
  font-weight: 400;
  color: var(--text-tertiary);
  margin-left: var(--space-1);
}
.req-input {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-3);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-size: 0.9375rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: border-color var(--transition);
}
.req-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.req-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  background: var(--warning-bg);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  font-size: 0.8125rem;
  color: var(--warning);
  line-height: 1.5;
  margin-bottom: var(--space-5);
}
.req-notice i {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.req-actions {
  display: flex;
  gap: var(--space-2);
}
.req-actions .btn {
  flex: 1;
  height: 44px;
}
@media (max-width: 480px) {
  .req-modal-panel {
    padding: var(--space-6);
  }
  .req-actions {
    flex-direction: column;
  }
}

.format-section {
  margin-bottom: var(--space-5);
}
.format-label-row {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.format-options {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.format-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border-mid);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
}
.format-btn:hover {
  border-color: var(--border-strong);
}
.format-btn.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
  font-weight: 500;
}

.quantity-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.quantity-ctrl {
  display: flex;
  align-items: center;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 44px;
}
.qty-btn {
  width: 40px;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover {
  background: var(--bg-muted);
}
.qty-num {
  width: 44px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  border-left: 0.5px solid var(--border-light);
  border-right: 0.5px solid var(--border-light);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-total {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.qty-total strong {
  color: var(--text-primary);
}

.product-actions {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.product-actions .btn-primary {
  flex: 1;
  height: 48px;
  font-size: 1rem;
}
.product-actions .wish-toggle {
  width: 48px;
  height: 48px;
  padding: 0;
}

/* Variable product — WooCommerce variation form */
.product-variations {
  margin-top: var(--space-4);
}
.product-variations table.variations {
  border: none;
  margin-bottom: var(--space-4);
  width: 100%;
}
.product-variations table.variations tr {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-3);
}
.product-variations table.variations td {
  display: block;
  padding: 0;
  border: none;
}
.product-variations table.variations td.label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
  letter-spacing: 0.02em;
}
.product-variations table.variations td.label label {
  font-size: inherit;
  color: inherit;
}
.product-variations table.variations td.value select {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-3);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition);
  appearance: auto;
}
.product-variations table.variations td.value select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(25, 57, 141, 0.1);
}
.product-variations .reset_variations {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-decoration: underline;
  cursor: pointer;
  margin-top: var(--space-1);
  display: inline-block;
}
.product-variations .reset_variations:hover {
  color: var(--text-secondary);
}
.product-variations .single_variation_wrap {
  margin-top: var(--space-4);
}
.product-variations .woocommerce-variation-price {
  margin-bottom: var(--space-2);
}
.product-variations .woocommerce-variation-price .price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.product-variations .woocommerce-variation-price .price del {
  color: var(--text-tertiary);
  font-size: 0.9375rem;
  font-weight: 400;
  margin-right: var(--space-2);
}
.product-variations .woocommerce-variation-price .price ins {
  text-decoration: none;
}
.product-variations .woocommerce-variation-availability {
  margin-bottom: var(--space-3);
}
.product-variations .woocommerce-variation-availability .stock {
  font-size: 0.8125rem;
  color: var(--success);
  font-weight: 500;
}
.product-variations .woocommerce-variation-availability .out-of-stock {
  color: var(--danger);
}
.product-variations .quantity {
  display: flex;
  align-items: center;
  gap: 0;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 44px;
  width: fit-content;
  margin-bottom: var(--space-3);
}
.product-variations .quantity input[type="number"] {
  width: 44px;
  height: 100%;
  border: none;
  border-left: 0.5px solid var(--border-light);
  border-right: 0.5px solid var(--border-light);
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  -moz-appearance: textfield;
}
.product-variations .quantity input[type="number"]::-webkit-inner-spin-button,
.product-variations .quantity input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.product-variations .quantity .qty-btn {
  width: 40px;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-variations .quantity .qty-btn:hover {
  background: var(--bg-muted);
}
.product-variations .single_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 48px;
  padding: 0 var(--space-8);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-lg);
  border: 0.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  background: var(--brand);
  color: var(--text-on-brand);
  border-color: var(--brand);
  font-family: var(--font-sans);
  width: 100%;
}
.product-variations .single_add_to_cart_button:hover {
  background: var(--brand-hover);
  color: var(--text-on-brand);
  border-color: var(--brand-hover);
}
.product-variations .single_add_to_cart_button:active {
  transform: scale(0.98);
}
.product-variations .single_add_to_cart_button.disabled,
.product-variations .single_add_to_cart_button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.product-variations .woocommerce-variation-add-to-cart {
  display: flex;
  flex-direction: column;
}

.delivery-info {
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}
.delivery-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 8px 0;
  font-size: 0.875rem;
}
.delivery-row:not(:last-child) {
  border-bottom: 0.5px solid var(--border-light);
}
.delivery-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 1px;
}
.delivery-title {
  font-weight: 500;
  margin-bottom: 1px;
}
.delivery-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.share-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Product tabs */
.product-tabs {
  margin-top: var(--space-12);
}
.tabs-nav {
  display: flex;
  border-bottom: 0.5px solid var(--border-light);
  margin-bottom: 0;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
}
.tab-btn {
  padding: 14px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text-primary);
}
.tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.tab-panel {
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding: var(--space-6);
}
.tab-panel-content {
  display: none;
}
.tab-panel-content.active {
  display: block;
}

/* Book meta table */
.book-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border-light);
  font-size: 0.875rem;
}
.meta-row:last-child {
  border-bottom: none;
}
.meta-key {
  color: var(--text-secondary);
}
.meta-val {
  font-weight: 500;
}
.book-meta .col {
  padding: 0 var(--space-4);
}
.book-meta .col:first-child {
  padding-left: 0;
  border-right: 0.5px solid var(--border-light);
}
.book-meta .col:last-child {
  padding-right: 0;
}

/* Reviews */
.review-summary {
  display: flex;
  gap: var(--space-8);
  align-items: center;
  padding-bottom: var(--space-5);
  border-bottom: 0.5px solid var(--border-light);
  margin-bottom: var(--space-5);
}
.review-score {
  text-align: center;
  flex-shrink: 0;
}
.review-score .score {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.review-score .score-stars {
  color: var(--brand);
  font-size: 16px;
}
.review-bars {
  flex: 1;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-muted);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 99px;
}

.review-item {
  padding: var(--space-5) 0;
  border-bottom: 0.5px solid var(--border-light);
}
.review-item:last-child {
  border-bottom: none;
}
.reviewer-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.reviewer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 99px;
  background: var(--brand-light);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.reviewer-name {
  font-size: 0.875rem;
  font-weight: 500;
}
.reviewer-date {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.review-stars {
  color: var(--brand);
  font-size: 13px;
  margin-bottom: 6px;
}
.review-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   CART PAGE
   ============================================================ */
.cart-page-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 900px) {
  .cart-page-layout {
    grid-template-columns: 1fr;
  }
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}
.cart-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: var(--space-3) var(--space-4);
  border-bottom: 0.5px solid var(--border-light);
  text-align: left;
}
.cart-table th:last-child {
  text-align: right;
}
.cart-table td {
  padding: var(--space-4);
  border-bottom: 0.5px solid var(--border-light);
  vertical-align: top;
}
.cart-table tr:last-child td {
  border-bottom: none;
}

.cart-item-info {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.cart-item-cover {
  width: 64px;
  aspect-ratio: 2/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 0.5px solid var(--border-light);
  flex-shrink: 0;
  background: var(--bg-muted);
}
.cart-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.cart-item-author {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.cart-item-remove {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cart-item-remove:hover {
  color: var(--danger);
}

.cart-qty-ctrl {
  display: flex;
  align-items: center;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: fit-content;
  height: 34px;
}
.cart-qty-btn {
  width: 32px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.cart-qty-btn:hover {
  background: var(--bg-muted);
}
.cart-qty-num {
  width: 36px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 0.5px solid var(--border-light);
  border-right: 0.5px solid var(--border-light);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-price {
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: right;
}

/* Order summary sidebar */
.order-summary {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  font-size: 0.9375rem;
  border-bottom: 0.5px solid var(--border-light);
}
.summary-row:last-of-type {
  border-bottom: none;
}
.summary-total {
  display: flex;
  justify-content: space-between;
  padding: var(--space-4) 0;
  font-size: 1.125rem;
  font-weight: 700;
  border-top: 0.5px solid var(--border-mid);
  margin-top: var(--space-2);
}
.coupon-row {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}
.coupon-row input {
  flex: 1;
  height: 40px;
}
.secure-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Cart proceed to checkout button — custom + WC native fallback */
.woocommerce-cart a.btn-lg.btn-primary,
.order-summary a.btn-lg.btn-primary {
  background: var(--brand) !important;
  color: #fff !important;
  font-size: 1.0625rem;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  border: 2px solid var(--brand) !important;
  box-shadow: 0 2px 10px rgba(25, 57, 141, 0.3);
  text-transform: uppercase;
}
.woocommerce-cart a.btn-lg.btn-primary:hover,
.order-summary a.btn-lg.btn-primary:hover {
  background: var(--brand-hover) !important;
  color: #fff !important;
  border-color: var(--brand-hover) !important;
  box-shadow: 0 4px 14px rgba(25, 57, 141, 0.4);
}

/* WC native checkout-button override — covers any path where WC renders it */
.woocommerce a.checkout-button,
.woocommerce-cart a.checkout-button,
a.checkout-button.button {
  display: block !important;
  width: 100% !important;
  background: var(--brand) !important;
  color: #fff !important;
  border: 2px solid var(--brand) !important;
  border-radius: var(--radius-md) !important;
  padding: 14px var(--space-5) !important;
  text-align: center !important;
  font-family: var(--font-sans) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow: 0 2px 10px rgba(25, 57, 141, 0.3) !important;
  transition:
    background var(--transition),
    box-shadow var(--transition) !important;
  -webkit-font-smoothing: antialiased;
}
.woocommerce a.checkout-button:hover,
.woocommerce-cart a.checkout-button:hover,
a.checkout-button.button:hover {
  background: var(--brand-hover) !important;
  color: #fff !important;
  border-color: var(--brand-hover) !important;
  box-shadow: 0 4px 14px rgba(25, 57, 141, 0.4) !important;
}

/* WooCommerce Cart Block — Proceed to Checkout button */
.wc-block-cart__submit-button,
.wc-block-cart__submit-button.wp-element-button {
  display: block !important;
  width: 100% !important;
  background: var(--brand) !important;
  color: #fff !important;
  border: 2px solid var(--brand) !important;
  border-radius: var(--radius-md) !important;
  padding: 14px var(--space-5) !important;
  text-align: center !important;
  font-family: var(--font-sans) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow: 0 2px 10px rgba(25, 57, 141, 0.3) !important;
  transition:
    background var(--transition),
    box-shadow var(--transition) !important;
  -webkit-font-smoothing: antialiased;
}
.wc-block-cart__submit-button:hover,
.wc-block-cart__submit-button.wp-element-button:hover {
  background: var(--brand-hover) !important;
  color: #fff !important;
  border-color: var(--brand-hover) !important;
  box-shadow: 0 4px 14px rgba(25, 57, 141, 0.4) !important;
}

/* Checkout — Place Order button */
#place_order,
.woocommerce-checkout #place_order {
  display: block !important;
  width: 100% !important;
  background: var(--brand) !important;
  color: #fff !important;
  border: 2px solid var(--brand) !important;
  border-radius: var(--radius-md) !important;
  padding: 14px var(--space-5) !important;
  text-align: center !important;
  font-family: var(--font-sans) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow: 0 2px 10px rgba(25, 57, 141, 0.3) !important;
  transition:
    background var(--transition),
    box-shadow var(--transition) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  -webkit-font-smoothing: antialiased;
  cursor: pointer;
  box-sizing: border-box !important;
}
#place_order:hover,
.woocommerce-checkout #place_order:hover {
  background: var(--brand-hover) !important;
  color: #fff !important;
  border-color: var(--brand-hover) !important;
  box-shadow: 0 4px 14px rgba(25, 57, 141, 0.4) !important;
}

/* Scroll to top */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-slow);
  font-size: 1.25rem;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: var(--brand-hover);
  transform: translateY(-2px);
}
.scroll-top-btn:active {
  transform: scale(0.95);
}

/* ============================================================
   CHECKOUT PAGE
   ============================================================ */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 960px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

.checkout-step {
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-4);
  overflow: hidden;
}
.checkout-step-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-bottom: 0.5px solid var(--border-light);
  cursor: pointer;
}
.step-number {
  width: 28px;
  height: 28px;
  border-radius: 99px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}
.checkout-step.active .step-number,
.checkout-step.done .step-number {
  background: var(--brand);
  color: #fff;
}
.step-title {
  font-size: 0.9375rem;
  font-weight: 600;
}
.step-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 1px;
}
.step-edit {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--brand);
  cursor: pointer;
}
.checkout-step-body {
  padding: var(--space-6);
}

.form-row:not(.woocommerce-form-row) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 600px) {
  .form-row:not(.woocommerce-form-row) {
    grid-template-columns: 1fr;
  }
}

/* Payment methods */
.payment-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-lg);
  cursor: pointer;
  margin-bottom: var(--space-3);
  transition: all var(--transition);
}
.payment-option:hover {
  border-color: var(--border-strong);
}
.payment-option.selected {
  border-color: var(--brand);
  background: var(--brand-light);
}
.payment-option .payment-icon {
  width: 44px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.payment-option .payment-name {
  font-size: 0.9375rem;
  font-weight: 500;
}
.payment-option .payment-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.payment-radio {
  margin-left: auto;
}
.payment-radio input {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
}

/* Order review sidebar */
.order-review-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 0.5px solid var(--border-light);
}
.order-review-item:last-child {
  border-bottom: none;
}
.order-item-cover {
  width: 48px;
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  border: 0.5px solid var(--border-light);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.order-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.order-item-qty {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--brand);
  color: #fff;
  border-radius: 99px;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-item-info {
  flex: 1;
  min-width: 0;
}
.order-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 2px;
}
.order-item-author {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.order-item-format {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.order-item-price {
  font-size: 0.9375rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* ============================================================
   ORDER CONFIRMATION PAGE
   ============================================================ */
.order-confirm-hero {
  text-align: center;
  padding: var(--space-12) var(--space-5);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 0.5px solid var(--border-light);
  margin-bottom: var(--space-8);
}
.order-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 99px;
  background: var(--success-bg);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto var(--space-5);
}
.order-confirm-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}
.order-number {
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg-muted);
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-top: var(--space-3);
}

/* ============================================================
   MY ACCOUNT PAGE
   ============================================================ */
/* ============================================================
   MY ACCOUNT PAGE
   ============================================================ */
.ma-page {
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
}

/* Two-column layout */
.ma-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-10);
  align-items: start;
  width: 100%;
}

/* ── Sidebar ────────────────────────────────────────── */
.ma-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* User identity card */
.ma-user-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.ma-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}
.ma-user-info {
  min-width: 0;
}
.ma-user-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-user-email {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Stats pills */
.ma-stats {
  display: flex;
  gap: var(--space-3);
}
.ma-stat {
  flex: 1;
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  text-align: center;
}
.ma-stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}
.ma-stat-lbl {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Navigation */
.ma-nav {
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ma-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition:
    background var(--transition),
    color var(--transition);
  white-space: nowrap;
}
.ma-nav-item:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}
.ma-nav-item.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}
.ma-nav-item.logout {
  margin-top: var(--space-2);
  border-top: 0.5px solid var(--border-light);
  padding-top: var(--space-3);
  color: var(--text-tertiary);
}
.ma-nav-item.logout:hover {
  color: var(--danger);
  background: var(--danger-bg);
}
.ma-nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ma-nav-label {
  flex: 1;
}
.ma-badge {
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 1px 8px;
  border-radius: 99px;
  font-weight: 500;
}
.ma-nav-item.active .ma-badge {
  background: var(--brand);
  color: #fff;
}

/* ── Content area ───────────────────────────────────── */
.ma-content {
  min-width: 0;
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
}

/* WC section headings inside account */
.ma-content h2 {
  font-size: 1.125rem;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-5);
}

/* WC tables — horizontally scrollable */
.ma-content .shop_table,
.ma-content .woocommerce-orders-table,
.ma-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.ma-content table thead th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  border-bottom: 0.5px solid var(--border-light);
}
.ma-content table tbody td {
  padding: var(--space-4);
  border-bottom: 0.5px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}
.ma-content table tbody tr:last-child td {
  border-bottom: none;
}
.ma-content table tbody tr:hover td {
  background: var(--bg-muted);
}

/* WC notices — stack cleanly */
.ma-content .woocommerce-info,
.ma-content .woocommerce-message,
.ma-content .woocommerce-error {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: var(--space-4) !important;
  padding: var(--space-5) !important;
  background: var(--bg-muted) !important;
  border: none !important;
  border-left: 3px solid var(--brand) !important;
  border-radius: var(--radius-lg) !important;
  list-style: none !important;
  margin: 0 !important;
  box-shadow: none !important;
}
.ma-content .woocommerce-info::before,
.ma-content .woocommerce-message::before,
.ma-content .woocommerce-error::before {
  display: none !important;
}
.ma-content .woocommerce-info a.button,
.ma-content .woocommerce-message a.button {
  float: none !important;
  margin: 0 !important;
  align-self: flex-start;
} /* Forms inside account */
.ma-content .woocommerce-form-row input,
.ma-content .woocommerce-form-row select,
.ma-content .woocommerce-form-row .input-text {
  width: 100%;
}

/* Two-column form row layout */
.ma-content .form-row-first,
.ma-content .form-row-last {
  width: 100%;
}
@media (min-width: 768px) {
  .ma-content .form-row-first {
    float: left;
    width: 48%;
    clear: left;
  }
  .ma-content .form-row-last {
    float: right;
    width: 48%;
  }
}

/* Input/select/textarea fields */
.ma-content input[type="text"],
.ma-content input[type="email"],
.ma-content input[type="password"],
.ma-content input[type="tel"],
.ma-content input[type="number"],
.ma-content select,
.ma-content textarea {
  height: 46px;
  padding: 0 var(--space-4);
  font-size: 0.9375rem;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-primary);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  width: 100%;
  box-sizing: border-box;
}
.ma-content textarea {
  height: auto;
  padding: var(--space-3) var(--space-4);
  min-height: 120px;
}
.ma-content input:focus,
.ma-content select:focus,
.ma-content textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.ma-content label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

/* Buttons inside account */
.ma-content .woocommerce-Button,
.ma-content button[type="submit"],
.ma-content .woocommerce-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 var(--space-7);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
.ma-content .woocommerce-Button:hover,
.ma-content button[type="submit"]:hover {
  background: var(--brand-hover);
  color: #fff;
}

/* ── Edit Account page ─────────────────────────────── */
.ma-content .edit-account fieldset {
  margin: var(--space-8) 0 var(--space-6);
  padding: var(--space-6);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: var(--bg-muted);
}
.ma-content .edit-account legend {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 var(--space-2);
  margin-left: calc(var(--space-2) * -1);
}
.ma-content .edit-account em {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
  font-style: normal;
}

/* ── Address page ──────────────────────────────────── */
.ma-content .woocommerce-Addresses,
.ma-content .col2-set.addresses {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}
.ma-content .woocommerce-Addresses .col-1,
.ma-content .woocommerce-Addresses .col-2,
.ma-content .col2-set.addresses .col-1,
.ma-content .col2-set.addresses .col-2 {
  float: none !important;
  width: 100% !important;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
.ma-content .woocommerce-Address {
  margin: 0;
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition);
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}
.ma-content .woocommerce-Address:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.ma-content .woocommerce-Address-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 0.5px solid var(--border-light);
  min-height: 34px;
}
.ma-content .woocommerce-Address-title h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.4;
}
.ma-content .woocommerce-Address-title a.edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 var(--space-4);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff !important;
  text-decoration: none;
  transition: background var(--transition);
  flex-shrink: 0;
}
.ma-content .woocommerce-Address-title a.edit:hover {
  background: var(--brand-hover);
  color: #fff !important;
}
.ma-content address {
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: break-word;
}
@media (max-width: 600px) {
  .ma-content .woocommerce-Addresses,
  .ma-content .col2-set.addresses {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-top: var(--space-4);
  }
  .ma-content .woocommerce-Address {
    padding: var(--space-6);
  }
  .ma-content .woocommerce-Address-title {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }
  .ma-content .woocommerce-Address-title a.edit {
    align-self: flex-start;
  }
}
.ma-content .woocommerce-address-fields__field-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.ma-content .woocommerce-address-fields__field-wrapper > p {
  margin: 0;
}
.ma-content .edit-address .woocommerce-address-fields p:last-of-type {
  margin-top: var(--space-6);
}

/* Address list page (my-address.php) */
.ma-content .woocommerce-Addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.ma-content .woocommerce-Address {
  margin: 0;
}
.ma-content .woocommerce-Address-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.ma-content .woocommerce-Address-title h2 {
  font-size: 1rem;
  margin: 0;
}
.ma-content .woocommerce-Address-title .edit {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand);
  text-decoration: none;
}
.ma-content .woocommerce-Address-title .edit:hover {
  text-decoration: underline;
}
.ma-content address {
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Orders page ───────────────────────────────────── */
.ma-content .woocommerce-orders-table {
  margin-top: var(--space-4);
}
.ma-content .woocommerce-orders-table__cell-order-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.ma-content .woocommerce-orders-table__cell-order-status mark {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  background: var(--bg-muted);
  color: var(--text-secondary);
}
.ma-content .woocommerce-orders-table__cell-order-status mark.processing,
.ma-content .woocommerce-orders-table__cell-order-status mark.completed {
  background: var(--success-bg);
  color: var(--success);
}
.ma-content .woocommerce-orders-table__cell-order-status mark.on-hold {
  background: #fff3cd;
  color: #856404;
}
.ma-content .woocommerce-orders-table__cell-order-status mark.cancelled,
.ma-content .woocommerce-orders-table__cell-order-status mark.refunded,
.ma-content .woocommerce-orders-table__cell-order-status mark.failed {
  background: var(--danger-bg);
  color: var(--danger);
}
.ma-content .woocommerce-orders-table__cell-order-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 var(--space-4);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  margin: 2px;
}
.ma-content .woocommerce-orders-table__cell-order-actions .button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Orders pagination */
.ma-content .woocommerce-pagination {
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-3);
}
.ma-content .woocommerce-pagination .woocommerce-button {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--space-5);
  font-size: 0.875rem;
  font-weight: 500;
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}
.ma-content .woocommerce-pagination .woocommerce-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ── View Order page ───────────────────────────────── */
.ma-content .order-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
}
.ma-content .order-info strong {
  color: var(--text-primary);
  font-weight: 600;
}
.ma-content .order-again {
  margin-top: var(--space-6);
}
.ma-content .order-again .button {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 var(--space-6);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  transition: background var(--transition);
}
.ma-content .order-again .button:hover {
  background: var(--brand-hover);
  color: #fff;
}

/* ── Downloads page ────────────────────────────────── */
.ma-content .woocommerce-MyAccount-downloads {
  margin-top: var(--space-4);
}
.ma-content .woocommerce-MyAccount-downloads .download-file a {
  color: var(--brand);
  font-weight: 500;
  text-decoration: none;
}
.ma-content .woocommerce-MyAccount-downloads .download-file a:hover {
  text-decoration: underline;
}

/* ── Payment Methods page ──────────────────────────── */
.ma-content .payment-methods {
  margin-top: var(--space-4);
}
.ma-content .woocommerce-PaymentMethod {
  padding: var(--space-4);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}
.ma-content .woocommerce-PaymentMethod:hover {
  background: var(--bg-muted);
}
.ma-content .woocommerce-PaymentMethodsTable {
  margin-bottom: var(--space-6);
}
.ma-content a[href*="add-payment-method"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: var(--space-6) auto;
  height: 46px;
  padding: 0 var(--space-8);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  transition: background var(--transition);
}
.ma-content a[href*="add-payment-method"]:hover {
  background: var(--brand-hover);
  color: #fff;
}

/* ── Dashboard page ────────────────────────────────── */
.ma-content .woocommerce-MyAccount-content > p:first-child {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}
.ma-content .woocommerce-MyAccount-content > p:first-child a {
  color: var(--brand);
  font-weight: 500;
  text-decoration: none;
}
.ma-content .woocommerce-MyAccount-content > p:first-child a:hover {
  text-decoration: underline;
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .ma-layout {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .ma-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: var(--space-2);
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .ma-sidebar::-webkit-scrollbar {
    height: 4px;
  }
  .ma-sidebar::-webkit-scrollbar-track {
    background: transparent;
  }
  .ma-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-mid);
    border-radius: 4px;
  }
  /* Hide user card and stats on mobile — show nav tabs only */
  .ma-user-card,
  .ma-stats {
    display: none;
  }
  .ma-nav {
    flex-direction: row;
    gap: var(--space-1);
    padding: var(--space-2);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
    width: 100%;
    overflow-x: auto;
  }
  .ma-nav-item {
    flex-shrink: 0;
    flex-direction: column;
    gap: 3px;
    padding: var(--space-2) var(--space-3);
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
  }
  .ma-nav-item.logout {
    margin-top: 0;
    border-top: none;
    padding-top: var(--space-2);
  }
  .ma-nav-icon {
    width: auto;
    font-size: 18px;
  }
  .ma-nav-label {
    display: block;
    line-height: 1.2;
  }
  .ma-badge {
    font-size: 0.625rem;
    padding: 1px 5px;
  }
  .ma-content {
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    overflow-x: auto;
  }
  .ma-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .ma-content .button + .button,
  .ma-content button + button,
  .ma-content a.button + a.button {
    margin-top: var(--space-3);
  }
}

/* ── Login/Register toggle ──────────────────────────── */
#amblebooks-login-register {
  max-width: 520px;
  margin: 0 auto;
}
#amblebooks-login-register h2 {
  margin-bottom: var(--space-4);
  font-family: var(--font-serif);
  font-size: 1.5rem;
}
.amblebooks-auth-toggle {
  margin-top: var(--space-5);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.amblebooks-auth-toggle a {
  color: var(--brand);
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}
.amblebooks-auth-toggle a:hover {
  color: var(--brand-hover);
}

/* ── My Account login page wrapper ─────────────────── */
.ma-login-wrap {
  max-width: 460px;
  margin: var(--space-16) auto;
}

/* Heading */
.ma-login-wrap h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin-bottom: var(--space-6);
}

/* Stack each form row: label above input */
.ma-login-wrap .woocommerce-form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-4);
}

/* Remember-me + submit row */
.ma-login-wrap .form-row:not(.woocommerce-form-row) {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
}

/* Full-width submit button */
.ma-login-wrap button[type="submit"] {
  width: 100%;
}

/* Lost password link */
.ma-login-wrap .woocommerce-LostPassword {
  text-align: center;
  margin-top: var(--space-3);
  font-size: 0.8125rem;
}
.ma-login-wrap .woocommerce-LostPassword a {
  color: var(--brand);
  text-decoration: underline;
}

/* ── My Account overrides ───────────────────────────── */
.woocommerce-account main .woocommerce {
  max-width: none !important;
  width: 100%;
}
.woocommerce-account .woocommerce-MyAccount-navigation {
  display: none;
}
#amblebooks-login-register h2 {
  margin-bottom: var(--space-4);
  font-family: var(--font-serif);
  font-size: 1.5rem;
}
.amblebooks-auth-toggle {
  margin-top: var(--space-5);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.amblebooks-auth-toggle a {
  color: var(--brand);
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}
.amblebooks-auth-toggle a:hover {
  color: var(--brand-hover);
}

/* ============================================================
   HERO / HOMEPAGE SECTIONS
   ============================================================ */
.hero-section {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 0.5px solid var(--border-light);
  padding: var(--space-10) var(--space-12);
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: var(--space-8);
  align-items: center;
  margin-bottom: var(--space-6);
}
@media (max-width: 700px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: var(--space-6);
  }
}
.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: var(--space-3);
}
.hero-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: var(--space-3);
}
.hero-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}
.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.hero-book-cover {
  aspect-ratio: 2/3;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 0.5px solid var(--border-light);
}
.hero-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero carousel wrapper */
.hero-carousel {
  position: relative;
  margin-bottom: var(--space-6);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 0.5px solid var(--border-light);
}
.hero-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}
.hero-carousel-slide {
  flex: 0 0 100%;
}

.hero-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}
@media (max-width: 700px) {
  .hero-carousel-slide img {
    aspect-ratio: 4 / 3;
  }
}

/* Navigation dots */
.hero-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}
.hero-carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition:
    background 200ms,
    transform 200ms;
}
.hero-carousel-dots .dot.active {
  background: #fff;
  transform: scale(1.3);
}
.hero-carousel-dots .dot:hover {
  background: #fff;
}

/* Prev / Next arrows */
.hero-carousel-prev,
.hero-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 200ms;
  z-index: 2;
}
.hero-carousel-prev:hover,
.hero-carousel-next:hover {
  background: rgba(0, 0, 0, 0.6);
}
.hero-carousel-prev {
  left: 12px;
}
.hero-carousel-next {
  right: 12px;
}

@media (max-width: 700px) {
  .hero-carousel-prev,
  .hero-carousel-next {
    display: none;
  }
  .hero-carousel-dots {
    bottom: 8px;
  }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}
.section-header h2 {
  font-size: 1.25rem;
  font-family: var(--font-sans);
  font-weight: 700;
}
.section-see-all {
  font-size: 0.8125rem;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* Newsletter banner */
.newsletter-banner {
  margin: var(--space-8) 0;
  border-radius: var(--radius-xl);
  background: var(--bg-card) center/cover no-repeat;
  border: 0.5px solid var(--border-light);
  padding: var(--space-10) var(--space-10);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.newsletter-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  border-radius: inherit;
}
.newsletter-banner[style*="background-image"] .newsletter-banner-body {
  position: relative;
  z-index: 1;
}
.newsletter-banner[style*="background-image"] .newsletter-banner-body h3,
.newsletter-banner[style*="background-image"] .newsletter-banner-body p {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.newsletter-banner[style*="background-image"] .newsletter-input {
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
}
.newsletter-banner[style*="background-image"] .newsletter-input:focus {
  background: #fff;
}
.newsletter-banner[style*="background-image"] .newsletter-submit {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.newsletter-banner-body {
  max-width: 480px;
  position: relative;
  z-index: 1;
}
.newsletter-banner h3 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  font-family: var(--font-serif);
}
.newsletter-banner p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}
.newsletter-form {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}
.newsletter-input-wrap {
  flex: 1;
  max-width: 300px;
}
.newsletter-input {
  width: 100%;
  height: 48px;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 0 var(--space-4);
  font-size: 0.9375rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
  background: var(--bg-muted);
}
.newsletter-input:focus {
  border-color: var(--brand);
}
.newsletter-submit {
  height: 48px;
  padding: 0 var(--space-6);
  font-size: 0.9375rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.newsletter-submit:hover {
  background: var(--brand-hover);
}
@media (max-width: 700px) {
  .newsletter-banner {
    padding: var(--space-8) var(--space-5);
  }
  .newsletter-form {
    flex-wrap: wrap;
  }
  .newsletter-input-wrap {
    max-width: none;
    min-width: 200px;
  }
}

/* Promo banner */
.promo-banner {
  margin: var(--space-8) 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 0.5px solid var(--border-light);
  aspect-ratio: 4 / 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (max-width: 700px) {
  .promo-banner {
    aspect-ratio: 16 / 9;
  }
}

/* Featured author strip */
.author-strip {
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
.author-strip h3 {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  margin-bottom: 2px;
}
.author-strip p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Blog carousel */
.blog-carousel {
  position: relative;
  margin-bottom: var(--space-8);
}
.blog-carousel-track {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.blog-carousel-track::-webkit-scrollbar {
  height: 4px;
}
.blog-carousel-track::-webkit-scrollbar-thumb {
  background: var(--border-mid);
  border-radius: 4px;
}
.blog-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  min-height: 220px;
  background: var(--bg-muted);
}
.blog-card-img {
  position: absolute;
  inset: 0;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.15) 60%,
    rgba(0, 0, 0, 0) 100%
  );
}
.blog-card-body {
  position: relative;
  z-index: 1;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
}
.blog-card-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.blog-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-top: var(--space-1);
  line-height: 1.4;
  color: #fff;
}
.blog-carousel-prev,
.blog-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition:
    background 200ms,
    color 200ms;
  z-index: 2;
}
.blog-carousel-prev:hover,
.blog-carousel-next:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.blog-carousel-prev {
  left: -18px;
}
.blog-carousel-next {
  right: -18px;
}
@media (max-width: 700px) {
  .blog-carousel-prev,
  .blog-carousel-next {
    display: none;
  }
  .blog-card {
    flex: 0 0 240px;
  }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  margin-top: var(--space-8);
}
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border-light);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}
.page-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.page-btn.dots {
  border: none;
  background: transparent;
  cursor: default;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-card);
  border-top: 0.5px solid var(--border-light);
  margin-top: var(--space-16);
}
.footer-main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-12);
  padding: var(--space-12) 0;
}
@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}
.footer-brand .site-logo {
  font-size: 1.5rem;
  margin-bottom: var(--space-3);
}
.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}
.footer-social {
  display: flex;
  gap: var(--space-2);
}
.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border-mid);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.social-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 600px) {
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.footer-col-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}
.footer-link {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  transition: color var(--transition);
}
.footer-link:hover {
  color: var(--brand);
}
.footer-bottom {
  border-top: 0.5px solid var(--border-light);
  padding: var(--space-5) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  gap: var(--space-3);
}
.footer-bottom-links {
  display: flex;
  gap: var(--space-5);
}
.footer-bottom-links a {
  color: var(--text-tertiary);
  transition: color var(--transition);
}
.footer-bottom-links a:hover {
  color: var(--brand);
}

/* ============================================================
   NOTIFICATIONS / TOASTS
   ============================================================ */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.amblebooks-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  border: 0.5px solid;
  font-size: 0.875rem;
  margin-bottom: var(--space-4);
}
.woocommerce-message {
  background: var(--success-bg);
  border-color: #c0dd97;
  color: var(--success);
}
.woocommerce-info {
  background: var(--info-bg);
  border-color: #b5d4f4;
  color: var(--info);
}
.woocommerce-error {
  background: var(--danger-bg);
  border-color: #f7c1c1;
  color: var(--danger);
}

/* ============================================================
   WOOCOMMERCE OVERRIDES
   ============================================================ */
/* .woocommerce-page targets the <body> on WC pages — padding handled per-template via <main> */

/* Star ratings */
.woocommerce .star-rating {
  color: var(--brand);
}
.woocommerce .star-rating span {
  background: none;
  color: var(--brand);
}

/* WooCommerce buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--brand) !important;
  color: #fff !important;
  border-radius: var(--radius-md) !important;
  border: none !important;
  font-family: var(--font-sans) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0 var(--space-5) !important;
  height: 40px !important;
  line-height: 40px !important;
  transition: background var(--transition) !important;
  cursor: pointer !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: var(--brand-hover) !important;
  color: #fff !important;
}
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  background: var(--brand) !important;
}

/* WooCommerce form fields */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
  border: 0.5px solid var(--border-mid) !important;
  border-radius: var(--radius-md) !important;
  padding: 0 var(--space-3) !important;
  height: 40px !important;
  font-family: var(--font-sans) !important;
  font-size: 0.875rem !important;
  color: var(--text-primary) !important;
  background: var(--bg-card) !important;
  outline: none !important;
  transition: border-color var(--transition) !important;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(25, 57, 141, 0.1) !important;
}
.woocommerce form .form-row label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

/* Cart & checkout tables */
.woocommerce table.shop_table {
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}
.woocommerce table.shop_table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-muted);
  border-bottom: 0.5px solid var(--border-light);
}
.woocommerce table.shop_table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 0.5px solid var(--border-light);
  font-size: 0.9375rem;
}
.woocommerce table.shop_table tr:last-child td {
  border-bottom: none;
}

/* Order totals */
.woocommerce .cart_totals,
.woocommerce .order-total {
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

/* Coupon field */
.woocommerce form.coupon {
  display: flex;
  gap: var(--space-2);
}
.woocommerce form.coupon input {
  flex: 1;
}

/* ============================================================
   ABOUT US PAGE
   ============================================================ */
.page-hero {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-10);
  padding-top: var(--space-4);
}

/* Each template sets its own padding-top inline; this is the fallback */
main {
  padding-top: var(--space-4);
}
.page-hero-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  margin-bottom: var(--space-3);
}
.page-hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.page-hero-sub + .page-hero-sub {
  margin-top: var(--space-4);
}
.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}
.about-card {
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.about-card i {
  font-size: 1.5rem;
  color: var(--brand);
  margin-bottom: var(--space-3);
  display: block;
}
.about-card h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  margin-bottom: var(--space-2);
}
.about-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.about-content {
  margin-bottom: var(--space-10);
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
}
.about-stat {
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.about-stat i {
  font-size: 1.25rem;
  color: var(--brand);
  margin-bottom: var(--space-2);
  display: block;
}
.about-stat-value {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.about-stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ============================================================
   CONTACT US PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-6);
  align-items: start;
}
.contact-form-wrap {
  padding: var(--space-6);
}
.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.contact-field {
  margin-bottom: var(--space-4);
}
.contact-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}
.contact-input {
  width: 100%;
  padding: 0 12px;
  height: 42px;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}
.contact-input:focus {
  border-color: var(--brand);
}
.contact-input::placeholder {
  color: var(--text-tertiary);
}
.contact-textarea {
  height: 130px;
  padding-top: 10px;
  resize: vertical;
}
.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.contact-success {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}
.contact-success p {
  margin-top: var(--space-3);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.contact-info {
  margin-bottom: var(--space-4);
  padding: var(--space-5);
}
.contact-info-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) 0;
}
.contact-info-item + .contact-info-item {
  border-top: 0.5px solid var(--border-light);
}
.contact-info-item i {
  font-size: 1.125rem;
  color: var(--brand);
  margin-top: 2px;
  flex-shrink: 0;
}
.contact-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}
.contact-info-item a,
.contact-info-item span {
  font-size: 0.875rem;
  color: var(--text-primary);
  text-decoration: none;
}
.contact-info-item a:hover {
  color: var(--brand);
}
.contact-social {
  padding: var(--space-5);
}
.contact-social h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.contact-social-links {
  display: flex;
  gap: var(--space-2);
}

@media (max-width: 700px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .contact-form-row {
    grid-template-columns: 1fr;
  }
  .about-cards {
    grid-template-columns: 1fr;
  }
  .page-hero-title {
    font-size: 1.625rem;
  }
}

/* ============================================================
   REQUEST A BOOK
   ============================================================ */
.request-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-6);
  align-items: start;
}
.request-form-wrap {
  padding: var(--space-6);
}
.request-sidebar ol {
  margin: 0;
}

/* ============================================================
   POLICY PAGES
   ============================================================ */
.policy-content {
  padding: var(--space-6);
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.policy-content h2 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  color: var(--text-primary);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}
.policy-content h2:first-child {
  margin-top: 0;
}
.policy-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}
.policy-content p {
  margin-bottom: var(--space-3);
}
.policy-content ul {
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}
.policy-content ul li {
  margin-bottom: var(--space-1);
}
.policy-content strong {
  color: var(--text-primary);
}

@media (max-width: 700px) {
  .request-layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-group {
  margin-bottom: var(--space-8);
}
.faq-group-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 0.5px solid var(--border-light);
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.faq-item {
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open {
  border-color: var(--border-mid);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  line-height: 1.5;
}
.faq-question:hover {
  background: var(--bg-muted);
}
.faq-icon {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--text-tertiary);
  transition: transform var(--transition);
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease;
}
.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
}
.faq-answer-inner {
  overflow: hidden;
  padding: 0 var(--space-5);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.faq-item.open .faq-answer-inner {
  padding-bottom: var(--space-5);
}

/* ============================================================
   RESPONSIVE NAVIGATION
   ============================================================ */
@media (max-width: 900px) {
  .site-header .container {
    padding: 0 var(--space-3);
  }
  .nav-inner {
    gap: var(--space-2);
  }
  .primary-nav {
    display: none;
  }
  .primary-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 0.5px solid var(--border-light);
    padding: var(--space-4);
    z-index: 99;
  }
  .menu-toggle {
    display: flex;
  }
  .nav-search {
    flex: 1;
    max-width: 160px;
  }
  .nav-cart-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0.5px solid var(--border-light);
    background: transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    justify-content: center;
    position: relative;
  }
  .nav-cart-btn:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
  }
  .nav-cart-btn .cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--brand);
    color: #fff;
    border: 2px solid var(--bg-card);
  }
  .nav-cart-btn .nav-cart-label {
    display: none;
  }
}

/* ============================================================
   UTILITY ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.fade-in {
  animation: fadeIn 0.2s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.slide-up {
  animation: slideUp 0.25s ease forwards;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: calc(var(--nav-h) + var(--space-4));
  right: var(--space-4);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
  max-width: 380px;
  width: 100%;
}
@media (max-width: 480px) {
  .toast-container {
    right: var(--space-2);
    left: var(--space-2);
    max-width: none;
  }
}
.toast {
  pointer-events: auto;
  background: var(--bg-card);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  transform: translateX(calc(100% + var(--space-4)));
  opacity: 0;
  transition:
    transform 250ms ease,
    opacity 250ms ease;
  position: relative;
  overflow: hidden;
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-top: 1px;
}
.toast-success .toast-icon {
  background: var(--success-bg);
  color: var(--success);
}
.toast-info .toast-icon {
  background: var(--info-bg);
  color: var(--info);
}
.toast-warning .toast-icon {
  background: var(--warning-bg);
  color: var(--warning);
}
.toast-error .toast-icon {
  background: var(--danger-bg);
  color: var(--danger);
}
.toast-body {
  flex: 1;
  min-width: 0;
}
.toast-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-sans);
}
.toast-message {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 1px;
}
.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 16px;
  padding: 2px;
  line-height: 1;
}
.toast-close:hover {
  color: var(--text-primary);
}
.toast-cta {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
}
.toast-cta:hover {
  color: var(--brand-hover);
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--border-mid);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transition: width 4000ms linear;
}
.toast-success .toast-progress {
  background: var(--success);
}
.toast-info .toast-progress {
  background: var(--info);
}
.toast-warning .toast-progress {
  background: var(--warning);
}
.toast-error .toast-progress {
  background: var(--danger);
}

/* ============================================================
   OVERLAY / BACKDROP (shared by modal + drawer)
   ============================================================ */
.amblebooks-overlay {
  position: fixed;
  inset: 0;
  background: rgba(1, 1, 1, 0.45);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}
.amblebooks-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   NEWSLETTER MODAL
   ============================================================ */
.newsletter-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
  padding: var(--space-4);
}
.newsletter-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.newsletter-modal .modal-panel {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: var(--space-10);
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  transform: translateY(20px) scale(0.97);
  transition: transform 250ms ease;
}
.newsletter-modal.open .modal-panel {
  transform: translateY(0) scale(1);
}
.modal-close-btn {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--bg-muted);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-md);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 18px;
  transition: all var(--transition);
}
.modal-close-btn:hover {
  background: var(--bg-muted-hover);
  color: var(--text-primary);
}
.newsletter-modal .modal-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 22px;
  margin-bottom: var(--space-5);
}
.newsletter-modal .modal-title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}
.newsletter-modal .modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}
.newsletter-modal .nl-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.newsletter-modal .nl-input-group {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}
.newsletter-modal .nl-input-group .form-input {
  flex: 1 1 0%;
  width: 0; /* lets flex-grow work without fighting the 100% width from .form-input */
  min-width: 0;
  height: 44px;
}
.newsletter-modal .nl-input-group .btn {
  flex-shrink: 0;
  height: 44px;
}
.newsletter-modal .nl-disclaimer {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: var(--space-2);
  line-height: 1.5;
}
.newsletter-modal .nl-skip {
  display: block;
  margin: var(--space-4) auto 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: var(--font-sans);
}
.newsletter-modal .nl-skip:hover {
  color: var(--text-secondary);
}

.newsletter-modal .modal-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-5);
}
.newsletter-modal .modal-img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 480px) {
  .newsletter-modal .modal-panel {
    padding: var(--space-6);
  }
  .newsletter-modal .nl-input-group {
    flex-direction: column;
    align-items: stretch;
  }
  .newsletter-modal .nl-input-group .form-input {
    flex: none;
    width: 100%;
    height: 44px;
  }
  .newsletter-modal .nl-input-group .btn {
    width: 100%;
    height: 44px;
  }
}

/* ============================================================
   QUICK-VIEW DRAWER
   ============================================================ */
.quick-view-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 640px;
  max-width: 100vw;
  background: var(--bg-card);
  z-index: 210;
  transform: translateX(100%);
  transition: transform 250ms ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}
@media (max-width: 680px) {
  .quick-view-drawer {
    width: 100vw;
  }
}
.quick-view-drawer.open {
  transform: translateX(0);
}
.qv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 0.5px solid var(--border-light);
  flex-shrink: 0;
}
.qv-header-title {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
.qv-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.qv-close-btn:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}
.qv-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
}
.qv-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-tertiary);
}
.qv-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
@media (max-width: 600px) {
  .qv-layout {
    grid-template-columns: 1fr;
  }
}
.qv-gallery img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border-light);
}
.qv-categories {
  font-size: 0.75rem;
  color: var(--brand);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}
.qv-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}
.qv-author {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}
.qv-rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}
.qv-rating .stars {
  color: var(--brand);
  font-size: 13px;
}
.qv-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}
.qv-excerpt {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}
.qv-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.qv-qty {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.qv-qty .qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
  transition: background var(--transition);
}
.qv-qty .qty-btn:hover {
  background: var(--bg-muted);
}
.qv-qty .qty-num {
  width: 32px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
}
.qv-actions .btn-add-to-cart {
  flex: 1;
}
.qv-wish {
  flex-shrink: 0;
  font-size: 18px;
  border: 0.5px solid var(--border-light) !important;
}
.qv-wish.active {
  color: var(--brand);
}
.qv-full-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.qv-full-link:hover {
  color: var(--brand);
}
.qv-full-link i {
  font-size: 14px;
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
  margin-top: var(--space-8);
}
.comments-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: var(--space-5);
}
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list .children {
  list-style: none;
  margin-left: var(--space-6);
  padding-left: var(--space-4);
  border-left: 2px solid var(--border-light);
}
.comment {
  padding: var(--space-4) 0;
  border-bottom: 0.5px solid var(--border-light);
}
.comment:last-child {
  border-bottom: none;
}
.comment-body {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.comment-author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.comment-author .avatar {
  width: 32px;
  height: 32px;
  border-radius: 99px;
}
.comment-author .fn {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  font-style: normal;
}
.comment-author .says {
  display: none;
}
.comment-metadata {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
}
.comment-metadata a {
  color: var(--text-tertiary);
  text-decoration: none;
}
.comment-metadata a:hover {
  color: var(--brand);
}
.comment-content p {
  margin-bottom: var(--space-2);
}
.reply {
  margin-top: var(--space-2);
}
.comment-reply-link {
  font-size: 0.75rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.comment-reply-link:hover {
  text-decoration: underline;
}

/* Comment form */
.comment-respond {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 0.5px solid var(--border-light);
}
.comment-reply-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  margin-bottom: var(--space-4);
}
.comment-reply-title small {
  margin-left: var(--space-2);
  font-family: var(--font-sans);
}
.comment-reply-title a {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
}
.comment-reply-title a:hover {
  color: var(--brand);
}
.comment-notes {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
}
.logged-in-as {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
}
.logged-in-as a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.logged-in-as a:hover {
  text-decoration: underline;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.comment-form-author,
.comment-form-email,
.comment-form-url {
  margin: 0;
}
.comment-form-author label,
.comment-form-email label,
.comment-form-url label,
.comment-form-comment label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
  width: 100%;
  max-width: 400px;
  height: 42px;
  padding: 0 12px;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-card);
  outline: none;
  transition: border-color var(--transition);
}
.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
  border-color: var(--brand);
}
.comment-form-comment {
  margin: 0;
}
.comment-form-comment textarea {
  width: 100%;
  min-height: 140px;
  padding: 10px 12px;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-card);
  outline: none;
  resize: vertical;
  transition: border-color var(--transition);
  font-family: var(--font-sans);
  line-height: 1.6;
}
.comment-form-comment textarea:focus {
  border-color: var(--brand);
}
.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
}
.comment-form-cookies-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}
.form-submit {
  margin: 0;
}
.form-submit .submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 var(--space-6);
  background: var(--brand);
  color: #fff;
  border: 0.5px solid var(--brand);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.form-submit .submit:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}
.form-submit .submit:active {
  transform: scale(0.98);
}

/* ============================================================
   BLOG / ARCHIVE
   ============================================================ */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 800px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
}

/* Featured post */
.blog-featured {
  display: block;
  border-radius: var(--radius-xl);
}
.blog-featured-link {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-decoration: none;
  min-height: 300px;
}
.blog-featured-img {
  overflow: hidden;
}
.blog-featured-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
}
.blog-featured-title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  line-height: 1.35;
  color: var(--text-primary);
}
.blog-featured-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.blog-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-2);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}
.blog-meta-author {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.blog-avatar {
  width: 24px;
  height: 24px;
  border-radius: 99px;
}
.blog-meta-date {
}
@media (max-width: 600px) {
  .blog-featured-link {
    grid-template-columns: 1fr;
  }
  .blog-featured-img {
    height: 200px;
  }
}
@media (max-width: 600px) {
  .blog-featured-body {
    padding: var(--space-4);
  }
  .blog-featured-title {
    font-size: 1.125rem;
  }
}

/* Post grid */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* Card item (non-featured) */
.blog-card-item {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.blog-card-img {
  display: block;
  height: 180px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.blog-card-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.blog-card-date {
}
.blog-card-title {
  font-size: 1rem;
  line-height: 1.35;
}
.blog-card-title a {
  color: var(--text-primary);
  text-decoration: none;
}
.blog-card-title a:hover {
  color: var(--brand);
}
.blog-card-excerpt {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 0.5px solid var(--border-light);
  margin-top: auto;
}
.blog-card-author {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.blog-avatar-sm {
  width: 20px;
  height: 20px;
  border-radius: 99px;
}
.blog-card-readmore {
  font-size: 0.75rem;
}
.blog-card-readmore:hover i {
  transform: translateX(2px);
}
.blog-card-readmore i {
  transition: transform var(--transition);
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.blog-sidebar-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

/* Sidebar search */
.blog-search-form {
  display: flex;
  gap: var(--space-2);
}
.blog-search-input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  outline: none;
  background: var(--bg-card);
  color: var(--text-primary);
}
.blog-search-input:focus {
  border-color: var(--brand);
}
.blog-search-input::placeholder {
  color: var(--text-tertiary);
}
.blog-search-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.blog-search-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Sidebar recent posts */
.blog-sidebar-post {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 0.5px solid var(--border-light);
  text-decoration: none;
}
.blog-sidebar-post:last-child {
  border-bottom: none;
}
.blog-sidebar-post-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-muted);
}
.blog-sidebar-post-info {
  flex: 1;
  min-width: 0;
}
.blog-sidebar-post-title {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-sidebar-post-date {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Sidebar categories */
.blog-categories {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.blog-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-1) 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.blog-cat-item:hover {
  color: var(--brand);
}
.blog-cat-count {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  background: var(--bg-muted);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

/* Sidebar tags */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* ── Single post two-col layout (mirrors blog-layout pattern) ── */
.blog-single-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-8);
  align-items: start;
}

/* ── Prev / next post navigation ────────────────────────────── */
.blog-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

/* ── Mobile category filter chip strip ──────────────────────── */
/* Hidden on desktop — flex-scrolls into view at ≤800px          */
.blog-filter-strip {
  display: none;
  overflow-x: auto;
  gap: var(--space-2);
  padding-bottom: var(--space-1);
  margin-bottom: var(--space-5);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.blog-filter-strip::-webkit-scrollbar {
  display: none;
}
.blog-filter-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 0.5px solid var(--border-mid);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  white-space: nowrap;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}
.blog-filter-chip:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}
.blog-filter-chip.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ── Mobile overrides (≤800px) ──────────────────────────────── */
@media (max-width: 800px) {
  /* Single post: stack article + sidebar into 1 col */
  .blog-single-layout {
    grid-template-columns: 1fr;
  }

  /* Sidebar on single post: unstick, 2-col card grid (compact) */
  .blog-single-layout .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  /* Listing pages: replace sidebar with filter chip strip */
  .blog-layout .blog-sidebar {
    display: none;
  }
  .blog-filter-strip {
    display: flex;
  }

  /* Blog cards full-width earlier since sidebar is gone */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Card image: slightly taller on full-width mobile */
  .blog-card-img {
    height: 200px;
  }
}

/* ── Tiny screens (≤480px) ───────────────────────────────────── */
@media (max-width: 480px) {
  /* Prev/next nav: stack vertically */
  .blog-post-nav {
    grid-template-columns: 1fr;
  }

  /* Single post sidebar: also single col on tiny screens */
  .blog-single-layout .blog-sidebar {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   INFOLION CONSENT BANNER — themed
   ============================================================ */
#infolion-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  background: #fff;
  color: var(--text-primary);
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  line-height: 1.5;
  flex-wrap: wrap;
  border-top: 0.5px solid var(--border-light);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}
#infolion-consent-banner p {
  margin: 0;
  flex: 1 1 260px;
  color: var(--text-secondary);
}
.infolion-consent-buttons {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}
#infolion-accept,
#infolion-decline {
  padding: 0 var(--space-4);
  height: 34px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
#infolion-accept {
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
}
#infolion-accept:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}
#infolion-decline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-mid);
}
#infolion-decline:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}
@media (max-width: 600px) {
  #infolion-consent-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: var(--space-3) var(--space-4);
  }
  #infolion-consent-banner p {
    flex: none;
  }
  .infolion-consent-buttons {
    width: 100%;
  }
  #infolion-accept,
  #infolion-decline {
    flex: 1;
    text-align: center;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .site-header,
  .site-footer,
  .filters-sidebar,
  .breadcrumb-bar,
  .announcement-bar {
    display: none !important;
  }
  .shop-layout,
  .product-layout,
  .cart-page-layout,
  .checkout-layout {
    grid-template-columns: 1fr !important;
  }
}
