:root {
  --cs-primary: #2563EB;
  --cs-accent: #10B981;
  --cs-sale: #EF4444;
  --cs-bg: #F8FAFC;
  --cs-card: #FFFFFF;
  --cs-text: #0F172A;
  --cs-muted: #64748B;
  --cs-border: rgba(15, 23, 42, 0.08);
  --cs-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --cs-glass: rgba(255, 255, 255, 0.85);
  --cs-radius: 18px;
    --cs-filter-sticky-top: 140px;
    --cs-bottom-nav-height: 0px;
    --cs-safe-bottom: env(safe-area-inset-bottom, 0px);
}

body.dark-mode {
  --cs-bg: #0F172A;
  --cs-card: #1e293b;
  --cs-text: #f8fafc;
  --cs-muted: #94a3b8;
  --cs-border: rgba(248, 250, 252, 0.08);
  --cs-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --cs-glass: rgba(15, 23, 42, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--cs-bg);
  color: var(--cs-text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.cs-page { min-height: 100vh; }

.cs-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 14px 8px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  background: var(--cs-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--cs-border);
}
.cs-header.scrolled {
  background: var(--cs-card);
  box-shadow: var(--cs-shadow);
}

/* Mobile: logo+cart row, then search row */
.cs-header-main {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "logo actions"
    "search search";
  align-items: center;
  gap: 8px 10px;
}
.cs-logo {
  grid-area: logo;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  color: inherit;
}
.cs-logo-img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 12px;
}
.cs-header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cs-search-row {
  grid-area: search;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.cs-filter-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  height: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--cs-border);
  border-radius: 12px;
  background: var(--cs-card);
  color: var(--cs-text);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  position: relative;
}
.cs-filter-toggle svg { color: var(--cs-primary); flex-shrink: 0; }
.cs-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cs-accent);
}
.cs-icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  background: var(--cs-card);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--cs-sale);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-filter-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--cs-primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.cs-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cs-muted);
  font-size: 15px;
  pointer-events: none;
}
.cs-search-input {
  width: 100%;
  height: 44px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--cs-border);
  border-radius: 12px;
  background: var(--cs-card);
  color: var(--cs-text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.cs-search-input:focus { border-color: var(--cs-primary); }

.cs-category-bar {
  width: 100%;
  padding: 4px 0 0;
}

.cs-category-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: clamp(4px, 1vw, 8px);
  width: 100%;
}

.cs-category-widget {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px 3px;
  border: 1px solid var(--cs-border);
  border-radius: 9px;
  background: var(--cs-card);
  color: #0f172a;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s, color .15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cs-category-widget:hover {
  border-color: var(--cat-tint, var(--cs-primary));
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.cs-category-widget.active {
  border-color: var(--cat-tint, var(--cs-primary));
  background: color-mix(in srgb, var(--cat-tint, var(--cs-primary)) 12%, var(--cs-card));
  box-shadow: 0 2px 10px color-mix(in srgb, var(--cat-tint, var(--cs-primary)) 14%, transparent);
  color: #0f172a;
}

.cs-category-icon {
  width: clamp(22px, 5.5vw, 28px);
  height: clamp(22px, 5.5vw, 28px);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--cat-tint, var(--cs-primary)) 14%, var(--cs-card));
  color: var(--cat-tint, var(--cs-primary));
}

.cs-category-icon svg {
  width: clamp(12px, 3.4vw, 15px);
  height: clamp(12px, 3.4vw, 15px);
}

.cs-category-label {
  font-size: clamp(10px, 2.2vw, 12px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1.15;
  width: 100%;
  padding: 0 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}

.cs-layout {
  display: flex;
  flex-direction: column;
}

.cs-filters-sidebar {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.cs-filters-sidebar.open {
  opacity: 1;
  pointer-events: auto;
}
.cs-filters-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cs-card);
  border-radius: 18px 18px 0 0;
  padding: 16px 16px 0;
  box-shadow: var(--cs-shadow);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.cs-filters-sidebar.open .cs-filters-panel {
  transform: translateY(0);
}
.cs-filters-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
  padding: 0 0 0 0;
}
.cs-filters-head-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cs-filters-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cs-filters-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--cs-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.cs-filters-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}
.cs-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cs-filter-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cs-muted);
}
.cs-filters-fields select,
.cs-filters-fields input {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--cs-bg);
  border: 1px solid var(--cs-border);
  border-radius: 12px;
  color: var(--cs-text);
  outline: none;
  font-family: inherit;
}
.cs-filters-fields select:focus,
.cs-filters-fields input:focus { border-color: var(--cs-primary); }
.filter-price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-price-range input { flex: 1; min-width: 0; }
.filter-price-range span {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--cs-muted);
}
.cs-filter-clear {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--cs-border);
  border-radius: 12px;
  background: transparent;
  color: var(--cs-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.cs-filter-clear:hover { border-color: var(--cs-primary); color: var(--cs-primary); }

.cs-collection-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-collection-chip {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid var(--cs-border);
  border-radius: 999px;
  background: var(--cs-surface);
  color: var(--cs-text);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.cs-collection-chip:hover {
  border-color: var(--cs-primary);
  color: var(--cs-primary);
}

.cs-collection-chip.active {
  background: var(--cs-primary);
  border-color: var(--cs-primary);
  color: #fff;
}

.cs-main {
  padding: 12px 14px 32px;
  flex: 1;
  min-width: 0;
}

.cs-results-meta {
  font-size: 12px;
  color: var(--cs-muted);
  font-weight: 500;
  line-height: 1.3;
}

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

.cs-product-card {
  position: relative;
  background: var(--cs-card);
  border-radius: var(--cs-radius);
  box-shadow: var(--cs-shadow);
  overflow: hidden;
  border: 1px solid var(--cs-border);
  cursor: pointer;
}
.cs-product-open { cursor: pointer; }
.cs-product-media {
  position: relative;
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(16,185,129,0.06));
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}
.cs-product-img {
  width: 100%;
  max-width: 160px;
  height: 120px;
  object-fit: contain;
  border-radius: 12px;
}
.cs-img-placeholder {
  font-size: 48px;
  opacity: 0.4;
}
.cs-product-body { padding: 14px 16px 16px; }

@media (max-width: 767px) {
  .cs-product-media { min-height: 100px; padding: 10px; }
  .cs-product-img { height: 90px; max-width: 120px; }
  .cs-product-body { padding: 10px 10px 12px; }
  .cs-product-title { font-size: 12px; margin: 2px 0 6px; }
  .cs-product-chips { gap: 3px; margin-bottom: 8px; flex-wrap: nowrap; }
  .cs-chip { font-size: 8px; padding: 2px 5px; }
  .cs-pay-btn { padding: 5px 2px; }
  .cs-pay-lbl { font-size: 7px; }
  .cs-pay-amt { font-size: 8px; }
  .cs-btn { padding: 8px 4px; font-size: 10px; }
  .cs-product-actions .cs-btn-share { flex: 0 0 28px; width: 28px; min-width: 28px; }
}
.cs-product-brand {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cs-primary);
}
.cs-product-title {
  font-size: 15px;
  font-weight: 700;
  margin: 4px 0 8px;
  line-height: 1.3;
}
.cs-product-chips {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  min-width: 0;
}
.cs-chip {
  flex: 1 1 0;
  min-width: 0;
  padding: 3px 6px;
  border-radius: 99px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--cs-primary);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.cs-chip-market {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.cs-chip-store {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.cs-chip-preorder {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.28);
}
.market-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs-pay-row {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.cs-pay-row-single .cs-pay-btn { flex: 1 1 100%; }
.cs-pay-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 3px;
  border-radius: 10px;
  border: 1.5px solid var(--cs-border);
  background: var(--cs-card);
  color: var(--cs-text);
  font-family: inherit;
  cursor: pointer;
}
.cs-pay-btn.active {
  border-color: var(--cs-primary);
  background: rgba(37, 99, 235, 0.1);
}
.cs-pay-btn.cs-pay-offer.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}
.cs-pay-lbl {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--cs-muted);
  display: flex;
  align-items: center;
  gap: 2px;
}
.cs-pay-offer-icon { color: #f59e0b; }
.cs-pay-amt { font-size: 9px; font-weight: 700; }

.cs-pd-payment-wrap .cs-pay-btn {
  padding: 10px 6px;
  gap: 3px;
}

.cs-pd-payment-wrap .cs-pay-amt {
  font-size: 13px;
}

.cs-pay-installment-mult {
  font-size: 0.85em;
  font-weight: 600;
  color: var(--cs-muted);
}

.cs-product-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}
.cs-product-actions .cs-btn-cart,
.cs-product-actions .cs-btn-buy { flex: 1 1 0; min-width: 0; }
.cs-product-actions .cs-btn-share {
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}
.cs-btn {
  padding: 10px 6px;
  border-radius: 14px;
  border: none;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.cs-btn-cart {
  background: rgba(37, 99, 235, 0.1);
  color: var(--cs-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.cs-btn-cart.in-cart { background: var(--cs-primary); color: #fff; }
.cs-btn-buy { background: var(--cs-accent); color: #fff; }
.cs-btn-share {
  background: var(--cs-card);
  color: var(--cs-primary);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.cs-empty { padding: 48px 20px; text-align: center; color: var(--cs-muted); }

.cs-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 0;
  flex-wrap: wrap;
  width: 100%;
}
.cs-pagination-btn {
  padding: 8px 14px;
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  background: var(--cs-card);
  color: var(--cs-text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.cs-pagination-btn:hover:not(:disabled) {
  border-color: var(--cs-primary);
  color: var(--cs-primary);
}
.cs-pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cs-pagination-info {
  font-size: 13px;
  font-weight: 600;
  color: var(--cs-muted);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal {
  background: var(--cs-card);
  border-radius: var(--cs-radius);
  padding: 20px;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--cs-muted);
}
.modal h2 { font-size: 18px; margin-bottom: 12px; }
.cs-buy-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.cs-form-field { display: flex; flex-direction: column; gap: 6px; }
.cs-form-field span { font-size: 12px; font-weight: 600; color: var(--cs-muted); }
.cs-form-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  background: var(--cs-bg);
  color: var(--cs-text);
}
.cs-form-field input:focus {
  outline: none;
  border-color: var(--cs-primary);
}
.cs-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.btn-outline {
  background: transparent;
  color: var(--cs-text);
  border: 1px solid var(--cs-border);
}
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: var(--cs-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-sm { padding: 4px 8px; font-size: 12px; }
.btn-danger { background: var(--cs-sale); }
.meta { font-size: 11px; color: var(--cs-muted); }
.cs-cart-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cs-border);
}
.cs-cart-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
}
.cs-cart-info { flex: 1; min-width: 0; }
.cs-cart-payment {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
}
.cs-cart-pay-label { font-weight: 600; color: var(--cs-primary); }
.cs-cart-pay-amt { font-weight: 700; color: var(--cs-accent); }
.cs-cart-payments { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cs-cart-pay-chip {
  font-size: 9px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.08);
}
.cs-cart-pay-chip-lbl {
  color: var(--cs-muted);
  text-transform: uppercase;
  font-size: 8px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cs-text);
  color: var(--cs-bg);
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  box-shadow: var(--cs-shadow);
}

@media (min-width: 768px) {
  .cs-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 24px 8px;
    width: 100%;
  }

  .cs-header-main {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo search actions";
    gap: 12px 16px;
  }

  .cs-logo {
    font-size: 20px;
  }

  .cs-logo-img {
    width: 40px;
    height: 40px;
  }

  .cs-search-row {
    max-width: none;
  }

  .cs-category-bar {
    padding-top: 6px;
  }

  .cs-category-widget {
    flex-direction: row;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 10px;
    min-height: 0;
  }

  .cs-category-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
  }

  .cs-category-icon svg {
    width: 13px;
    height: 13px;
  }

  .cs-category-label {
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
  }

  .cs-filter-toggle { display: none; }
  .cs-filters-close { display: none; }

  .cs-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px 32px;
  }

  .cs-filters-sidebar {
    position: relative;
    inset: unset;
    width: 260px;
    flex-shrink: 0;
    align-self: flex-start;
    background: transparent;
    opacity: 1;
    pointer-events: auto;
    z-index: auto;
    max-height: none;
  }

  .cs-filters-panel {
    position: fixed;
    top: var(--cs-filter-sticky-top);
    left: var(--cs-filter-fixed-left, 24px);
    width: var(--cs-filter-fixed-width, 260px);
    z-index: 40;
    transform: none;
    display: flex;
    flex-direction: column;
    max-height: none;
    overflow: visible;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    box-shadow: var(--cs-shadow);
    padding: 16px 16px 16px;
  }

  .cs-filters-fields {
    overflow: visible;
    padding-bottom: 0;
  }

  .cs-main {
    padding: 0;
    max-width: none;
  }

  .cs-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .cs-filters-sidebar { width: 280px; }
  .cs-product-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
}

/* Hide filters outside Electronics category */
.cs-filter-toggle[hidden],
.cs-filters-sidebar[hidden] {
  display: none !important;
}

.cs-layout-no-filters {
  flex-direction: column !important;
}

.cs-layout-no-filters .cs-main {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Staff cost badge (Centresouq staff view only) */
.cs-staff-cost {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 6px 0 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  font-size: 11px;
  line-height: 1.3;
}

.cs-staff-cost-label {
  color: #92400e;
  font-weight: 600;
}

.cs-staff-cost strong {
  color: #78350f;
  font-weight: 700;
}

.cs-staff-cost-vendor {
  width: 100%;
  font-size: 10px;
  color: #a16207;
}

/* Homepage */
.cs-homepage {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 12px 0 32px;
}

.cs-home-hero {
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 55%, #2563eb 100%);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.25);
}

.cs-home-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 200px;
}

@media (min-width: 768px) {
  .cs-home-hero-inner {
    grid-template-columns: 1fr 1fr;
    min-height: 280px;
  }
}

.cs-home-hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.cs-home-hero-img {
  max-height: 220px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.cs-home-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 28px 24px;
  color: #fff;
}

@media (min-width: 768px) {
  .cs-home-hero-content { padding: 40px 36px; }
}

.cs-home-hero-badge {
  display: inline-block;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs-home-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.cs-home-hero-text {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  max-width: 420px;
}

.cs-home-hero-cta {
  width: fit-content;
  margin-top: 4px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #1e40af;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cs-home-sub-banners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 640px) {
  .cs-home-sub-banners { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

.cs-home-sub-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 88px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.cs-home-sub-banner-title {
  font-size: 13px;
  font-weight: 700;
}

.cs-home-sub-banner-sub {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

.cs-home-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Homepage product rows: 3 per row on mobile, one even row on larger screens */
.cs-home-section .cs-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 12px);
}

.cs-home-section .cs-product-card {
  min-width: 0;
}

.cs-home-section .cs-product-media {
  min-height: clamp(72px, 22vw, 120px);
  padding: clamp(6px, 2vw, 14px);
}

.cs-home-section .cs-product-img {
  height: clamp(56px, 18vw, 110px);
  max-width: 100%;
}

.cs-home-section .cs-product-body {
  padding: clamp(6px, 2vw, 12px) clamp(6px, 2vw, 14px) clamp(8px, 2vw, 14px);
}

.cs-home-section .cs-product-brand {
  font-size: clamp(7px, 2vw, 10px);
}

.cs-home-section .cs-product-title {
  font-size: clamp(10px, 2.8vw, 14px);
  margin: 2px 0 4px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cs-home-section .cs-product-chips {
  gap: 3px;
  margin-bottom: 6px;
  flex-wrap: nowrap;
}

.cs-home-section .cs-chip {
  font-size: clamp(7px, 1.6vw, 9px);
  padding: 2px 4px;
}

.cs-home-section .cs-pay-row {
  gap: 2px;
  margin-bottom: 6px;
}

.cs-home-section .cs-pay-btn {
  padding: clamp(3px, 1vw, 6px) 2px;
  border-radius: 8px;
}

.cs-home-section .cs-pay-lbl {
  font-size: clamp(6px, 1.6vw, 8px);
}

.cs-home-section .cs-pay-amt {
  font-size: clamp(7px, 1.8vw, 9px);
}

.cs-home-section .cs-btn {
  padding: clamp(6px, 1.8vw, 9px) clamp(3px, 1vw, 6px);
  font-size: clamp(8px, 2.2vw, 11px);
}

.cs-home-section .cs-product-actions .cs-btn-share {
  flex: 0 0 clamp(24px, 7vw, 32px);
  width: clamp(24px, 7vw, 32px);
  min-width: clamp(24px, 7vw, 32px);
}

@media (min-width: 640px) {
  .cs-home-section .cs-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 1100px) {
  .cs-home-section .cs-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }
}

.cs-home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.cs-home-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.cs-home-section-sub {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

.cs-home-view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cs-browse-hub-page {
  padding-bottom: 8px;
}

.cs-browse-hub-hero {
  margin: 0 0 20px;
  padding: 20px 16px 8px;
}

.cs-browse-hub-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cs-text, #0f172a);
}

.cs-browse-hub-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--cs-muted, #64748b);
}

.cs-browse-hub-section .cs-subcat-grid {
  padding: 0 12px 4px;
}

.cs-browse-hub--shop {
  padding-top: 4px;
}

.cs-browse-hub--shop .cs-hub-collection,
.cs-browse-hub .cs-hub-collection,
.cs-browse-hub-section .cs-subcat-grid,
.cs-browse-hub .cs-subcat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
  padding: 4px 4px 16px;
  overflow: visible;
  flex-wrap: unset;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: auto;
}

.cs-browse-hub--shop .cs-subcat-widget,
.cs-browse-hub .cs-hub-collection .cs-subcat-widget,
.cs-browse-hub-section .cs-subcat-widget,
.cs-browse-hub .cs-subcat-widget {
  width: 100%;
  max-width: none;
  flex: unset;
  scroll-snap-align: unset;
}

.cs-browse-hub-section .cs-home-section-head,
.cs-browse-hub--shop .cs-browse-hub-hero {
  display: none;
}

.cs-hub-collection {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 12px 16px;
}

.cs-browse-hub--categories .cs-hub-collection {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 8px 4px 16px;
}

.cs-browse-hub--categories .cs-hub-tile {
  padding: 20px 12px;
  min-height: 120px;
}

.cs-browse-hub--categories .cs-hub-tile-media {
  width: 56px;
  height: 56px;
}

.cs-browse-hub--categories .cs-hub-tile-media svg {
  width: 30px;
  height: 30px;
}

.cs-browse-hub--categories .cs-hub-tile-label {
  font-size: 14px;
}

.cs-hub-collection-brands {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cs-hub-collection-brands .cs-subcat-widget {
  width: 100%;
}

.cs-hub-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px 8px;
  border: 1px solid color-mix(in srgb, var(--cat-tint, #2563eb) 22%, #e2e8f0);
  border-radius: 14px;
  background: color-mix(in srgb, var(--cat-tint, #2563eb) 8%, #fff);
  color: var(--cs-text, #0f172a);
  cursor: pointer;
  text-align: center;
}

.cs-hub-tile-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  color: var(--cat-tint, #2563eb);
}

.cs-hub-tile-media svg {
  width: 26px;
  height: 26px;
}

.cs-hub-tile-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .cs-hub-collection,
  .cs-hub-collection-brands {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cs-browse-hub--categories .cs-hub-collection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cs-subcat-bar {
  margin: 0;
  padding: 0;
}

.cs-catalog-with-subs .cs-subcat-bar {
  margin-bottom: 16px;
}

.cs-catalog-with-subs {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.cs-subcat-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: clamp(6px, 1.5vw, 12px);
  width: 100%;
}

.cs-subcat-widget {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--cs-text);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease;
  box-shadow: none;
}

.cs-subcat-widget:hover {
  transform: translateY(-2px);
}

.cs-subcat-widget.active .cs-subcat-media {
  border-color: var(--cs-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cs-primary) 22%, transparent);
}

.cs-subcat-media {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: clamp(8px, 2vw, 14px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cs-subcat-letter {
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 800;
  line-height: 1;
  color: var(--cs-primary);
}

.cs-subcat-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.cs-subcat-label {
  font-size: clamp(10px, 2.2vw, 13px);
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  line-height: 1.25;
  width: 100%;
  padding: 0 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cs-pd-subcats .cs-subcat-bar {
  margin-top: 0;
}

/* Product detail page */
.cs-product-detail-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cs-product-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cs-pd-toolbar {
  display: flex;
  align-items: center;
}

.cs-pd-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--cs-border);
  background: var(--cs-card);
  color: var(--cs-text);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, color .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cs-pd-back:hover {
  border-color: var(--cs-primary);
  color: var(--cs-primary);
}

.cs-pd-back-icon {
  font-size: 16px;
  line-height: 1;
}

.cs-pd-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

@media (min-width: 900px) {
  .cs-pd-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 32px;
  }
}

.cs-pd-media,
.cs-pd-panel {
  min-width: 0;
}

.cs-pd-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: calc(var(--cs-radius) + 4px);
  box-shadow: var(--cs-shadow);
  padding: 20px;
}

@media (min-width: 640px) {
  .cs-pd-panel {
    padding: 24px;
  }
}

/* Gallery — 3 side thumbs + 1 main */
.cs-pd-gallery {
  position: relative;
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: calc(var(--cs-radius) + 4px);
  box-shadow: var(--cs-shadow);
  padding: 12px;
}

.cs-pd-gallery-split {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  gap: 12px;
}

.cs-pd-main-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.04), rgba(16, 185, 129, 0.03));
  border-radius: 16px;
  min-height: 280px;
}

.cs-pd-main-img {
  width: 100%;
  max-height: min(520px, 62vh);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 16px;
}

.cs-pd-main-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 280px;
  font-size: 72px;
  opacity: 0.3;
}

.cs-pd-thumbs-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 76px;
  flex-shrink: 0;
}

.cs-pd-thumb {
  width: 76px;
  height: 76px;
  padding: 6px;
  border: 2px solid var(--cs-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.cs-pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.cs-pd-thumb.active,
.cs-pd-thumb:hover {
  border-color: var(--cs-text);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.cs-pd-thumb.active {
  transform: scale(1.02);
}

.cs-pd-cover-reset {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border: 1px solid var(--cs-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--cs-text);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.cs-pd-cover-reset.hidden {
  display: none;
}

.cs-pd-gallery-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--cs-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

@media (max-width: 599px) {
  .cs-pd-gallery-split {
    flex-direction: column-reverse;
  }

  .cs-pd-thumbs-col {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .cs-pd-thumb {
    flex-shrink: 0;
  }
}

/* Product info panel */
.cs-pd-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-pd-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cs-pd-brand {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--cs-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs-pd-stock {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.cs-pd-stock-in {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.cs-pd-stock-out {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.cs-pd-stock-preorder {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.cs-pd-title {
  margin: 0;
  font-size: clamp(24px, 4.5vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--cs-text);
}

.cs-pd-specs {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cs-muted);
}

.cs-pd-price-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.cs-pd-price-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.cs-pd-price-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cs-muted);
}

.cs-pd-price {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--cs-text);
  line-height: 1;
}

.cs-pd-price-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-pd-price-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  color: var(--cs-muted);
}

.cs-pd-price-chip-accent {
  color: var(--cs-primary);
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.06);
}

.cs-pd-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-pd-section-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cs-muted);
}

.cs-pd-section-hint {
  margin: -4px 0 0;
  font-size: 12px;
  color: var(--cs-muted);
}

.cs-pd-desc-body {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--cs-bg);
  border: 1px solid var(--cs-border);
}

.cs-pd-desc-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--cs-text);
  white-space: pre-wrap;
}

.cs-pd-payment-wrap .cs-pay-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 480px) {
  .cs-pd-payment-wrap .cs-pay-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cs-pd-payment-wrap .cs-pay-btn {
  min-height: 64px;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid var(--cs-border);
  background: var(--cs-bg);
}

.cs-pd-payment-wrap .cs-pay-btn.active {
  border-color: var(--cs-primary);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.cs-pd-payment-wrap .cs-pay-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cs-pd-payment-wrap .cs-pay-amt {
  font-size: 13px;
  font-weight: 800;
}

.cs-pd-buybar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--cs-card) 80%, transparent);
  padding-bottom: 2px;
}

.cs-pd-buybar-wish {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--cs-border);
  background: var(--cs-bg);
  font-size: 18px;
  cursor: pointer;
}

.cs-pd-buybar-cart {
  min-height: 44px;
  font-weight: 700;
}

.cs-pd-buybar-buy {
  min-height: 44px;
  font-weight: 700;
  padding-left: 18px;
  padding-right: 18px;
}

.cs-pd-buybar-share {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.cs-pd-related-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cs-pd-related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 12px);
}

@media (min-width: 640px) {
  .cs-pd-related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .cs-pd-related-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .cs-pd-related-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.cs-pd-related .cs-product-card,
.cs-pd-related .cs-product-actions .cs-btn {
  cursor: pointer;
}

.cs-pd-subcats {
  margin-top: 4px;
}

/* Shop chat widget */
.cs-chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cs-chat-panel {
  position: fixed;
  right: 18px;
  bottom: 80px;
  z-index: 81;
  width: min(360px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 100px));
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.cs-chat-panel.is-open {
  display: flex;
}
.cs-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  min-height: 44px;
}
.cs-chat-head .cs-chat-user {
  flex: 1;
  min-width: 0;
  padding: 0;
  border-bottom: none;
  background: transparent;
}
.cs-chat-head .cs-chat-user[hidden] {
  display: none !important;
}
.cs-chat-head .cs-chat-identity-summary {
  width: 100%;
}
.cs-chat-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  flex-shrink: 0;
  padding: 0 2px;
}
.cs-chat-cart[hidden] {
  display: none !important;
}
.cs-chat-cart {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  max-height: 120px;
  overflow: auto;
  background: #f8fafc;
}
.cs-chat-cart-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-chat-cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.cs-chat-cart-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.cs-chat-cart-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.cs-chat-cart-info { min-width: 0; flex: 1; }
.cs-chat-cart-title {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-chat-cart-meta {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-chat-cart-empty { margin: 0; font-size: 11px; color: #94a3b8; }
.cs-chat-identity {
  padding: 12px;
  display: grid;
  gap: 8px;
}
.cs-chat-identity[hidden],
.cs-chat-login[hidden],
.cs-chat-user[hidden],
.cs-chat-messages[hidden],
.cs-chat-compose[hidden],
.cs-chat-phone-hint[hidden],
.cs-chat-pending[hidden],
.cs-chat-stickers[hidden] {
  display: none !important;
}
.cs-chat-login {
  padding: 14px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}
.cs-chat-login-text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}
.cs-chat-login-btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  text-decoration: none;
}
.cs-chat-phone-hint {
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.cs-chat-phone-hint a {
  color: var(--cs-primary);
  font-weight: 600;
}
.cs-chat-user {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.cs-chat-head .cs-chat-user {
  padding: 0;
  border-bottom: none;
  background: transparent;
}
.cs-chat-identity-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
}
.cs-chat-identity-name {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-chat-identity-sep { color: #94a3b8; flex-shrink: 0; }
.cs-chat-identity-phone {
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-chat-identity input,
.cs-chat-compose input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}
.cs-chat-messages {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
}
.cs-chat-bubble {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.cs-chat-bubble.me {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
}
.cs-chat-bubble.staff {
  align-self: flex-start;
  background: #f1f5f9;
  color: #0f172a;
}
.cs-chat-compose {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 10px calc(8px + var(--cs-safe-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  background: #f0f2f5;
}
.cs-chat-compose-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.cs-chat-compose-pill {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px 4px 4px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.cs-chat-compose-pill #cs-chat-input,
.cs-chat-compose input[type="text"] {
  flex: 1;
  min-width: 0;
  width: auto;
  border: none !important;
  background: transparent;
  border-radius: 0;
  padding: 8px 4px;
  font-size: 15px;
  line-height: 1.3;
  color: #0f172a;
  outline: none;
  box-shadow: none;
}
.cs-chat-compose-pill #cs-chat-input::placeholder {
  color: #94a3b8;
}
.cs-chat-pill-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.cs-chat-pill-btn:hover,
.cs-chat-pill-btn.is-active {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}
.cs-chat-round-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: #1e293b;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}
.cs-chat-round-btn:hover {
  filter: brightness(1.08);
}
.cs-chat-round-btn.is-recording {
  background: #dc2626;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.35);
}
.cs-chat-send-round {
  background: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.cs-chat-send-round[hidden],
.cs-chat-round-btn[hidden] {
  display: none !important;
}
.cs-chat-compose .btn { white-space: nowrap; }
.cs-chat-icon-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.cs-chat-icon-btn:hover { background: #f8fafc; }
.cs-chat-icon-btn.is-recording {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}
.cs-chat-icon-btn.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.cs-chat-photo-wrap {
  position: relative;
  flex-shrink: 0;
}
.cs-chat-photo-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  left: auto;
  z-index: 30;
  min-width: 140px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.cs-chat-photo-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  color: #0f172a;
  cursor: pointer;
}
.cs-chat-photo-menu button:hover { background: #f1f5f9; }
.cs-chat-stickers {
  border-top: 1px solid #e2e8f0;
  padding: 8px 12px 10px;
  background: #f8fafc;
}
.cs-chat-stickers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: #64748b;
}
.cs-chat-stickers-head button {
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.cs-chat-stickers-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  max-height: 140px;
  overflow: auto;
}
.cs-chat-sticker-item {
  border: 0;
  background: transparent;
  border-radius: 10px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cs-chat-sticker-item:hover { background: #e2e8f0; }
.cs-chat-att-sticker {
  font-size: 42px;
  line-height: 1;
  margin-top: 2px;
  user-select: none;
}
.cs-chat-bubble-sticker {
  background: transparent !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
  box-shadow: none !important;
}
.cs-chat-pending-sticker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 28px;
}
.cs-chat-pending {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px 0;
  border-top: 1px solid #e2e8f0;
}
.cs-chat-pending-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.cs-chat-pending-item img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
}
.cs-chat-pending-audio {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 10px 0 12px;
  font-size: 12px;
  color: #475569;
}
.cs-chat-pending-item button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.cs-chat-att-photo {
  display: block;
  margin-top: 6px;
}
.cs-chat-att-photo img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(0,0,0,0.08);
}
.cs-chat-att-audio {
  display: block;
  width: 100%;
  max-width: 220px;
  margin-top: 6px;
  height: 36px;
}
.cs-chat-bubble.me .cs-chat-att-photo img {
  background: rgba(255,255,255,0.15);
}

a.cs-icon-btn {
  text-decoration: none;
  color: inherit;
}

.cs-wishlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cs-sale);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-wishlist-btn.active {
  background: #fff0f0;
}
.cs-wishlist-btn-inline {
  position: static;
  width: 36px;
  min-width: 36px;
  flex: 0 0 36px;
  box-shadow: none;
  border: 1px solid var(--cs-border);
}

/* Account page */
.cs-account-page {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.12), transparent),
    var(--cs-bg);
}
.cs-account-page .cs-account-header {
  grid-template-columns: 1fr auto;
  grid-template-areas: "logo actions";
}
.cs-account-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}
.cs-account-loading,
.cs-empty-inline {
  color: var(--cs-muted);
  padding: 24px 0;
}
.cs-account-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cs-account-hero-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: calc(var(--cs-radius) + 4px);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(16, 185, 129, 0.06) 100%);
  border: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.08);
}
.cs-account-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--cs-primary) 0%, #1d4ed8 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.cs-account-avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 20px;
  margin: 0 auto 12px;
}
.cs-account-hero-text {
  min-width: 0;
}
.cs-account-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.cs-account-sub {
  color: var(--cs-muted);
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
}
.cs-account-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  border-radius: 14px;
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  box-shadow: var(--cs-shadow);
  scrollbar-width: none;
}
.cs-account-tabs::-webkit-scrollbar {
  display: none;
}
.cs-account-tab,
.cs-auth-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--cs-muted);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  flex: 1 0 auto;
}
.cs-account-tab-icon {
  display: flex;
  opacity: 0.75;
}
.cs-account-tab.active .cs-account-tab-icon {
  opacity: 1;
}
.cs-account-tab.active,
.cs-auth-tab.active {
  background: var(--cs-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
@media (max-width: 420px) {
  .cs-account-tab-label {
    display: none;
  }
  .cs-account-tab {
    padding: 10px 12px;
    flex: 1;
  }
}
.cs-account-panel {
  animation: cs-account-fade 0.2s ease;
}
@keyframes cs-account-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.cs-account-card {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  padding: 20px;
  box-shadow: var(--cs-shadow);
}
.cs-account-card h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}
.cs-card-desc {
  color: var(--cs-muted);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.4;
}
.cs-account-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cs-border);
}
.cs-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}
.cs-profile-card .cs-account-card-head {
  margin-bottom: 8px;
  padding-bottom: 12px;
}
.cs-profile-group {
  margin-top: 12px;
  border-radius: 14px;
  background: var(--cs-bg);
  border: 1px solid var(--cs-border);
  overflow: hidden;
}
.cs-profile-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--cs-border);
  background: rgba(37, 99, 235, 0.04);
}
.cs-profile-group-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--cs-primary);
  flex-shrink: 0;
}
.cs-profile-group-head h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cs-muted);
}
.cs-profile-fields {
  padding: 4px 0;
}
.cs-profile-fields-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 560px) {
  .cs-profile-fields-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.cs-profile-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--cs-border);
}
.cs-profile-field:first-child {
  border-top: none;
}
.cs-profile-field-body {
  min-width: 0;
  flex: 1;
}
.cs-profile-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cs-muted);
  margin-bottom: 2px;
}
.cs-profile-field-value {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.cs-profile-field-value.is-empty {
  color: var(--cs-muted);
  font-weight: 500;
  font-style: italic;
}
.cs-profile-edit-btn {
  flex-shrink: 0;
  border: 1px solid var(--cs-border);
  background: var(--cs-card);
  color: var(--cs-primary);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cs-profile-edit-btn:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.25);
}
.cs-field select {
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--cs-bg);
  color: var(--cs-text);
  font: inherit;
}
.cs-profile-form .cs-auth-error {
  margin-top: 0;
}
.cs-account-auth-wrap {
  max-width: 420px;
  margin: 24px auto 0;
}
.cs-account-auth {
  text-align: center;
}
.cs-auth-brand {
  margin-bottom: 8px;
}
.cs-auth-tabs {
  display: flex;
  gap: 6px;
  margin: 20px 0 16px;
  padding: 4px;
  border-radius: 12px;
  background: var(--cs-bg);
  border: 1px solid var(--cs-border);
}
.cs-auth-tab {
  flex: 1;
}
.cs-auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.cs-auth-form.hidden {
  display: none;
}
.cs-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.cs-field input {
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--cs-bg);
  color: var(--cs-text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cs-field input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.cs-btn-block {
  width: 100%;
  justify-content: center;
}
.cs-btn-primary {
  background: var(--cs-primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.cs-btn-ghost {
  background: transparent;
  border: 1px solid var(--cs-border);
  color: var(--cs-text);
}
.cs-auth-error {
  color: var(--cs-sale);
  font-size: 13px;
  margin-top: 10px;
}
.cs-auth-error.hidden {
  display: none;
}
.cs-google-auth {
  margin: 4px 0 16px;
}
.cs-google-signin-host {
  display: flex;
  justify-content: center;
  min-height: 44px;
}
.cs-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 4px;
  color: var(--cs-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cs-auth-divider::before,
.cs-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cs-border);
}
.cs-auth-divider span {
  flex-shrink: 0;
}
.cs-account-cart-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-account-cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--cs-border);
}
.cs-account-cart-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--cs-bg);
}
.cs-account-cart-name {
  font-weight: 600;
  font-size: 14px;
}
.cs-account-cart-meta,
.cs-account-cart-price {
  font-size: 12px;
  color: var(--cs-muted);
  margin-top: 2px;
}
.cs-account-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 16px;
  font-size: 16px;
  border-top: 1px solid var(--cs-border);
  margin-top: 8px;
}
.cs-account-wishlist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 768px) {
  .cs-account-wishlist-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.cs-account-wish-item {
  border: 1px solid var(--cs-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--cs-bg);
}
.cs-account-wish-media img,
.cs-account-wish-media .cs-img-placeholder {
  width: 100%;
  height: 120px;
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(16,185,129,0.06));
}
.cs-account-wish-body {
  padding: 10px;
  position: relative;
}
.cs-account-wish-name {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  display: block;
  padding-right: 28px;
}
.cs-account-wish-price {
  font-size: 12px;
  color: var(--cs-muted);
  margin-top: 4px;
}
.cs-account-wish-remove {
  position: absolute;
  top: 8px;
  right: 8px;
}
.cs-order-group-title {
  font-size: 14px;
  margin: 16px 0 8px;
  color: var(--cs-muted);
}
.cs-order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-order-card {
  border: 1px solid var(--cs-border);
  border-radius: 14px;
  padding: 12px;
  background: var(--cs-bg);
}
.cs-order-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.cs-order-number {
  font-weight: 700;
}
.cs-order-date {
  font-size: 12px;
  color: var(--cs-muted);
  margin-top: 2px;
}
.cs-order-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--cs-primary);
  white-space: nowrap;
}
.cs-order-status-delivered { background: rgba(16, 185, 129, 0.15); color: #059669; }
.cs-order-status-cancelled { background: rgba(239, 68, 68, 0.12); color: var(--cs-sale); }
.cs-order-status-shipped { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.cs-order-products {
  font-size: 13px;
  margin: 10px 0;
}
.cs-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--cs-muted);
  margin-bottom: 8px;
}
.cs-account-modal {
  width: min(480px, 100%);
  background: var(--cs-card);
  border-radius: 16px;
  padding: 18px;
}
.cs-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
}
.cs-modal-title {
  font-size: 18px;
  margin-bottom: 4px;
}
.cs-modal-sub {
  color: var(--cs-muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.cs-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.cs-order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.cs-order-detail-items {
  border-top: 1px solid var(--cs-border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-order-detail-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.cs-account-chat-card .cs-account-card-head {
  flex-wrap: wrap;
}
.cs-account-chat-top {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--cs-border);
  margin-bottom: 4px;
}
.cs-account-chat-user {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
}
.cs-account-chat-user-name {
  font-weight: 700;
  color: var(--cs-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-account-chat-user-sep { color: #94a3b8; flex-shrink: 0; }
.cs-account-chat-user-phone {
  color: var(--cs-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-account-chat-hint {
  font-size: 12px;
  width: 100%;
}
.cs-account-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding: 10px 2px 12px;
  margin-bottom: 0;
  border-top: none;
  border-bottom: none;
  background: #f0f2f5;
  border-radius: 12px;
  min-height: 180px;
}
.cs-account-chat-card {
  padding: 12px !important;
  overflow: hidden;
}
.cs-account-chat-day {
  display: flex;
  justify-content: center;
  margin: 6px 0;
}
.cs-account-chat-day span {
  font-size: 11px;
  font-weight: 600;
  color: var(--cs-muted);
  background: var(--cs-bg);
  border: 1px solid var(--cs-border);
  border-radius: 999px;
  padding: 4px 10px;
}
.cs-account-chat-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 85%;
}
.cs-account-chat-row.me {
  align-self: flex-end;
  align-items: flex-end;
}
.cs-account-chat-row.staff {
  align-self: flex-start;
  align-items: flex-start;
}
.cs-account-chat-time {
  font-size: 10px;
  color: var(--cs-muted);
}
.cs-account-chat-cart {
  align-self: center;
  width: 100%;
  max-width: 340px;
  border: 1px dashed var(--cs-border);
  border-radius: 12px;
  padding: 10px;
  background: var(--cs-bg);
}
.cs-account-chat-cart-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--cs-muted);
  margin-bottom: 8px;
}
.cs-account-chat-cart-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cs-account-chat-cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.cs-account-chat-cart-item img,
.cs-account-chat-cart-ph {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--cs-card);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-account-chat-compose {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  padding: 8px 0 0;
  border-top: none;
  background: transparent;
}
.cs-account-chat-compose.cs-chat-compose {
  margin: 0;
}
.cs-account-chat-compose .cs-chat-compose-bar {
  width: 100%;
}
.cs-account-chat-compose input[type="text"] {
  flex: 1;
  border: none !important;
  border-radius: 0;
  padding: 8px 4px;
  background: transparent;
  color: var(--cs-text);
  font: inherit;
  min-width: 0;
  box-shadow: none;
}

/* ── Buy Now checkout sheet ── */
.cs-co-overlay { align-items: flex-end; }
@media (min-width: 640px) {
  .cs-co-overlay { align-items: center; }
}
.cs-co-modal {
  max-width: 520px;
  max-height: 92vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
}
@media (min-width: 640px) {
  .cs-co-modal { border-radius: var(--cs-radius); }
}
.cs-co-modal .modal-close { z-index: 2; }
.cs-co-title {
  font-size: 18px;
  font-weight: 700;
  padding: 18px 20px 0;
  margin: 0;
}
.cs-co-subtitle {
  font-size: 13px;
  color: var(--cs-muted);
  padding: 4px 20px 12px;
  margin: 0;
  border-bottom: 1px solid var(--cs-border);
}
.cs-co-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}
.cs-co-section { margin-bottom: 18px; }
.cs-co-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cs-muted);
  margin: 0 0 10px;
}
.cs-co-account-card {
  background: var(--cs-bg);
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
}
.cs-co-account-name { font-weight: 700; margin-bottom: 6px; }
.cs-co-account-line { color: var(--cs-muted); margin-top: 4px; font-size: 12px; }
.cs-co-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.cs-co-auth-btn { flex: 1 1 auto; min-width: 100px; text-align: center; text-decoration: none; }
.cs-co-auth-hint { font-size: 12px; color: var(--cs-muted); margin: 0; }
.cs-co-guest-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.cs-co-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--cs-bg);
  border: 1px solid var(--cs-border);
  border-radius: 10px;
}
.cs-co-item-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  flex-shrink: 0;
}
.cs-co-item-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.cs-co-item-body { flex: 1; min-width: 0; }
.cs-co-item-brand { font-size: 11px; font-weight: 600; color: var(--cs-muted); text-transform: uppercase; }
.cs-co-item-name { font-size: 14px; font-weight: 600; margin: 2px 0; }
.cs-co-item-sku { font-size: 11px; color: var(--cs-muted); }
.cs-co-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  margin-top: 4px;
}
.cs-co-stock-ok { color: #059669; font-weight: 600; }
.cs-co-stock-warn { color: #dc2626; font-weight: 600; }
.cs-co-stock-preorder { color: #6d28d9; font-weight: 600; }
.cs-co-stock-checking { font-size: 11px; color: var(--cs-muted); margin-top: 6px; }
.cs-co-qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.cs-co-qty-label { font-size: 12px; font-weight: 600; color: var(--cs-muted); }
.cs-co-qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  overflow: hidden;
}
.cs-co-qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--cs-card);
  font-size: 18px;
  cursor: pointer;
  color: var(--cs-text);
}
.cs-co-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cs-co-qty-val {
  min-width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}
.cs-co-line-total { margin-left: auto; font-size: 14px; }
.cs-co-fulfillment-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.cs-co-fulfillment-btn {
  padding: 10px 12px;
  border: 2px solid var(--cs-border);
  border-radius: 10px;
  background: var(--cs-card);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--cs-text);
}
.cs-co-fulfillment-btn.active {
  border-color: var(--cs-accent);
  background: color-mix(in srgb, var(--cs-accent) 8%, var(--cs-card));
}
.cs-co-address-block,
.cs-co-pickup-block { display: flex; flex-direction: column; gap: 10px; }
.cs-co-pickup-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--cs-border);
  background: var(--cs-card);
}
.cs-co-pickup-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--cs-text);
}
.cs-co-pickup-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--cs-muted);
  line-height: 1.4;
}
.cs-co-success-modal { text-align: center; }
.cs-co-success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cs-accent) 14%, var(--cs-card));
  color: var(--cs-accent);
  font-size: 28px;
  font-weight: 700;
  line-height: 52px;
}
.cs-co-success-body {
  text-align: left;
  margin: 16px 0 8px;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--cs-border);
}
.cs-co-success-ref,
.cs-co-success-order,
.cs-co-success-total,
.cs-co-success-line {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--cs-text);
}
.cs-co-success-total { font-weight: 700; }
.cs-co-success-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--cs-muted);
  line-height: 1.45;
}
.cs-co-address-options { display: flex; flex-direction: column; gap: 8px; }
.cs-co-radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
}
.cs-co-radio input { margin-top: 2px; }
.cs-co-address-field.cs-co-hidden { display: none; }
.cs-co-pickup-block select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  font: inherit;
  background: var(--cs-card);
}
.cs-co-free-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  padding: 4px 10px;
  border-radius: 999px;
}
.cs-co-fee-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--cs-muted);
}
.cs-co-muted { font-size: 12px; color: var(--cs-muted); margin: 0; }
.cs-co-pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cs-co-pay-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  border: 2px solid var(--cs-border);
  border-radius: 10px;
  background: var(--cs-card);
  cursor: pointer;
  text-align: left;
}
.cs-co-pay-btn.active {
  border-color: var(--cs-accent);
  background: color-mix(in srgb, var(--cs-accent) 8%, var(--cs-card));
}
.cs-co-pay-offer .cs-co-pay-label::after { content: ' 🏷️'; }
.cs-co-pay-label { font-size: 12px; font-weight: 700; }
.cs-co-pay-amt { font-size: 13px; font-weight: 600; }
.cs-co-totals {
  background: var(--cs-bg);
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  padding: 12px 14px;
}
.cs-co-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}
.cs-co-total-grand {
  border-top: 1px solid var(--cs-border);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 15px;
}
.cs-co-free { color: #059669; font-weight: 700; }
.cs-co-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--cs-border);
  background: var(--cs-card);
}
.cs-co-footer .btn { flex: 1; }
.cs-co-place-btn { font-weight: 700; }
.cs-co-items-list { display: flex; flex-direction: column; gap: 10px; }
.cs-co-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.cs-co-line-remove {
  border: none;
  background: #fee2e2;
  color: #dc2626;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.cs-account-cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.cs-account-checkout-btn { font-weight: 700; }
.cs-co-cart-checkout { font-weight: 700; }

/* Noon-style account dashboard */
.cs-account-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 767px) {
  .cs-account-layout { grid-template-columns: 1fr; }
}
.cs-account-sidebar {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 16px;
  box-shadow: var(--cs-shadow);
  padding: 14px;
  position: sticky;
  top: 76px;
}
@media (max-width: 767px) {
  .cs-account-sidebar { position: static; }
}
.cs-account-side-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 16px;
  border-bottom: 1px solid var(--cs-border);
  margin-bottom: 10px;
}
.cs-account-side-user .cs-account-avatar {
  width: 48px;
  height: 48px;
  font-size: 15px;
}
.cs-account-side-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
}
.cs-account-side-email {
  color: var(--cs-muted);
  font-size: 12px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-account-side-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}
.cs-account-side-summary .cs-account-side-name {
  flex-shrink: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-account-side-summary .cs-account-side-email {
  margin-top: 0;
  flex: 1;
  min-width: 0;
}
.cs-account-side-sep {
  color: #94a3b8;
  flex-shrink: 0;
}
.cs-account-side-user-text {
  flex: 1;
  min-width: 0;
}
.cs-account-side-logout {
  flex-shrink: 0;
  align-self: center;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.cs-account-nav-group + .cs-account-nav-group {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--cs-border);
}
.cs-account-nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-muted);
  padding: 4px 10px 8px;
}
.cs-account-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cs-account-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--cs-text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cs-account-nav-link:hover { background: rgba(37, 99, 235, 0.06); }
.cs-account-nav-link.active {
  background: rgba(37, 99, 235, 0.12);
  color: var(--cs-primary);
}
.cs-account-nav-icon { display: inline-flex; }

/* Desktop / tablet: keep classic sidebar (not mobile icon grid) */
@media (min-width: 768px) {
  .cs-account-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .cs-account-sidebar {
    display: block;
    padding: 14px;
    border-radius: 16px;
    box-shadow: var(--cs-shadow);
    background: var(--cs-card);
    border: 1px solid var(--cs-border);
    position: sticky;
    top: 76px;
  }

  .cs-account-side-user {
    padding: 10px 8px 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--cs-border);
  }

  .cs-account-nav-group--shortcuts .cs-account-nav,
  .cs-account-nav--icons {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: unset !important;
    gap: 2px;
    padding: 0;
  }

  .cs-account-nav-group--shortcuts .cs-account-nav-link {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
    color: var(--cs-text);
  }

  .cs-account-nav-group--shortcuts .cs-account-nav-icon {
    width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent !important;
    color: inherit;
  }

  .cs-account-nav-group--shortcuts .cs-account-nav-link.active .cs-account-nav-icon {
    background: transparent !important;
    color: var(--cs-primary);
  }

  .cs-account-nav-group--settings .cs-account-nav,
  .cs-account-nav--list {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: unset !important;
    gap: 2px;
  }

  .cs-account-nav-group--settings .cs-account-nav-link {
    flex-direction: row;
    justify-content: flex-start;
    background: transparent;
    box-shadow: none;
    padding: 10px 12px;
    text-align: left;
  }

  .cs-account-nav-group--settings .cs-account-nav-title {
    display: block;
  }

  .cs-account-nav-group--settings {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--cs-border);
    border-radius: 0;
  }

  .cs-account-nav-group + .cs-account-nav-group {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--cs-border);
  }

  .cs-account-main {
    max-width: 1100px;
    padding: 20px 16px 56px;
  }

  .cs-noon-panel-head .cs-card-desc {
    display: block;
  }
}

.cs-account-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cs-noon-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.cs-noon-panel-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.cs-noon-widget {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 16px;
  box-shadow: var(--cs-shadow);
  padding: 18px;
}
.cs-noon-widget-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}
.cs-noon-widget-grid { display: grid; gap: 14px; }
.cs-noon-widget-grid-2 {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}
@media (max-width: 640px) {
  .cs-noon-widget-grid-2 { grid-template-columns: 1fr; }
}
.cs-noon-field-label {
  display: block;
  font-size: 12px;
  color: var(--cs-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.cs-noon-field-control {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--cs-border);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  color: var(--cs-text);
}
body.dark-mode .cs-noon-field-control { background: var(--cs-card); }
.cs-noon-field-control:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.cs-noon-field-value { font-size: 14px; font-weight: 600; }
.cs-noon-field-value.is-empty { color: var(--cs-muted); font-weight: 500; }
.cs-noon-field-edit { color: var(--cs-muted); display: inline-flex; }
.cs-noon-field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--cs-accent);
}
.cs-noon-gender {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cs-noon-gender-btn {
  border: 1px solid var(--cs-border);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--cs-text);
}
body.dark-mode .cs-noon-gender-btn { background: var(--cs-card); }
.cs-noon-gender-btn.active {
  border-color: var(--cs-primary);
  color: var(--cs-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.cs-viewed-grid { margin-top: 4px; }

/* —— Store profile page (UI only) —— */
.cs-store-profile {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 48px;
  max-width: 100%;
}
.cs-store-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}
.cs-store-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  min-height: 180px;
  max-height: min(42vh, 420px);
  background: #0f172a;
  overflow: hidden;
}
@media (min-width: 768px) {
  .cs-store-cover { min-height: 220px; }
}
.cs-store-cover-empty {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #334155 100%);
}
.cs-store-cover-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(28px) saturate(1.15);
  transform: scale(1.12);
  opacity: 0.9;
  pointer-events: none;
  user-select: none;
}
.cs-store-cover-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.cs-store-cover-fade {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  height: 72%;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(15, 23, 42, 0.45) 42%,
    transparent 100%
  );
}
.cs-store-identity {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  padding: 16px 16px 18px;
  margin: 0;
}
@media (min-width: 768px) {
  .cs-store-identity { padding: 22px 26px 24px; gap: 18px; }
}
.cs-store-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  background: #fff;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .cs-store-logo { width: 92px; height: 92px; border-radius: 20px; }
}
.cs-store-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.03em;
}
.cs-store-identity-text { flex: 1; min-width: 0; padding-bottom: 2px; }
.cs-store-name {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.cs-store-location {
  margin: 6px 0 0;
  opacity: 0.92;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
.cs-store-desc {
  margin: 8px 0 0;
  opacity: 0.9;
  font-size: 13px;
  line-height: 1.5;
  max-width: 42rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cs-store-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.cs-store-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.cs-store-social:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}
.cs-store-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cs-store-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}
.cs-store-section-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cs-text);
}
.cs-store-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--cs-muted);
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--cs-border);
  border-radius: 999px;
  padding: 4px 10px;
}
.cs-store-collections { gap: 10px; }
.cs-store-subs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
  width: 100%;
  padding: 0;
  overflow: visible;
}
.cs-store-sub {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  border-radius: 14px;
  cursor: pointer;
  color: var(--cs-text);
  text-align: center;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.cs-store-sub:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
  border-color: rgba(37, 99, 235, 0.2);
}
.cs-store-sub:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}
.cs-store-sub.active {
  border-color: transparent;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.26);
}
.cs-store-sub-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  background: linear-gradient(145deg, #f8fafc 0%, #eef2f7 100%);
  overflow: hidden;
  padding: 8px;
  box-sizing: border-box;
}
.cs-store-sub-media-all {
  color: #2563eb;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  padding: 0;
}
.cs-store-sub.active .cs-store-sub-media,
.cs-store-sub.active .cs-store-sub-media-all {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.cs-store-sub-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.cs-store-sub-initial {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
  color: #64748b;
  letter-spacing: -0.03em;
}
.cs-store-sub.active .cs-store-sub-initial { color: #fff; }
.cs-store-sub-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 8px 10px;
  min-width: 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}
.cs-store-sub.active .cs-store-sub-meta {
  background: transparent;
}
.cs-store-sub-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
  letter-spacing: -0.01em;
}
@media (max-width: 640px) {
  .cs-store-subs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .cs-store-profile { gap: 16px; }
  .cs-store-hero { border-radius: 16px; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .cs-store-subs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .cs-store-subs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1201px) {
  .cs-store-subs { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .cs-store-sub-name { font-size: 13px; }
}
body.dark-mode .cs-store-sub {
  background: var(--cs-card);
  border-color: var(--cs-border);
  box-shadow: none;
}
body.dark-mode .cs-store-sub-media {
  background: rgba(248, 250, 252, 0.06);
}
body.dark-mode .cs-store-sub-meta {
  background: transparent;
}
body.dark-mode .cs-store-count {
  background: rgba(248, 250, 252, 0.06);
}

/* Store product grid polish (scoped — does not alter global catalog cards elsewhere) */
.cs-store-profile .cs-product-grid {
  gap: 14px;
}
.cs-store-profile .cs-store-product-card {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.cs-store-profile .cs-store-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
  border-color: rgba(37, 99, 235, 0.16);
}
.cs-store-profile .cs-store-product-card .cs-product-media {
  min-height: 168px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(37, 99, 235, 0.06), transparent 55%),
    linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 18px;
}
.cs-store-profile .cs-store-product-card .cs-product-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-width: 0;
}
.cs-store-profile .cs-store-product-card .cs-product-brand {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0;
}
.cs-store-profile .cs-store-product-card .cs-product-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin: 4px 0 0;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.cs-store-product-card .cs-store-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.28);
}
.cs-store-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 10px 0 0;
}
.cs-store-price {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.cs-store-compare {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.cs-store-stock {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  margin: 8px 0 0;
  padding: 4px 9px;
  border-radius: 999px;
  width: fit-content;
  letter-spacing: 0.02em;
}
.cs-store-stock-in {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}
.cs-store-stock-out {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}
.cs-store-stock-pre {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}
.cs-store-rating {
  font-size: 12px;
  color: #d97706;
  margin: 6px 0 0;
  letter-spacing: 0.02em;
}
.cs-store-rating span {
  color: var(--cs-muted);
  margin-left: 4px;
  font-weight: 600;
}
.cs-store-product-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}
.cs-store-profile .cs-store-product-actions .cs-btn {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.cs-store-profile .cs-btn-quickview {
  order: 2;
  background: #fff;
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: none;
}
.cs-store-profile .cs-btn-quickview:hover {
  background: #f8fafc;
  border-color: rgba(37, 99, 235, 0.3);
  color: #1d4ed8;
}
.cs-store-profile .cs-store-product-actions .cs-btn-cart {
  order: 1;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}
.cs-store-profile .cs-store-product-actions .cs-btn-cart:hover {
  filter: brightness(1.04);
}
.cs-store-profile .cs-store-product-actions .cs-btn-cart.in-cart {
  background: linear-gradient(180deg, #1e40af 0%, #1d4ed8 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.3);
}
.cs-store-profile .cs-empty {
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.02);
  padding: 36px 20px;
}
.cs-store-profile .cs-pagination {
  margin-top: 8px;
  padding-top: 4px;
}
@media (min-width: 900px) {
  .cs-store-product-actions {
    grid-template-columns: 1fr 1.15fr;
  }
  .cs-store-profile .cs-btn-quickview { order: 0; }
  .cs-store-profile .cs-store-product-actions .cs-btn-cart { order: 0; }
}
@media (max-width: 767px) {
  .cs-store-profile .cs-product-grid { gap: 10px; }
  .cs-store-profile .cs-store-product-card .cs-product-media { min-height: 124px; padding: 12px; }
  .cs-store-profile .cs-store-product-card .cs-product-title {
    font-size: 13px;
    min-height: 2.5em;
  }
  .cs-store-price { font-size: 1.02rem; }
  .cs-store-profile .cs-store-product-actions .cs-btn {
    min-height: 36px;
    font-size: 11px;
    padding: 8px 10px;
  }
}

/* ── Mobile app shell (shop + account) ── */
.cs-bottom-nav {
  display: none;
}

@media (max-width: 767px) {
  :root {
    --cs-bottom-nav-height: 78px;
  }

  .cs-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    align-items: flex-end;
    justify-content: space-around;
    gap: 0;
    min-height: var(--cs-bottom-nav-height);
    padding: 0 4px calc(4px + var(--cs-safe-bottom));
    background: transparent;
    border-top: none;
    box-shadow: none;
    overflow: visible;
  }

  .cs-bottom-nav-shape {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 0;
    pointer-events: none;
    color: #f1f5f9;
    filter: drop-shadow(0 -6px 20px rgba(15, 23, 42, 0.1));
  }

  .cs-bottom-nav-shape-svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .cs-bottom-nav-item {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    min-width: 0;
    min-height: 0;
    padding: 0 2px 10px;
    border-radius: 0;
    text-decoration: none;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
    touch-action: manipulation;
    transition: color 0.22s ease;
    background: transparent;
  }

  .cs-bottom-nav-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    transition:
      background 0.22s ease,
      color 0.22s ease,
      box-shadow 0.22s ease,
      transform 0.22s ease,
      width 0.22s ease,
      height 0.22s ease;
  }

  .cs-bottom-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 0;
  }

  .cs-bottom-nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .cs-bottom-nav-item.active {
    color: #1e3a8a;
    background: transparent;
  }

  .cs-bottom-nav-item.active .cs-bottom-nav-icon-wrap {
    width: 52px;
    height: 52px;
    margin-top: -28px;
    background: linear-gradient(165deg, #1e40af 0%, #1e3a8a 48%, #172554 100%);
    color: #fff;
    box-shadow:
      0 0 0 5px #f1f5f9,
      0 10px 22px rgba(30, 58, 138, 0.42),
      0 4px 8px rgba(15, 23, 42, 0.12);
    transform: translateY(-4px);
  }

  .cs-bottom-nav-item.active .cs-bottom-nav-icon svg {
    width: 24px;
    height: 24px;
  }

  .cs-bottom-nav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    transition: color 0.22s ease, font-weight 0.22s ease;
  }

  .cs-bottom-nav-item.active .cs-bottom-nav-label {
    color: #1e3a8a;
    font-weight: 700;
  }

  .cs-page,
  .cs-account-page {
    padding-bottom: calc(var(--cs-bottom-nav-height) + var(--cs-safe-bottom) + 8px);
  }

  .cs-main {
    padding: 8px 12px 16px;
    min-width: 0;
    background: transparent;
  }

  .cs-account-main {
    padding: 14px 12px calc(var(--cs-bottom-nav-height) + var(--cs-safe-bottom) + 20px);
  }

  .cs-header-actions .cs-hide-on-mobile-tabbar {
    display: none;
  }

  /* Mobile: logo + search row; bottom nav replaces status and category strip */
  .cs-status,
  #cs-status,
  .cs-header-actions,
  .cs-category-bar {
    display: none !important;
  }

  .cs-header-main {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "logo search";
    gap: 10px;
    align-items: center;
  }

  .cs-logo {
    display: inline-flex !important;
    grid-area: logo;
    flex-shrink: 0;
    padding: 0;
    max-width: none;
    overflow: visible;
  }

  .cs-logo-img {
    width: 38px;
    height: 38px;
  }

  .cs-search-row {
    grid-area: search;
    min-width: 0;
  }

  /* One continuous page: search sits above content with no header chrome */
  .cs-page {
    background: var(--cs-bg);
  }

  .cs-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: max(8px, env(safe-area-inset-top, 0px)) 12px 8px;
    background: var(--cs-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
  }

  .cs-header.scrolled {
    background: var(--cs-bg);
    box-shadow: none;
  }

  .cs-layout {
    margin: 0;
    padding: 0;
    border: none;
    gap: 0;
    background: transparent;
  }

  .cs-layout-no-filters .cs-main {
    padding-top: 8px;
  }

  .cs-browse-hub-hero {
    display: none !important;
  }

  .cs-browse-hub-page,
  .cs-browse-hub,
  .cs-browse-hub--shop,
  .cs-browse-hub--categories,
  .cs-browse-hub--brands {
    padding-top: 0;
    margin-top: 0;
  }

  .cs-hub-collection,
  .cs-browse-hub .cs-hub-collection {
    padding-top: 4px !important;
  }

  .cs-main:has(.cs-browse-hub--categories) {
    display: flex;
    flex-direction: column;
    min-height: calc(
      100dvh - var(--cs-bottom-nav-height) - var(--cs-safe-bottom) - 56px
    );
  }

  .cs-main:has(.cs-browse-hub--categories) #search-results {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .cs-homepage {
    padding-top: 4px;
  }

  .cs-main:has(.cs-homepage) {
    padding-top: 6px;
  }

  .cs-account-page .cs-header {
    padding: max(8px, env(safe-area-inset-top, 0px)) 12px 8px;
    background: var(--cs-bg);
    border-bottom: none;
    box-shadow: none;
    display: none;
  }

  .cs-account-page .cs-logo {
    display: block !important;
  }

  .cs-account-page .cs-header-actions {
    display: flex !important;
  }

  /* Modern mobile account dashboard */
  .cs-account-main {
    padding: 12px 14px calc(var(--cs-bottom-nav-height) + var(--cs-safe-bottom) + 20px);
    max-width: none;
  }

  .cs-account-shell,
  .cs-account-layout {
    gap: 12px;
  }

  .cs-account-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--cs-card);
    border: 1px solid var(--cs-border);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 4px;
    position: static;
    overflow: hidden;
  }

  .cs-account-sidebar .cs-account-nav-group + .cs-account-nav-group {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  .cs-account-side-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 12px;
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  }

  .cs-account-side-user .cs-account-avatar {
    width: 44px;
    height: 44px;
    font-size: 14px;
  }

  .cs-account-side-user-text {
    flex: 1;
    min-width: 0;
  }

  .cs-account-side-logout {
    padding: 6px 8px;
    font-size: 11px;
    border-radius: 10px;
  }

  .cs-account-side-summary {
    width: 100%;
  }

  .cs-account-side-name {
    font-size: 15px;
    letter-spacing: -0.02em;
  }

  .cs-account-side-email {
    font-size: 13px;
  }

  .cs-account-nav-group--shortcuts {
    margin: 0;
    padding: 6px 4px 8px;
    border: none;
  }

  .cs-account-nav-group--shortcuts .cs-account-nav,
  .cs-account-nav--icons {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    overflow: visible !important;
    flex-direction: unset !important;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .cs-account-nav-group--shortcuts .cs-account-nav-link {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto;
    padding: 8px 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
    color: var(--cs-muted);
  }

  .cs-account-nav-group--shortcuts .cs-account-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(37, 99, 235, 0.07);
    color: var(--cs-primary);
  }

  .cs-account-nav-group--shortcuts .cs-account-nav-link.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--cs-primary);
  }

  .cs-account-nav-group--shortcuts .cs-account-nav-link.active .cs-account-nav-icon {
    background: var(--cs-primary);
    color: #fff;
  }

  .cs-account-nav-group--settings {
    margin-top: 0;
    padding: 8px 6px 6px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
  }

  .cs-account-nav-group--settings .cs-account-nav-title {
    display: none;
  }

  .cs-account-nav-group--settings .cs-account-nav,
  .cs-account-nav--list {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    overflow: visible !important;
    flex-direction: unset !important;
    padding: 0;
  }

  .cs-account-nav-group--settings .cs-account-nav-link {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 11px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    background: rgba(241, 245, 249, 0.65);
  }

  .cs-account-nav-group--settings .cs-account-nav-link.active {
    background: rgba(37, 99, 235, 0.12);
    color: var(--cs-primary);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18);
  }

  .cs-account-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .cs-noon-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 2px 0;
    padding: 0;
  }

  .cs-noon-panel-head h2 {
    font-size: 1.25rem;
    letter-spacing: -0.02em;
  }

  .cs-noon-panel-head .cs-card-desc {
    display: none;
  }

  .cs-noon-widget {
    margin: 0;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--cs-border);
    background: var(--cs-card);
    box-shadow: none;
  }

  .cs-noon-widget-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cs-muted);
    margin-bottom: 10px;
  }

  .cs-noon-field-control {
    min-height: 48px;
    border-radius: 12px;
    padding: 12px 14px;
  }

  .cs-noon-gender {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cs-noon-gender-btn {
    min-height: 44px;
    border-radius: 12px;
    justify-content: center;
  }

  .cs-account-cart-item,
  .cs-account-wish-item {
    border-radius: 14px;
  }

  .toast {
    bottom: calc(var(--cs-bottom-nav-height) + var(--cs-safe-bottom) + 12px);
    max-width: calc(100vw - 32px);
    text-align: center;
  }

  .cs-chat-fab {
    right: 14px;
    bottom: calc(var(--cs-bottom-nav-height) + var(--cs-safe-bottom) + 12px);
    width: 56px;
    height: 56px;
  }

  .cs-chat-panel {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(var(--cs-bottom-nav-height) + var(--cs-safe-bottom) + 12px);
    max-height: min(70vh, 520px);
  }

  .cs-pd-buybar {
    bottom: calc(var(--cs-bottom-nav-height) + var(--cs-safe-bottom));
    padding-bottom: 10px;
    z-index: 5;
  }

  .cs-pd-thumbs-col {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .cs-pd-thumb {
    scroll-snap-align: start;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    padding: 18px 16px calc(16px + var(--cs-safe-bottom));
  }

  .cs-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .cs-account-modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    overflow-y: auto;
  }

  .cs-co-modal {
    max-height: min(94vh, 900px);
  }

  .cs-co-footer {
    padding-bottom: calc(14px + var(--cs-safe-bottom));
  }

  .cs-co-footer .btn,
  .cs-co-qty-btn,
  .cs-co-line-remove {
    min-height: 44px;
    min-width: 44px;
  }

  .cs-order-detail-grid {
    grid-template-columns: 1fr;
  }

  .cs-noon-panel-head h2 {
    font-size: 18px;
  }

  .cs-account-nav-link {
    min-height: 44px;
    flex-shrink: 0;
  }

  .cs-pagination-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .cs-product-grid {
    gap: 12px;
  }

  .cs-product-title {
    font-size: 13px;
    line-height: 1.35;
  }

  .cs-chip {
    font-size: 9px;
    padding: 3px 6px;
  }

  .cs-pay-btn {
    min-height: 44px;
    padding: 6px 4px;
  }

  .cs-pay-lbl {
    font-size: 9px;
  }

  .cs-pay-amt {
    font-size: 10px;
  }

  .cs-btn {
    min-height: 40px;
    padding: 10px 8px;
    font-size: 11px;
  }

  .cs-product-actions .cs-btn-share {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .cs-wishlist-btn {
    width: 40px;
    height: 40px;
  }

  .cs-filters-fields select,
  .cs-filters-fields input[type="number"] {
    min-height: 44px;
    font-size: 16px;
  }

  .cs-filters-close {
    width: 44px;
    height: 44px;
  }

  .cs-home-hero,
  .cs-home-section {
    margin-left: 0;
    margin-right: 0;
  }

  .cs-account-cart-item {
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
  }

  .cs-account-cart-item .cs-account-cart-price {
    grid-column: 2;
  }

  .cs-account-chat-compose .btn {
    min-height: 44px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .cs-chat-compose input[type="text"],
  .cs-chat-identity input {
    min-height: 44px;
    font-size: 16px;
  }

  .cs-chat-compose-pill #cs-chat-input {
    min-height: 36px;
    font-size: 16px;
  }

  .cs-chat-round-btn {
    width: 48px;
    height: 48px;
  }

  .cs-chat-icon-btn {
    width: 44px;
    height: 44px;
  }

  .cs-bottom-nav-item {
    font-size: 10px;
  }

  .cs-bottom-nav-icon-wrap {
    position: relative;
  }

  .cs-bottom-nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: var(--cs-sale);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .cs-bottom-nav-badge[hidden] {
    display: none !important;
  }

  /* Category bar hidden on mobile (bottom nav Category tab) */

  /* Subcategory strip (catalog / home) — horizontal scroll */
  .cs-subcat-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 4px 2px 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cs-subcat-grid::-webkit-scrollbar {
    display: none;
  }

  .cs-subcat-widget {
    flex: 0 0 auto;
    width: 88px;
    scroll-snap-align: start;
  }

  /* Shop / brand / category hubs — full wrapping grid, no scroll */
  .cs-browse-hub .cs-subcat-grid,
  .cs-browse-hub-section .cs-subcat-grid,
  .cs-browse-hub .cs-hub-collection,
  .cs-hub-collection {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px 8px;
    overflow: visible !important;
    flex-wrap: unset !important;
    scroll-snap-type: none !important;
    padding: 4px 2px 20px;
  }

  .cs-browse-hub--categories .cs-hub-collection {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 10px !important;
    padding: 6px 0 12px !important;
    flex: 1;
    min-height: calc(
      100dvh - var(--cs-bottom-nav-height) - var(--cs-safe-bottom) - 72px
    );
    align-content: stretch;
  }

  .cs-browse-hub-page:has(.cs-browse-hub--categories),
  .cs-browse-hub--categories {
    display: flex;
    flex-direction: column;
    min-height: calc(
      100dvh - var(--cs-bottom-nav-height) - var(--cs-safe-bottom) - 72px
    );
  }

  .cs-browse-hub--categories .cs-hub-tile {
    min-height: 0;
    height: 100%;
    padding: 14px 10px 16px;
    justify-content: center;
    gap: 10px;
    border-radius: 16px;
  }

  .cs-browse-hub--categories .cs-hub-tile-media {
    width: min(72px, 22vw);
    height: min(72px, 22vw);
    border-radius: 14px;
  }

  .cs-browse-hub--categories .cs-hub-tile-media svg {
    width: 34px;
    height: 34px;
  }

  .cs-browse-hub--categories .cs-hub-tile-label {
    font-size: 15px;
    font-weight: 700;
  }

  .cs-browse-hub .cs-subcat-widget,
  .cs-browse-hub-section .cs-subcat-widget,
  .cs-hub-collection .cs-subcat-widget {
    width: 100% !important;
    max-width: none !important;
    flex: unset !important;
    scroll-snap-align: unset !important;
  }

  .cs-subcat-media {
    aspect-ratio: 1;
    border-radius: 16px;
  }

  /* Homepage — modern mobile storefront */
  .cs-main:has(.cs-homepage) {
    padding: 6px 14px 20px;
  }

  .cs-homepage {
    gap: 22px;
    padding: 4px 0 12px;
  }

  .cs-home-hero {
    border-radius: 20px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.15) inset,
      0 16px 40px rgba(30, 64, 175, 0.22);
    background: linear-gradient(145deg, #0f172a 0%, #1d4ed8 42%, #3b82f6 100%);
  }

  .cs-home-hero-inner {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .cs-home-hero-media {
    order: -1;
    padding: 18px 20px 0;
    max-height: none;
    background: transparent;
  }

  .cs-home-hero-img {
    max-height: 140px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25));
  }

  .cs-home-hero-content {
    padding: 16px 18px 20px;
    gap: 8px;
  }

  .cs-home-hero-badge {
    font-size: 10px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    letter-spacing: 0.06em;
  }

  .cs-home-hero-title {
    font-size: 1.4rem;
    line-height: 1.2;
    letter-spacing: -0.035em;
  }

  .cs-home-hero-text {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
  }

  .cs-home-hero-cta {
    width: 100%;
    min-height: 46px;
    margin-top: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
  }

  .cs-home-sub-banners {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 2px 2px 6px;
    margin: 0 -2px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cs-home-sub-banners::-webkit-scrollbar {
    display: none;
  }

  .cs-home-sub-banner {
    flex: 0 0 min(42%, 168px);
    scroll-snap-align: start;
    min-height: 92px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  }

  .cs-home-sub-banner-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .cs-home-sub-banner-sub {
    font-size: 11px;
    line-height: 1.35;
    margin-top: 4px;
    opacity: 0.92;
  }

  .cs-home-section {
    gap: 12px;
  }

  .cs-home-section-head {
    align-items: center;
    padding: 0 2px;
  }

  .cs-home-section-title {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.03em;
  }

  .cs-home-section-sub {
    display: none;
  }

  .cs-home-view-all {
    flex-shrink: 0;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    font-size: 12px;
    font-weight: 700;
  }

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

  .cs-home-section .cs-product-card {
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  }

  .cs-home-section .cs-product-media {
    min-height: 108px;
    padding: 12px 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  }

  .cs-home-section .cs-product-img {
    height: 88px;
    max-width: 100%;
  }

  .cs-home-section .cs-product-body {
    padding: 10px 10px 12px;
  }

  .cs-home-section .cs-product-title {
    font-size: 12px;
    font-weight: 700;
    -webkit-line-clamp: 2;
    line-height: 1.3;
  }

  .cs-home-section .cs-product-brand {
    font-size: 9px;
  }

  .cs-home-section .cs-chip {
    font-size: 8px;
  }

  .cs-home-section .cs-pay-lbl {
    font-size: 7px;
  }

  .cs-home-section .cs-pay-amt {
    font-size: 9px;
    font-weight: 700;
  }

  .cs-home-section .cs-btn {
    font-size: 10px;
    min-height: 34px;
    border-radius: 10px;
  }

  .cs-home-section .cs-subcat-grid {
    gap: 10px;
  }

  /* Catalog listing */
  .cs-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-product-media {
    min-height: 118px;
  }

  .cs-product-img {
    height: 100px;
    max-width: 100%;
    object-fit: contain;
  }

  .cs-product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 6px;
  }

  .cs-product-actions .cs-btn-cart,
  .cs-product-actions .cs-btn-buy {
    min-height: 40px;
    font-size: 11px;
  }

  /* Product detail */
  .cs-product-detail,
  .cs-product-detail-page {
    gap: 16px;
  }

  .cs-pd-back {
    min-height: 44px;
    padding: 10px 16px;
  }

  .cs-pd-title {
    font-size: 1.35rem;
  }

  .cs-pd-buybar {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 12px 0 10px;
    margin: 0 -2px;
  }

  .cs-pd-buybar-wish {
    grid-row: span 2;
  }

  .cs-pd-buybar-cart,
  .cs-pd-buybar-buy {
    min-height: 48px;
    font-size: 14px;
  }

  .cs-pd-payment-wrap .cs-pay-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-pd-payment-wrap .cs-pay-btn {
    min-height: 56px;
  }

  /* Account auth & forms */
  .cs-account-auth-wrap {
    padding: 0 4px;
  }

  .cs-account-auth {
    padding: 20px 16px;
  }

  .cs-auth-tab {
    min-height: 44px;
    flex: 1;
  }

  .cs-field input,
  .cs-field select,
  .cs-noon-field-control {
    min-height: 48px;
    font-size: 16px;
  }

  .cs-btn-block,
  .cs-account-checkout-btn {
    min-height: 48px;
    font-size: 15px;
  }

  .cs-account-wishlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-co-pay-row,
  .cs-co-pay-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .cs-co-item {
    padding: 10px 0;
  }

  .cs-co-item-img {
    width: 56px;
    height: 56px;
  }

  .cs-store-profile .cs-store-hero {
    border-radius: 16px;
    overflow: hidden;
  }

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

  .cs-empty {
    padding: 28px 16px;
    font-size: 14px;
    line-height: 1.5;
  }

  .cs-page {
    max-width: 100vw;
  }

  img.cs-product-img,
  .cs-home-hero-img,
  .cs-pd-main-img {
    max-width: 100%;
    height: auto;
  }

  .cs-homepage,
  .cs-catalog-with-subs,
  .cs-product-detail {
    animation: cs-mobile-fade-in 0.28s ease-out;
  }

  @keyframes cs-mobile-fade-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  .cs-chat-panel {
    max-height: min(85vh, 400px);
  }
}

@media (min-width: 768px) {
  .cs-bottom-nav {
    display: none !important;
  }
}

