/* တရုတ်လေး Shop — Fashion storefront */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

.fashion-shop {
  color-scheme: light;
  --shop-promo-bg: var(--primary-light, rgba(5, 128, 109, 0.12));
  --shop-promo-text: var(--accent-text, var(--primary, #05806d));
  --shop-media-bg: #f3f3f3;
  --shop-chip-bg: rgba(255, 255, 255, 0.95);
  --shop-skeleton-mid: #f5f2ee;
  --shop-checkout: var(--primary, #05806d);
  --shop-checkout-hover: var(--primary-dark, #046458);
  --shop-success-bg: #ecfdf3;
  --shop-success-text: #067647;

  --bg: var(--background, #f7f5f2);
  /* theme.js --card is a hover tint; panels need a solid surface */
  --bg-elevated: var(--surface-popover-solid, #ffffff);
  --bg-soft: var(--surface-muted, rgba(15, 23, 42, 0.04));
  --text: var(--foreground, #141414);
  --accent: var(--primary, #05806d);
  --accent-soft: var(--primary-dark, #046458);
  --on-accent: var(--on-primary, #ffffff);
  --line: var(--line-subtle, rgba(20, 20, 20, 0.08));
  --line-strong: var(--line-default, rgba(20, 20, 20, 0.14));
  --shadow-sm: var(--shadow, 0 4px 20px rgba(20, 20, 20, 0.06));
  --shadow-md: var(--shadow-modal, 0 16px 48px rgba(20, 20, 20, 0.12));
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --header-h: 72px;
}

html.theme-dark .fashion-shop {
  color-scheme: dark;
  --background: #0a1018;
  --foreground: #eef2f7;
  --text-muted: rgba(255, 255, 255, 0.62);
  --text-faint: rgba(255, 255, 255, 0.42);
  --text-secondary: rgba(255, 255, 255, 0.78);
  --text-placeholder: rgba(255, 255, 255, 0.38);
  --surface-popover-solid: #141c26;
  --surface-subtle: rgba(255, 255, 255, 0.04);
  --surface-muted: rgba(255, 255, 255, 0.06);
  --surface-raised: rgba(255, 255, 255, 0.08);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --input-bg: #101820;
  --input-bg-soft: #0d141c;
  --header-bg: rgba(10, 16, 24, 0.92);
  --border: rgba(255, 255, 255, 0.1);
  --line-subtle: rgba(255, 255, 255, 0.08);
  --line-default: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.2);
  --hover-bg: rgba(255, 255, 255, 0.06);
  --hover-bg-strong: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-modal: 0 24px 70px rgba(0, 0, 0, 0.55);
  --modal-backdrop: rgba(0, 0, 0, 0.72);
  --overlay-scrim: rgba(0, 0, 0, 0.55);
  --danger-bg: rgba(232, 69, 69, 0.15);
  --danger-text: #ffb4b4;
  --shop-promo-bg: var(--primary-a16, rgba(255, 255, 255, 0.06));
  --shop-promo-text: var(--accent-text, var(--primary));
  --shop-media-bg: rgba(255, 255, 255, 0.05);
  --shop-chip-bg: rgba(20, 28, 38, 0.92);
  --shop-skeleton-mid: rgba(255, 255, 255, 0.06);
  --shop-success-bg: rgba(6, 118, 71, 0.18);
  --shop-success-text: #6ee7a8;

  --bg: var(--background);
  --bg-elevated: var(--surface-popover-solid);
  --bg-soft: var(--surface-muted);
  --text: var(--foreground);
  --line: var(--line-subtle);
  --line-strong: var(--line-default);
  --shadow-sm: var(--shadow);
  --shadow-md: var(--shadow-modal);
}

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

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

html:has(.fashion-shop) {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html:has(.fashion-shop)::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.fashion-shop a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.shop-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  min-height: var(--header-h);
  padding: 10px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--header-bg, var(--bg-elevated)) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border, var(--line));
}

.shop-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-shrink: 0;
}

.shop-brand img {
  display: none;
}

.shop-brand-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.shop-brand-text h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--text);
}

.shop-brand-text p {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.shop-header-search {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  min-height: 48px;
  padding: 0 4px 0 14px;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--input-bg);
  box-shadow: var(--shadow-sm);
}

.shop-header-search-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-faint);
}

.shop-header-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 0;
  outline: none;
}

.shop-header-search-input::placeholder {
  color: var(--text-faint);
}

.shop-header-search-input:focus {
  outline: none;
}

.shop-header-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring, rgba(5, 128, 109, 0.18));
}

.shop-header-search-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--primary-shadow-sm, 0 2px 10px rgba(5, 128, 109, 0.28));
}

.shop-header-search-btn:hover {
  background: var(--accent-soft);
}

.shop-header-search-btn svg {
  width: 18px;
  height: 18px;
}

.shop-header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.shop-header-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.shop-header-toolbar-divider {
  width: 1px;
  height: 22px;
  margin: 0 2px;
  background: var(--line-strong);
  flex-shrink: 0;
}

.shop-header-actions .shop-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  flex-shrink: 0;
}

.shop-header-lang {
  position: relative;
  flex-shrink: 0;
}

.shop-header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.shop-header-toolbar .shop-header-icon-btn:hover {
  background: var(--hover-bg-strong, var(--bg-soft));
  color: var(--text);
}

.shop-header-toolbar .shop-header-icon-btn.is-active,
.shop-view-btn.is-active {
  background: var(--bg-elevated);
  border-color: var(--line-strong);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.shop-header-icon-btn svg {
  width: 18px;
  height: 18px;
}

.shop-header-staff {
  display: inline-flex;
}

.shop-header-cart-wrap {
  position: relative;
  flex-shrink: 0;
}

.shop-header-cart {
  position: relative;
}

.shop-header-cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: var(--primary-shadow-sm);
  pointer-events: none;
}

.shop-header-cart-badge:empty,
.shop-header-cart-badge[hidden] {
  display: none !important;
}

.shop-cart-float {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 140;
  width: min(360px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line-default);
  border-radius: 16px;
  background: var(--surface-popover-solid, var(--card));
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.16),
    0 6px 16px rgba(15, 23, 42, 0.08);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-cart-float.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.shop-cart-float::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 18px;
  width: 14px;
  height: 14px;
  background: var(--surface-popover-solid, var(--card));
  border-top: 1px solid var(--line-default);
  border-left: 1px solid var(--line-default);
  transform: rotate(45deg);
}

.shop-cart-float-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.shop-cart-float-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line-subtle);
}

.shop-cart-float-thumb img,
.shop-cart-float-thumb-empty {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-cart-float-thumb-empty {
  background:
    linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-elevated) 100%);
}

.shop-cart-float-qty {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--primary-shadow-sm);
  border: 2px solid var(--surface-popover-solid, var(--card));
}

.shop-cart-float-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-cart-float-price {
  align-self: flex-end;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.shop-cart-float-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-cart-float-btn {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--primary-shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease;
}

.shop-cart-float-btn:hover {
  background: var(--accent-soft);
}

.shop-cart-float-btn:active {
  transform: scale(0.98);
}

.shop-lang-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  min-width: 220px;
  padding: 14px;
  border: 1px solid var(--line-default);
  border-radius: 14px;
  background: var(--surface-popover-solid, var(--card));
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0, 0, 0, 0.28));
}

.shop-lang-popover h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.shop-lang-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-lang-btn {
  padding: 8px 12px;
  border: 1px solid var(--line-subtle);
  border-radius: 10px;
  background: var(--bg-soft, var(--surface-muted));
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-secondary, var(--text));
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.shop-lang-btn:hover,
.shop-lang-btn.is-active {
  background: var(--primary-a20, rgba(13, 122, 106, 0.15));
  border-color: var(--accent-a35, var(--accent));
  color: var(--accent-text, var(--accent));
}

.shop-cart-trigger {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 52px;
  padding: 6px 8px 2px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

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

.shop-cart-trigger-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shop-cart-trigger-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.shop-icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.shop-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.shop-icon-btn svg {
  width: 18px;
  height: 18px;
}

.shop-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shop-link-btn {
  display: none;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-items: center;
}

.shop-link-btn:hover {
  background: var(--bg-elevated);
}

/* Catalog */
.shop-catalog {
  padding: clamp(24px, 3vw, 36px) clamp(16px, 4vw, 48px) 48px;
}

.shop-catalog-panel {
  margin-top: 4px;
  min-height: 280px;
}

.shop-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  flex-shrink: 0;
}

.shop-toolbar {
  display: block;
  margin-bottom: 14px;
}

.shop-search-wrap {
  position: relative;
}

.shop-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  pointer-events: none;
}

.shop-input,
.shop-select,
.shop-textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.shop-search-wrap .shop-input {
  padding-left: 42px;
}

.shop-textarea {
  min-height: 96px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  resize: vertical;
}

.shop-input:focus,
.shop-select:focus,
.shop-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.08);
}

.is-hidden {
  display: none !important;
}

.shop-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.shop-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.shop-table th,
.shop-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.shop-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg-soft);
}

.shop-table tbody tr:hover {
  background: var(--hover-bg);
}

.shop-table tbody tr.is-out {
  opacity: 0.72;
}

.shop-table-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
}

.shop-table-thumb--empty {
  color: var(--text-faint);
  font-size: 18px;
}

.shop-table-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.shop-table-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.shop-stock-out {
  color: var(--danger);
  font-weight: 600;
}

.shop-btn-sm {
  padding: 10px 14px;
  font-size: 11px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.shop-grid.is-loading {
  min-height: 220px;
}

.shop-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  width: 100%;
}

.shop-skeleton-card {
  aspect-ratio: 0.82;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--bg-soft) 0%, var(--shop-skeleton-mid) 45%, var(--bg-soft) 100%);
  background-size: 200% 100%;
  animation: shop-skeleton-shimmer 1.2s ease-in-out infinite;
}

@keyframes shop-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Marketplace product cards */
.market-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.market-card:hover,
.market-card:focus-visible {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  outline: none;
}

.market-card.is-out {
  opacity: 0.78;
}

.market-card-media {
  position: relative;
  aspect-ratio: 1;
  background: var(--shop-media-bg);
  overflow: hidden;
}

.market-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.market-card:hover .market-card-media img {
  transform: scale(1.03);
}

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

.market-card-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--shop-chip-bg);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
}

.market-card-tag--out {
  background: var(--danger-bg);
  color: var(--danger);
}

.market-card-quick {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.market-card-quick svg {
  width: 16px;
  height: 16px;
}

.market-card-quick span {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.market-card-quick:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.market-card-body {
  padding: 12px 12px 14px;
  display: grid;
  gap: 6px;
}

.market-card-category {
  display: inline-block;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.market-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.market-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.market-card-price {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.market-card-variants {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

.market-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.market-card-promo {
  font-size: 12px;
  font-weight: 600;
  color: var(--shop-promo-text);
}

.market-card-hover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.market-card:hover .market-card-hover,
.market-card:focus-within .market-card-hover {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.market-card-hover button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* Product preview modal */
.shop-preview {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2vh, 24px);
  overflow: auto;
}

.shop-preview[hidden] {
  display: none !important;
}

.shop-preview-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop, rgba(15, 23, 42, 0.55));
}

.shop-preview-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: min(720px, calc(100vh - 24px));
  margin: 0;
  --preview-bg: var(--bg-elevated);
  --preview-soft: var(--bg-soft);
  --preview-text: var(--text);
  --preview-muted: var(--text-muted);
  --preview-faint: var(--text-faint);
  --preview-line: var(--line);
  --preview-line-strong: var(--line-strong);
  --preview-pill-bg: #f3f4f6;
  --preview-pill-muted: #9ca3af;
  --preview-pill-border: #cbd5e1;
  --preview-pill-available-bg: var(--preview-bg);
  color: var(--preview-text);
  background: var(--preview-bg);
  border: 1px solid var(--preview-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-modal);
}

html.theme-dark .shop-preview-dialog {
  --preview-pill-bg: rgba(255, 255, 255, 0.06);
  --preview-pill-muted: rgba(255, 255, 255, 0.38);
  --preview-pill-border: rgba(255, 255, 255, 0.14);
  --preview-pill-available-bg: var(--surface-raised);
}

.shop-preview-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 1px solid var(--preview-line);
  border-radius: 999px;
  background: var(--preview-bg);
  color: var(--preview-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.shop-preview-close:hover {
  background: var(--preview-soft);
}

.shop-preview-body {
  display: grid;
  grid-template-columns: minmax(240px, 380px) minmax(0, 1fr) minmax(260px, 320px);
  gap: 0;
  min-height: 0;
  max-height: min(720px, calc(100vh - 24px));
  overflow: auto;
  background: var(--preview-bg);
  align-items: stretch;
}

.shop-preview-gallery {
  padding: 24px;
  border-right: 1px solid var(--preview-line);
  background: var(--preview-bg);
}

.shop-preview-main {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--shop-media-bg);
  border: 1px solid var(--preview-line);
}

.shop-preview-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-preview-noimg {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--preview-faint);
}

.shop-preview-info {
  padding: 28px 24px;
  border-right: 1px solid var(--preview-line);
  background: var(--preview-bg);
  min-width: 0;
}

.shop-preview-info h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  line-height: 1.25;
  color: var(--preview-text);
}

.shop-preview-sold {
  font-size: 13px;
  color: var(--preview-muted);
  margin-bottom: 16px;
}

.shop-preview-price {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--preview-text);
}

.shop-preview-promo {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--shop-promo-bg);
  color: var(--shop-promo-text);
  font-size: 13px;
  font-weight: 600;
}

.shop-preview-picker {
  margin-top: 20px;
  display: grid;
  gap: 22px;
}

.shop-preview-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.shop-preview-option-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--preview-text);
}

.shop-preview-option-label strong {
  font-weight: 700;
}

.shop-preview-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-preview-swatch {
  width: 52px;
  height: 52px;
  padding: 3px;
  border: 2px solid var(--preview-line-strong);
  border-radius: 8px;
  background: var(--preview-soft);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shop-preview-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.shop-preview-swatch-dot {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.shop-preview-swatch:hover {
  border-color: var(--accent);
}

.shop-preview-swatch.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.shop-preview-swatch.is-cross-muted:not(.is-active) {
  opacity: 0.72;
}

.shop-preview-swatch.is-soldout:not(.is-active) {
  opacity: 0.55;
}

.shop-preview-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-preview-pill {
  min-width: 44px;
  padding: 8px 14px;
  border: 1px dashed var(--preview-pill-border);
  border-radius: 8px;
  background: var(--preview-pill-bg);
  color: var(--preview-pill-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.shop-preview-size-pills {
  gap: 10px;
}

.shop-preview-color-pills {
  gap: 10px;
}

.shop-preview-size-pill {
  min-width: 52px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.shop-preview-color-pill {
  min-width: 48px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}

.shop-preview-pill.is-available:not(.is-active) {
  border: 2px solid var(--preview-text);
  background: var(--preview-pill-available-bg);
  color: var(--preview-text);
  font-weight: 700;
  box-shadow: none;
}

.shop-preview-color-pill.is-available:not(.is-active) {
  border: 1px solid var(--preview-text);
  background: var(--preview-pill-available-bg);
  color: var(--preview-text);
  font-weight: 700;
  box-shadow: none;
}

.shop-preview-pill.is-available:not(.is-active):hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.shop-preview-color-pill.is-available:not(.is-active):hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  box-shadow: none;
  transform: none;
}

.shop-preview-pill.is-active {
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  box-shadow: var(--primary-shadow-sm);
}

.shop-preview-color-pill.is-active {
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: none;
}

.shop-preview-pill.is-unavailable:not(.is-active) {
  border: 1px dashed var(--preview-pill-border);
  background: var(--preview-pill-bg);
  color: #b0b7c3;
  font-weight: 500;
  cursor: pointer;
}

.shop-preview-color-pill.is-unavailable:not(.is-active) {
  border: 1px dashed var(--preview-pill-border);
  background: var(--preview-pill-bg);
  color: #b0b7c3;
  font-weight: 500;
}

.shop-preview-pill.is-cross-muted:not(.is-active) {
  opacity: 1;
  border-style: dashed;
}

.shop-preview-pill.is-soldout:not(.is-active) {
  opacity: 1;
  text-decoration: line-through;
  text-decoration-color: var(--preview-faint);
}

.shop-preview-pill.is-unavailable.is-soldout:not(.is-active) {
  color: #c0c7d2;
}

.shop-preview-pill:hover:not(.is-unavailable):not(.is-active),
.shop-preview-pill.is-unavailable:not(.is-active):hover {
  border-color: var(--preview-faint);
}

.shop-preview-buy {
  padding: 20px;
  background: var(--preview-soft);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.shop-preview-buy-box {
  position: static;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--preview-line);
  border-radius: 12px;
  background: var(--preview-bg);
}

.shop-preview-store {
  font-size: 14px;
  color: var(--preview-muted);
}

.shop-preview-service {
  display: grid;
  gap: 10px;
  font-size: 13px;
  color: var(--preview-text);
}

.shop-preview-service div {
  display: grid;
  gap: 2px;
}

.shop-preview-service span {
  color: var(--preview-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.shop-preview-service strong {
  color: var(--preview-text);
  font-weight: 600;
}

.shop-preview-stock {
  font-size: 13px;
  color: var(--preview-muted);
}

.shop-preview-qty {
  display: grid;
  gap: 8px;
}

.shop-preview-qty > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--preview-text);
}

.shop-preview-qty-controls {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--preview-line-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--preview-bg);
}

.shop-preview-qty-controls button {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--preview-text);
  font-size: 18px;
  cursor: pointer;
}

.shop-preview-qty-controls input {
  width: 56px;
  height: 40px;
  border: 0;
  border-left: 1px solid var(--preview-line);
  border-right: 1px solid var(--preview-line);
  text-align: center;
  font: inherit;
  font-weight: 700;
  color: var(--preview-text);
  background: transparent;
}

.shop-preview-add,
.shop-preview-checkout {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.shop-preview-add {
  border: 0;
  background: var(--shop-checkout);
  color: #fff;
}

.shop-preview-add:hover:not(:disabled) {
  background: var(--shop-checkout-hover);
}

.shop-preview-add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shop-preview-checkout {
  border: 1px solid var(--preview-line-strong);
  background: var(--preview-bg);
  color: var(--preview-text);
}

body.shop-preview-open {
  overflow: hidden;
}

body.shop-preview-open .shop-header {
  pointer-events: none;
}

/* Product card (legacy) */
.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.shop-card.out-of-stock {
  opacity: 0.72;
}

.shop-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-soft);
}

.shop-card-thumb,
.shop-card-media .shop-card-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.shop-card:hover .shop-card-thumb img {
  transform: scale(1.05);
}

.shop-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--shop-chip-bg);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-card-badge.sold-out {
  background: var(--danger-bg);
  color: var(--danger);
}

.shop-card-quick {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.shop-card:hover .shop-card-quick,
.shop-card:focus-within .shop-card-quick {
  opacity: 1;
  transform: translateY(0);
}

.shop-card-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.shop-card-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.shop-card-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
}

.shop-card-sku {
  font-size: 12px;
  color: var(--text-muted);
}

.shop-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}

.shop-card-price {
  font-size: 15px;
  font-weight: 700;
}

.shop-card-in-cart {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Buttons */
.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.shop-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.shop-btn-primary,
.shop-card-quick .shop-btn {
  width: 100%;
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.shop-btn-primary:hover:not(:disabled),
.shop-card-quick .shop-btn:hover:not(:disabled) {
  background: var(--accent-soft);
}

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

.shop-btn-ghost {
  border-color: var(--line-strong);
  background: var(--bg-elevated);
}

/* Cart full page */
.shop-cart-page {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  visibility: hidden;
}

.shop-cart-page.open {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.shop-cart-page-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
}

.shop-cart-page-top h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
}

.shop-back-btn {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
}

.shop-cart-page-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 420px);
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

.shop-cart-page-items-wrap {
  overflow: auto;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 4vw, 48px);
  border-right: 1px solid var(--line);
}

.shop-cart-pay {
  overflow: auto;
  padding: clamp(20px, 3vw, 28px);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shop-pay-summary h3,
.shop-pay-form h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
}

.shop-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.shop-pay-row strong {
  color: var(--text);
  font-weight: 600;
}

.shop-pay-row-total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--text);
}

.shop-pay-row-total strong {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
}

.shop-pay-note {
  margin: -6px 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.shop-pay-form[hidden],
.shop-pay-empty[hidden] {
  display: none !important;
}

.shop-pay-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-muted);
}

.shop-pay-empty p {
  margin: 0 0 14px;
}

.shop-btn-checkout {
  background: var(--shop-checkout);
  border-color: var(--shop-checkout);
  font-size: 15px;
  padding: 16px 20px;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.shop-btn-checkout:hover:not(:disabled) {
  background: var(--shop-checkout-hover);
  border-color: var(--shop-checkout-hover);
}

body.shop-cart-open {
  overflow: hidden;
}

/* Cart backdrop */
.shop-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--overlay-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.shop-cart-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.shop-cart-items {
  flex: 1;
  overflow: auto;
  scrollbar-width: none;
}

.shop-cart-items::-webkit-scrollbar {
  display: none;
}

.shop-cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.shop-cart-item:last-child {
  border-bottom: none;
}

.shop-cart-item-thumb {
  width: 72px;
  height: 88px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-soft);
  flex-shrink: 0;
}

.shop-cart-item-thumb--empty {
  display: block;
}

.shop-cart-item-info {
  flex: 1;
  min-width: 0;
}

.shop-cart-item-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.shop-cart-item-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
}

.shop-cart-item-price-actions {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 8px;
}

.shop-line-total {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.shop-cart-item-meta-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.shop-meta-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.shop-meta-x {
  font-size: 12px;
  color: var(--text-faint);
}

.shop-qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.shop-qty-input {
  width: 48px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-align: center;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-elevated);
  -moz-appearance: textfield;
}

.shop-qty-input::-webkit-outer-spin-button,
.shop-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.shop-remove-btn {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 999px;
  background: var(--danger-bg);
  color: var(--danger);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shop-remove-btn svg {
  width: 14px;
  height: 14px;
}

.shop-cart-footer {
  padding: 18px 22px 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, var(--surface-subtle));
  display: grid;
  gap: 12px;
}

.shop-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.shop-total span:first-child {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.shop-total span:last-child {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
}

.shop-empty {
  grid-column: 1 / -1;
  padding: 56px 16px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.shop-empty strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text);
  font-weight: 600;
}

.shop-empty p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.shop-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.35;
}

/* Footer */
.shop-footer {
  padding: 28px clamp(16px, 4vw, 48px) 36px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}

.shop-footer strong {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  font-weight: 600;
}

/* Modals */
.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--modal-backdrop);
  backdrop-filter: blur(4px);
}

.shop-modal.show {
  display: flex;
}

.shop-modal-card {
  width: min(460px, 100%);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.shop-modal-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
}

.shop-modal-sub {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.shop-form-group {
  margin-bottom: 14px;
}

.shop-form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.shop-form-group .shop-input,
.shop-form-group .shop-textarea {
  border-radius: var(--radius-sm);
}

.shop-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.shop-success {
  text-align: center;
}

/* POS thermal slip (matches mobile receipt.ts) */
.shop-slip-modal {
  width: min(420px, 100%);
  padding: 20px;
}

.shop-slip-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  max-height: min(62vh, 520px);
  overflow: auto;
}

.shop-slip-preview-wrap .pos-slip-print {
  width: 58mm;
  min-width: 58mm;
  padding: 4mm;
  background: #fff;
  color: #000;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.shop-slip-preview-wrap .pos-slip-print .center {
  text-align: center;
}

.shop-slip-preview-wrap .pos-slip-print .shop-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.shop-slip-preview-wrap .pos-slip-print .divider {
  border-top: 1px dashed #000;
  margin: 6px 0;
}

.shop-slip-preview-wrap .pos-slip-print table {
  width: 100%;
  border-collapse: collapse;
}

.shop-slip-preview-wrap .pos-slip-print td {
  padding: 3px 0;
  vertical-align: top;
}

.shop-slip-preview-wrap .pos-slip-print .total-row td {
  font-weight: 700;
  font-size: 13px;
  padding-top: 6px;
}

.shop-slip-preview-wrap .pos-slip-print .footer {
  margin-top: 8px;
  font-size: 10px;
}

.shop-slip-preview-wrap .pos-slip-print small {
  font-size: 9px;
  color: #333;
  display: block;
}

.shop-slip-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.shop-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: var(--shop-success-bg);
  color: var(--shop-success-text);
  display: grid;
  place-items: center;
  font-size: 28px;
}

.shop-success p {
  margin: 12px 0 0;
  color: var(--text-muted);
  white-space: pre-line;
  line-height: 1.6;
}

.shop-mobile-cart-btn {
  display: inline-flex;
}

@media (min-width: 768px) {
  .shop-header-toolbar .shop-header-staff {
    display: inline-flex;
  }
}

@media (max-width: 900px) {
  .shop-header {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 10px 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .shop-header-search {
    grid-column: 1 / -1;
    max-width: none;
  }

  .shop-header-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .shop-brand {
    grid-column: 1;
  }

  .shop-header-actions .shop-view-toggle {
    display: none;
  }

  .shop-header-toolbar-divider {
    display: none;
  }
}

@media (max-width: 960px) {
  .shop-preview-body {
    grid-template-columns: 1fr;
  }

  .shop-preview-gallery,
  .shop-preview-info,
  .shop-preview-buy {
    border-right: 0;
    border-bottom: 1px solid var(--preview-line, var(--line));
  }

  .shop-preview-buy-box {
    position: static;
  }
}

@media (max-width: 768px) {
  .shop-cart-page-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .shop-cart-page-items-wrap,
  .shop-checkout-main {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .market-card-title {
    font-size: 12px;
    min-height: 2.5em;
  }

  .market-card-price {
    font-size: 16px;
  }

  .market-card-hover {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    position: static;
    padding: 0 10px 10px;
  }

  .market-card-hover button {
    min-height: 36px;
    font-size: 12px;
  }

  .shop-table-wrap {
    border-radius: var(--radius-sm);
  }

  .shop-table {
    min-width: 0;
  }

  .shop-table thead {
    display: none;
  }

  .shop-table tr {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  .shop-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 0;
    border: 0;
  }

  .shop-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
  }

  .shop-table td[data-label="Photo"] {
    grid-template-columns: 1fr;
  }

  .shop-table td[data-label="Photo"]::before {
    display: none;
  }

  .shop-card-name {
    font-size: 18px;
  }

  .shop-card-quick {
    opacity: 1;
    transform: none;
    position: static;
    padding: 0 16px 16px;
  }

  .shop-card-body {
    padding-bottom: 0;
  }
}

/* Checkout flow — Hexcy-style steps */
.shop-checkout-steps {
  padding: 0 clamp(16px, 4vw, 48px) 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
}

.shop-checkout-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.shop-checkout-step {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: default;
}

.shop-checkout-step::after {
  content: '›';
  margin-left: 10px;
  color: var(--text-faint, #94a3b8);
  font-weight: 400;
}

.shop-checkout-step:last-child::after {
  content: none;
}

.shop-checkout-step.is-active {
  color: var(--shop-checkout, var(--primary));
}

.shop-checkout-step.is-done {
  color: var(--text);
  cursor: pointer;
}

.shop-checkout-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 4vw, 48px);
  border-right: 1px solid var(--line);
}

.shop-checkout-panel[hidden] {
  display: none !important;
}

.shop-checkout-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.shop-checkout-panel-head h3,
.shop-checkout-panel > h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
}

.shop-quick-reorder-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--shop-checkout, var(--primary));
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}

.shop-quick-reorder-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--primary-a25, rgba(5, 128, 109, 0.25));
  background: var(--primary-a8, rgba(5, 128, 109, 0.08));
}

.shop-checkout-empty {
  text-align: center;
  padding: 48px 16px 24px;
}

.shop-checkout-empty[hidden] {
  display: none !important;
}

.shop-checkout-empty-icon {
  font-size: 56px;
  margin-bottom: 12px;
  opacity: 0.85;
}

.shop-checkout-empty h4 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.shop-checkout-empty p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.shop-checkout-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.shop-checkout-nav[hidden] {
  display: none !important;
}

.shop-delivery-options {
  display: grid;
  gap: 10px;
}

.shop-delivery-option,
.shop-payment-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
}

.shop-payment-card.is-selected,
.shop-delivery-option:has(input:checked) {
  border-color: var(--shop-checkout, var(--primary));
  box-shadow: 0 0 0 1px var(--primary-a12, rgba(5, 128, 109, 0.12));
  background: var(--primary-a8, rgba(5, 128, 109, 0.08));
}

.shop-payment-card input,
.shop-delivery-option input {
  accent-color: var(--shop-checkout, var(--primary));
}

.shop-payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.shop-payment-card-label {
  font-weight: 600;
  font-size: 14px;
}

.shop-delivery-option-text {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.shop-delivery-option-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.shop-delivery-option-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.shop-delivery-option-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--shop-checkout, var(--primary));
}

.shop-delivery-fee {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.shop-payment-details {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.shop-payment-account {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--primary-a8, rgba(5, 128, 109, 0.08));
  border: 1px solid var(--primary-a15, rgba(5, 128, 109, 0.15));
  margin-bottom: 16px;
}

.shop-payment-account-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.shop-payment-account-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 4px 0;
}

.shop-payment-account-row strong {
  text-align: right;
  word-break: break-all;
}

.shop-payment-upload {
  display: grid;
  gap: 10px;
}

.shop-upload-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px dashed var(--line-strong, var(--line));
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.shop-upload-drop.is-dragover {
  border-color: var(--shop-checkout, var(--primary));
  background: var(--primary-a8, rgba(5, 128, 109, 0.08));
}

.shop-upload-name {
  font-size: 13px;
  color: var(--text-muted);
}

.shop-btn-sm {
  padding: 8px 12px;
  font-size: 13px;
}

.shop-payment-proof-preview {
  margin-top: 4px;
}

.shop-payment-proof-preview img {
  max-width: 100%;
  max-height: 180px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.shop-proof-file {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted, #f5f5f5);
  font-size: 13px;
}

.shop-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.shop-form-group .req {
  color: var(--shop-checkout, var(--primary));
}

.shop-summary-items {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.shop-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.shop-summary-item strong {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.shop-checkout-review {
  display: grid;
  gap: 16px;
}

.shop-review-block {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.shop-review-block h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.shop-review-block p {
  margin: 0;
  line-height: 1.5;
}

.shop-review-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px dashed var(--line);
  font-size: 14px;
}

.shop-review-line:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.shop-cart-page-body.is-empty {
  grid-template-columns: 1fr;
}

.shop-cart-page-body.is-empty .shop-cart-pay {
  display: none;
}

.shop-cart-page-body.is-empty .shop-checkout-main {
  border-right: 0;
}

@media (max-width: 960px) {
  .shop-cart-page-body {
    grid-template-columns: 1fr;
  }

  .shop-checkout-main {
    border-right: 0;
  }

  .shop-cart-pay {
    border-top: 1px solid var(--line);
  }
}
