:root {
  --ink: #17211d;
  --muted: #5c6962;
  --paper: #fbfaf5;
  --cream: #f4efe4;
  --sage: #586f5b;
  --sage-dark: #2f4938;
  --rose: #b3635f;
  --gold: #d7a64f;
  --sky: #dbe7ed;
  --line: rgba(23, 33, 29, 0.14);
  --shadow: 0 22px 55px rgba(30, 45, 35, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.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;
}

.promo-bar {
  background: var(--sage-dark);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  letter-spacing: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 245, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--rose);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.search {
  display: grid;
  grid-template-columns: 1fr auto auto;
  min-height: 46px;
  border: 1px solid var(--line);
  background: #fff;
}

.search input,
.newsletter input {
  min-width: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  padding: 0 16px;
  outline: 0;
}

.search input:focus,
.newsletter input:focus {
  box-shadow: inset 0 0 0 2px rgba(88, 111, 91, 0.45);
}

.search button,
.newsletter button,
.primary-action,
.secondary-action,
.add-button,
.cart-button {
  border: 0;
  cursor: pointer;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
}

.clear-search {
  color: var(--muted);
  background: #f7f3ea;
  border-left: 1px solid var(--line);
}

.search button,
.newsletter button,
.primary-action,
.add-button {
  color: #fff;
  background: var(--sage-dark);
}

.secondary-action {
  color: var(--sage-dark);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.utility-nav {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: var(--ink);
}

.cart-button span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--gold);
  font-size: 12px;
}

.category-nav {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 13px clamp(18px, 4vw, 56px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  scrollbar-width: none;
}

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

.category-nav a {
  flex: 0 0 auto;
}

.category-nav a:hover,
.utility-nav a:hover,
.text-link:hover,
.section-heading a:hover {
  color: var(--rose);
}

.hero {
  min-height: 580px;
  display: grid;
  align-items: end;
  padding: clamp(80px, 9vw, 150px) clamp(18px, 5vw, 72px) clamp(52px, 7vw, 86px);
  background:
    linear-gradient(90deg, rgba(23, 33, 29, 0.84), rgba(23, 33, 29, 0.44) 48%, rgba(23, 33, 29, 0.18)),
    url("assets/gujingdong-read-banner.jpg?v=20260803-6") center / cover no-repeat;
  color: #fff;
}

.hero-content {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f2c778;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

h1 {
  max-width: 660px;
  margin-bottom: 18px;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.05;
}

h3 {
  font-size: 18px;
  line-height: 1.25;
}

.hero-copy {
  max-width: 560px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip div {
  background: #fff;
  padding: 22px clamp(18px, 3vw, 36px);
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  margin-bottom: 4px;
}

.trust-strip span,
.quiet-note,
.book-meta,
.book-format,
.site-footer p,
.newsletter p,
.feature-copy p,
.deal-row p {
  color: var(--muted);
}

.section-shell,
.feature-band,
.newsletter,
.site-footer {
  padding-left: clamp(18px, 5vw, 72px);
  padding-right: clamp(18px, 5vw, 72px);
}

.section-shell {
  padding-top: 76px;
  padding-bottom: 76px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading a,
.text-link {
  color: var(--sage-dark);
  font-weight: 800;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.book-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(30, 45, 35, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.book-card:hover {
  transform: translateY(-5px);
  border-color: rgba(179, 99, 95, 0.38);
  box-shadow: 0 24px 52px rgba(30, 45, 35, 0.14);
}

.cover-wrap {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: linear-gradient(145deg, var(--cream), var(--sky));
  overflow: hidden;
}

.book-card .book-info {
  cursor: pointer;
}

.cover-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: none;
  transition: transform 200ms ease;
}

.cover-wrap:hover img {
  transform: scale(1.035);
}

.cover-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(23, 33, 29, 0.78);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.cover-wrap:hover .cover-hint,
.cover-wrap:focus-visible .cover-hint {
  opacity: 1;
  transform: translateY(0);
}

.cover-wrap:focus-visible,
.add-button:focus-visible,
.cart-button:focus-visible,
.cover-modal-close:focus-visible {
  outline: 3px solid rgba(215, 166, 79, 0.9);
  outline-offset: 3px;
}

.book-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px;
}

.book-title {
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.12;
}

.book-meta,
.book-format {
  font-size: 14px;
}

.book-format {
  margin: 12px 0 16px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: auto;
  margin-bottom: 14px;
}

.price {
  font-size: 22px;
  font-weight: 850;
}

.compare {
  color: var(--muted);
  text-decoration: line-through;
}

.add-button {
  width: 100%;
}

.detail-link {
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  color: var(--sage-dark);
  background: transparent;
  cursor: pointer;
  font-weight: 850;
  text-align: left;
}

.store-view {
  display: none;
  padding: clamp(42px, 7vw, 82px) clamp(18px, 5vw, 72px);
}

.store-view.view-active {
  display: block;
}

.back-link {
  margin-bottom: 28px;
  padding: 0;
  border: 0;
  color: var(--sage-dark);
  background: transparent;
  cursor: pointer;
  font-weight: 850;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

.product-gallery-shell {
  display: grid;
  gap: 14px;
}

.product-media {
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: clamp(24px, 5vw, 52px);
  background: linear-gradient(145deg, var(--cream), var(--sky));
  border: 1px solid var(--line);
}

.product-media img {
  max-height: 620px;
  width: auto;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.product-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 7px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.product-thumb.selected {
  border-color: var(--rose);
  box-shadow: inset 0 0 0 2px rgba(179, 99, 95, 0.28);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-copy h1,
.checkout-form h1,
.success-view h1 {
  color: var(--ink);
}

.product-copy h1 {
  margin-bottom: 12px;
}

.product-author {
  color: var(--muted);
  font-size: 18px;
}

.rating-row,
.stock-row,
.detail-list {
  color: var(--muted);
}

.rating-row {
  margin: 22px 0;
  color: var(--rose);
  font-weight: 850;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 24px 0;
}

.product-price strong {
  font-size: 34px;
}

.format-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.format-pills span {
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
}

.quantity-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 22px 0;
}

.quantity-control {
  display: inline-grid;
  grid-template-columns: 42px 56px 42px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
}

.quantity-control button,
.quantity-control input {
  border: 0;
  background: transparent;
  text-align: center;
  min-width: 0;
}

.quantity-control button {
  cursor: pointer;
  font-weight: 900;
}

.product-actions,
.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.buy-now,
.checkout-submit {
  color: #fff;
  background: var(--rose);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin-top: 30px;
  padding: 22px;
  border: 1px solid var(--line);
  background: #fff;
}

.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

.cart-list {
  display: grid;
  gap: 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.cart-item img {
  width: 92px;
  height: 124px;
  object-fit: contain;
  background: var(--cream);
}

.cart-item h3 {
  margin-bottom: 6px;
}

.cart-item-actions {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.remove-button {
  padding: 0;
  border: 0;
  color: var(--rose);
  background: transparent;
  cursor: pointer;
  font-weight: 850;
}

.order-summary {
  position: sticky;
  top: 110px;
  padding: 24px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 12px 28px rgba(30, 45, 35, 0.08);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 12px 0;
  color: var(--muted);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 22px;
  font-weight: 900;
}

.empty-state {
  padding: 36px;
  border: 1px solid var(--line);
  background: #fff;
}

.checkout-form,
.success-view {
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(24px, 4vw, 42px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
}

.form-grid input,
.form-grid select {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
}

.span-2 {
  grid-column: span 2;
}

.checkout-note {
  color: var(--muted);
  font-size: 14px;
}

.success-view {
  max-width: 780px;
  margin: clamp(42px, 8vw, 92px) auto;
  text-align: center;
}

.success-secondary {
  color: var(--ink);
  background: var(--cream);
  border-color: var(--line);
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding-top: 78px;
  padding-bottom: 78px;
  background: #e7efe9;
}

.feature-copy {
  max-width: 560px;
}

.feature-copy p {
  font-size: 18px;
  line-height: 1.65;
}

.feature-books {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: end;
}

.feature-book-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--cream);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature-book-link:hover,
.feature-book-link:focus-visible {
  transform: translateY(-8px);
  box-shadow: 0 28px 64px rgba(30, 45, 35, 0.2);
}

.feature-book-link:focus-visible {
  outline: 3px solid rgba(215, 166, 79, 0.9);
  outline-offset: 4px;
}

.feature-book-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}

.feature-book-link:hover img,
.feature-book-link:focus-visible img {
  transform: scale(1.04);
}

.feature-book-link:nth-child(2) {
  transform: translateY(-24px);
}

.feature-book-link:nth-child(2):hover,
.feature-book-link:nth-child(2):focus-visible {
  transform: translateY(-32px);
}

.deal-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.deal-row article {
  background: #fff;
  border: 1px solid var(--line);
  padding: 26px;
}

.deal-row span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.newsletter {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 28px;
  align-items: center;
  padding-top: 58px;
  padding-bottom: 58px;
  background: var(--ink);
  color: #fff;
}

.newsletter p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.74);
}

.newsletter form {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 52px;
  background: #fff;
}

.newsletter input {
  color: var(--ink);
}

.contact-strip {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 48px;
  background: #f3f5ef;
  border-top: 1px solid var(--line);
}

.contact-strip p {
  max-width: 620px;
  margin-bottom: 0;
}

.email-card {
  display: grid;
  gap: 8px;
  padding: 24px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(34, 50, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.email-card:hover,
.email-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(179, 99, 95, 0.38);
  box-shadow: 0 24px 58px rgba(34, 50, 42, 0.12);
}

.email-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.email-card strong {
  font-size: clamp(20px, 2.2vw, 28px);
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding-top: 34px;
  padding-bottom: 34px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin-bottom: 0;
}

.copyright {
  margin-top: 8px;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  color: #fff;
  background: var(--sage-dark);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.cover-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.cover-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.cover-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 29, 0.72);
  backdrop-filter: blur(8px);
}

.cover-modal-panel {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.cover-modal-panel img {
  max-width: 100%;
  max-height: min(72vh, 760px);
  object-fit: contain;
  box-shadow: var(--shadow);
}

.cover-modal-panel h2 {
  margin-top: 16px;
  font-size: clamp(24px, 4vw, 36px);
  text-align: center;
}

.cover-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .utility-nav {
    justify-content: space-between;
  }

  .trust-strip,
  .book-grid,
  .deal-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-band,
  .newsletter,
  .contact-strip,
  .product-detail,
  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }
}

@media (max-width: 640px) {
  .promo-bar {
    font-size: 13px;
  }

  .site-header {
    position: static;
  }

  .brand {
    font-size: 22px;
  }

  .search,
  .newsletter form {
    grid-template-columns: 1fr;
  }

  .search button,
  .newsletter button {
    width: 100%;
  }

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

  .hero {
    min-height: 540px;
    background-position: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-copy {
    font-size: 17px;
  }

  .trust-strip,
  .book-grid,
  .deal-row {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .site-footer {
    display: block;
  }

  .section-heading a,
  .quiet-note {
    display: inline-block;
    margin-top: 12px;
  }

  .feature-books {
    gap: 10px;
  }

  .cover-wrap {
    aspect-ratio: 1 / 1;
  }

  .product-media {
    min-height: 360px;
  }

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

  .cart-item-actions {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .feature-book-link:nth-child(2) {
    transform: translateY(-12px);
  }

  .feature-book-link:nth-child(2):hover,
  .feature-book-link:nth-child(2):focus-visible {
    transform: translateY(-18px);
  }

  .footer-links {
    margin-top: 18px;
  }
}
