.shop .topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(14px);
}

.shop .topbar-inner {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 62px;
}

.shop .topbar-inner .brand {
  grid-column: 1;
  justify-self: start;
}

.shop .topbar-inner nav {
  grid-column: 2;
  justify-self: end;
}

.shop .topbar nav {
  font-size: .875rem;
}

.cart-trigger {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding-inline: 11px;
  font-size: .875rem;
}

.cart-icon {
  position: relative;
  width: 22px;
  height: 20px;
  flex: 0 0 auto;
}

.cart-icon::before,
.cart-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.cart-icon::before {
  inset: 0 0 5px;
  clip-path: polygon(0 3%, 22% 3%, 29% 23%, 100% 23%, 86% 88%, 32% 88%, 16% 19%, 0 19%);
}

.cart-icon::after {
  left: 7px;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  box-shadow: 10px 0 currentColor;
}

.cart-trigger span {
  margin-right: 0;
}

.cart-trigger .cart-count {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 20px;
  background: var(--accent-ink);
  color: #ffddc9;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.shop-page {
  padding: clamp(25px, 4.7vw, 60px) 0 52px;
}

.shop-hero {
  display: grid;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
}

.shop-hero:has(.shop-featured) {
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.42fr);
}

.shop-hero-copy { padding: 18px 0; }

.shop-hero h1 {
  margin: 9px 0 26px;
  color: var(--text);
  font: 900 clamp(2.6rem, 5.3vw, 4.75rem)/1.12 "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  letter-spacing: -.023em;
}

.shop-hero p {
  margin: 0;
  color: var(--accent);
  font-size: .925rem;
  font-weight: 720;
  letter-spacing: .11em;
}

.shop-browse {
  display: inline-flex;
  align-items: center;
  padding-inline: 21px;
  font-size: .9375rem;
}

.shop-browse:hover {
  color: var(--accent-ink);
  background: #ffc2a7;
}

.shop-featured {
  min-width: 0;
  padding: clamp(14px, 2vw, 22px);
  background: linear-gradient(153deg, #29212c, #211b24 70%);
  border-color: #51404f;
}

.shop-featured-heading,
.shop-featured-arrows {
  display: flex;
  align-items: center;
  gap: 7px;
}

.shop-featured-heading {
  justify-content: space-between;
  min-height: 42px;
  margin-bottom: 13px;
}

.shop-featured-heading h2 {
  color: #ffd0b5;
  font-size: clamp(1.12rem, 2.3vw, 1.4rem);
  letter-spacing: .055em;
}

.shop-featured-arrows button {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  background: #322835;
  font-size: 1.55rem;
  line-height: 1;
}

.shop-featured-viewport {
  overflow: hidden;
  border-radius: 11px;
}

.shop-featured-track {
  display: flex;
  transition: transform .62s cubic-bezier(.22,.7,.23,1);
}

.shop-featured-slide {
  display: grid;
  flex: 0 0 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, .95fr);
  gap: clamp(10px, 2vw, 20px);
  align-items: center;
}

.shop-featured-art {
  display: grid;
  place-items: center;
  padding: clamp(8px, 1.3vw, 15px);
  aspect-ratio: 2 / 1;
  border: 1px solid #405658;
  border-radius: 11px;
  background: radial-gradient(ellipse at 45% 48%, #385053, #1c262a 83%);
}

.shop-featured-slide:nth-child(2) .shop-featured-art {
  border-color: #544762;
  background: radial-gradient(ellipse at 45% 48%, #524363, #282136 83%);
}

.shop-featured-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: contain;
  image-rendering: pixelated;
}

.shop-featured-copy {
  display: grid;
  justify-items: start;
  gap: 9px;
  min-width: 0;
  padding-inline-end: 4px;
}

.shop-featured-copy h3 {
  margin: 0;
  font-size: clamp(1.16rem, 2.3vw, 1.55rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.shop-featured-copy .shop-product-price { font-size: 1.2rem; }

.shop-featured-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-color: #785349;
  background: #442d2c;
  color: #ffd4bd;
  text-decoration: none;
}

.shop-featured-link:hover {
  border-color: var(--accent);
  color: #ffe3d4;
}

.shop-featured-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 5px;
}

.shop-featured-dots {
  display: flex;
  grid-column: 2;
}

.shop-featured-dots button {
  display: grid;
  width: 31px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.shop-featured-dots button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 10px;
  background: #927d8c;
  transition: width .22s ease, background-color .22s ease;
}

.shop-featured-dots button[aria-current="true"]::before {
  width: 19px;
  background: var(--accent);
}

.shop-featured-playback {
  grid-column: 3;
  justify-self: end;
  min-height: 31px;
  padding: 3px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: .75rem;
}

.shop-featured-playback:hover { color: var(--accent); }

.shop-catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.shop-filters {
  display: flex;
  gap: 6px;
}

.shop-filters button { min-height: 38px; }
.shop-filters button[aria-pressed="true"] {
  border-color: #9a6654;
  background: #462e2e;
  color: #ffd4bd;
}

.shop-rules {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px clamp(24px, 5vw, 70px);
  margin-top: clamp(22px, 3.4vw, 38px);
  padding: clamp(14px, 2vw, 22px);
  background: var(--panel);
}

.shop-rules h2 {
  margin: 0 0 9px;
  font-size: 1.125rem;
}

.shop-qq-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
}

.shop-qq-number {
  margin: 0;
  color: var(--muted);
}

.shop-qq-number strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.shop-qq-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--accent);
  font-size: .875rem;
}

.shop-rules-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 25px;
  margin: 0;
  padding-inline-start: 17px;
  color: var(--muted);
  font-size: .925rem;
  line-height: 1.55;
}

.shop-rules-list li::marker { color: var(--accent); }

.shop-qq-page {
  padding-block: clamp(24px, 6vw, 64px);
}

.shop-qq-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 440px;
  margin-inline: auto;
  padding: clamp(20px, 4vw, 36px);
  text-align: center;
}

.shop-qq-card h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.shop-qq-card p {
  margin: 0;
  color: var(--muted);
}

.shop-qq-card .primary,
.order-actions a {
  display: inline-flex;
  align-items: center;
  color: var(--accent-ink);
}

.shop-qq-code {
  display: block;
  width: min(100%, 240px);
  height: auto;
  margin-top: 6px;
  background: white;
  border-radius: 8px;
}

.shop-catalog {
  margin-top: clamp(27px, 4.5vw, 52px);
}

.shop-catalog,
.shop-rules,
#catalog-title,
.shop-product {
  scroll-margin-top: 85px;
}

.shop-catalog h2 {
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-weight: 800;
}

.shop-catalog-group {
  margin-top: 23px;
}

.shop-catalog-group h3 {
  margin: 0;
  font-size: 1.125rem;
}

.shop-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.shop-product {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-product:target { border-color: var(--accent); }

.shop-product-media {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 1;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #302521;
}

.shop-product:nth-child(3n + 2) .shop-product-media {
  background: #243031;
}

.shop-product:nth-child(3n) .shop-product-media {
  background: #302538;
}

.shop-product-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  image-rendering: pixelated;
}

.shop-placeholder {
  width: 54px;
  height: 54px;
  border: 1px dashed #8c7367;
  border-radius: 10px;
  background: #ffffff08;
}

.shop-product:nth-child(3n + 2) .shop-placeholder {
  border-color: #899b88;
}

.shop-product:nth-child(3n) .shop-placeholder {
  border-color: #a394aa;
}

.shop-product-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 14px 17px;
  overflow-wrap: anywhere;
}

.shop-product-copy h4,
.shop-product-copy p {
  margin: 0;
}

.shop-product-copy h4 {
  font-size: 1rem;
}

.shop-product-copy p {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
}

.shop-product-empty {
  font-size: .875rem;
}

.shop-product-price {
  color: var(--accent);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}

.shop-product-unit {
  font-size: .875rem;
}

.shop-add {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 5px 6px 5px 10px;
  background: var(--field);
  font-size: .875rem;
  transition: border-color .18s ease, background-color .18s ease;
}

.shop-offers {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 5px;
}

.shop-add-icon {
  display: grid;
  flex: 0 0 30px;
  min-height: 30px;
  place-items: center;
  border-radius: 6px;
  background: #5a3933;
  color: #ffd5bc;
  font-size: 1rem;
  font-weight: 750;
}

.shop-add.shop-added {
  border-color: #517b63;
  background: #25332c;
}

.shop-added .shop-add-icon {
  background: #346047;
  color: #d8f6dd;
}

.shop-cart-feedback {
  position: fixed;
  z-index: 3;
  inset: auto clamp(12px, 4vw, 36px) max(16px, env(safe-area-inset-bottom)) auto;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 11px 15px;
  border: 1px solid #517b63;
  border-radius: 9px;
  background: #26372e;
  color: #dbf5df;
  box-shadow: 0 10px 34px #0a070b88;
  font-size: .875rem;
  pointer-events: none;
}

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 440px);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  box-shadow: -12px 0 40px #08050d70;
}

.cart-drawer[open] {
  display: flex;
  flex-direction: column;
}

.cart-drawer::backdrop {
  background: var(--backdrop);
}

.cart-heading,
.cart-row-title,
.cart-row-controls,
.cart-total,
.order-discount,
.order-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-heading {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.cart-empty {
  display: grid;
  place-items: center;
  align-content: center;
  flex: 1;
  gap: 14px;
  padding: 24px;
  color: var(--muted);
}

.cart-empty p {
  margin: 0;
}

.cart-items {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  margin: 0;
  padding: 0 22px;
  list-style: none;
}

.cart-row {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cart-row-title {
  align-items: start;
}

.cart-row-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cart-row-title span {
  color: var(--muted);
  font-size: .875rem;
  white-space: nowrap;
}

.cart-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

.cart-quantity-button {
  min-width: 36px;
  min-height: 36px;
  padding-inline: 9px;
  font-size: .875rem;
}

.cart-checkout {
  padding: 17px 22px;
  border-top: 1px solid var(--line);
  background: var(--raised);
}

.cart-total {
  margin-bottom: 14px;
}

.cart-total strong {
  color: var(--accent);
  font-size: 1.15rem;
}

.cart-checkout .order-discount {
  margin-bottom: 8px;
  color: var(--jade);
  font-size: .875rem;
}

.cart-checkout button {
  width: 100%;
  font-size: .875rem;
}

.delivery-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.delivery-fields {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 17px;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  margin: 0;
  padding: 19px 22px;
  border: 0;
}

.delivery-fields input,
.delivery-fields select {
  font-size: 1rem;
}

.delivery-fields select {
  appearance: none;
  width: 100%;
  min-height: 46px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 50% / 6px 6px,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 12px) 50% / 6px 6px,
    var(--field);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: inherit;
}

.delivery-fields select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.delivery-fields label,
.delivery-coordinates legend {
  font-size: .875rem;
}

.delivery-coordinates {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.delivery-coordinates legend {
  margin-bottom: 7px;
  padding: 0;
  font-weight: 700;
}

.delivery-coordinates > div,
.delivery-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cart-status {
  margin: 0;
  padding: 10px 22px 16px;
  background: var(--raised);
  color: var(--accent);
  font-size: .875rem;
}

.order-receipt {
  padding: 24px 22px;
  overflow-y: auto;
}

.order-receipt h3 {
  margin: 0 0 16px;
  color: var(--jade);
  font-size: 1.2rem;
}

.order-summary {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.order-summary dt {
  color: var(--muted);
}

.order-summary dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.order-summary .order-discount {
  color: var(--jade);
}

.order-receipt ul {
  margin: 14px 0;
  padding-left: 20px;
  overflow-wrap: anywhere;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 880px) {
  .shop-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .shop-hero:has(.shop-featured) {
    grid-template-columns: minmax(0, 1fr);
    gap: 19px;
  }

  .shop-hero-copy {
    padding: 4px 0 0;
  }

  .shop-hero h1 {
    margin-bottom: 17px;
  }

  .shop-featured-slide {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }

  .shop-featured-art {
    aspect-ratio: 3 / 1;
  }

  .shop-featured-copy {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    align-items: center;
  }

  .shop-featured-copy .shop-featured-link {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .shop-rules,
  .shop-rules-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-catalog {
    margin-top: 25px;
  }

  .shop-products {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-product-media {
    padding: 7px;
  }

  .shop-product-copy {
    padding: 10px 12px;
  }

  .shop-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
}

@media (pointer: coarse) {
  .shop-featured-arrows button,
  .shop-featured-dots button { width: 44px; height: 44px; }
  .shop-featured-playback, .shop-filters button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-featured-track, .shop-featured-dots button::before, .shop-add {
    transition: none;
  }
}

@media (max-width: 390px) {
  .shop .topbar nav {
    gap: 7px;
  }

  .shop .nav-action,
  .cart-trigger {
    padding-inline: 7px;
  }

  .cart-trigger {
    gap: 4px;
  }
}
