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

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --card: #222;
  --text: #f5f5f5;
  --muted: #a1a1a1;
  --accent: #fe2c55;
  --accent2: #25f4ee;
  --green: #00c853;
  --border: #333;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
}

body.sheet-open {
  overflow: hidden;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(80px + var(--safe-b));
}

.layout-body {
  display: block;
}

.sidebar {
  display: none;
}

.hero-desktop {
  display: none;
}

.feed-head {
  display: none;
}

.brand-tag {
  display: none;
}

.header-cart {
  display: none;
}

.hidden {
  display: none !important;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  padding: 12px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.search-box input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.search-box input::placeholder {
  color: var(--muted);
}

/* Flash banner */
.flash-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(90deg, #2a1018, #1a1a1a);
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
}

.flash-tag {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Categories */
.cats-scroll {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}

.cats-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-pill.on {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Product grid — TikTok Shop 2-col */
.feed {
  padding: 10px 8px;
}

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

.card {
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.card-img {
  position: relative;
  aspect-ratio: 1;
  background: #2a2a2a;
  overflow: hidden;
}

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

.card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.card-off {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--green);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
}

.card-body {
  padding: 8px;
}

.card-title {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  min-height: 2.6em;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.card-price {
  color: var(--accent);
  font-weight: 800;
  font-size: 0.95rem;
}

.card-was {
  color: var(--muted);
  font-size: 0.7rem;
  text-decoration: line-through;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.stars {
  color: #ffc107;
  letter-spacing: -1px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 6px;
}

.btn-cart {
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-buy {
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.btn-buy:active,
.btn-cart:active {
  transform: scale(0.97);
  opacity: 0.9;
}

@media (hover: hover) {
  .card:hover {
    border-color: #444;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }

  .card {
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  }

  .btn-buy:hover {
    filter: brightness(1.08);
  }

  .btn-cart:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .cat-pill:hover:not(.on) {
    border-color: #555;
    color: var(--text);
  }
}

/* Cart bar */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100%);
  padding: 10px 14px calc(10px + var(--safe-b));
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 40;
}

.cart-bar.hidden {
  display: none;
}

.cart-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), #ff4466);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

/* Checkout sheet */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

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

.sheet-panel {
  width: min(480px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 20px 16px calc(24px + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sheet.open .sheet-panel {
  transform: translateY(0);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sheet-head h2 {
  font-size: 1.2rem;
}

.sheet-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.co-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.co-item {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
}

.co-item img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #333;
}

.co-total-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.co-form label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.co-form input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.row3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
}

.co-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 14px 0 10px;
}

.btn-pay {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), #ff4466);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-pay:disabled {
  opacity: 0.6;
  cursor: wait;
}

.co-trust {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 10px;
}

/* Auth & header actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-auth,
.btn-profile {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-auth:hover,
.btn-profile:hover {
  border-color: var(--accent);
}

.co-signin-note {
  font-size: 0.75rem;
  color: var(--accent2);
  margin-bottom: 12px;
}

.co-addresses {
  margin-bottom: 14px;
}

.co-addr-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.co-addr-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.co-addr-hint a {
  color: var(--accent2);
}

.addr-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.82rem;
}

.addr-option.selected {
  border-color: var(--accent);
  background: rgba(254, 44, 85, 0.08);
}

.addr-option input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.addr-option strong {
  display: block;
  margin-bottom: 2px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent2);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
}

.link-btn.danger {
  color: #ff6b6b;
}

/* Cart drawer */
.cart-panel .cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  max-height: 45vh;
  overflow-y: auto;
}

.cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px 0;
  font-size: 0.9rem;
}

.cart-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cart-row img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #333;
}

.cart-row-info {
  flex: 1;
  font-size: 0.85rem;
}

.cart-row-info strong {
  display: block;
  margin-bottom: 4px;
}

.cart-row-price {
  color: var(--muted);
  font-size: 0.8rem;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}

.cart-qty button {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--card);
  color: var(--text);
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.cart-remove {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
}

/* Auth modal */
.auth-panel label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.auth-panel input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.auth-lead {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}

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

.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.on {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(254, 44, 85, 0.1);
}

.auth-error {
  color: #ff6b6b;
  font-size: 0.82rem;
  min-height: 1.2em;
  margin-bottom: 8px;
}

/* Profile page */
.profile-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  min-height: 100vh;
}

.profile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.profile-top h1 {
  font-size: 1.4rem;
  flex: 1;
}

.back-link {
  color: var(--accent2);
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-ghost {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
}

.profile-gate {
  text-align: center;
  padding: 48px 20px;
}

.profile-gate p {
  color: var(--muted);
  margin-bottom: 20px;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.profile-card h2 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.profile-user {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.profile-card label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.profile-card input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
}

.btn-secondary {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

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

.section-head h2 {
  margin-bottom: 0;
}

.addr-form {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem !important;
  color: var(--text) !important;
}

.check-row input {
  width: auto !important;
  margin: 0 !important;
}

.addr-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.addr-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.addr-card.default {
  border-color: var(--accent);
}

.addr-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.addr-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.order-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.order-more-btn {
  width: 100%;
  padding: 10px;
  font-size: 0.85rem;
}

.order-detail-panel {
  max-width: min(520px, 100%);
}

.order-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.85rem;
}

.order-detail-meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-detail-section {
  margin-bottom: 16px;
}

.order-detail-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

.order-detail-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.order-detail-item img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #333;
  flex-shrink: 0;
}

.order-detail-item > div {
  flex: 1;
  min-width: 0;
}

.order-detail-item strong {
  display: block;
}

.status-shipped { color: var(--accent2); }

@media (min-width: 1024px) {
  #order-detail {
    align-items: center;
  }

  #order-detail .sheet-panel {
    border-radius: 16px;
    transform: scale(0.96) translateY(8px);
  }

  #order-detail.open .sheet-panel {
    transform: scale(1) translateY(0);
  }
}

.order-status {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--card);
}

.status-paid { color: var(--green); }
.status-pending { color: #ffc107; }
.status-rejected { color: #ff6b6b; }

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 639px) {
  .topbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .brand {
    margin-bottom: 0;
    flex: 1;
  }

  .search-box {
    order: 3;
    width: 100%;
  }

  .header-cart {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
  }

  .header-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ─── Tablet ─── */
@media (min-width: 640px) {
  .app {
    max-width: 720px;
    padding-bottom: calc(80px + var(--safe-b));
  }

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

  .feed {
    padding: 14px 12px;
  }

  .card-body {
    padding: 10px;
  }

  .card-title {
    font-size: 0.85rem;
  }
}

/* ─── Desktop ─── */
@media (min-width: 1024px) {
  body {
    background: #080808;
  }

  .app {
    max-width: 1320px;
    padding: 0 24px 40px;
    margin: 0 auto;
  }

  .topbar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    max-width: 1320px;
    margin: 0 auto;
  }

  .brand {
    margin-bottom: 0;
    flex-shrink: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .brand-name {
    font-size: 1.35rem;
  }

  .brand-tag {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
    margin-left: 18px;
  }

  .search-box {
    flex: 1;
    max-width: 480px;
  }

  .search-box input {
    padding: 12px 18px;
    font-size: 0.95rem;
  }

  .header-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
  }

  .header-cart:hover {
    border-color: var(--accent);
    background: var(--card);
  }

  .header-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .layout-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: start;
    padding-top: 8px;
  }

  .sidebar {
    display: block;
    position: sticky;
    top: 88px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
  }

  .sidebar-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
  }

  .cats-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
  }

  .cats-side .cat-pill {
    width: 100%;
    text-align: left;
    border-radius: 8px;
    padding: 10px 14px;
  }

  .cats-scroll {
    display: none;
  }

  .sidebar-promo {
    padding: 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2a1018, #1a1a2e);
    border: 1px solid #3a2030;
    margin-bottom: 16px;
  }

  .sidebar-promo strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
  }

  .sidebar-promo span {
    font-size: 0.78rem;
    color: var(--muted);
  }

  .sidebar-trust {
    list-style: none;
    font-size: 0.78rem;
    color: var(--muted);
  }

  .sidebar-trust li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-trust li:last-child {
    border-bottom: none;
  }

  .hero-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: linear-gradient(120deg, #1a1020 0%, #121218 50%, #0f1a18 100%);
    border: 1px solid var(--border);
  }

  .hero-text h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
  }

  .hero-text p {
    color: var(--muted);
    font-size: 1rem;
    max-width: 420px;
  }

  .hero-stats {
    display: flex;
    gap: 28px;
    flex-shrink: 0;
  }

  .hero-stats div {
    text-align: center;
  }

  .hero-stats strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent2);
  }

  .hero-stats span {
    font-size: 0.75rem;
    color: var(--muted);
  }

  .flash-banner {
    border-radius: 10px;
    margin-bottom: 16px;
    padding: 10px 18px;
  }

  .feed-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
  }

  .feed-head h2 {
    font-size: 1.35rem;
    font-weight: 800;
  }

  .feed-count {
    font-size: 0.85rem;
    color: var(--muted);
  }

  .feed {
    padding: 0 4px 20px;
  }

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

  .card {
    border-radius: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 0.9rem;
    min-height: auto;
    -webkit-line-clamp: 3;
  }

  .card-price {
    font-size: 1.05rem;
  }

  .card-meta {
    font-size: 0.72rem;
  }

  .btn-buy,
  .btn-cart {
    font-size: 0.82rem;
    padding: 10px;
  }

  .cart-bar {
    display: none !important;
  }

  /* Centered modal checkout on desktop */
  .sheet {
    align-items: center;
  }

  .sheet-panel {
    width: min(520px, 92vw);
    max-height: 88vh;
    border-radius: 16px;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s;
  }

  .sheet:not(.open) .sheet-panel {
    opacity: 0;
  }

  .sheet.open .sheet-panel {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* ─── Wide desktop ─── */
@media (min-width: 1280px) {
  .grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .layout-body {
    grid-template-columns: 240px 1fr;
    gap: 32px;
  }
}
