/* ============================================================
   The Salmon Bookshop — Main Stylesheet
   ============================================================ */

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

:root {
  --salmon:       #F35323;  /* logo orange-red */
  --salmon-light: #F7865E;
  --salmon-dark:  #C23D12;
  --blue:         #3560AE;  /* logo blue */
  --blue-dark:    #264A8A;
  --blue-light:   #5A80C8;
  --cream:        #FAF8F5;
  --warm-white:   #FEFCFA;
  --ink:          #1C1C2E;
  --ink-muted:    #5A5870;
  --ink-faint:    #9A98A8;
  --border:       #E4E0F0;
  --border-dark:  #C8C4D8;
  --gold:         #3560AE;  /* repurpose gold as blue for external links */
  --success:      #2D7A4F;
  --danger:       #C23D12;
}

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

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main { flex: 1; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--salmon); }
img { display: block; max-width: 100%; }
address { font-style: normal; }

h1, h2, h3, h4 { font-family: 'Lora', serif; line-height: 1.3; }

/* ---- Container -------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---- Header ----------------------------------------------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(53,96,174,0.08);
}

.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
}

.header-contact {
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.header-contact a { color: var(--ink-muted); text-decoration: none; }
.header-contact a:hover { color: var(--salmon); }

/* Currency selector */
.currency-selector { position: relative; }
.currency-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-family: inherit;
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}
.currency-btn:hover { border-color: var(--salmon); color: var(--salmon); }
.currency-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 300;
  min-width: 180px;
  list-style: none;
  padding: 4px 0;
  margin-top: 4px;
}
.currency-dropdown.open { display: block; }
.currency-dropdown li {
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-muted);
  white-space: nowrap;
}
.currency-dropdown li:hover { background: var(--cream); color: var(--salmon); }
.currency-dropdown li.active { color: var(--salmon); font-weight: 600; }
/* Note banner shown when non-EUR selected */
.currency-notice {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
  padding: 5px 1rem;
  display: none;
}
.currency-notice.visible { display: block; }
.header-contact .sep { margin: 0 0.4rem; }

.header-logo {
  text-align: center;
}
.header-logo a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.header-logo strong {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--salmon-dark);
  letter-spacing: 0.01em;
}
.header-logo small {
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.header-search {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: visible;
  background: var(--cream);
  position: relative;
}
.header-search input {
  border: none;
  background: transparent;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  width: 180px;
  outline: none;
}
.header-search button {
  border: none;
  background: transparent;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  border-left: 1px solid var(--border);
}
.header-search button:hover { background: var(--border); }

.cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 12px;
  background: var(--salmon);
  color: #fff;
  border-radius: 4px;
  white-space: nowrap;
}
.cart-link:hover { background: var(--salmon-dark); color: #fff; }

.cart-count {
  font-size: 13px;
  font-weight: 600;
}
.cart-count.has-items {
  background: #fff;
  color: var(--salmon-dark);
  border-radius: 12px;
  padding: 1px 7px;
  font-size: 12px;
}

/* ---- Hamburger -------------------------------------------- */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--ink);
  font-size: 1.3rem;
}
.hamburger:focus { outline: none; }

/* ---- Page content (CMS Summernote output) ----------------- */
.page-content h2 {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  color: var(--salmon);
  margin: 1.75rem 0 0.5rem;
}
.page-content h3 {
  font-family: 'Lora', serif;
  font-size: 1rem;
  color: var(--blue);
  margin: 1.25rem 0 0.4rem;
}
.page-content p { margin-bottom: 1rem; }
.page-content ul,
.page-content ol {
  padding-left: 1.5rem !important;
  margin-bottom: 1rem !important;
}
.page-content ul {
  list-style: none !important;
  padding-left: 2rem !important;
}
.page-content ul > li {
  position: relative !important;
  padding-left: 1.25rem !important;
  margin-bottom: 0.5rem !important;
  list-style: none !important;
}
.page-content ul > li::before {
  content: '\2022' !important;
  color: var(--salmon) !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  line-height: 1.65 !important;
}
.page-content ol {
  list-style: decimal !important;
  padding-left: 2rem !important;
}
.page-content ol > li {
  padding-left: 0.25rem !important;
  margin-bottom: 0.5rem !important;
}
.page-content ol > li::marker { color: var(--salmon) !important; font-weight: 700 !important; }
.page-content a { color: var(--salmon); }
.page-content a:hover { text-decoration: underline; }

/* ---- Navigation ------------------------------------------- */
.nav-bar {
  background: var(--salmon);
}
.page-home .nav-bar {
  background: var(--blue);
}
.main-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.main-nav > ul {
  list-style: none;
  display: flex;
  gap: 0;
  align-items: stretch;
  justify-content: center;
}
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  transition: color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.main-nav > ul > li > a:hover { color: #fff; opacity: 1; }
.main-nav > ul > li > a.active {
  color: #fff;
  border-bottom: 2px solid rgba(255,255,255,0.6);
}
.main-nav .external-link { color: rgba(255,255,255,0.75); }
.main-nav .external-link:hover { color: #fff; opacity: 1; }

/* Dropdown */
.dropdown {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-width: 220px;
  width: max-content;
  padding: 6px 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  z-index: 200;
  transition: opacity 0.15s, visibility 0.15s;
}
.has-dropdown:hover .dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.dropdown li { list-style: none; }
.dropdown li a {
  display: block;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
}
.dropdown li a:hover { color: var(--salmon); background: var(--cream); }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* ---- Perks bar -------------------------------------------- */
.perks-bar {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.perks-bar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1200px;
  margin: 0 auto;
}
.perk {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  border-right: 1px solid var(--border);
  font-size: 13px;
}
.perk:last-child { border-right: none; }
.perk-icon { font-size: 20px; margin-bottom: 4px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--blue); color: #fff; border-radius: 4px; margin-bottom: 6px; }
.perk strong { display: block; font-weight: 600; font-size: 13px; color: var(--ink); }
.perk span { color: var(--ink-muted); font-size: 12px; }

/* ---- Hero ------------------------------------------------- */
.hero {
  background: var(--blue);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 460px;
  overflow: hidden;
}
.hero-text {
  padding: 3.5rem 3rem 3.5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--salmon);
}
.hero h1 {
  font-size: 2.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero h1 em { font-style: italic; color: #fff; opacity: 0.85; }
.hero p { font-size: 1rem; opacity: 0.88; margin-bottom: 1.75rem; line-height: 1.7; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 13px;
  opacity: 0.75;
  flex-wrap: wrap;
}
.hero-slider {
  position: relative;
  overflow: hidden;
}
.hero-slides {
  width: 100%;
  height: 100%;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero-slide.active {
  opacity: 1;
  position: relative;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.slider-arrow:hover { background: rgba(255,255,255,0.35); }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }
.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}
.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.slider-dot.active { background: #fff; }
.btn-primary {
  background: #fff;
  color: var(--salmon-dark);
  border: none;
  padding: 11px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.55);
  padding: 11px 24px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.btn-outline:hover { border-color: #fff; }

/* ---- Generic section -------------------------------------- */
.section { padding: 2.5rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.section-header h2 { font-size: 1.4rem; font-weight: 600; }
.see-all { font-size: 13px; color: var(--salmon); }
.see-all:hover { text-decoration: underline; }

/* ---- Category tabs ---------------------------------------- */
.genre-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.genre-tab {
  background: var(--warm-white);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.genre-tab.active, .genre-tab:hover {
  background: var(--salmon);
  color: #fff;
  border-color: var(--salmon);
}

/* ---- Book card -------------------------------------------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.book-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}
.book-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.book-card a { display: flex; flex-direction: column; flex: 1; }

.book-cover {
  aspect-ratio: 2/3;
  background: var(--cream);
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.book-card:hover .book-cover img { transform: scale(1.03); }

.book-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--ink-faint);
  font-size: 2rem;
}
.book-cover-placeholder i { font-size: 2rem; }

.sold-out-badge,
.book-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.4;
}
.sold-out-badge {
  background: rgba(28,28,26,0.82);
  color: #fff;
}
.book-badge-sale {
  background: var(--salmon);
  color: #fff;
}
.book-badge-new {
  background: #2D7A4F;
  color: #fff;
}
.book-price-was {
  font-size: 11px;
  color: var(--ink-faint);
  text-decoration: line-through;
  margin-left: 4px;
}

.book-info {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.book-genre-tag {
  font-size: 11px;
  color: var(--salmon);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.book-title {
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 3px;
  flex: 1;
}
.book-author { font-size: 12px; color: var(--ink-muted); margin-bottom: 0.6rem; }
.book-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.book-price { font-size: 15px; font-weight: 600; color: var(--salmon-dark); }
.book-stock-zero { font-size: 11px; color: var(--ink-faint); }

.add-to-cart-btn {
  background: var(--salmon);
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  font-family: inherit;
}
.add-to-cart-btn:hover { background: var(--salmon-dark); }
.add-to-cart-btn:disabled { background: var(--border); cursor: not-allowed; color: var(--ink-faint); }

/* ---- Category strip --------------------------------------- */
.cat-strip {
  background: var(--blue);
  padding: 2rem;
  overflow: hidden;
}
.cat-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.cat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.cat-card:hover { background: rgba(255,255,255,0.1); color: #fff; }
.cat-icon { font-size: 20px; margin-bottom: 0.6rem; color: var(--salmon-light); }
.cat-name { font-family: 'Lora', serif; font-size: 0.9rem; color: #fff; margin-bottom: 2px; }
.cat-count { font-size: 12px; color: rgba(255,255,255,0.45); }

/* ---- Books listing page ----------------------------------- */
.listing-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 2rem;
  align-items: start;
}

.filter-sidebar {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  position: sticky;
  top: 80px;
}
.filter-sidebar h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}
.filter-group { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-group h4 { font-family: 'Lora', serif; font-size: 0.95rem; margin-bottom: 0.6rem; }
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
}
.filter-option input { accent-color: var(--salmon); cursor: pointer; }
.filter-option:hover { color: var(--ink); }
.filter-count { margin-left: auto; color: var(--ink-faint); font-size: 12px; }

.filter-price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-price-inputs input {
  width: 70px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--cream);
}
.filter-price-inputs span { color: var(--ink-muted); font-size: 12px; }

.filter-apply-btn {
  display: block;
  width: 100%;
  padding: 8px;
  background: var(--salmon);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.5rem;
}
.filter-apply-btn:hover { background: var(--salmon-dark); }
.filter-clear { font-size: 12px; color: var(--ink-faint); text-align: center; display: block; margin-top: 6px; cursor: pointer; }
.filter-clear:hover { color: var(--salmon); }

.listing-main {}
.listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.listing-count { font-size: 14px; color: var(--ink-muted); }
.listing-count strong { color: var(--ink); }
.listing-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}
.listing-sort select {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 13px;
  font-family: inherit;
  background: var(--warm-white);
  color: var(--ink);
  cursor: pointer;
}

/* Search highlight */
.search-banner {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  font-size: 14px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search-banner strong { color: var(--salmon-dark); }
.search-clear { font-size: 12px; color: var(--ink-faint); }
.search-clear:hover { color: var(--salmon); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
}
.page-btn {
  border: 1px solid var(--border);
  background: var(--warm-white);
  color: var(--ink-muted);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}
.page-btn:hover { border-color: var(--salmon); color: var(--salmon); }
.page-btn.active { background: var(--salmon); color: #fff; border-color: var(--salmon); }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* No results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink-muted);
}
.no-results h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

/* ---- Book detail page ------------------------------------- */
.breadcrumb {
  padding: 0.75rem 2rem;
  font-size: 13px;
  color: var(--ink-muted);
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  max-width: 100%;
}
.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--salmon); }
.breadcrumb span { margin: 0 0.4rem; }

.book-detail {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 3rem;
  padding: 2.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.book-gallery {}
.book-main-img {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--warm-white);
  margin-bottom: 0.75rem;
}
.book-main-img img { width: 100%; max-height: 520px; object-fit: contain; padding: 1rem; }

.book-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.book-thumb {
  width: 68px;
  height: 68px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: var(--warm-white);
  transition: border-color 0.15s;
}
.book-thumb.active { border-color: var(--salmon); border-width: 2px; }
.book-thumb img { width: 100%; height: 100%; object-fit: cover; }

.book-buy {}
.book-buy .genre-tag {
  display: inline-block;
  background: var(--cream);
  border: 1px solid var(--border);
  color: var(--salmon);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}
.book-buy h1 {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.book-buy .book-meta {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}
.book-buy .book-meta strong { color: var(--ink); }

.book-price-block {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.book-price-main { font-size: 2rem; font-weight: 600; color: var(--salmon-dark); font-family: 'Lora', serif; }
.book-price-was { font-size: 1rem; color: var(--ink-faint); text-decoration: line-through; }

.stock-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 1.5rem;
}
.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.stock-dot.in { background: var(--success); }
.stock-dot.out { background: var(--danger); }
.stock-dot.low { background: #E08000; }

.add-to-cart-form { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.qty-input {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--warm-white);
}
.qty-input button {
  border: none;
  background: transparent;
  padding: 0 12px;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink-muted);
  border-right: 1px solid var(--border);
  line-height: 1;
  font-family: inherit;
}
.qty-input button:last-child { border-right: none; border-left: 1px solid var(--border); }
.qty-input button:hover { background: var(--cream); }
.qty-input input {
  border: none;
  width: 48px;
  text-align: center;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  color: var(--ink);
}
.qty-input input:focus { outline: none; }

.btn-add-cart {
  flex: 1;
  background: var(--salmon);
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-add-cart:hover { background: var(--salmon-dark); }
.btn-add-cart:disabled { background: var(--border); color: var(--ink-faint); cursor: not-allowed; }

.book-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

.book-description h3 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--ink-muted); font-weight: 600; font-family: 'Source Sans 3', sans-serif; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
.book-description-body {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
}
.book-description-body p + p { margin-top: 0.75rem; }

.trust-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-muted);
}
.trust-badge span { font-size: 16px; }

/* Related books */
.related-section { padding: 2rem; border-top: 1px solid var(--border); background: var(--warm-white); }
.related-section .book-grid { max-width: 1100px; margin: 0 auto; }
.related-section h2 { max-width: 1100px; margin: 0 auto 1.25rem; }
.related-section h2 { font-size: 1.2rem; }

/* ---- Cart page -------------------------------------------- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  padding: 2rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
.cart-items {}
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-img { width: 80px; height: 110px; border-radius: 4px; overflow: hidden; background: var(--cream); border: 1px solid var(--border); }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info .cart-item-title { font-family: 'Lora', serif; font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.cart-item-info .cart-item-author { font-size: 12px; color: var(--ink-muted); margin-bottom: 8px; }
.cart-item-info .cart-item-price { font-size: 14px; font-weight: 600; color: var(--salmon-dark); }
.cart-item-remove { font-size: 18px; color: var(--ink-faint); cursor: pointer; padding: 4px; }
.cart-item-remove:hover { color: var(--danger); }

.cart-summary {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  position: sticky;
  top: 90px;
}
.cart-summary h3 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-muted);
}
.cart-summary-line:last-of-type { border-bottom: none; }
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 0 1.25rem;
  color: var(--ink);
}
.btn-checkout {
  display: block;
  width: 100%;
  background: var(--salmon);
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
}
.btn-checkout:hover { background: var(--salmon-dark); color: #fff; }

/* ---- Flash messages --------------------------------------- */
.flash {
  padding: 0.75rem 2rem;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flash.success { background: #EAF5EE; color: #1B5E35; border-bottom: 1px solid #BFE0CC; }
.flash.error   { background: #FBF0EE; color: #7A2020; border-bottom: 1px solid #F0C0B8; }

/* ---- Page banner (for listing/search heading) ------------- */
.page-banner {
  background: #3460AD;
  border-bottom: none;
  padding: 1.5rem 2rem;
  color: #fff;
}
.page-banner h1,
.page-banner p {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.page-banner h1 { font-size: 1.6rem; font-weight: 600; color: #fff; }
.page-banner p { font-size: 14px; color: rgba(255,255,255,0.8); margin-top: 4px; }

/* ---- Footer ----------------------------------------------- */
.site-footer {
  background: var(--salmon-dark);
  color: rgba(255,255,255,0.75);
  margin-top: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding: 2.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-col h4 {
  font-family: 'Lora', serif;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}
.footer-about .footer-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.footer-social a:hover { background: var(--salmon); color: #fff; }
.footer-desc { font-size: 13px; line-height: 1.65; margin-top: 0.75rem; }
address { line-height: 1.75; font-size: 13px; }
address a { color: rgba(255,255,255,0.65); }
address a:hover { color: #fff; }
.footer-col ul { list-style: none; }
.footer-col ul li a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  padding: 3px 0;
}
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 960px) {
  .book-detail { grid-template-columns: 1fr; }
  .listing-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .cat-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-text { padding: 2.5rem 1.5rem; }
  .hero-slider { height: 260px; }
  .hero h1 { font-size: 1.8rem; }
  .main-nav {
    display: none;
    padding: 0;
  }
  .main-nav.open {
    display: block;
    background: var(--salmon);
    border-top: 1px solid rgba(255,255,255,0.2);
  }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    max-width: 100%;
    padding: 0;
  }
  .main-nav > ul > li > a {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    display: block;
  }
  .main-nav > ul > li > a.active {
    border-bottom: 1px solid rgba(255,255,255,0.15);
    border-left: 3px solid #fff;
  }
  .dropdown {
    position: static;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    border-radius: 0;
    border-top: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.15);
    display: none;
    width: 100%;
    min-width: 100%;
  }
  .dropdown.open { display: block; }
  .dropdown li a {
    padding: 0.65rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    font-size: 13px;
  }
  .dropdown li a:hover { background: rgba(0,0,0,0.1); color: #fff; }
  .has-dropdown > a::after { content: " \25BE"; display: none; }
}

@media (max-width: 768px) {
  .basket-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 680px) {
  .header-top { grid-template-columns: 1fr; text-align: center; }
  .header-contact { display: none; }
  .perks-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .cat-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .cart-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---- Book detail tabs ------------------------------------- */
.book-tabs { margin-bottom: 0.5rem; }
.book-tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
  gap: 0;
}
.book-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.book-tab-btn.active {
  color: var(--salmon);
  border-bottom-color: var(--salmon);
}
.book-tab-btn:hover { color: var(--salmon); }
.tab-count {
  background: var(--salmon);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.4;
}
.book-tab-panel { min-height: 60px; }
.reviews-list { display: flex; flex-direction: column; gap: 1rem; }
.review-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--warm-white);
}
.review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
