/* ============================================================
   Uganda Bookshop — Main Stylesheet
   Brand colors: yellow #FFAA00 | black #1A1A1A | teal #0EA5A0
                 cream #FAF0D7  | gold #D4930A
   ============================================================ */

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

:root {
  --yellow:      #FFAA00;
  --yellow-dark: #E09600;
  --black:       #1A1A1A;
  --teal:        #0EA5A0;
  --teal-dark:   #0B8A86;
  --cream:       #FAF0D7;
  --cream-dark:  #F5E8D9;
  --gold:        #D4930A;
  --warm-white:  #FFFBF0;
  --gray-50:     #F9FAFB;
  --gray-100:    #F3F4F6;
  --gray-200:    #E5E7EB;
  --gray-400:    #9CA3AF;
  --gray-600:    #4B5563;
  --gray-800:    #1F2937;
  --red:         #EF4444;
  --green:       #22C55E;
  --orange:      #F97316;

  --radius:      8px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.14);

  --font-sans:   'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:  Georgia, 'Times New Roman', serif;
  --font-mono:   'Geist Mono', 'Courier New', monospace;

  --nav-height:  64px;
  --max-width:   1280px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--warm-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-height);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) { .container { padding: 0 2rem; } }

/* ─── Typography ────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { line-height: 1.7; }

.text-sm   { font-size: 0.875rem; }
.text-xs   { font-size: 0.75rem; }
.text-muted { color: var(--gray-600); }

/* ─── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dark);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  backdrop-filter: blur(8px);
  transition: height .2s ease, box-shadow .2s ease, background .2s ease;
}

.navbar.is-scrolled {
  height: 52px;
  background: rgba(250, 240, 215, 0.96);
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.08);
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  transition: gap .2s ease;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  white-space: nowrap;
}

.navbar-logo img { width: 36px; height: 36px; border-radius: 6px; }

.navbar-logo img,
.navbar-logo span {
  transition: width .2s ease, height .2s ease, font-size .2s ease;
}

.navbar.is-scrolled .navbar-logo img {
  width: 30px;
  height: 30px;
}

.navbar.is-scrolled .navbar-logo span {
  font-size: 1rem;
}

.navbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
  transition: max-width .2s ease, flex-basis .2s ease;
}

.navbar.is-scrolled .navbar-search {
  max-width: 360px;
}

.navbar-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--cream-dark);
  border-radius: 9999px;
  background: white;
  font-size: 0.875rem;
  outline: none;
  transition: border-color .2s, padding .2s, min-height .2s;
  min-height: 38px;
}

.navbar.is-scrolled .navbar-search input {
  min-height: 32px;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.navbar-search input:focus { border-color: var(--teal); }

.navbar-search .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
  display: inline-flex;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.nav-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--black);
  transition: background .2s;
}

.nav-icon-btn:hover { background: var(--cream-dark); }

.nav-icon-btn svg,
.category-nav svg {
  flex-shrink: 0;
}

.nav-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 3px;
  border-radius: 9999px;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-badge-dark {
  background: var(--black);
  color: white;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--cream-dark);
  background: white;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all .2s;
}

.nav-user-btn:hover { border-color: var(--teal); }

.mobile-menu-button,
.mobile-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--black);
}

.mobile-menu-button:hover,
.mobile-menu-close:hover {
  background: var(--cream-dark);
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(26, 26, 26, .38);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 190;
  width: min(86vw, 22rem);
  overflow-y: auto;
  background: var(--warm-white);
  border-left: 1px solid var(--cream-dark);
  box-shadow: -16px 0 40px rgba(26, 26, 26, .18);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--cream-dark);
}

.mobile-menu-search {
  position: relative;
  margin: 1rem;
}

.mobile-menu-search span {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  display: inline-flex;
}

.mobile-menu-search input {
  width: 100%;
  min-height: 42px;
  padding: .6rem .9rem .6rem 2.45rem;
  border: 1px solid var(--cream-dark);
  border-radius: 999px;
  background: white;
  outline: none;
}

.mobile-menu-search input:focus {
  border-color: var(--teal);
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: 0 1rem 1.5rem;
}

.mobile-menu-nav a,
.mobile-menu-nav button {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 42px;
  padding: .55rem .7rem;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--black);
  font-size: .92rem;
  font-weight: 600;
  text-align: left;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav button:hover {
  background: var(--cream);
}

body.mobile-menu-open {
  overflow: hidden;
}

/* Category nav bar */
.category-nav {
  background: var(--black);
  color: white;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar { display: none; }

.category-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.category-nav a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 0.6rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  transition: color .2s, background .2s;
  border-bottom: 2px solid transparent;
}

.category-nav a:hover,
.category-nav a.active {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer,
footer {
  background: var(--black);
  color: rgba(255,255,255,.8);
  padding: 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3.5rem 0;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand { font-family: var(--font-sans); }
.footer-brand-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1rem;
}
.footer-brand-row img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.footer-brand h3 { color: white; margin-bottom: 0; font-size: 1.1rem; }
.footer-brand p  { font-size: 0.875rem; line-height: 1.7; }
.footer-socials {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
}
.footer-socials a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: white;
  transition: background .2s, color .2s;
}
.footer-socials a:hover {
  background: var(--yellow);
  color: var(--black);
}

.footer-col h4 {
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 1rem;
}

.footer-col ul  { list-style: none; }
.footer-col li  { margin-bottom: 0.5rem; }
.footer-col a   { font-size: 0.875rem; color: rgba(255,255,255,.7); transition: color .2s; }
.footer-col a:hover { color: var(--yellow); }

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .875rem;
  color: rgba(255,255,255,.72);
}
.footer-contact svg {
  color: var(--yellow);
  margin-top: .15rem;
  flex-shrink: 0;
}

.footer-copyright,
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 0;
}

.footer-copyright p {
  text-align: center;
  font-size: .75rem;
  color: rgba(255,255,255,.4);
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,.5);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--yellow); color: var(--black); }
.btn-primary:hover:not(:disabled) { background: var(--yellow-dark); }

.btn-teal { background: var(--teal); color: white; }
.btn-teal:hover:not(:disabled) { background: var(--teal-dark); }

.btn-black { background: var(--black); color: white; }
.btn-black:hover:not(:disabled) { background: #333; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-200);
  color: var(--black);
}
.btn-outline:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }

.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); color: var(--black); }

.btn-danger { background: var(--red); color: white; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* ─── Badges / Status ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  gap: 0.25rem;
}

.badge-yellow   { background: #FEF3C7; color: #92400E; }
.badge-teal     { background: #CCFBF1; color: #0F766E; }
.badge-green    { background: #DCFCE7; color: #166534; }
.badge-red      { background: #FEE2E2; color: #991B1B; }
.badge-gray     { background: var(--gray-100); color: var(--gray-600); }
.badge-orange   { background: #FED7AA; color: #9A3412; }

.status-pending   { background: #FEF3C7; color: #92400E; }
.status-paid      { background: #CCFBF1; color: #0F766E; }
.status-shipped   { background: #DBEAFE; color: #1E40AF; }
.status-delivered { background: #DCFCE7; color: #166534; }
.status-cancelled { background: #FEE2E2; color: #991B1B; }

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

/* ─── Book Card ──────────────────────────────────────────────── */
.book-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.book-card-cover {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--cream);
}

.book-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.book-card:hover .book-card-cover img { transform: scale(1.04); }

.book-card-body {
  padding: 0.75rem;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 7.25rem;
}

.book-card-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-author {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-card-price {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--black);
  margin-top: auto;
}

.book-card-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 0.75rem 0.75rem;
  margin-top: auto;
  min-height: 3.25rem;
  align-items: stretch;
}

.book-card-actions .btn {
  min-height: 2.35rem;
  width: 100%;
  white-space: normal;
  line-height: 1.15;
}

/* ─── Book Grid ──────────────────────────────────────────────── */
.books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 480px)  { .books-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { .books-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .books-grid { grid-template-columns: repeat(5, 1fr); } }

/* ─── Carousel / Shelf ───────────────────────────────────────── */
.carousel-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cream-dark) transparent;
  padding-bottom: 0.5rem;
}

.carousel-track {
  display: flex;
  gap: 1rem;
}

.carousel-track .book-card {
  flex: 0 0 160px;
}

@media (min-width: 640px) { .carousel-track .book-card { flex: 0 0 180px; } }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--gray-800);
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: white;
  color: var(--black);
  outline: none;
  transition: border-color .2s;
}

.form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,165,160,.1); }
.form-control.error { border-color: var(--red); }
.form-error { font-size: 0.8rem; color: var(--red); margin-top: 0.3rem; }

select.form-control { cursor: pointer; }

textarea.form-control { resize: vertical; min-height: 100px; }

/* ─── Table ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gray-600);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--gray-100);
  white-space: nowrap;
}

td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

tr:hover td { background: var(--gray-50); }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in .2s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

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

.modal-body    { padding: 1.5rem; }
.modal-footer  {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ─── Toast ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 340px;
}

.toast {
  background: var(--black);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toast-in .25s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.success { background: #166534; }
.toast.error   { background: #991B1B; }
.toast.info    { background: var(--teal-dark); }

/* ─── Skeleton loader ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Section titles ─────────────────────────────────────────── */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.section-subtitle {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* ─── Star Rating ────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 2px; }
.star { color: var(--gray-200); font-size: 1rem; }
.star.filled { color: var(--yellow); }

.star-icon {
  width: 1rem;
  height: 1rem;
  fill: var(--gray-200);
  color: var(--gray-200);
}

.star-icon.filled {
  fill: var(--yellow);
  color: var(--yellow);
}

.star-btn {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
}

.star-btn .star-icon {
  width: 1.55rem;
  height: 1.55rem;
}

.empty-state-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: var(--gray-400);
  background: currentColor;
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5.5A2.5 2.5 0 016.5 3H20v17H7a3 3 0 00-3 3V5.5zM4 19.5A2.5 2.5 0 016.5 17H20' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5.5A2.5 2.5 0 016.5 3H20v17H7a3 3 0 00-3 3V5.5zM4 19.5A2.5 2.5 0 016.5 17H20' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
  padding: 4rem 0;
  overflow: hidden;
}

/* ─── Page header strip ──────────────────────────────────────── */
.page-header {
  background: var(--cream);
  padding: 2rem 0;
  border-bottom: 1px solid var(--cream-dark);
}

/* ─── Misc helpers ───────────────────────────────────────────── */
.d-none   { display: none !important; }
.d-flex   { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }

/* ─── Spinner ────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 3px solid rgba(0,0,0,.1);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

.spinner-lg {
  width: 48px; height: 48px;
  border-width: 4px;
}

/* ─── Divider ────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--gray-100);
  margin: 1.5rem 0;
}

/* ─── Accordion (FAQ) ────────────────────────────────────────── */
.accordion-item { border-bottom: 1px solid var(--gray-100); }

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  width: 100%;
  background: none;
  border: none;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: var(--black);
  gap: 1rem;
}

.accordion-trigger .chevron {
  flex-shrink: 0;
  width: 20px; height: 20px;
  transition: transform .2s;
}

.accordion-item.open .accordion-trigger .chevron { transform: rotate(180deg); }

.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}

.accordion-content-inner { padding-bottom: 1rem; color: var(--gray-600); font-size: 0.9rem; }

/* ─── Responsive helpers ─────────────────────────────────────── */
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
  .navbar {
    min-height: var(--nav-height);
    height: var(--nav-height);
    padding: 0;
  }

  .navbar.is-scrolled {
    height: 56px;
    min-height: 56px;
  }

  .navbar-inner {
    flex-wrap: nowrap;
    gap: .75rem;
    justify-content: space-between;
  }

  .navbar-logo span {
    font-size: 1rem;
  }

  .navbar-search {
    display: none;
  }

  .navbar-actions {
    display: none;
  }

  .category-nav {
    display: none;
  }
}

@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}

/* Homepage port from the React storefront */
.home-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 5%, rgba(245, 158, 11, .26), transparent 32rem),
    radial-gradient(circle at 8% 92%, rgba(14, 165, 160, .18), transparent 28rem),
    linear-gradient(135deg, #FAF0D7 0%, #F5E0A8 48%, #EDD5A0 100%);
  padding: 4.5rem 0 4rem;
}

.home-hero-grid,
.spotlight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.home-hero-copy h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  letter-spacing: 0;
  margin-bottom: 1rem;
  color: var(--black);
}

.home-hero-copy h1 span {
  position: relative;
  display: inline-block;
}

.home-hero-copy h1 span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .12em;
  height: .12em;
  border-radius: 999px;
  background: var(--gold);
  opacity: .7;
  z-index: -1;
}

.home-hero-copy p {
  max-width: 32rem;
  color: rgba(26, 26, 26, .64);
  margin-bottom: 1.5rem;
}

.home-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}

.home-actions .btn,
.book-card-actions .btn {
  border-radius: 999px;
}

.home-actions svg,
.book-card-actions svg,
.section-link svg,
.featured-label svg,
.pick-ribbon svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.book-card-actions svg,
.featured-label svg,
.pick-ribbon svg {
  fill: currentColor;
}

.icon-arrow-right,
.icon-sparkle {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
}

.icon-arrow-right {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.icon-sparkle {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2l1.7 6.3L20 10l-6.3 1.7L12 18l-1.7-6.3L4 10l6.3-1.7L12 2z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2l1.7 6.3L20 10l-6.3 1.7L12 18l-1.7-6.3L4 10l6.3-1.7L12 2z' fill='black'/%3E%3C/svg%3E");
}

.home-hero-books {
  min-height: 28rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-stack,
.book-stack-placeholder {
  position: relative;
  width: min(100%, 28rem);
  min-height: 24rem;
}

.book-stack-placeholder .skeleton {
  position: absolute;
  width: 10rem;
  height: 14rem;
}

.book-stack-placeholder .skeleton:nth-child(1) { left: 1rem; top: 3rem; transform: rotate(-6deg); }
.book-stack-placeholder .skeleton:nth-child(2) { left: 50%; top: 1.5rem; transform: translateX(-50%); height: 18rem; width: 12rem; }
.book-stack-placeholder .skeleton:nth-child(3) { right: 1rem; bottom: 3rem; transform: rotate(6deg); }

.stack-book {
  position: absolute;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: white;
  box-shadow: 0 22px 45px rgba(0,0,0,.22), 0 7px 18px rgba(0,0,0,.14);
  transition: transform .35s ease;
}

.stack-book:hover {
  transform: translateY(-6px) scale(1.03);
}

.stack-book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack-main {
  z-index: 3;
  left: 50%;
  top: 2rem;
  width: 12rem;
  height: 18rem;
  transform: translateX(-50%);
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.stack-main:hover {
  transform: translateX(-50%) translateY(-6px) scale(1.03);
}

.stack-left {
  z-index: 1;
  left: .75rem;
  top: 4.2rem;
  width: 9rem;
  height: 13rem;
  transform: rotate(-7deg);
  opacity: .76;
}

.stack-right {
  z-index: 1;
  right: .75rem;
  top: 8.5rem;
  width: 9rem;
  height: 13rem;
  transform: rotate(7deg);
  opacity: .76;
}

.pick-ribbon {
  position: absolute;
  left: 0;
  top: .85rem;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .7rem;
  border-radius: 0 999px 999px 0;
  background: var(--gold);
  color: white;
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.stack-caption {
  position: absolute;
  left: 50%;
  bottom: .25rem;
  transform: translateX(-50%);
  width: 14rem;
  text-align: center;
}

.stack-caption h2 {
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stack-caption p {
  color: rgba(26,26,26,.55);
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stack-caption span,
.price-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .35rem;
  padding: .2rem .75rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--black);
  font-size: .72rem;
  font-weight: 800;
}

.home-shelf-section,
.home-recommended {
  background: var(--cream);
  padding: 3rem 0 2rem;
}

.home-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.home-section-header h2,
.section-heading {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--black);
}

.eyebrow {
  color: var(--teal);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: .2rem;
}

.section-link {
  display: none;
  align-items: center;
  gap: .25rem;
  color: rgba(26,26,26,.62);
  font-size: .9rem;
  font-weight: 700;
}

.section-link:hover { color: var(--black); }

.shelf-row {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.shelf-label {
  display: none;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .65rem;
  font-weight: 800;
  color: rgba(26,26,26,.28);
}

.bookshelf {
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: .2rem;
}

.bookshelf::-webkit-scrollbar { display: none; }

.bookshelf::after {
  content: "";
  display: block;
  height: 16px;
  margin-top: .4rem;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(to bottom, #C8A050 0%, #9A6E28 60%, rgba(0,0,0,.16) 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.3);
}

.shelf-track {
  display: flex;
  align-items: end;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem .2rem .25rem;
  scrollbar-width: none;
}

.shelf-track::-webkit-scrollbar { display: none; }

.shelf-book {
  flex: 0 0 9rem !important;
  max-width: 9rem;
  scroll-snap-align: start;
}

.shelf-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  background: white;
  box-shadow: 8px 8px 24px rgba(0,0,0,.3), 3px 3px 10px rgba(0,0,0,.18);
  transition: transform .25s ease;
}

.shelf-cover:hover { transform: translateY(-8px); }

.shelf-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shelf-cover span,
.book-pill {
  position: absolute;
  right: .45rem;
  top: .45rem;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  padding: .1rem .45rem;
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.shelf-book h3 {
  margin-top: .75rem;
  font-family: var(--font-sans);
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf-book p {
  color: rgba(26,26,26,.55);
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf-skeleton {
  flex: 0 0 9rem;
  height: 12rem;
}

.home-spotlight {
  border-top: 1px solid #DDD3C0;
  border-bottom: 1px solid #DDD3C0;
  background: #E8D9C0;
  padding: 4rem 0;
}

.spotlight-loading {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 2rem;
}

.spotlight-loading .skeleton:first-child { height: 18rem; }
.spotlight-loading .skeleton { height: 2rem; margin-bottom: .8rem; }

.spotlight-cover {
  display: block;
  justify-self: center;
  width: min(100%, 16rem);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  outline: 3px solid var(--gold);
  outline-offset: 6px;
  box-shadow: 0 32px 64px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.12);
  background: white;
}

.spotlight-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-copy {
  max-width: 36rem;
}

.featured-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 2px solid rgba(212,147,10,.45);
  border-radius: 999px;
  background: rgba(212,147,10,.18);
  color: #9A6500;
  padding: .25rem .8rem;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1rem;
}

.spotlight-copy h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: .45rem;
}

.spotlight-author,
.spotlight-desc {
  color: rgba(26,26,26,.62);
}

.spotlight-desc {
  margin-top: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spotlight-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.spotlight-meta strong {
  font-size: 2rem;
}

.spotlight-meta span {
  border: 1px solid rgba(26,26,26,.18);
  border-radius: 999px;
  padding: .25rem .7rem;
  color: rgba(26,26,26,.62);
  font-size: .82rem;
  font-weight: 700;
}

.home-collection,
.home-promises {
  background: var(--warm-white);
  padding: 4rem 0;
}

.category-shortcuts {
  margin-top: 3.5rem;
}

.category-grid,
.stats-grid,
.promise-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.category-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 5rem;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: var(--category-bg);
  color: var(--black);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  transition: transform .2s, box-shadow .2s;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.category-card span,
.stat-icon,
.promise-icon,
.newsletter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.category-card svg,
.stat-icon svg,
.promise-icon svg,
.newsletter-icon svg {
  width: 1.8rem;
  height: 1.8rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-icon::before,
.promise-icon::before,
.newsletter-icon::before {
  content: "";
  width: 1.8rem;
  height: 1.8rem;
  background: currentColor;
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
}

.icon-book::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5.5A2.5 2.5 0 016.5 3H20v17H7a3 3 0 00-3 3V5.5zM4 19.5A2.5 2.5 0 016.5 17H20' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5.5A2.5 2.5 0 016.5 3H20v17H7a3 3 0 00-3 3V5.5zM4 19.5A2.5 2.5 0 016.5 17H20' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.icon-star::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3l2.8 5.7 6.3.9-4.6 4.4 1.1 6.2L12 17.3l-5.6 2.9 1.1-6.2-4.6-4.4 6.3-.9L12 3z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3l2.8 5.7 6.3.9-4.6 4.4 1.1 6.2L12 17.3l-5.6 2.9 1.1-6.2-4.6-4.4 6.3-.9L12 3z' fill='black'/%3E%3C/svg%3E");
}

.icon-truck::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 6h11v10H3V6zm11 4h4l3 3v3h-7v-6zM7 20a2 2 0 100-4 2 2 0 000 4zm10 0a2 2 0 100-4 2 2 0 000 4z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 6h11v10H3V6zm11 4h4l3 3v3h-7v-6zM7 20a2 2 0 100-4 2 2 0 000 4zm10 0a2 2 0 100-4 2 2 0 000 4z' fill='black'/%3E%3C/svg%3E");
}

.icon-mail::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6h16v12H4V6zm0 1l8 6 8-6' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6h16v12H4V6zm0 1l8 6 8-6' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.icon-shield::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3l8 3v5c0 5-3.4 8.7-8 10-4.6-1.3-8-5-8-10V6l8-3zm-3 9l2 2 4-5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3l8 3v5c0 5-3.4 8.7-8 10-4.6-1.3-8-5-8-10V6l8-3zm-3 9l2 2 4-5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.home-stats {
  background: linear-gradient(135deg, #E8DFCF 0%, #EDE4D4 52%, #E0D4BC 100%);
  border-top: 1px solid #CFC0A4;
  border-bottom: 1px solid #CFC0A4;
  padding: 3.5rem 0;
}

.stat-card,
.promise-card {
  text-align: center;
  border: 2px solid #DDD0B8;
  border-radius: var(--radius);
  background: white;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}

.stat-card:hover,
.promise-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.stat-icon,
.promise-icon,
.newsletter-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 16px;
  margin: 0 auto 1rem;
  background: rgba(212,147,10,.18);
  color: var(--gold);
}

.stat-card:nth-child(2) .stat-icon { background: rgba(14,165,160,.16); color: var(--teal); }
.stat-card:nth-child(3) .stat-icon { background: rgba(255,170,0,.22); color: var(--yellow-dark); }

.stat-card strong {
  display: block;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 2.3rem;
  line-height: 1.1;
  margin-bottom: .45rem;
}

.stat-card:nth-child(2) strong { color: var(--teal); }
.stat-card:nth-child(3) strong { color: var(--yellow-dark); }

.stat-card h3,
.promise-card h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  margin-bottom: .25rem;
}

.stat-card p,
.promise-card p {
  color: rgba(26,26,26,.58);
  font-size: .9rem;
}

.home-newsletter {
  background: var(--black);
  color: white;
  padding: 4rem 0;
}

.newsletter-panel {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.newsletter-icon {
  background: rgba(255,255,255,.1);
  color: var(--yellow);
}

.newsletter-panel h2 {
  color: white;
  margin-bottom: .5rem;
}

.newsletter-panel p {
  color: rgba(255,255,255,.7);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  max-width: 28rem;
  margin: 1.5rem auto 0;
}

.newsletter-form .form-control {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.22);
  color: white;
}

.newsletter-form .form-control::placeholder {
  color: rgba(255,255,255,.55);
}

#newsletter-msg {
  margin-top: 1rem;
  color: var(--green);
  font-weight: 700;
}

.home-promises .section-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.promise-icon {
  background: rgba(14,165,160,.16);
  color: var(--teal);
}

.promise-card:nth-child(2) .promise-icon { background: rgba(212,147,10,.18); color: var(--gold); }
.promise-card:nth-child(3) .promise-icon { background: rgba(255,170,0,.22); color: var(--yellow-dark); }

.book-card-cover {
  position: relative;
}

.book-card-actions .btn svg {
  width: .95rem;
  height: .95rem;
}

@media (min-width: 560px) {
  .category-grid,
  .stats-grid,
  .promise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .newsletter-form {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .home-hero-grid,
  .spotlight-grid {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 1fr);
  }

  .section-link,
  .shelf-label {
    display: inline-flex;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid,
  .promise-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-hero {
    padding: 6rem 0 5.5rem;
  }

  .shelf-book {
    flex: 0 0 10rem !important;
    max-width: 10rem;
  }

  .shelf-skeleton {
    flex: 0 0 10rem !important;
    height: 13.33rem;
  }
}

@media (max-width: 520px) {
  .home-section-header {
    align-items: start;
  }

  .home-hero-books {
    min-height: 24rem;
  }

  .stack-main {
    width: 10.5rem;
    height: 15.75rem;
  }

  .stack-left,
  .stack-right {
    width: 7.5rem;
    height: 11rem;
  }

  .stack-left { left: 0; }
  .stack-right { right: 0; }
}
