:root {
  --ink: #141512;
  --muted: #686b64;
  --line: #d9dcd4;
  --paper: #f5f6f1;
  --white: #ffffff;
  --moss: #315b48;
  --red: #a94132;
  --soft-red: #f3e8e4;
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}
body:has(.cart-drawer.is-open) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.utility-bar {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 6px max(20px, calc((100vw - var(--max)) / 2));
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.utility-bar a { border-bottom: 1px solid #777a73; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(235px, auto) 1fr minmax(280px, 360px);
  gap: 28px;
  align-items: center;
  min-height: 86px;
  padding: 14px max(20px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
}
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.main-nav { display: flex; justify-content: center; gap: 26px; }
.main-nav a {
  padding: 12px 0 9px;
  border-bottom: 1px solid transparent;
  color: #3f413c;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.main-nav a:hover, .main-nav a[aria-current] { border-color: var(--ink); color: var(--ink); }
.header-tools { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.search-bar input {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 0 4px;
  outline: none;
  background: transparent;
}
.search-bar input:focus { border-bottom-width: 2px; }
.cart-button {
  min-height: 40px;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0 14px;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.cart-button strong {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  margin-left: 7px;
  place-items: center;
  background: var(--ink);
  color: var(--white);
  font-size: 10px;
}
.cart-button:hover { background: var(--ink); color: var(--white); }
.cart-button:hover strong { background: var(--white); color: var(--ink); }

.site-main { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.page-root { min-height: 62vh; }
.eyebrow {
  margin: 0 0 13px;
  color: var(--moss);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
  gap: 70px;
  align-items: center;
  min-height: 650px;
  padding: 72px 5%;
  border-bottom: 1px solid var(--line);
}
.hero-copy { max-width: 760px; }
.hero-copy h1 { max-width: 720px; margin-bottom: 24px; font-size: clamp(54px, 7vw, 96px); line-height: 0.96; }
.hero-copy > p:not(.eyebrow) { max-width: 610px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.primary-link, .secondary-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.primary-link { background: var(--ink); color: var(--white); }
.secondary-link { background: var(--white); }
.primary-link:hover { background: var(--moss); border-color: var(--moss); }
.secondary-link:hover { background: var(--paper); }
.feature-cover {
  display: grid;
  max-width: 310px;
  justify-self: center;
  gap: 8px;
}
.feature-cover img { width: 100%; box-shadow: 14px 16px 0 var(--paper); transition: transform 180ms ease; }
.feature-cover:hover img { transform: translateY(-5px); }
.feature-cover span { margin-top: 17px; font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
.feature-cover strong { color: var(--moss); font-size: 13px; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.metric-strip article { padding: 28px 24px; border-right: 1px solid var(--line); }
.metric-strip article:last-child { border-right: 0; }
.metric-strip strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 400; }
.metric-strip span { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 72px 0 24px;
}
.section-head h2 { margin: 0; font-size: 42px; }
.section-head > a { padding-bottom: 5px; border-bottom: 1px solid var(--ink); font-size: 11px; font-weight: 800; text-transform: uppercase; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 38px 22px; }
.product-grid.compact { padding-bottom: 72px; }
.product-card { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.cover-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--paper);
}
.cover-link img { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.cover-link:hover img { transform: scale(1.018); }
.cover-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.card-copy { padding: 17px 0 13px; }
.card-copy > span, .isbn { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.card-copy h3 { margin: 8px 0; font-size: 20px; line-height: 1.16; }
.card-copy h3 a:hover { color: var(--moss); }
.card-copy p { display: -webkit-box; overflow: hidden; margin-bottom: 10px; color: var(--muted); font-size: 13px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-actions strong { font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 400; }
.card-actions button, .detail-actions button, .checkout-button, .coupon-row button {
  min-height: 36px;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0 13px;
  background: var(--white);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.card-actions button:hover, .detail-actions button:hover, .checkout-button:hover, .coupon-row button:hover { background: var(--ink); color: var(--white); }
.card-actions button:disabled, .detail-actions button:disabled { cursor: not-allowed; opacity: 0.45; }

.shop-head {
  display: flex;
  min-height: 260px;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  padding: 58px 0 36px;
  border-bottom: 1px solid var(--ink);
}
.shop-head h1 { margin-bottom: 12px; font-size: clamp(50px, 7vw, 82px); }
.shop-head p { max-width: 650px; color: var(--muted); line-height: 1.7; }
.sort-box { display: grid; min-width: 190px; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.sort-box select {
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
}
.catalog-layout { display: grid; grid-template-columns: 185px minmax(0, 1fr); gap: 54px; padding: 34px 0 80px; }
.filter-panel { position: sticky; top: 118px; display: grid; align-self: start; }
.filter-panel h2 { margin-bottom: 18px; font-size: 20px; }
.filter-panel button {
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
}
.filter-panel button:hover, .filter-panel button.is-active { color: var(--ink); font-weight: 800; }
.result-line { margin-bottom: 22px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }

.collection-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  min-height: 330px;
  margin: 0 0 42px;
  padding: 58px 0 36px;
  border-bottom: 1px solid var(--ink);
}
.collection-board h1 { margin-bottom: 15px; font-size: clamp(54px, 8vw, 98px); line-height: 0.95; }
.collection-board p:not(.eyebrow) { max-width: 650px; color: var(--muted); line-height: 1.7; }
.collection-board > strong { color: var(--moss); font-family: Georgia, "Times New Roman", serif; font-size: 94px; font-weight: 400; line-height: 0.8; }
.collection-board.best { border-bottom-color: var(--red); }
.collection-board.best > strong { color: var(--red); }
.collection-grid { padding-bottom: 80px; }

.product-detail {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  gap: 72px;
  align-items: start;
  padding: 64px 5% 72px;
  border-bottom: 1px solid var(--line);
}
.detail-cover { display: grid; min-height: 560px; place-items: center; padding: 34px; background: var(--paper); }
.detail-cover img { width: min(100%, 390px); max-height: 580px; object-fit: contain; box-shadow: 14px 15px 0 #e5e7e0; }
.detail-copy { max-width: 650px; padding-top: 4px; }
.back-link { display: inline-block; margin-bottom: 42px; border-bottom: 1px solid var(--ink); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.detail-copy h1 { margin-bottom: 16px; font-size: clamp(42px, 5vw, 68px); line-height: 1.02; }
.byline { color: var(--moss); font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.detail-copy > p:not(.eyebrow, .byline) { color: var(--muted); font-size: 16px; line-height: 1.75; }
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); margin: 32px 0; border-top: 1px solid var(--line); }
.fact-grid div { padding: 15px 0; border-bottom: 1px solid var(--line); }
.fact-grid div:nth-child(odd) { padding-right: 18px; }
.fact-grid dt { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.fact-grid dd { margin: 6px 0 0; font-size: 13px; font-weight: 700; }
.detail-actions { display: flex; align-items: center; gap: 22px; }
.detail-actions strong { font-family: Georgia, "Times New Roman", serif; font-size: 32px; font-weight: 400; }
.detail-actions button { min-height: 46px; padding: 0 22px; background: var(--ink); color: var(--white); }

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 80px;
  align-items: end;
  min-height: 520px;
  padding: 70px 5%;
  border-bottom: 1px solid var(--line);
}
.contact-panel h1 { font-size: clamp(54px, 8vw, 96px); }
.contact-panel p { max-width: 610px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.contact-panel address { display: grid; gap: 14px; padding: 30px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-style: normal; }
.contact-panel address span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.contact-panel address a { overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: 22px; }
.empty-state { min-height: 440px; padding: 70px 0; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  width: min(var(--max), calc(100% - 40px));
  margin: 70px auto 0;
  padding: 38px 0 28px;
  border-top: 1px solid var(--ink);
}
.site-footer > div { display: grid; align-content: start; gap: 6px; }
.site-footer > div:last-of-type { justify-self: end; text-align: right; }
.site-footer strong { font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
.site-footer p, .site-footer span { color: var(--muted); font-size: 11px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.site-footer a:hover { color: var(--moss); }
.copyright { grid-column: 1 / -1; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  justify-items: end;
  background: rgba(20, 21, 18, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.cart-drawer.is-open { opacity: 1; pointer-events: auto; }
.cart-panel {
  width: min(520px, 100%);
  height: 100vh;
  overflow-y: auto;
  padding: 28px;
  background: var(--white);
  transform: translateX(30px);
  transition: transform 180ms ease;
}
.cart-drawer.is-open .cart-panel { transform: translateX(0); }
.cart-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.cart-head h2 { margin: 0; font-size: 34px; }
.icon-button { min-height: 36px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.cart-items { display: grid; gap: 0; }
.cart-line { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 64px; height: 92px; object-fit: cover; }
.cart-line > div:nth-child(2) { display: grid; align-content: start; gap: 6px; }
.cart-line > div:nth-child(2) span { color: var(--muted); font-size: 12px; }
.quantity-tools { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.quantity-tools button { min-height: 28px; border: 1px solid var(--line); border-radius: 0; background: var(--white); color: var(--ink); font-size: 10px; }
.quantity-tools button:last-child { margin-left: auto; border: 0; color: var(--red); }
.coupon-row, .checkout-form { display: grid; gap: 13px; margin-top: 22px; }
.coupon-row label, .checkout-form label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.coupon-row > div { display: grid; grid-template-columns: 1fr auto; }
.coupon-row input, .checkout-form input, .checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 11px;
  background: var(--white);
}
.checkout-form textarea { resize: vertical; }
.totals { display: grid; gap: 9px; margin: 22px 0; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.totals div { display: flex; justify-content: space-between; gap: 20px; font-size: 12px; }
.totals .grand-total { padding-top: 9px; border-top: 1px solid var(--line); font-size: 16px; }
.checkout-button { width: 100%; min-height: 46px; background: var(--ink); color: var(--white); }
.payment-note, .empty-note { color: var(--muted); font-size: 11px; line-height: 1.5; }
.paypal-buttons { margin-top: 12px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  padding: 13px 18px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 1fr auto; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; }
  .header-tools { min-width: 320px; }
  .hero-panel { gap: 38px; padding-inline: 0; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-layout { grid-template-columns: 150px minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 760px) {
  .utility-bar { align-items: flex-start; flex-direction: column; gap: 3px; }
  .site-header { position: static; grid-template-columns: 1fr; gap: 14px; min-height: 0; }
  .header-tools { grid-row: auto; min-width: 0; }
  .main-nav { grid-column: auto; grid-row: auto; gap: 19px; padding-bottom: 4px; }
  .site-main { width: min(100% - 24px, var(--max)); }
  .hero-panel { grid-template-columns: 1fr; gap: 44px; min-height: 0; padding: 54px 0; }
  .hero-copy h1 { font-size: 54px; }
  .feature-cover { width: min(280px, 88%); justify-self: start; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip article:nth-child(2) { border-right: 0; }
  .metric-strip article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .section-head { align-items: start; flex-direction: column; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 14px; }
  .shop-head, .collection-board { align-items: start; flex-direction: column; }
  .shop-head { display: flex; }
  .sort-box { width: 100%; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; grid-template-columns: repeat(2, 1fr); }
  .filter-panel h2 { grid-column: 1 / -1; }
  .collection-board { display: grid; grid-template-columns: 1fr; min-height: 280px; }
  .collection-board > strong { font-size: 64px; }
  .product-detail { grid-template-columns: 1fr; gap: 42px; padding: 40px 0 64px; }
  .detail-cover { min-height: 400px; }
  .detail-copy h1 { font-size: 46px; }
  .contact-panel { grid-template-columns: 1fr; gap: 42px; min-height: 0; padding: 58px 0; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer > div:last-of-type { justify-self: start; text-align: left; }
  .site-footer nav { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .header-tools { grid-template-columns: 1fr; }
  .main-nav { gap: 15px; }
  .hero-copy h1 { font-size: 44px; }
  .product-grid { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: 1fr; }
  .metric-strip article { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-strip article:last-child { border-bottom: 0; }
  .fact-grid { grid-template-columns: 1fr; }
  .detail-cover { min-height: 320px; padding: 24px; }
  .cart-panel { padding: 20px; }
}
