:root {
  --black: #050505;
  --black-2: #0d0d0d;
  --black-3: #171717;
  --white: #ffffff;
  --paper: #f7f5f1;
  --line: rgba(255, 255, 255, 0.12);
  --line-dark: rgba(9, 9, 9, 0.1);
  --muted: #9c9c9c;
  --muted-dark: #5f5f5f;
  --gold: #c7a86b;
  --gold-soft: #e0c98f;
  --green: #21483d;
  --rose: #d0ada6;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --max: 100vw;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--white);
  background: var(--black);
  font-family: "HarmonyOS Sans SC", "Alibaba PuHuiTi", "Source Han Sans SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}

body.drawer-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

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

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

main {
  height: calc(100svh - 68px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

main::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 3, 0.9);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 16px;
  font-weight: 760;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--gold-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  position: relative;
  padding: 22px 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.main-nav a:hover {
  color: var(--white);
}

.main-nav a:hover::after {
  background: var(--gold);
}

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

.icon-button,
.cart-button,
.carousel-arrow,
.drawer-close,
.wish-button {
  display: inline-grid;
  position: relative;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.icon-button,
.cart-button {
  width: 40px;
  height: 40px;
}

.cart-button span {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: var(--black);
  font-size: 11px;
  font-weight: 800;
}

.icon-button svg,
.cart-button svg,
.primary-action svg,
.ghost-action svg,
.secondary-action svg,
.summary-list svg,
.service-strip svg,
.member-grid svg,
.care-grid svg,
.hotspot svg,
.rotate-hint svg,
.filter-toggle svg,
.drawer-close svg,
.search-box svg,
.wish-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.showroom {
  display: grid;
  grid-template-columns: clamp(140px, 9vw, 188px) minmax(0, 1fr) clamp(360px, 24vw, 460px);
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-left: 0;
  border-right: 0;
  background:
    radial-gradient(circle at 62% 18%, rgba(255, 255, 255, 0.14), transparent 28%),
    linear-gradient(90deg, #050505 0%, #080808 48%, #f7f5f1 48%, #f7f5f1 100%);
}

.side-rail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 34px;
  border-right: 1px solid var(--line);
  background: #030303;
}

.side-rail a {
  position: relative;
  color: rgba(255, 255, 255, 0.56);
  font-size: 15px;
}

.side-rail a::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 50%;
  width: 3px;
  height: 18px;
  background: transparent;
  transform: translateY(-50%);
}

.side-rail a.active,
.side-rail a:hover {
  color: var(--white);
}

.side-rail a.active::before,
.side-rail a:hover::before {
  background: var(--gold);
}

.hero-stage {
  position: relative;
  display: block;
  min-width: 0;
  height: 100%;
  padding: 24px 28px 22px;
}

.hero-copy {
  position: absolute;
  top: 18%;
  left: clamp(28px, 3vw, 56px);
  z-index: 5;
  width: min(390px, 42%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: 58px;
  font-weight: 420;
  line-height: 1;
}

.hero-cn {
  margin-bottom: 24px;
  color: var(--white);
  font-size: 26px;
}

.lead {
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 15px;
  line-height: 1.8;
}

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

.primary-action,
.ghost-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-align: center;
}

.primary-action {
  background: var(--white);
  color: var(--black);
  font-weight: 760;
}

.ghost-action {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.18);
}

.secondary-action {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.viewer-frame {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.54) 46%, rgba(255, 255, 255, 0.86) 47%, rgba(255, 255, 255, 0.96)),
    var(--black);
  box-shadow: var(--shadow);
}

.viewer-frame::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 116px;
  z-index: 1;
  width: min(72%, 620px);
  height: 92px;
  border: 1px solid rgba(199, 168, 107, 0.34);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.36));
  transform: translateX(-50%);
}

.viewer-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 94px;
  z-index: 1;
  width: min(48%, 420px);
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(22px);
  transform: translateX(-50%);
}

.viewer-label {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 6;
  display: grid;
  gap: 5px;
}

.viewer-label span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.viewer-label strong {
  color: var(--white);
  font-size: 18px;
  font-weight: 680;
}

.glasses-viewer {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.glasses-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: pan-y;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.orbit-ring span {
  position: absolute;
  width: min(60vw, 640px);
  aspect-ratio: 1 / 0.42;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 50%;
}

.orbit-ring span:nth-child(2) {
  width: min(48vw, 500px);
  transform: rotate(12deg);
}

.orbit-ring span:nth-child(3) {
  width: min(68vw, 740px);
  border-color: rgba(199, 168, 107, 0.24);
  transform: rotate(-8deg);
}

.hotspot {
  position: absolute;
  z-index: 7;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--black);
  border: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.hotspot-a {
  top: 31%;
  right: 18%;
}

.hotspot-b {
  top: 49%;
  left: 57%;
}

.hotspot-c {
  top: 58%;
  left: 67%;
}

.rotate-hint {
  position: absolute;
  left: 50%;
  bottom: 142px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  transform: translateX(-50%);
}

.hero-carousel {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 48px;
  z-index: 8;
  display: grid;
  grid-template-columns: 34px repeat(4, minmax(70px, 1fr)) 34px;
  gap: 8px;
  margin-top: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 4, 4, 0.72);
  backdrop-filter: blur(16px);
}

.carousel-arrow {
  width: 34px;
  height: 54px;
  align-self: center;
}

.thumb-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
}

.thumb-card.active {
  border-color: var(--gold);
}

.thumb-card img {
  width: 100%;
  max-height: 42px;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  border-radius: 6px;
  background: var(--paper);
}

.thumb-card span {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buy-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 34px;
  color: var(--black);
  background: var(--paper);
}

.product-kicker {
  width: max-content;
  margin-bottom: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(199, 168, 107, 0.52);
  border-radius: 999px;
  color: #8e6f31;
  font-size: 12px;
  font-weight: 800;
}

.buy-panel h2 {
  margin-bottom: 10px;
  font-size: 30px;
  font-weight: 560;
  line-height: 1.18;
}

.product-subtitle {
  margin-bottom: 22px;
  color: var(--muted-dark);
  line-height: 1.65;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 22px;
}

.price-row span {
  font-size: 40px;
  font-weight: 780;
}

.price-row small {
  color: var(--muted-dark);
}

.control-group {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.control-title {
  color: #232323;
  font-size: 14px;
  font-weight: 700;
}

.swatches,
.lens-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch {
  width: 36px;
  height: 36px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.swatch.active {
  box-shadow: 0 0 0 2px var(--black), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.lens-option {
  padding: 10px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-size: 13px;
}

.lens-option.active {
  background: var(--black);
  color: var(--white);
}

.summary-list {
  display: grid;
  gap: 12px;
  margin: 6px 0 22px;
  padding: 14px 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.summary-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #333;
  font-size: 14px;
}

.summary-list svg {
  color: #9a7733;
}

.buy-panel .primary-action {
  flex: 1 1 170px;
  background: var(--black);
  color: var(--white);
}

.buy-panel .secondary-action {
  flex: 1 1 140px;
  color: var(--black);
  border-color: var(--line-dark);
  background: var(--white);
}

.service-strip {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: 36px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: clamp(42px, 5vw, 72px) clamp(36px, 6vw, 92px);
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  background: #080808;
}

.service-heading h2 {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 38px;
  font-weight: 520;
  line-height: 1.15;
}

.service-heading p:last-child {
  max-width: 460px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.8;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.service-strip article {
  display: grid;
  gap: 12px;
  min-height: 190px;
  align-content: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.service-strip article:last-child {
  border-right: 1px solid var(--line);
}

.service-strip svg {
  color: var(--gold);
}

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

.service-strip span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.section {
  display: grid;
  align-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 40px clamp(28px, 4vw, 72px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  color: var(--black);
  background: var(--paper);
}

.section:nth-of-type(even) {
  background: var(--white);
}

.section-heading {
  width: min(1180px, 100%);
  margin: 0 auto 20px;
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: 34px;
  font-weight: 560;
}

.section-heading p:last-child {
  max-width: 720px;
  color: var(--muted-dark);
  line-height: 1.7;
}

.catalog-toolbar,
.catalog-layout,
.sunglass-layout,
.detail-layout,
.prescription-layout,
.checkout-layout,
.member-grid,
.care-grid {
  width: min(1360px, 100%);
  margin: 0 auto;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.view-toggle {
  display: flex;
  gap: 22px;
}

.view-toggle button,
.filter-toggle,
.sort-select select {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--black);
  font-weight: 700;
}

.view-toggle button {
  border-bottom: 2px solid transparent;
}

.view-toggle button.active {
  border-color: var(--black);
}

.filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
}

.sort-select {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-dark);
  font-size: 13px;
}

.sort-select select {
  min-width: 132px;
  padding: 0 12px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--white);
}

.catalog-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
}

.catalog-filters {
  display: grid;
  align-self: start;
  gap: 18px;
  padding: 0 22px 22px 0;
  border-right: 1px solid var(--line-dark);
}

.catalog-filters div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.catalog-filters strong {
  flex-basis: 100%;
  margin-bottom: 4px;
  font-size: 14px;
}

.catalog-filters button {
  padding: 8px 11px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: transparent;
  color: var(--black);
  font-size: 13px;
}

.catalog-filters .active,
.catalog-filters .selected,
.catalog-filters button:hover {
  background: var(--black);
  color: var(--white);
}

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

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

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover,
.product-card.active {
  border-color: rgba(199, 168, 107, 0.72);
  box-shadow: var(--soft-shadow);
  transform: translateY(-3px);
}

.product-card.is-hidden {
  display: none;
}

.product-card img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  background: #f4f2ee;
}

.wish-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--black);
  border-color: var(--line-dark);
}

.wish-button.active {
  background: var(--black);
  color: var(--white);
}

.product-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--black);
  font-size: 12px;
}

.product-card-body {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  padding: 12px;
}

.product-card h3 {
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 680;
}

.product-card p {
  margin-bottom: 0;
  color: var(--muted-dark);
  font-size: 12px;
  line-height: 1.45;
}

.product-card strong {
  color: var(--black);
  font-size: 17px;
}

.sunglasses-section {
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 34%),
    #050505;
}

.sunglasses-section .section-heading p:last-child {
  color: rgba(255, 255, 255, 0.62);
}

.sunglass-layout {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, minmax(0, 0.95fr));
  gap: 16px;
}

.sunglass-campaign,
.sun-card {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: #0b0b0b;
  box-shadow: var(--shadow);
}

.sunglass-campaign {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 390px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.84)),
    url("./assets/rg-rigel-black-gold.jpg") center / cover;
}

.sunglass-campaign h3 {
  max-width: 460px;
  margin-bottom: 16px;
  color: var(--white);
  font-size: 30px;
  font-weight: 520;
  line-height: 1.15;
}

.sunglass-campaign p:not(.eyebrow) {
  max-width: 430px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.75;
}

.sunglass-campaign .primary-action {
  width: max-content;
  background: var(--white);
  color: var(--black);
}

.sun-card {
  background: #0c0c0c;
}

.sun-card:hover,
.sun-card.active {
  border-color: rgba(199, 168, 107, 0.76);
}

.sun-card img {
  aspect-ratio: 4 / 4.2;
  background: #111;
}

.sun-card .product-card-body {
  min-height: 92px;
  background: #080808;
}

.sun-card h3,
.sun-card strong {
  color: var(--white);
}

.sun-card p {
  color: rgba(255, 255, 255, 0.58);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

.detail-gallery,
.detail-copy,
.lens-plans,
.rx-form,
.cart-summary,
.payment-card,
.member-grid article,
.care-grid article {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--soft-shadow);
}

.detail-gallery {
  overflow: hidden;
}

.detail-gallery > img {
  width: 100%;
  aspect-ratio: 16 / 7.4;
  object-fit: cover;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
}

.detail-thumbs button {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: transparent;
}

.detail-thumbs button.active {
  border-color: var(--gold);
}

.detail-thumbs img {
  width: 100%;
  aspect-ratio: 16 / 7.4;
  object-fit: cover;
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
}

.detail-copy h3 {
  margin-bottom: 12px;
  font-size: 28px;
}

.detail-copy p {
  color: var(--muted-dark);
  line-height: 1.65;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.spec-grid span {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  color: var(--muted-dark);
}

.spec-grid strong {
  color: var(--black);
}

.prescription-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
}

.lens-plans {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.lens-plans button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  text-align: left;
}

.lens-plans button.active {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.lens-plans span {
  color: inherit;
  opacity: 0.68;
  font-size: 13px;
}

.lens-plans b {
  grid-row: 1 / span 2;
}

.rx-form {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.rx-row {
  display: grid;
  grid-template-columns: 90px repeat(4, minmax(80px, 1fr));
  gap: 10px;
  align-items: center;
}

.rx-head {
  color: var(--muted-dark);
  font-size: 13px;
}

.rx-row input {
  min-width: 0;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--white);
}

.upload-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 14px;
  border: 1px dashed rgba(9, 9, 9, 0.24);
  border-radius: var(--radius);
}

.upload-card button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--black);
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
}

.cart-summary {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.cart-line {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line-dark);
}

.cart-line:last-child {
  border-bottom: 0;
}

.cart-line img {
  width: 124px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.cart-line h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.cart-line p {
  color: var(--muted-dark);
}

.cart-line span {
  font-size: 19px;
  font-weight: 800;
}

.payment-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
}

.payment-card span,
.payment-card strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-card em {
  color: var(--black);
  font-style: normal;
}

.payment-card strong {
  padding-top: 14px;
  border-top: 1px solid var(--line-dark);
  font-size: 21px;
}

.payment-card .primary-action {
  background: var(--black);
  color: var(--white);
}

.member-grid,
.care-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.member-grid article,
.care-grid article {
  min-height: 178px;
  padding: 22px;
}

.member-grid svg,
.care-grid svg {
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  color: #957331;
}

.member-grid h3,
.care-grid h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.member-grid p,
.care-grid p {
  color: var(--muted-dark);
  line-height: 1.55;
}

.member-grid strong {
  display: block;
  margin-top: 14px;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  justify-items: end;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.drawer-panel {
  position: relative;
  width: min(420px, 100%);
  height: 100%;
  padding: 34px;
  color: var(--black);
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.24s ease;
}

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

.drawer-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 38px;
  height: 38px;
  background: var(--white);
  color: var(--black);
  border-color: var(--line-dark);
}

.drawer-panel h2 {
  margin-bottom: 24px;
  font-size: 32px;
}

.drawer-line {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.drawer-line img {
  width: 100px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.drawer-line div {
  display: grid;
  gap: 7px;
}

.drawer-line span {
  color: var(--muted-dark);
}

.drawer-panel .primary-action {
  width: 100%;
  margin-top: 22px;
  background: var(--black);
  color: var(--white);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--white);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-results {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.search-results button {
  min-height: 44px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--white);
  text-align: left;
  padding: 0 14px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(340px, calc(100vw - 48px));
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

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

@media (max-width: 1200px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .showroom {
    grid-template-columns: 132px minmax(0, 1fr) 320px;
    background: var(--black);
  }

  .buy-panel {
    grid-column: auto;
    margin: 0;
    padding: 24px;
  }

  .hero-stage {
    padding: 20px;
  }

  .hero-copy {
    top: 15%;
    left: 34px;
    width: 310px;
  }

  .viewer-frame {
    min-height: 0;
  }

  .service-strip {
    grid-template-columns: 1fr 1.25fr;
    padding: 42px 34px;
  }

  .product-grid,
  .sunglass-layout,
  .member-grid,
  .care-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-strip article:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 0;
  }

  body {
    overflow: auto;
  }

  main {
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
  }

  .topbar {
    min-height: 62px;
    padding: 0 16px;
  }

  .brand span:last-child {
    display: none;
  }

  .icon-button,
  .cart-button {
    width: 38px;
    height: 38px;
  }

  .showroom {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
    scroll-snap-align: none;
    border: 0;
  }

  .side-rail {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-rail a {
    flex: 0 0 auto;
    font-size: 14px;
  }

  .side-rail a::before {
    display: none;
  }

  .hero-stage {
    display: block;
    gap: 16px;
    height: auto;
    padding: 14px 16px 18px;
  }

  .hero-copy {
    position: static;
    width: auto;
    order: 2;
  }

  h1 {
    font-size: 42px;
  }

  .hero-cn {
    font-size: 22px;
  }

  .viewer-frame {
    height: 390px;
    min-height: 390px;
  }

  .viewer-frame::before {
    bottom: 88px;
    width: 78%;
    height: 58px;
  }

  .viewer-frame::after {
    bottom: 76px;
  }

  .viewer-label {
    top: 20px;
    left: 20px;
  }

  .hotspot-a {
    top: 34%;
    right: 16%;
  }

  .hotspot-b {
    top: 50%;
    left: 26%;
  }

  .hotspot-c {
    top: 55%;
    left: 52%;
  }

  .rotate-hint {
    bottom: 86px;
  }

  .hero-carousel {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .carousel-arrow {
    display: none;
  }

  .buy-panel {
    padding: 24px 18px;
  }

  .buy-panel h2 {
    font-size: 28px;
  }

  .price-row span {
    font-size: 38px;
  }

  .service-strip {
    display: grid;
    height: auto;
    min-height: 0;
    padding: 48px 16px;
    overflow: visible;
    scroll-snap-align: none;
  }

  .service-grid,
  .catalog-layout,
  .sunglass-layout,
  .detail-layout,
  .prescription-layout,
  .checkout-layout,
  .member-grid,
  .care-grid {
    grid-template-columns: 1fr;
  }

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

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

  .section {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 58px 16px;
    scroll-snap-align: none;
  }

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

  .catalog-toolbar {
    grid-template-columns: 1fr auto;
  }

  .filter-toggle {
    display: inline-flex;
  }

  .sort-select {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .catalog-filters {
    display: none;
    padding: 18px;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    background: var(--white);
  }

  .catalog-filters.open {
    display: grid;
  }

  .product-grid,
  .product-grid.view-2 {
    grid-template-columns: 1fr;
  }

  .product-card img {
    aspect-ratio: 16 / 10;
  }

  .product-card-body {
    min-height: 92px;
    padding: 16px;
  }

  .sunglass-campaign {
    min-height: 360px;
  }

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

  .rx-form {
    overflow-x: auto;
  }

  .rx-row {
    min-width: 620px;
  }

  .cart-line {
    grid-template-columns: 96px 1fr;
  }

  .cart-line img {
    width: 96px;
  }
}

@media (min-width: 641px) and (max-width: 820px) {
  body {
    overflow: hidden;
  }

  main {
    height: calc(100svh - 62px);
    overflow-y: auto;
    scroll-snap-type: y mandatory;
  }

  .showroom {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) 238px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    scroll-snap-align: start;
    border-left: 0;
    border-right: 0;
  }

  .side-rail {
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 18px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .side-rail a {
    font-size: 13px;
  }

  .side-rail a::before {
    display: block;
    left: -12px;
  }

  .hero-stage {
    display: block;
    height: 100%;
    padding: 14px;
  }

  .hero-copy {
    position: absolute;
    top: 12%;
    left: 22px;
    z-index: 6;
    width: 190px;
  }

  h1 {
    font-size: 34px;
  }

  .hero-cn {
    margin-bottom: 14px;
    font-size: 20px;
  }

  .lead {
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.55;
  }

  .primary-action,
  .ghost-action,
  .secondary-action {
    min-height: 42px;
    padding: 0 14px;
  }

  .viewer-frame {
    height: 100%;
    min-height: 0;
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.72) 58%, rgba(255, 255, 255, 0.88) 59%, rgba(255, 255, 255, 0.96)),
      var(--black);
  }

  .viewer-frame::before {
    bottom: 106px;
  }

  .viewer-frame::after {
    bottom: 86px;
  }

  .rotate-hint {
    bottom: 130px;
  }

  .hotspot-a {
    top: 32%;
    right: 12%;
  }

  .hotspot-b {
    top: 50%;
    left: 58%;
  }

  .hotspot-c {
    top: 58%;
    left: 68%;
  }

  .hero-carousel {
    left: 14px;
    right: 14px;
    bottom: 34px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
    overflow: hidden;
  }

  .carousel-arrow {
    display: none;
  }

  .thumb-card {
    padding: 6px;
  }

  .thumb-card img {
    max-height: 38px;
  }

  .buy-panel {
    grid-column: auto;
    padding: 20px 18px;
  }

  .product-kicker {
    margin-bottom: 12px;
  }

  .buy-panel h2 {
    font-size: 22px;
  }

  .product-subtitle,
  .summary-list {
    display: none;
  }

  .price-row {
    margin-bottom: 18px;
  }

  .price-row span {
    font-size: 32px;
  }

  .control-group {
    margin-bottom: 16px;
  }

  .lens-options {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .service-strip,
  .section {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    scroll-snap-align: start;
  }

  .service-strip {
    grid-template-columns: 0.9fr 1.1fr;
    padding: 34px 24px;
  }

  .service-heading h2 {
    font-size: 30px;
  }

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

  .service-strip article {
    min-height: 160px;
    padding: 18px;
  }

  .section {
    display: grid;
    align-content: center;
    padding: 30px 22px;
  }

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

  .catalog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-filters {
    display: none;
  }

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

  .product-card img {
    aspect-ratio: 16 / 7;
  }

  .product-card-body {
    min-height: 72px;
    padding: 12px;
  }

  .sunglass-layout,
  .detail-layout,
  .prescription-layout,
  .checkout-layout,
  .member-grid,
  .care-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sunglass-campaign {
    min-height: 330px;
  }

  .sun-card img {
    aspect-ratio: 16 / 7;
  }
}

@media (max-width: 460px) {
  .nav-actions {
    gap: 7px;
  }

  .hero-actions,
  .panel-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    grid-template-columns: repeat(4, 132px);
  }

  .viewer-frame {
    height: 360px;
    min-height: 360px;
  }

  .drawer-panel {
    padding: 28px 20px;
  }
}
