:root {
  --surface-page: #FBF8EF;
  --surface-warm: #F4EDE0;
  --surface-raised: #FFFDF7;
  --surface-inset: #EEE4D2;
  --text-primary: #1E211B;
  --text-secondary: #5B6357;
  --text-tertiary: #87907E;
  --border-default: #D9CCB8;
  --border-strong: #1E211B;
  --accent-primary: #0F5A33;
  --accent-hover: #0B4428;
  --accent-secondary: #B65C37;
  --accent-gold: #C69A45;
  --status-success: #2F7A4F;
  --status-warning: #B46A23;
  --status-error: #B43D35;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  --font-display: Georgia, "Times New Roman", serif;
  --font-ui: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-note: "Segoe Print", "Bradley Hand ITC", cursive;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --container: 1320px;
  --radius: 6px;
  --header-offset: 168px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--text-primary);
  background: var(--surface-page);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  overflow-x: clip;
}

body.no-scroll {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--border-strong);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  z-index: 30;
  transform: translateY(-160%);
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  padding: var(--space-2) var(--space-3);
}

.skip-link:focus {
  transform: translateY(0);
}

.utility-bar {
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: var(--space-4);
  padding: 0 max(var(--space-4), calc((100vw - var(--container)) / 2));
  color: var(--surface-raised);
  background: var(--accent-primary);
  font-size: 13px;
  font-weight: 700;
}

.utility-email {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.utility-email svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.utility-email:hover {
  text-decoration: underline;
}

.utility-bar > span {
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface-page) 94%, transparent);
  border-bottom: 1px solid var(--border-default);
  backdrop-filter: blur(14px);
}

.header-main {
  width: min(100% - 48px, var(--container));
  min-height: 104px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(300px, 520px) 320px;
  align-items: center;
  gap: var(--space-10);
}

.brand {
  display: grid;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1;
}

.brand-kicker,
.brand-subline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 0.92;
  text-transform: uppercase;
}

.brand-subline {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: 10px;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: 999px;
}

.search-form input {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  padding: 0 var(--space-4);
}

.search-form input:focus {
  outline: 0;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: var(--space-4);
}

.action-button {
  position: relative;
  min-width: 58px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.action-button:hover {
  color: var(--accent-primary);
}

.cart-count {
  position: absolute;
  top: 0;
  right: 4px;
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-primary);
  color: var(--surface-raised);
  font-family: var(--font-mono);
  font-size: 12px;
}

.category-nav {
  width: min(100% - 48px, var(--container));
  min-height: 48px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  overflow-x: auto;
  border-top: 1px solid var(--border-default);
}

.category-nav a {
  flex: 0 0 auto;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 16px;
}

.category-nav a:hover,
.category-nav .sale-link {
  color: var(--accent-secondary);
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-5);
  color: inherit;
  background: transparent;
  text-decoration: none;
  font-weight: 800;
  line-height: 1;
  transition:
    transform 160ms ease-out,
    background-color 160ms ease-out,
    border-color 160ms ease-out,
    color 160ms ease-out;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--accent-primary);
  color: var(--surface-raised);
}

.button-primary:hover {
  background: var(--accent-hover);
}

.button-secondary {
  background: var(--surface-raised);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.button-secondary:hover {
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.compact {
  min-height: 34px;
  padding: var(--space-2) var(--space-3);
  font-size: 12px;
}

.full-width {
  width: 100%;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--accent-primary);
  padding: var(--space-2) 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-link:hover {
  color: var(--accent-hover);
}

.hero-shelf {
  width: min(100% - 48px, var(--container));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: var(--space-12);
  align-items: start;
}

.hero-story {
  position: sticky;
  top: var(--header-offset);
  min-height: 760px;
  display: grid;
  align-content: stretch;
  overflow: hidden;
  border-right: 1px solid var(--border-default);
}

.hero-story img {
  position: absolute;
  inset: 0 auto 0 0;
  width: 118px;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-height: 760px;
  padding: var(--space-12) var(--space-8) var(--space-12) 142px;
}

.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero-copy .eyebrow::after,
.staff-note::after {
  content: "";
  display: block;
  width: 52px;
  height: 2px;
  margin-top: var(--space-3);
  background: var(--accent-secondary);
}

.hero-copy h1,
.section-top h2,
.cart-header h2,
.checkout-form h3,
.empty-state h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 8.5em;
  font-size: clamp(40px, 4vw, 48px);
}

.hero-copy p:not(.eyebrow) {
  margin: var(--space-5) 0 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.58;
}

.hero-actions {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.support-note {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-16);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 16px;
}

.support-note a {
  color: var(--accent-primary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.popular-panel {
  padding: var(--space-12) 0 var(--space-16);
}

.section-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.section-top h2 {
  font-size: 30px;
}

.compact-top {
  margin-bottom: var(--space-5);
}

.shelf-tools {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.sort-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

select,
input,
textarea {
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text-primary);
  padding: var(--space-3);
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--border-strong);
}

textarea {
  resize: vertical;
}

.result-note {
  min-height: 24px;
  margin-top: calc(var(--space-6) * -1);
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
  font-size: 14px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-8) var(--space-6);
}

.book-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: var(--space-3);
}

.cover-frame {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: block;
  overflow: hidden;
  background: var(--surface-inset);
  border-radius: var(--radius);
  box-shadow: 0 14px 22px color-mix(in srgb, var(--text-primary) 18%, transparent);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.book-card:hover .cover-frame {
  transform: translateY(-4px);
}

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

.book-copy {
  display: grid;
  gap: var(--space-1);
}

.book-copy h3 a {
  text-decoration: none;
}

.book-copy h3 a:hover {
  color: var(--accent-primary);
}

.detail-link {
  width: fit-content;
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 800;
  text-decoration-thickness: 1px;
}

.book-copy h3,
.cart-line h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.book-copy p,
.book-copy span,
.cart-line p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
}

.book-buy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-2);
}

.book-price {
  font-weight: 900;
}

.add-button {
  min-height: 32px;
  padding: var(--space-2) var(--space-3);
  font-size: 12px;
}

.staff-section {
  padding: var(--space-12) max(var(--space-6), calc((100vw - var(--container)) / 2));
  background: var(--surface-warm);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-10);
}

.staff-card {
  min-width: 0;
  display: grid;
  gap: var(--space-4);
}

.staff-card .compact-card .book-buy-row {
  display: none;
}

.staff-note {
  min-height: 58px;
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-note);
  font-size: 14px;
  line-height: 1.35;
  transform: rotate(-2deg);
}

.staff-byline {
  display: grid;
  gap: var(--space-1);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-default);
}

.staff-byline strong {
  font-size: 14px;
}

.staff-byline span {
  color: var(--text-secondary);
  font-size: 12px;
}

.new-week-section,
.service-strip,
.site-footer {
  width: min(100% - 48px, var(--container));
  margin-left: auto;
  margin-right: auto;
}

.new-week-section {
  padding: var(--space-12) 0;
}

.new-week-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-6);
}

.compact-card .cover-frame {
  box-shadow: 0 10px 16px color-mix(in srgb, var(--text-primary) 14%, transparent);
}

.compact-card .book-copy h3 {
  font-size: 14px;
}

.compact-card .book-copy p,
.compact-card .book-copy span {
  font-size: 12px;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: var(--space-12);
  border: 1px solid var(--border-default);
  background: var(--surface-raised);
}

.service-strip div {
  display: grid;
  gap: var(--space-1);
  min-height: 92px;
  padding: var(--space-5);
  border-right: 1px solid var(--border-default);
}

.service-strip div:last-child {
  border-right: 0;
}

.service-strip strong {
  font-size: 14px;
}

.service-strip span {
  color: var(--text-secondary);
  font-size: 13px;
}

.drawer-overlay,
.product-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--text-primary) 38%, transparent);
}

.product-overlay {
  z-index: 54;
}

.product-dialog {
  position: fixed;
  inset: var(--space-8);
  z-index: 60;
  width: min(1160px, calc(100vw - var(--space-16)));
  max-height: calc(100dvh - var(--space-16));
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--space-5);
  padding: var(--space-6);
  overflow: auto;
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  box-shadow: 0 24px 64px color-mix(in srgb, var(--text-primary) 18%, transparent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(var(--space-4));
  transition:
    opacity 220ms ease-out,
    transform 260ms ease-in-out;
}

.product-dialog.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.product-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-4);
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: var(--space-8);
  align-items: start;
}

.product-media {
  min-width: 0;
  display: grid;
  gap: var(--space-4);
}

.product-main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  background: var(--surface-page);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
}

.product-thumbnails {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
}

.product-thumbnails button {
  min-width: 0;
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2);
  color: var(--text-secondary);
  background: var(--surface-page);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  text-align: left;
}

.product-thumbnails button.is-selected {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  box-shadow: inset 0 0 0 1px var(--accent-primary);
}

.product-thumbnails img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
}

.product-thumbnails span {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-info {
  display: grid;
  gap: var(--space-4);
}

.product-info h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.product-info p {
  margin: 0;
  color: var(--text-secondary);
}

.product-info ul {
  margin: 0;
  padding-left: var(--space-5);
  color: var(--text-secondary);
}

.product-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
}

.product-meta-row strong {
  font-size: 24px;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(480px, 100vw);
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: var(--space-5);
  padding: var(--space-6);
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--surface-raised);
  border-left: 1px solid var(--border-default);
  box-shadow: -24px 0 48px color-mix(in srgb, var(--text-primary) 16%, transparent);
  transform: translateX(104%);
  transition: transform 260ms ease-in-out;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-4);
}

.cart-header h2 {
  font-size: 30px;
}

.drawer-close {
  border: 0;
  background: transparent;
  color: var(--accent-primary);
  padding: var(--space-2) 0;
  font-weight: 900;
}

.cart-lines {
  display: grid;
  gap: var(--space-4);
}

.cart-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-default);
  overflow: hidden;
}

.cart-line img {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: 108px;
  object-fit: cover;
  box-shadow: 0 8px 14px color-mix(in srgb, var(--text-primary) 14%, transparent);
}

.cart-line-body {
  min-width: 0;
  display: grid;
  gap: var(--space-3);
}

.line-top {
  display: grid;
  grid-template-columns: 1fr auto;
  min-width: 0;
  gap: var(--space-3);
}

.line-top strong {
  font-weight: 900;
}

.quantity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.quantity-stepper {
  display: inline-grid;
  grid-template-columns: 34px 40px 34px;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-inset);
}

.quantity-stepper button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-weight: 900;
}

.quantity-stepper button:hover {
  background: var(--surface-warm);
}

.quantity-stepper button:disabled {
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.quantity-stepper span {
  display: grid;
  place-items: center;
  height: 34px;
  border-left: 1px solid var(--border-default);
  border-right: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 13px;
}

.remove-line {
  border: 0;
  background: transparent;
  color: var(--text-tertiary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.remove-line:hover {
  color: var(--status-error);
}

.cart-empty {
  display: none;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--surface-warm);
}

.cart-empty.is-visible {
  display: grid;
}

.cart-empty p {
  margin: 0;
  color: var(--text-secondary);
}

.cart-totals {
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.cart-totals div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  color: var(--text-secondary);
}

.cart-totals dt,
.cart-totals dd {
  margin: 0;
}

.cart-totals dd {
  font-family: var(--font-mono);
}

.total-row {
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-default);
  color: var(--text-primary) !important;
  font-weight: 900;
}

.checkout-form {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-default);
}

.checkout-form h3 {
  font-size: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.field {
  display: grid;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.field small {
  min-height: 18px;
  color: var(--status-error);
  font-size: 12px;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--status-error);
  background: color-mix(in srgb, var(--surface-raised) 88%, var(--status-error));
}

.form-note {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 13px;
}

.order-success {
  display: none;
  padding: var(--space-4);
  border: 1px solid var(--status-success);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-raised) 86%, var(--status-success));
}

.order-success.is-visible {
  display: block;
}

.order-success p {
  margin: var(--space-2) 0 0;
  color: var(--text-secondary);
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: start;
  gap: var(--space-3);
  padding: var(--space-8);
  border: 1px solid var(--border-default);
  background: var(--surface-raised);
}

.empty-state h3 {
  font-size: 28px;
}

.empty-state p {
  margin: 0;
  color: var(--text-secondary);
}

.toast-region {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 60;
  display: grid;
  gap: var(--space-2);
  width: min(340px, calc(100vw - 32px));
}

.toast {
  padding: var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text-primary);
  transform: translateY(8px);
  opacity: 0;
  animation: toast-in 220ms ease-out forwards;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
  padding-top: var(--space-6);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-default);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

@keyframes toast-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1180px) {
  :root {
    --header-offset: 154px;
  }

  .header-main {
    grid-template-columns: 220px minmax(260px, 1fr) auto;
    gap: var(--space-6);
  }

  .hero-shelf {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: var(--space-8);
  }

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

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

  .new-week-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --header-offset: 0px;
  }

  .utility-bar {
    grid-template-columns: 1fr;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
  }

  .utility-email {
    justify-self: center;
  }

  .header-main {
    width: min(100% - 32px, var(--container));
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: var(--space-4) 0;
  }

  .brand {
    justify-self: start;
  }

  .header-main > .header-actions {
    width: 100%;
    max-width: calc(100vw - 32px);
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    gap: var(--space-2);
    overflow: visible;
  }

  .header-main > .header-actions .action-button {
    min-width: 0;
    width: 100%;
    padding: 0;
  }

  .cart-count {
    right: calc(50% - 28px);
  }

  .category-nav {
    width: min(100% - 32px, var(--container));
    justify-content: flex-start;
    padding: var(--space-3) 0;
  }

  .hero-shelf {
    width: min(100% - 32px, var(--container));
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-story {
    position: relative;
    top: auto;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border-default);
  }

  .hero-story img {
    position: relative;
    width: 100%;
    height: 340px;
  }

  .hero-copy {
    min-height: auto;
    padding: var(--space-8) 0;
  }

  .support-note {
    margin-top: var(--space-8);
  }

  .popular-panel {
    padding-top: var(--space-8);
  }

  .section-top {
    align-items: start;
    flex-direction: column;
  }

  .shelf-tools {
    width: 100%;
    justify-content: space-between;
  }

  .service-strip {
    grid-template-columns: 1fr;
  }

  .product-dialog {
    inset: var(--space-4);
    width: calc(100vw - var(--space-8));
    max-height: calc(100dvh - var(--space-8));
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-info h2 {
    font-size: 34px;
  }

  .product-thumbnails {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .service-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--border-default);
  }

  .service-strip div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .brand-word {
    font-size: 40px;
  }

  .search-form {
    grid-template-columns: 1fr;
    border-radius: var(--radius);
  }

  .search-form .button {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .book-grid,
  .staff-grid,
  .new-week-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6) var(--space-4);
  }

  .staff-section {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .new-week-section,
  .service-strip,
  .site-footer {
    width: min(100% - 32px, var(--container));
  }

  .cart-drawer {
    padding: var(--space-5);
  }

  .product-dialog {
    inset: 0;
    width: 100vw;
    max-height: 100dvh;
    padding: var(--space-5);
    border-inline: 0;
  }

  .product-dialog-header {
    align-items: center;
  }

  .product-info h2 {
    font-size: 30px;
  }

  .product-actions {
    grid-template-columns: 1fr;
  }

  .product-thumbnails {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cart-line {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .cart-line img {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    height: 87px;
  }

  .form-grid,
  .site-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .book-grid,
  .staff-grid,
  .new-week-row {
    grid-template-columns: 1fr;
  }

  .header-actions {
    gap: var(--space-2);
  }

  .action-button {
    min-width: 0;
    font-size: 12px;
  }
}
