:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --subtle: #8e8e93;
  --canvas: #f5f5f7;
  --paper: #ffffff;
  --line: rgba(29, 29, 31, 0.12);
  --line-strong: rgba(29, 29, 31, 0.2);
  --blue: #2563eb;
  --blue-deep: #1748bd;
  --violet: #7c3aed;
  --success: #1d7f56;
  --danger: #c9342f;
  --shadow-sm: 0 8px 24px rgba(20, 24, 36, 0.08);
  --shadow-lg: 0 28px 80px rgba(20, 24, 36, 0.16);
  --display: "SF Pro Display", "PingFang SC", "Segoe UI", sans-serif;
  --body: "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  --page: min(1320px, calc(100vw - 64px));
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.drawer-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

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

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

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.42);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 245, 247, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
}

.main-nav {
  width: var(--page);
  min-height: var(--header-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(260px, 520px) 1fr;
  align-items: center;
  gap: 28px;
}

.brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  stroke: none;
}

.brand-copy {
  display: grid;
  line-height: 1.14;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.search-box {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 15px;
  background: rgba(118, 118, 128, 0.1);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.search-box:focus-within {
  border-color: rgba(37, 99, 235, 0.28);
  background: var(--paper);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.search-box > svg {
  width: 20px;
  height: 20px;
  margin-left: 15px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  height: 44px;
  min-width: 0;
  padding: 0 44px 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.icon-button,
.round-button {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  background: transparent;
}

.clear-search {
  position: absolute;
  right: 4px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.clear-search svg {
  width: 18px;
  height: 18px;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.nav-link {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 580;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(118, 118, 128, 0.08);
}

.cart-trigger {
  min-height: 46px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  cursor: pointer;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 620;
  transition: transform 180ms ease, background 180ms ease;
}

.cart-trigger:hover {
  background: #000;
  transform: translateY(-1px);
}

.cart-trigger svg {
  width: 20px;
  height: 20px;
}

.cart-count,
.mobile-cart-count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.hero {
  width: var(--page);
  min-height: 720px;
  margin: 0 auto;
  padding: 72px 0 82px;
  display: grid;
  grid-template-columns: minmax(400px, 0.82fr) minmax(600px, 1.18fr);
  align-items: center;
  gap: 48px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 680;
  letter-spacing: 0.14em;
}

.hero h1,
.section-heading h2,
.drawer-header h2,
.order-dialog h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.hero h1 {
  max-width: 660px;
  font-size: clamp(54px, 5.2vw, 84px);
}

.hero-description {
  max-width: 500px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

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

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.primary-button:hover {
  background: var(--blue-deep);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.26);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

.secondary-button:hover {
  background: var(--paper);
  transform: translateY(-1px);
}

.hero-notes {
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}

.hero-notes li {
  position: relative;
  padding-left: 15px;
}

.hero-notes li::before {
  content: "";
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.product-orbit {
  position: relative;
  min-height: 590px;
  isolation: isolate;
}

.orbit-line {
  position: absolute;
  z-index: -1;
  top: 45px;
  right: 15px;
  width: 540px;
  height: 480px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.orbit-line::before,
.orbit-line::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: inherit;
}

.orbit-line::before {
  inset: 30px -22px -30px 22px;
}

.orbit-line::after {
  inset: 68px -45px -68px 45px;
}

.orbit-card {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.74);
  border-radius: 36px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

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

.orbit-card figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  padding: 12px 14px;
  display: grid;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.orbit-card figcaption span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.08em;
}

.orbit-card figcaption strong {
  margin-top: 2px;
  font-size: 15px;
}

.orbit-card-large {
  top: 58px;
  left: 80px;
  width: 350px;
  height: 455px;
  transform: rotate(-4deg);
}

.orbit-card-small {
  width: 214px;
  height: 270px;
}

.orbit-card-top {
  top: 8px;
  right: 0;
  transform: rotate(5deg);
}

.orbit-card-bottom {
  right: 36px;
  bottom: 4px;
  transform: rotate(-2deg);
}

.catalog-section {
  padding: 92px max(32px, calc((100vw - 1320px) / 2)) 120px;
  background: var(--paper);
}

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

.section-heading h2 {
  font-size: clamp(38px, 4vw, 58px);
}

.result-summary {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.category-filters {
  margin: 34px 0 30px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.filter-pill {
  min-height: 44px;
  padding: 0 19px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.filter-pill:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.filter-pill.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

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

.product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 26px;
  background: var(--canvas);
  transition: transform 220ms cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 220ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ececf0;
}

.product-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.05));
  pointer-events: none;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.product-card:hover .product-media img {
  transform: scale(1.025);
}

.product-badge {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  min-height: 28px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.product-content {
  min-height: 202px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.product-category {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.09em;
}

.product-content h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.product-subtitle {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.add-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  background: var(--ink);
  color: var(--paper);
  transition: transform 160ms ease, background 160ms ease;
}

.add-button:hover {
  background: var(--blue);
  transform: scale(1.04);
}

.add-button svg {
  width: 20px;
  height: 20px;
}

.empty-products {
  padding: 80px 24px;
  text-align: center;
}

.empty-products h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
}

.empty-products p {
  margin: 10px 0 22px;
  color: var(--muted);
}

.site-footer {
  width: var(--page);
  min-height: 180px;
  margin: 0 auto;
  padding: 48px 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand .brand-mark {
  width: 42px;
  height: 42px;
}

.site-footer > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.drawer-backdrop {
  position: fixed;
  z-index: 200;
  inset: 0;
  opacity: 0;
  background: rgba(18, 18, 20, 0.34);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: opacity 240ms ease;
}

.drawer-backdrop.is-visible {
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  z-index: 210;
  top: 0;
  right: 0;
  width: min(600px, 100vw);
  height: 100dvh;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: rgba(250, 250, 252, 0.96);
  box-shadow: -24px 0 70px rgba(20, 24, 36, 0.18);
  transform: translateX(0);
  transition: transform 280ms cubic-bezier(0.22, 0.76, 0.2, 1);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
}

.cart-drawer[aria-hidden="true"] {
  transform: translateX(102%);
}

.drawer-header {
  min-height: 132px;
  padding: 30px 34px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  font-size: 42px;
}

.round-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.08);
}

.round-button:hover {
  background: rgba(118, 118, 128, 0.16);
}

.round-button svg {
  width: 24px;
  height: 24px;
}

.drawer-scroll {
  height: calc(100dvh - 132px);
  padding: 0 34px 48px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cart-empty {
  min-height: calc(100dvh - 200px);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: rgba(37, 99, 235, 0.09);
  color: var(--blue);
}

.empty-icon svg {
  width: 44px;
  height: 44px;
}

.cart-empty h3 {
  margin: 24px 0 0;
  font-family: var(--display);
  font-size: 26px;
}

.cart-empty p {
  max-width: 290px;
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.cart-lines {
  padding-top: 12px;
}

.cart-line {
  padding: 20px 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.cart-line > img {
  width: 112px;
  height: 112px;
  border-radius: 18px;
  object-fit: cover;
  background: #ececf0;
}

.cart-line-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cart-line-details h3 {
  margin: 3px 0 0;
  font-family: var(--display);
  font-size: 16px;
}

.cart-line-price {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.quantity-controls {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.quantity-controls button {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(118, 118, 128, 0.1);
  font-size: 18px;
}

.quantity-controls span {
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.quantity-controls .remove-button {
  width: auto;
  margin-left: auto;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.cart-subtotal {
  padding: 24px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.cart-subtotal span {
  color: var(--muted);
}

.cart-subtotal strong {
  font-family: var(--display);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

#checkoutForm {
  padding-top: 30px;
}

.form-heading h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.form-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: var(--paper);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  min-height: 17px;
  color: var(--danger);
  font-size: 12px;
}

.submit-order {
  width: 100%;
  margin-top: 24px;
}

.checkout-note {
  margin: 12px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.order-dialog {
  position: fixed;
  z-index: 300;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(18, 18, 20, 0.42);
  opacity: 1;
  transition: opacity 220ms ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.order-dialog[aria-hidden="true"] {
  opacity: 0;
}

.order-dialog-card {
  width: min(440px, 100%);
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.success-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(29, 127, 86, 0.1);
  color: var(--success);
}

.success-mark svg {
  width: 34px;
  height: 34px;
  stroke-width: 2.4;
}

.order-dialog h2 {
  font-size: 38px;
}

.order-dialog-card > p:not(.eyebrow):not(.order-number) {
  margin: 12px auto 24px;
  color: var(--muted);
}

.order-number {
  margin: 12px 0 0;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.order-dialog .primary-button {
  width: 100%;
}

.toast {
  position: fixed;
  z-index: 400;
  right: 24px;
  bottom: 24px;
  min-height: 46px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  border-radius: 14px;
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.mobile-nav {
  display: none;
}

@media (max-width: 1099px) {
  :root {
    --page: min(100% - 40px, 920px);
  }

  .main-nav {
    grid-template-columns: 220px minmax(220px, 1fr) auto;
    gap: 16px;
  }

  .nav-link,
  .cart-trigger > span:not(.cart-count) {
    display: none;
  }

  .cart-trigger {
    width: 46px;
    padding: 0;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding: 64px 0 80px;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
  }

  .hero h1 {
    font-size: clamp(48px, 6.2vw, 68px);
  }

  .product-orbit {
    min-height: 500px;
  }

  .orbit-card-large {
    top: 52px;
    left: 20px;
    width: 280px;
    height: 370px;
  }

  .orbit-card-small {
    width: 170px;
    height: 220px;
  }

  .orbit-line {
    width: 430px;
    height: 400px;
  }

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

@media (max-width: 767px) {
  :root {
    --page: calc(100% - 32px);
    --header-height: 66px;
  }

  html {
    scroll-padding-top: 80px;
  }

  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .site-header {
    background: rgba(245, 245, 247, 0.9);
  }

  .main-nav {
    min-height: var(--header-height);
    grid-template-columns: 1fr auto auto;
    gap: 8px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    display: none;
  }

  .search-box {
    width: 44px;
    min-height: 44px;
    overflow: hidden;
    border-radius: 50%;
    cursor: pointer;
  }

  .search-box:focus-within {
    position: absolute;
    right: 54px;
    left: 0;
    z-index: 2;
    width: auto;
    border-radius: 14px;
  }

  .search-box > svg {
    flex: 0 0 auto;
    margin-left: 12px;
  }

  .search-box input {
    padding-right: 40px;
  }

  .search-box:not(:focus-within) input,
  .search-box:not(:focus-within) .clear-search {
    width: 0;
    padding: 0;
    opacity: 0;
  }

  .nav-actions {
    gap: 0;
  }

  .nav-link {
    display: none;
  }

  .cart-trigger {
    background: rgba(118, 118, 128, 0.1);
    color: var(--ink);
  }

  .cart-count {
    position: absolute;
    top: 8px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--blue);
    color: #fff;
    font-size: 9px;
  }

  .hero {
    padding: 46px 0 58px;
    display: block;
  }

  .hero h1 {
    font-size: clamp(44px, 13.5vw, 62px);
    letter-spacing: -0.06em;
  }

  .hero-description {
    margin-top: 20px;
    font-size: 16px;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .primary-button,
  .secondary-button {
    min-height: 48px;
  }

  .hero-notes {
    margin-top: 25px;
    gap: 8px 18px;
    font-size: 12px;
  }

  .product-orbit {
    min-height: 410px;
    margin-top: 38px;
  }

  .orbit-line {
    top: 36px;
    right: -86px;
    width: 390px;
    height: 330px;
  }

  .orbit-card {
    border-width: 6px;
    border-radius: 26px;
  }

  .orbit-card-large {
    top: 38px;
    left: 1%;
    width: 59%;
    max-width: 270px;
    height: 340px;
  }

  .orbit-card-small {
    right: 0;
    width: 39%;
    max-width: 170px;
    height: 196px;
  }

  .orbit-card-top {
    top: 0;
  }

  .orbit-card-bottom {
    bottom: 2px;
  }

  .orbit-card figcaption {
    right: 8px;
    bottom: 8px;
    left: 8px;
    padding: 9px 10px;
    border-radius: 13px;
  }

  .orbit-card figcaption span {
    font-size: 9px;
  }

  .orbit-card figcaption strong {
    font-size: 12px;
  }

  .catalog-section {
    padding: 62px 16px 76px;
    border-radius: 32px 32px 0 0;
  }

  .section-heading {
    align-items: start;
  }

  .section-heading h2 {
    font-size: 38px;
  }

  .result-summary {
    margin-top: 35px;
    white-space: nowrap;
  }

  .category-filters {
    margin: 26px -16px 22px;
    padding: 0 16px;
  }

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

  .product-card {
    border-radius: 20px;
  }

  .product-content {
    min-height: 184px;
    padding: 15px 13px 14px;
  }

  .product-content h3 {
    font-size: 15px;
    line-height: 1.35;
  }

  .product-subtitle {
    margin: 7px 0 14px;
    font-size: 11px;
  }

  .product-price {
    font-size: 17px;
  }

  .add-button {
    width: 40px;
    height: 40px;
  }

  .site-footer {
    min-height: 150px;
    padding: 36px 0;
    display: block;
  }

  .site-footer > p {
    margin: 18px 0 0;
  }

  .cart-drawer {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(94dvh, 900px);
    border-top: 1px solid var(--line);
    border-left: 0;
    border-radius: 28px 28px 0 0;
    transform: translateY(0);
  }

  .cart-drawer[aria-hidden="true"] {
    transform: translateY(102%);
  }

  .drawer-header {
    min-height: 108px;
    padding: 20px 20px 18px;
  }

  .drawer-header h2 {
    font-size: 36px;
  }

  .drawer-scroll {
    height: calc(min(94dvh, 900px) - 108px);
    padding: 0 20px calc(34px + env(safe-area-inset-bottom));
  }

  .cart-empty {
    min-height: calc(min(94dvh, 900px) - 180px);
  }

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

  .cart-line > img {
    width: 92px;
    height: 92px;
    border-radius: 15px;
  }

  .quantity-controls {
    gap: 1px;
  }

  .quantity-controls button {
    min-width: 34px;
    height: 34px;
  }

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

  .field-wide {
    grid-column: auto;
  }

  .order-dialog-card {
    padding: 34px 24px 28px;
    border-radius: 28px;
  }

  .toast {
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 16px;
    justify-content: center;
  }

  .mobile-nav {
    position: fixed;
    z-index: 150;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 12px;
    height: 62px;
    padding: 5px 8px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 22px;
    background: rgba(248, 248, 250, 0.9);
    box-shadow: 0 10px 34px rgba(20, 24, 36, 0.16);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
  }

  .mobile-nav a,
  .mobile-nav button {
    position: relative;
    min-width: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border-radius: 15px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
  }

  .mobile-nav a:hover,
  .mobile-nav button:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue);
  }

  .mobile-nav svg {
    width: 21px;
    height: 21px;
  }

  .mobile-cart-count {
    position: absolute;
    top: 2px;
    left: calc(50% + 8px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--blue);
    color: #fff;
    font-size: 9px;
  }
}

@media (max-width: 370px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-media {
    aspect-ratio: 5 / 4;
  }

  .product-content {
    min-height: 170px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions > * {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .orbit-card figcaption,
  .cart-drawer,
  .order-dialog-card,
  .mobile-nav {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .drawer-backdrop,
  .order-dialog {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(29, 29, 31, 0.34);
    --line-strong: rgba(29, 29, 31, 0.6);
    --muted: #424245;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --subtle: #8e8e93;
    --canvas: #101012;
    --paper: #1c1c1e;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.22);
    --blue: #5e8cff;
    --blue-deep: #79a0ff;
    --violet: #a97bff;
    --shadow-sm: 0 8px 28px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.42);
  }

  .site-header {
    background: rgba(16, 16, 18, 0.82);
  }

  .search-box:focus-within,
  .secondary-button,
  .filter-pill {
    background: rgba(28, 28, 30, 0.92);
  }

  .product-media,
  .cart-line > img {
    background: #29292c;
  }

  .orbit-card {
    border-color: rgba(28, 28, 30, 0.72);
  }

  .orbit-card figcaption,
  .product-badge {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(28, 28, 30, 0.8);
    color: var(--ink);
  }

  .cart-drawer {
    background: rgba(24, 24, 26, 0.96);
  }

  .order-dialog-card {
    background: rgba(28, 28, 30, 0.97);
  }

  .field input,
  .field textarea {
    background: #242426;
  }

  .mobile-nav {
    background: rgba(28, 28, 30, 0.9);
  }
}
