:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --border: rgba(0, 0, 0, 0.08);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  --nav-h: 52px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input {
  font: inherit;
}

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

[hidden] {
  display: none !important;
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.logo {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  justify-self: start;
}

.search-wrap {
  position: relative;
  width: min(320px, 100%);
  justify-self: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

#search {
  width: 100%;
  height: 32px;
  padding: 0 32px;
  border: 0;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  outline: none;
  text-align: center;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

#search:not(:placeholder-shown) {
  text-align: left;
  padding-left: 32px;
  padding-right: 12px;
}

#search::placeholder {
  color: var(--text-tertiary);
}

#search:focus {
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.28);
}

/* —— Hero —— */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 22px 20px;
  text-align: center;
  animation: rise 0.7s var(--ease) both;
}

.hero-eyebrow {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.hero-title {
  margin: 0;
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero-sub {
  margin: 14px auto 0;
  max-width: 420px;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

/* —— Toolbar —— */
.toolbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px 28px;
  animation: rise 0.7s var(--ease) 0.08s both;
}

.filter-group {
  text-align: center;
}

.filter-group + .filter-group {
  margin-top: 18px;
}

.filter-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.subcats-block .subcats-row {
  margin-bottom: 0;
}

.subcats-block .nested-subcats-row {
  margin-top: 12px;
  margin-bottom: 0;
}

.subcats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.nested-subcats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}

.nested-subcats-row[hidden] {
  display: none;
}

.nested-subcats .subcat {
  padding: 6px 14px;
  font-size: 12px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: none;
}

.nested-subcats .subcat.is-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.subcat {
  appearance: none;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 980px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease), color 0.2s var(--ease);
}

.subcat:hover {
  transform: scale(1.02);
}

.subcat.is-active {
  background: var(--text);
  color: #fff;
}

.brands-label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.brands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.brand {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  min-width: 76px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.brand:hover {
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.brand.is-active {
  background: var(--surface);
  color: var(--text);
  border-color: transparent;
  box-shadow: var(--shadow);
}

/* —— Products —— */
.products-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px 80px;
}

.products-meta {
  margin-bottom: 18px;
}

.products-meta p {
  margin: 0;
  font-size: 14px;
  color: var(--text-tertiary);
}

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

.product {
  appearance: none;
  border: 0;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  animation: rise 0.55s var(--ease) both;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.product:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.product:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.45);
  outline-offset: 2px;
}

.product-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
}

.product-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 8%;
  box-sizing: border-box;
  background: #fff;
  transition: transform 0.5s var(--ease), opacity 0.25s var(--ease);
}

.product-thumb img.is-normalized,
.product-thumb img.is-fallback {
  padding: 0;
}

.product-thumb:has(img.is-fallback) {
  background: transparent;
}

.product:hover .product-thumb img {
  transform: scale(1.03);
}

.product-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.product-brand {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.3;
  min-height: 1.3em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.product-spec {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-spec:empty {
  display: none;
}

.product-price-block {
  margin-top: auto;
  padding-top: 10px;
}

.product-price {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.product-price s {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.product-compare-price {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0;
  line-height: 1.35;
}

.empty {
  text-align: center;
  padding: 64px 16px;
  color: var(--text-secondary);
  font-size: 17px;
}

.load-status {
  text-align: center;
  margin: 18px 0 8px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.scroll-sentinel {
  width: 100%;
  height: 1px;
  margin-top: 24px;
  pointer-events: none;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.88);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.back-top:hover {
  transform: translateY(-2px) scale(1.04);
}

.back-top[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .back-top {
    right: 16px;
    bottom: 20px;
  }
}

/* —— Detail —— */
.detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 22px 96px;
  animation: rise 0.5s var(--ease) both;
}

.back {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  margin-bottom: 24px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.back:hover {
  color: var(--blue-hover);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.detail-media {
  background: var(--surface);
  border-radius: 28px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-media-zoom {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: zoom-in;
}

.detail-media img {
  width: 82%;
  height: 82%;
  object-fit: contain;
  animation: soft-zoom 0.7s var(--ease) both;
  pointer-events: none;
}

.detail-brand {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.detail-name {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.detail-price {
  margin: 18px 0 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.detail-price s {
  margin-left: 10px;
  font-size: 17px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.detail-compare {
  margin: 16px 0 0;
  display: grid;
  gap: 6px;
}

.detail-spec {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.detail-spec:empty {
  display: none;
}

.detail-compare-price {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.detail-compare-shot span {
  line-height: 1.35;
}

.detail-compare-shot {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  display: grid;
  gap: 6px;
  text-align: left;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  cursor: zoom-in;
}

.detail-compare-shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-secondary, #f5f5f7);
  pointer-events: none;
}

.store-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.store-lightbox[hidden] {
  display: none;
}

.store-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.store-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.store-lightbox-img {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 960px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.detail-desc {
  margin: 22px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 36ch;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  flex-shrink: 0;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 22px;
  cursor: pointer;
}

.btn:hover {
  background: var(--blue-hover);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.1);
}

.btn-danger {
  background: #c43b3b;
}

.btn-danger:hover {
  background: #a83232;
}

.detail-action-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: #0f766e;
}

.detail-action-hint.is-error {
  color: #b42318;
}

.page-view {
  max-width: 800px;
  margin: 0 auto;
  padding: 28px 22px 80px;
}

.page-title {
  margin: 12px 0 20px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.commerce-list {
  display: grid;
  gap: 12px;
}

.commerce-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.commerce-thumb {
  width: 88px;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f0f2;
}

.commerce-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.commerce-thumb-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-tertiary);
  font-size: 12px;
}

.commerce-body h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.commerce-body p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.commerce-price {
  color: var(--text) !important;
  font-weight: 500;
}

.cart-qty {
  width: 56px;
  margin: 0 4px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.text-btn {
  margin-top: 8px;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 13px;
  padding: 0;
  cursor: pointer;
}

.commerce-bar {
  position: sticky;
  bottom: 16px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.commerce-total {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.commerce-total strong {
  color: var(--text);
  font-size: 20px;
}

.checkout-bar {
  align-items: flex-end;
  gap: 14px;
}

.checkout-bill {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.checkout-ship-tip {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: #0f766e;
}

.checkout-bill-line {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.checkout-bill-line .is-free {
  color: #0f766e;
  font-weight: 600;
}

.checkout-bill-line.is-paid-freight,
#checkout-freight.is-paid-freight {
  color: #b42318;
}

#checkout-freight.is-paid-freight {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.checkout-freight-fee {
  font-size: 20px;
  font-weight: 700;
  color: #b42318;
  line-height: 1.2;
}

.checkout-freight-note {
  font-size: 13px;
  font-weight: 500;
  color: #b45309;
}

.account-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 14px;
  display: grid;
  gap: 16px;
}

.account-profile-main {
  display: grid;
  gap: 14px;
}

.account-phone-line {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.account-phone-line strong {
  color: var(--text);
  font-weight: 600;
  margin-left: 6px;
}

.account-nickname-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.account-nickname-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.account-nickname-row input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

.account-card label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.account-panel label input,
.account-card .account-panel input {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

.account-sub {
  margin: 0;
  font-size: 16px;
}

.account-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: #f7f7f8;
  border: 1px solid var(--border);
}

.account-danger {
  border-color: rgba(196, 59, 59, 0.28);
  background: #fff7f7;
}

.account-danger-btn {
  color: #b42318 !important;
}

.shipping-card,
#account-address-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 14px;
  display: grid;
  gap: 12px;
}

.address-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.address-pick-list,
.address-manage-list {
  display: grid;
  gap: 10px;
}

.address-pick-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.address-pick-option input {
  margin-top: 3px;
}

.address-pick-option span {
  display: grid;
  gap: 4px;
  font-size: 14px;
  color: var(--text);
}

.address-phone {
  color: var(--text-secondary);
  margin-left: 8px;
  font-weight: 400;
}

.address-line {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.address-default-tag {
  margin-left: 8px;
  font-style: normal;
  font-size: 12px;
  color: var(--accent, #c45c26);
  font-weight: 600;
}

.shipping-form {
  display: grid;
  gap: 12px;
}

.shipping-form > label:not(.shipping-save-row),
#account-address-card .account-panel > label:not(.shipping-save-row) {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.shipping-form textarea,
.account-panel textarea,
#address-detail {
  width: 100%;
  min-height: 84px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  resize: vertical;
  font: inherit;
}

.shipping-form label input,
.shipping-card label input[type="text"],
.shipping-card label input[type="tel"] {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

.shipping-save-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.shipping-save-row input {
  width: auto;
  height: auto;
}

.address-manage-item {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.address-manage-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.address-manage-title {
  margin: 0;
  font-size: 14px;
}

.address-manage-actions {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
}

.order-shipping {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 12px;
  border-radius: 12px;
  background: #f7f7f8;
  border: 1px solid var(--border);
}

.order-shipping p {
  margin: 0;
  display: flex;
  gap: 12px;
  font-size: 14px;
}

.order-shipping p span:first-child {
  flex: 0 0 3.5em;
  color: var(--text-secondary);
}

.order-list {
  display: grid;
  gap: 14px;
}

.order-card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px 12px;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow);
}

.order-card:hover {
  border-color: rgba(0, 113, 227, 0.35);
}

.order-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.order-no {
  font-weight: 600;
  color: var(--text);
}

.order-status {
  color: var(--text-secondary);
}

.order-status.is-shipped {
  color: #1d4ed8;
  font-weight: 600;
}

.order-time {
  margin-left: auto;
  color: var(--text-tertiary);
}

.order-lines {
  display: grid;
  gap: 10px;
}

.order-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
}

.order-line-thumb {
  width: 56px;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f2;
}

.order-line-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.order-line-body {
  min-width: 0;
}

.order-line-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-line-spec,
.order-line-price {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.order-line-amount {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.order-lines-empty {
  margin: 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

.order-card-pay {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.order-card-pay strong {
  color: var(--text);
  font-size: 15px;
}

.order-discount-badge {
  font-size: 12px;
  font-weight: 500;
  color: #b42318;
}

.order-bill {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 6px;
}

.order-bill p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.order-bill .is-discount {
  color: #b42318;
}

.order-bill .is-pay {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .order-time {
    margin-left: 0;
    width: 100%;
  }

  .order-line {
    grid-template-columns: 48px 1fr;
  }

  .order-line-amount {
    grid-column: 2;
    justify-self: start;
  }

  .nav-user {
    gap: 2px;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .nav-link {
    font-size: 12px;
    padding: 6px;
  }
}

.order-summary {
  margin-bottom: 8px;
  padding: 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.order-summary p {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.auth-card {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-tab {
  border: 0;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.auth-tab.is-active {
  background: #1d1d1f;
  color: #fff;
}

.auth-title {
  margin: 0 0 14px;
  font-size: 22px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-form input {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
}

.auth-error {
  margin: 0;
  font-size: 13px;
  color: #b42318;
}

.auth-tip {
  display: block;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.auth-form label .auth-tip {
  margin-top: 2px;
}

.auth-forgot {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 0;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.auth-forgot:hover {
  color: var(--text);
}

.auth-submit {
  width: 100%;
}

.auth-close {
  margin-top: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 22px 40px;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes soft-zoom {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 720px) {
  .nav-inner {
    gap: 8px;
    padding: 0 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .logo {
    font-size: 17px;
  }

  .search-wrap {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .hero {
    padding: 28px 16px 12px;
  }

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

  .toolbar,
  .products-section,
  .detail {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .product-body {
    padding: 12px 12px 16px;
  }

  .product-name {
    font-size: 13px;
  }

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

  .detail-compare-price {
    font-size: 13px;
  }

  .detail-compare-shots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .detail-compare-shot {
    gap: 4px;
    font-size: 11px;
  }

  .detail-compare-shot img {
    aspect-ratio: auto;
    max-height: 128px;
    object-fit: contain;
    border-radius: 10px;
  }
}

/* —— Wish Pool —— */
body.is-wish-mode {
  background: #fff6f0;
  overflow: hidden;
}

body.is-wish-mode .footer,
body.is-wish-mode .back-top,
body.is-wish-mode main > :not(#wish-view) {
  display: none !important;
}

body.is-wish-mode .nav {
  background: rgba(255, 248, 242, 0.78);
  border-bottom-color: rgba(255, 180, 150, 0.18);
}

body.is-wish-mode main {
  max-width: none;
  margin: 0;
  padding: 0;
}

.wish-view {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 14px 20px 20px;
  overflow: hidden;
  z-index: 40;
}

.wish-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 12% 18%, rgba(255, 214, 186, 0.9), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 22%, rgba(186, 236, 228, 0.75), transparent 58%),
    radial-gradient(ellipse 70% 50% at 48% 95%, rgba(255, 214, 222, 0.6), transparent 62%),
    radial-gradient(ellipse 40% 30% at 70% 55%, rgba(255, 236, 200, 0.45), transparent 70%),
    linear-gradient(165deg, #fff8f2 0%, #ffe8d6 38%, #e8f7f3 72%, #fdeef2 100%);
  z-index: 0;
}

.wish-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: wish-drift 14s ease-in-out infinite;
}

.wish-orb-a {
  width: 180px;
  height: 180px;
  left: 8%;
  top: 22%;
  background: rgba(255, 196, 160, 0.45);
}

.wish-orb-b {
  width: 140px;
  height: 140px;
  right: 12%;
  top: 36%;
  background: rgba(160, 220, 210, 0.4);
  animation-delay: -4s;
}

.wish-orb-c {
  width: 220px;
  height: 220px;
  left: 40%;
  bottom: 8%;
  background: rgba(255, 190, 200, 0.35);
  animation-delay: -8s;
}

@keyframes wish-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(12px, -18px) scale(1.06);
  }
}

.wish-sparkles {
  position: absolute;
  inset: 0;
}

.wish-sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 8px rgba(255, 220, 180, 0.8);
  animation: wish-twinkle 3.2s ease-in-out infinite;
}

@keyframes wish-twinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.wish-back {
  position: relative;
  z-index: 2;
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.55);
  color: #7a4a2b;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 980px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.wish-hero {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 560px;
  margin: 8px auto 0;
  pointer-events: none;
}

.wish-hero .wish-cta,
.wish-back {
  pointer-events: auto;
}

.wish-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b07a58;
}

.wish-title {
  margin: 0;
  font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 400;
  color: #5c3a28;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
  animation: wish-title-in 0.7s var(--ease) both;
}

.wish-sub {
  margin: 12px auto 0;
  max-width: 28em;
  font-size: 15px;
  line-height: 1.55;
  color: #8a6048;
  animation: wish-title-in 0.7s var(--ease) 0.08s both;
}

.wish-cta {
  margin-top: 22px;
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif;
  font-size: 18px;
  padding: 12px 28px;
  border-radius: 980px;
  color: #5c3a28;
  background: linear-gradient(135deg, #ffe0b5, #ffc9d1 50%, #bfece4);
  box-shadow: 0 8px 24px rgba(255, 160, 130, 0.28);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  animation: wish-title-in 0.7s var(--ease) 0.16s both;
}

.wish-cta:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(255, 150, 120, 0.35);
}

@keyframes wish-title-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wish-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 8px;
  border-radius: 980px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #8a4b1f;
  background: linear-gradient(135deg, #ffe7b0, #ffd0a8);
}

.wish-pool {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 168px;
  bottom: 0;
  width: 100%;
  margin: 0;
  overflow: visible;
}

.wish-bubble.is-fulfilled {
  box-shadow:
    0 12px 30px rgba(120, 70, 40, 0.12),
    0 0 0 1.5px rgba(255, 200, 120, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.wish-empty,
.wish-loading {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  color: #9a6b52;
  font-size: 15px;
  margin: 0;
  white-space: nowrap;
}

.wish-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 130;
  margin: 0;
  padding: 12px 18px;
  border-radius: 980px;
  background: rgba(92, 58, 40, 0.9);
  color: #fff8f2;
  font-size: 14px;
  box-shadow: 0 10px 28px rgba(70, 40, 30, 0.25);
  pointer-events: none;
}

.wish-bubble {
  position: absolute;
  width: min(200px, 28vw);
  max-width: 240px;
  padding: 14px 16px;
  border-radius: 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 12px 30px rgba(120, 70, 40, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transform: rotate(var(--tilt, 0deg));
  animation: wish-float var(--float-dur, 8s) ease-in-out var(--float-delay, 0s) infinite;
  cursor: default;
  will-change: transform;
}

.wish-bubble.is-mine {
  box-shadow:
    0 12px 30px rgba(120, 70, 40, 0.14),
    0 0 0 2px rgba(255, 255, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.wish-bubble.is-enter {
  animation: wish-pop 0.7s var(--ease) both, wish-float var(--float-dur, 8s) ease-in-out 0.7s infinite;
}

.wish-bubble.tone-peach {
  background: rgba(255, 232, 210, 0.88);
}
.wish-bubble.tone-mint {
  background: rgba(214, 242, 234, 0.9);
}
.wish-bubble.tone-sky {
  background: rgba(220, 236, 248, 0.9);
}
.wish-bubble.tone-cream {
  background: rgba(255, 246, 220, 0.92);
}
.wish-bubble.tone-rose {
  background: rgba(255, 226, 232, 0.9);
}

.wish-bubble-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #4d3224;
  word-break: break-word;
}

@keyframes wish-float {
  0%,
  100% {
    transform: rotate(var(--tilt, 0deg)) translate(0, 0) scale(1);
  }
  25% {
    transform: rotate(calc(var(--tilt, 0deg) + 2deg))
      translate(var(--sway, 10px), -16px) scale(1.02);
  }
  50% {
    transform: rotate(var(--tilt, 0deg)) translate(calc(var(--sway, 10px) * -0.6), -28px)
      scale(1.04);
  }
  75% {
    transform: rotate(calc(var(--tilt, 0deg) - 2deg))
      translate(calc(var(--sway, 10px) * 0.4), -12px) scale(1.01);
  }
}

@keyframes wish-pop {
  0% {
    opacity: 0;
    transform: scale(0.35) translateY(48px);
  }
  65% {
    opacity: 1;
    transform: scale(1.1) translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.wish-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
}

.wish-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(70, 40, 30, 0.28);
  backdrop-filter: blur(4px);
}

.wish-sheet-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: linear-gradient(180deg, #fff9f3, #fff);
  border-radius: 22px;
  padding: 22px 20px 18px;
  box-shadow: 0 20px 50px rgba(90, 50, 30, 0.2);
  display: grid;
  gap: 10px;
  animation: wish-sheet-in 0.3s var(--ease) both;
}

@keyframes wish-sheet-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.wish-sheet-card h3 {
  margin: 0;
  font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif;
  font-size: 26px;
  color: #5c3a28;
}

.wish-sheet-note {
  margin: 0;
  font-size: 13px;
  color: #9a6b52;
}

.wish-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #8a6048;
}

.wish-field textarea {
  width: 100%;
  border: 1px solid rgba(180, 120, 90, 0.25);
  border-radius: 14px;
  padding: 12px;
  resize: vertical;
  min-height: 96px;
  font: inherit;
  color: #4d3224;
  background: #fff;
}

.wish-count {
  margin: 0;
  text-align: right;
  font-size: 12px;
  color: #b08a72;
}

.wish-hint {
  margin: 0;
  font-size: 13px;
  color: #c45c26;
}

.wish-sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.wish-submit {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif;
  font-size: 16px;
  padding: 10px 18px;
  border-radius: 980px;
  color: #5c3a28;
  background: linear-gradient(135deg, #ffe0b5, #ffc9d1);
}

@media (max-width: 720px) {
  .wish-view {
    padding: 10px 12px 16px;
  }

  .wish-pool {
    top: 176px;
  }

  .wish-bubble {
    width: min(150px, 40vw);
    padding: 11px 12px;
  }

  .wish-bubble-text {
    font-size: 13px;
  }

  .wish-title {
    font-size: 40px;
  }
}

