/* ============================================================
   JESSIE LEARNED BOOKS — Antiquarian Library Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Cinzel:wght@400;600&display=swap');

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --parchment:      #F0E9D6;
  --cream:          #FAF6EE;
  --ink:            #1A0E05;
  --mahogany:       #4A1C0F;
  --leather:        #7A3B22;
  --burgundy:       #6B2030;
  --gold:           #C8921A;
  --gold-light:     #E4B84A;
  --gold-pale:      #F5E4A8;
  --sage:           #4E5E3A;
  --muted:          #7A6A54;
  --border:         #C4A87A;
  --border-light:   #DDD0B0;
  --shadow-warm:    rgba(26, 14, 5, 0.12);
  --shadow-deep:    rgba(26, 14, 5, 0.28);
  --radius:         4px;
  --radius-lg:      8px;
  --transition:     all 0.22s ease;
  --font-serif:     'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:      'EB Garamond', Georgia, serif;
  --font-display:   'Cinzel', 'Trajan Pro', serif;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(200, 146, 26, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(107, 32, 48, 0.04) 0%, transparent 60%);
  min-height: 100vh;
}

a { color: var(--burgundy); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--mahogany);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 500; }
h3 { font-size: 1.4rem; font-weight: 500; }
h4 { font-size: 1.15rem; font-weight: 500; }

p { margin-bottom: 1rem; }

.text-muted { color: var(--muted); font-size: 0.9em; }

/* ── Ornamental Divider ────────────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  color: var(--border);
}
.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}
.ornament span {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  white-space: nowrap;
  letter-spacing: 0.15em;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* ── HEADER ────────────────────────────────────────────────── */
.site-header {
  background: var(--mahogany);
  background-image: linear-gradient(135deg, #2A1008 0%, #4A1C0F 50%, #3A1509 100%);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px var(--shadow-deep);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: 1240px;
  margin: 0 auto;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-name {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--gold-light);
  letter-spacing: 0.08em;
  line-height: 1.1;
}
.logo-tag {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: rgba(228, 184, 74, 0.65);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-style: italic;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav a {
  color: rgba(240, 233, 214, 0.88);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--gold-light);
  background: rgba(200, 146, 26, 0.15);
}

/* ── Nav Subjects Dropdown ─────────────────────────────────── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  color: rgba(240, 233, 214, 0.88);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown-toggle:hover {
  color: var(--gold-light);
  background: rgba(200, 146, 26, 0.15);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  max-height: 360px;
  overflow-y: auto;
  background: #3A1208;
  border: 1px solid rgba(200, 146, 26, 0.3);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: rgba(240, 233, 214, 0.88);
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(200, 146, 26, 0.1);
  transition: var(--transition);
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { color: var(--gold-light); background: rgba(200, 146, 26, 0.12); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-search {
  display: flex;
  align-items: center;
  background: rgba(240, 233, 214, 0.1);
  border: 1px solid rgba(200, 146, 26, 0.35);
  border-radius: 50px;
  overflow: hidden;
  transition: var(--transition);
}
.header-search:focus-within {
  background: rgba(240, 233, 214, 0.18);
  border-color: var(--gold);
}
.header-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  width: 180px;
}
.header-search input::placeholder { color: rgba(240, 233, 214, 0.45); }
.header-search button {
  background: transparent;
  border: none;
  color: rgba(228, 184, 74, 0.8);
  padding: 0.4rem 0.75rem;
  font-size: 1rem;
  transition: var(--transition);
}
.header-search button:hover { color: var(--gold-light); }

.cart-btn {
  position: relative;
  background: transparent;
  border: 1px solid rgba(200, 146, 26, 0.5);
  border-radius: var(--radius);
  color: var(--gold-light);
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
  text-decoration: none;
}
.cart-btn:hover {
  background: rgba(200, 146, 26, 0.2);
  color: var(--gold-light);
  border-color: var(--gold);
}
.cart-count {
  background: var(--burgundy);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
  font-weight: bold;
  line-height: 1;
  display: none;
}
.cart-count.visible { display: flex; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(160deg, #1A0E05 0%, #3A1509 40%, #2A0A10 100%);
  overflow: hidden;
  padding: 6rem 1.5rem;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 80% at 30% 50%, rgba(200, 146, 26, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 75% 30%, rgba(107, 32, 48, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-serif);
  color: var(--cream);
  margin-bottom: 1.25rem;
  font-style: italic;
  font-weight: 400;
}
.hero h1 strong {
  font-style: normal;
  font-weight: 700;
  color: var(--gold-light);
}

.hero-desc {
  color: rgba(240, 233, 214, 0.75);
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.btn-primary {
  background: linear-gradient(135deg, #B8820E, #D4A830);
  color: var(--mahogany);
  border-color: var(--gold);
  font-weight: 500;
  box-shadow: 0 2px 12px rgba(200, 146, 26, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #C8921A, #E4B840);
  color: var(--mahogany);
  box-shadow: 0 4px 18px rgba(200, 146, 26, 0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--cream);
  border-color: rgba(240, 233, 214, 0.45);
}
.btn-outline:hover {
  background: rgba(240, 233, 214, 0.1);
  color: var(--gold-light);
  border-color: var(--gold);
}

.btn-secondary {
  background: var(--cream);
  color: var(--mahogany);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--parchment);
  border-color: var(--gold);
  color: var(--burgundy);
}

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

.btn-sm { font-size: 0.88rem; padding: 0.5rem 1.1rem; }
.btn-lg { font-size: 1.1rem; padding: 0.9rem 2.2rem; }
.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── BOOK CARDS ────────────────────────────────────────────── */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.75rem;
}

.book-card {
  background: var(--cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px var(--shadow-warm);
  text-decoration: none;
  color: inherit;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px var(--shadow-deep);
  border-color: var(--border);
  color: inherit;
}

.book-cover {
  position: relative;
  background: linear-gradient(160deg, #2A1008 0%, #4A2010 100%);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  flex-shrink: 0;
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}
.book-cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  background: linear-gradient(160deg, #3A1208 0%, #5A2818 50%, #3A1208 100%);
}
.book-cover-placeholder .placeholder-title {
  font-family: var(--font-serif);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.book-cover-placeholder .placeholder-author {
  font-family: var(--font-body);
  color: rgba(228, 184, 74, 0.6);
  font-size: 0.72rem;
}
.book-cover-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--gold) 0%, rgba(200, 146, 26, 0.5) 100%);
}

.condition-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 50px;
  font-weight: 500;
  text-transform: uppercase;
}
.condition-fine     { background: rgba(78, 94, 58, 0.88);  color: #d4ecc0; }
.condition-vg       { background: rgba(200, 146, 26, 0.88); color: #fff; }
.condition-good     { background: rgba(74, 28, 15, 0.85);  color: var(--gold-pale); }
.condition-fair     { background: rgba(107, 32, 48, 0.85); color: #ffcccc; }
.condition-poor     { background: rgba(80, 80, 80, 0.85);  color: #eee; }

.book-info {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.25rem;
}
.book-title {
  font-family: var(--font-serif);
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--mahogany);
  line-height: 1.3;
  margin-bottom: 0.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-author {
  font-size: 0.83rem;
  color: var(--muted);
  font-style: italic;
}
.book-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
}
.book-price {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--burgundy);
  font-weight: 700;
}
.book-binding {
  font-size: 0.73rem;
  color: var(--muted);
  background: var(--parchment);
  padding: 2px 8px;
  border-radius: 50px;
  border: 1px solid var(--border-light);
}

/* ── SHOP PAGE ─────────────────────────────────────────────── */
.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.shop-sidebar {
  background: var(--cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
  box-shadow: 0 2px 8px var(--shadow-warm);
}
.sidebar-section {
  margin-bottom: 1.75rem;
}
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-label {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* ── FORM ELEMENTS ─────────────────────────────────────────── */
.field {
  margin-bottom: 1.25rem;
}
.field label {
  display: block;
  font-size: 0.88rem;
  color: var(--mahogany);
  margin-bottom: 0.4rem;
  font-family: var(--font-serif);
  letter-spacing: 0.03em;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 146, 26, 0.15);
  background: #fff;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A6A54' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.5rem;
}

textarea { resize: vertical; min-height: 130px; line-height: 1.6; }

.price-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}
.price-range span { color: var(--muted); text-align: center; }

.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 0.25rem 0;
}
.radio-option input, .checkbox-option input {
  width: auto;
  accent-color: var(--gold);
}

/* ── BOOK DETAIL PAGE ──────────────────────────────────────── */
.book-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
}

.book-detail-cover {
  background: linear-gradient(160deg, #2A1008, #4A2010);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 8px 8px 32px var(--shadow-deep);
  aspect-ratio: 2 / 3;
  position: relative;
}
.book-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-detail-meta {
  background: var(--cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.book-detail-meta table {
  width: 100%;
  border-collapse: collapse;
}
.book-detail-meta td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
}
.book-detail-meta td:first-child {
  color: var(--muted);
  width: 40%;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.book-detail-meta td:last-child {
  color: var(--ink);
  font-weight: 500;
}
.book-detail-meta tr:last-child td { border-bottom: none; }

.book-detail-price {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--burgundy);
  margin: 1rem 0;
}

/* ── CART ──────────────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: start;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
}
.cart-item:last-child { border-bottom: none; }

.cart-item-thumb {
  width: 80px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, #3A1208, #5A2818);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
  color: var(--mahogany);
}
.cart-item-info p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}
.cart-item-price {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--burgundy);
  font-weight: 700;
  text-align: right;
}
.cart-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 2px 6px;
  line-height: 1;
}
.cart-remove:hover { color: var(--burgundy); }

.order-summary {
  background: var(--cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
  box-shadow: 0 2px 8px var(--shadow-warm);
}
.order-summary h3 {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.95rem;
}
.summary-row.total {
  font-size: 1.2rem;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--burgundy);
  border-top: 2px solid var(--border);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

/* ── EMPTY STATE ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
}
.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.empty-state h3 {
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

/* ── PAGINATION ────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}
.page-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
}
.page-btn:hover, .page-btn.active {
  background: var(--mahogany);
  color: var(--gold-light);
  border-color: var(--mahogany);
}
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-ellipsis { color: var(--muted); padding: 0 4px; line-height: 38px; }

/* ── FEATURES STRIP ────────────────────────────────────────── */
.features-strip {
  background: var(--cream);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 2rem 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.feature-item {
  padding: 1rem;
}
.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}
.feature-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--mahogany);
  margin-bottom: 0.25rem;
}
.feature-desc {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* ── CONTACT PAGE ──────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}
.contact-form-card {
  background: var(--cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 2px 12px var(--shadow-warm);
}
.contact-info-card {
  background: var(--cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 2px 12px var(--shadow-warm);
}
.contact-info-item {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}
.contact-info-icon {
  font-size: 1.2rem;
  width: 32px;
  flex-shrink: 0;
}
.contact-info-text h4 {
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}
.contact-info-text p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ── ABOUT PAGE ────────────────────────────────────────────── */
.about-header {
  background: linear-gradient(135deg, #2A1008, #4A1C0F);
  color: var(--cream);
  text-align: center;
  padding: 5rem 1.5rem;
}
.about-header h1 { color: var(--gold-light); }
.about-header p { color: rgba(240, 233, 214, 0.8); font-style: italic; }

.about-body {
  max-width: 760px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.about-body p {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ── ALERTS & NOTICES ──────────────────────────────────────── */
.alert {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}
.alert-success {
  background: rgba(78, 94, 58, 0.1);
  border-color: var(--sage);
  color: #2d4020;
}
.alert-error {
  background: rgba(107, 32, 48, 0.08);
  border-color: var(--burgundy);
  color: var(--burgundy);
}
.alert-info {
  background: rgba(200, 146, 26, 0.08);
  border-color: var(--gold);
  color: var(--mahogany);
}

/* ── LOADING ───────────────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
  font-style: italic;
}
.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SUCCESS PAGE ──────────────────────────────────────────── */
.success-page {
  text-align: center;
  max-width: 560px;
  margin: 5rem auto;
  padding: 0 1.5rem;
}
.success-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}
.success-page h1 { color: var(--sage); margin-bottom: 1rem; }
.success-page .order-number {
  display: inline-block;
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1.25rem;
  font-family: monospace;
  font-size: 1rem;
  color: var(--mahogany);
  margin: 1rem 0;
}

/* ── FOOTER ────────────────────────────────────────────────── */
.site-footer {
  background: var(--mahogany);
  background-image: linear-gradient(135deg, #1A0800 0%, #3A1208 100%);
  color: rgba(240, 233, 214, 0.75);
  border-top: 3px solid var(--gold);
  margin-top: 5rem;
  padding: 3.5rem 0 2rem;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.footer-brand h3 {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(240, 233, 214, 0.6);
  margin-bottom: 0;
  font-style: italic;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a {
  color: rgba(240, 233, 214, 0.65);
  font-size: 0.92rem;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(196, 168, 122, 0.25);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(240, 233, 214, 0.4);
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom a {
  color: rgba(240, 233, 214, 0.5);
}
.footer-bottom a:hover { color: var(--gold); }

/* ── PAGE HEADER ───────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, #2A1008, #4A1C0F);
  padding: 3rem 1.5rem;
  text-align: center;
  border-bottom: 3px solid rgba(200, 146, 26, 0.4);
  margin-bottom: 3rem;
}
.page-header h1 { color: var(--gold-light); margin-bottom: 0.4rem; }
.page-header p { color: rgba(240, 233, 214, 0.7); font-style: italic; margin: 0; }

/* ── RESULTS BAR ───────────────────────────────────────────── */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.results-count {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}
.sort-select {
  width: auto;
  min-width: 180px;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-size: 0.9rem;
}

/* ── PAYPAL AREA ───────────────────────────────────────────── */
#paypal-button-container {
  margin-top: 1.25rem;
}
.paypal-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.75rem;
  font-style: italic;
}
.paypal-note svg, .paypal-note img { vertical-align: middle; }

/* ── BREADCRUMB ────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--border); }

/* ── MOBILE MENU ───────────────────────────────────────────── */
.mobile-menu {
  display: none;
  background: #2A1008;
  border-top: 1px solid rgba(200, 146, 26, 0.3);
}
.mobile-menu a {
  display: block;
  color: rgba(240, 233, 214, 0.85);
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  border-bottom: 1px solid rgba(200, 146, 26, 0.1);
  transition: var(--transition);
}
.mobile-menu a:hover { color: var(--gold-light); background: rgba(200, 146, 26, 0.08); }
.mobile-menu.open { display: block; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-sidebar { position: static; }
  .book-detail  { grid-template-columns: 1fr; }
  .book-detail-cover { max-width: 280px; margin: 0 auto; }
  .cart-layout  { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .site-nav { display: none; }
  .header-search { display: none; }
  .hamburger { display: flex; }
  .books-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cart-item { grid-template-columns: 64px 1fr; }
  .cart-item-price { grid-column: 2; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .page-header { padding: 2rem 1rem; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero { padding: 4rem 1rem; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--parchment); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--leather); }

/* ── SELECTION ─────────────────────────────────────────────── */
::selection { background: var(--gold-pale); color: var(--mahogany); }

/* ── PHOTO REQUEST LINK ────────────────────────────────────── */
.photo-request-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--leather);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.4rem 0.85rem;
  transition: var(--transition);
}
.photo-request-link:hover {
  background: var(--gold-pale);
  border-color: var(--gold);
  color: var(--mahogany);
}
