:root {
  --brand: #ff5000;
  --brand-dark: #d83b00;
  --accent: #ff7a00;
  --gold: #ffb000;
  --ink: #151823;
  --muted: #6c7280;
  --line: #e8e9ee;
  --paper: #ffffff;
  --soft: #f5f5f5;
  --danger: #d32f2f;
  --warn: #f5a400;
  --ok: #16845b;
  --shadow: 0 16px 38px rgba(36, 38, 47, 0.1);
}

/* 20260524-8 marketplace refinement: mature Taiwan shopping layout inspired by familiar ecommerce patterns. */
.site-header {
  background: linear-gradient(180deg, #ff5000 0%, #ff6a00 100%);
  border-bottom: 0;
  color: #fff;
}

.header-main {
  padding-top: 14px;
  padding-bottom: 10px;
}

.brand-logo {
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.search-box {
  border-color: #fff;
  box-shadow: 0 6px 18px rgba(180, 54, 0, 0.22);
}

.search-box button {
  color: #fff;
  background: #ff5000;
}

.quick-actions a,
.cart-button {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.cart-button span {
  color: #ff5000;
  background: #fff;
}

.cart-button small {
  color: #fff7ed;
}

.category-strip {
  max-width: none;
  background: #fff;
  padding-top: 10px;
  box-shadow: 0 5px 18px rgba(36, 38, 47, 0.05);
}

.category-strip a {
  border-color: transparent;
  color: #4b5563;
  background: #fff;
}

.category-strip a:hover {
  color: var(--brand);
}

.app-shell {
  padding-top: 14px;
}

.section,
.commerce-hero,
.shop-service-row,
.category-shortcuts,
.promo-strip {
  max-width: 1240px;
  margin-right: auto;
  margin-left: auto;
}

.banner-carousel,
.checkout-panel,
.checkout-summary,
.auth-card,
.account-card,
.me-panel,
.me-wallet,
.shopee-order-card,
.orders-header {
  border-radius: 4px;
}

.product-card {
  border-radius: 4px;
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(255, 80, 0, 0.16);
}

.price::first-letter {
  font-size: 13px;
}

.order-tabs,
.shopee-order-card {
  border-radius: 0;
}

.order-tabs button.active::after,
.auth-tabs button.active::after {
  background: #ff5000;
}

.checkout-summary {
  position: sticky;
  top: 128px;
}

.site-footer {
  min-height: 96px;
  background: #2b2f36;
  color: #d7dbe2;
}

.site-footer strong {
  color: #fff;
}

@media (max-width: 620px) {
  .site-header {
    border-bottom: 0;
  }

  .category-strip {
    padding-right: 12px;
    padding-left: 12px;
  }

  .app-shell {
    padding-top: 10px;
  }

  .checkout-summary {
    position: static;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header,
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-main,
.admin-topbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 18px;
}

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

.brand-logo {
  display: block;
  width: 166px;
  height: 48px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: none;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 2px solid var(--brand);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.search-box input {
  min-width: 0;
  border: 0;
  padding: 11px 14px;
  outline: 0;
}

.search-box button,
.primary-button {
  border: 0;
  color: #fff;
  background: var(--brand);
  padding: 11px 18px;
  font-weight: 700;
}

.primary-button:hover,
.search-box button:hover {
  background: var(--brand-dark);
}

.quick-actions,
.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-actions a,
.cart-button,
.outline-button,
.ghost-link {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 12px;
  color: var(--ink);
  font-weight: 700;
}

.cart-button span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  color: #fff;
  background: var(--brand);
  border-radius: 99px;
  place-items: center;
  font-size: 12px;
}

.cart-button {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px 6px;
}

.cart-button small {
  grid-column: 1 / -1;
  color: var(--brand);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.category-strip {
  display: flex;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 18px 12px;
  gap: 8px;
  overflow-x: auto;
}

.category-strip a,
.pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.category-strip a.active,
.pill.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.app-shell {
  max-width: 1240px;
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  padding: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 22px;
  align-items: stretch;
  min-height: 340px;
  padding: 28px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(21, 24, 35, 0.84), rgba(21, 24, 35, 0.4), rgba(21, 24, 35, 0.16)),
    url("https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?auto=format&fit=crop&w=1800&q=82");
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
}

.hero h1 {
  max-width: 680px;
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero .primary-button,
.hero .outline-button {
  min-width: 132px;
  border-radius: 8px;
}

.hero .outline-button {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero-metrics {
  display: grid;
  align-content: end;
  gap: 10px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric {
  min-height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.metric strong {
  display: block;
  font-size: 26px;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.section {
  margin-top: 26px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar input,
.toolbar select,
.checkout-box input,
.checkout-box select,
.import-panel input,
.import-panel textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 12px;
}

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

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

.category-tile,
.benefit,
.admin-card,
.import-panel,
.table-wrap,
.product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(36, 38, 47, 0.04);
}

.category-tile {
  display: grid;
  min-height: 92px;
  padding: 16px;
  align-content: space-between;
}

.category-tile strong {
  font-size: 17px;
}

.category-tile span {
  color: var(--muted);
  font-size: 13px;
}

.product-card {
  overflow: hidden;
}

.product-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f1f2f5;
  object-position: center;
}

.product-body {
  padding: 12px;
}

.product-title {
  min-height: 44px;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
}

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

.price {
  color: var(--brand);
  font-size: 20px;
  font-weight: 800;
}

.original-price {
  color: var(--muted);
  font-size: 13px;
  text-decoration: line-through;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  border-radius: 6px;
  background: #f0f2f4;
  padding: 4px 7px;
}

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

.card-actions button,
.secondary-button,
.danger-button,
.success-button,
.icon-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  font-weight: 700;
}

.secondary-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.card-actions .primary-button,
.detail-actions .primary-button,
.order-action-row .primary-button {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.card-actions .primary-button:hover,
.detail-actions .primary-button:hover,
.order-action-row .primary-button:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;
}

.danger-button {
  border-color: rgba(211, 47, 47, 0.35);
  color: var(--danger);
}

.success-button {
  border-color: rgba(22, 132, 91, 0.35);
  color: var(--ok);
}

.full {
  width: 100%;
  border-radius: 8px;
}

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

.benefit {
  padding: 18px;
}

.benefit strong {
  display: block;
  margin-bottom: 6px;
}

.benefit span {
  color: var(--muted);
  line-height: 1.6;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: 20px;
}

.detail-gallery {
  display: grid;
  gap: 10px;
}

.detail-gallery-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
}

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

.thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 8px;
}

.detail-info,
.copy-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.detail-info h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.25;
}

.sku-grid,
.qty-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.sku-grid button,
.qty-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 12px;
}

.sku-grid button.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.qty-row input {
  width: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.spec-table,
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td,
.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  width: 130px;
  color: var(--muted);
  font-weight: 700;
}

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

.detail-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  justify-content: end;
  background: rgba(36, 38, 47, 0.46);
}

.cart-drawer.open {
  display: flex;
}

.drawer-panel {
  width: min(420px, 100%);
  height: 100%;
  overflow: auto;
  background: #fff;
  box-shadow: var(--shadow);
}

.drawer-head {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 16px;
}

.drawer-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.cart-items {
  padding: 14px;
}

.cart-line {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line img {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  object-fit: cover;
}

.cart-line h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

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

.checkout-box {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 16px;
}

.checkout-box label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.cart-total strong {
  color: var(--brand);
  font-size: 24px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: 340px;
  transform: translateY(20px);
  opacity: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: 0.2s ease;
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 20px;
  color: var(--muted);
}

.site-footer strong {
  color: var(--ink);
}

.admin-body {
  background: #f6f7f9;
}

.admin-topbar {
  max-width: none;
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.admin-nav {
  position: sticky;
  top: 68px;
  display: grid;
  align-content: start;
  gap: 6px;
  height: calc(100vh - 68px);
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 16px;
}

.admin-nav button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 12px;
  text-align: left;
  font-weight: 700;
}

.admin-nav button.active {
  color: #fff;
  background: var(--brand);
}

.admin-main {
  padding: 20px;
}

.admin-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.admin-title h1 {
  margin: 0;
  font-size: 28px;
}

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

.admin-card {
  padding: 16px;
}

.admin-card small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.admin-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.admin-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.admin-section {
  margin-top: 18px;
}

.table-wrap {
  overflow: auto;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
  font-size: 13px;
}

.admin-table td {
  min-width: 104px;
  font-size: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.status.online,
.status.paid,
.status.ok {
  color: #096847;
  background: #def7ec;
}

.status.draft,
.status.warn {
  color: #8a5a00;
  background: #fff2c7;
}

.status.blocked,
.status.danger {
  color: #a61919;
  background: #ffe1e1;
}

.import-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.import-panel textarea {
  min-height: 150px;
  resize: vertical;
}

.ai-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.ai-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.ai-step strong {
  display: block;
  margin-bottom: 6px;
}

.ai-step span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .header-main,
  .admin-topbar {
    grid-template-columns: 1fr;
  }

  .quick-actions,
  .admin-topbar-actions {
    justify-content: space-between;
  }

  .hero,
  .detail-layout,
  .wide-panel {
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .stat-grid,
  .ai-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    position: static;
    display: flex;
    height: auto;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-nav button {
    flex: 0 0 auto;
  }
}

@media (max-width: 620px) {
  .app-shell,
  .admin-main {
    padding: 12px;
  }

  .hero {
    min-height: 500px;
    padding: 22px;
  }

  .metric-row,
  .grid,
  .category-grid,
  .stat-grid,
  .ai-flow,
  .detail-images {
    grid-template-columns: 1fr;
  }

  .section-head,
  .admin-title {
    align-items: start;
    flex-direction: column;
  }

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

/* Consumer storefront v3: Taobao / Pinduoduo / Shopee-inspired dense commerce UI. */
.commerce-hero {
  margin-bottom: 12px;
}

.banner-carousel {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 12px;
  background: #111;
}

.banner-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 38px;
  color: #fff;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.4s ease;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
}

.banner-slide p {
  max-width: 520px;
  margin: 0;
  font-size: 18px;
}

.banner-slide .primary-button {
  width: fit-content;
  border-radius: 8px;
}

.banner-dots {
  position: absolute;
  left: 38px;
  bottom: 24px;
  display: flex;
  gap: 7px;
}

.banner-dots span {
  width: 28px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.78);
}

.shop-service-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.shop-service-row div,
.promo-strip,
.account-card,
.checkout-panel,
.checkout-summary,
.order-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(36, 38, 47, 0.04);
}

.shop-service-row div {
  padding: 14px;
}

.shop-service-row strong,
.shop-service-row span,
.promo-strip strong,
.promo-strip span {
  display: block;
}

.shop-service-row span,
.promo-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.category-shortcuts {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 12px;
}

.category-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 10px 16px;
  font-weight: 800;
}

.promo-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px;
  background: linear-gradient(90deg, #fff5ef, #e9fff8);
}

.promo-strip b {
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
}

.product-card {
  position: relative;
}

.shop-card {
  border-radius: 10px;
}

.product-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.price {
  font-size: 22px;
}

.shop-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 10px;
}

.favorite-button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #8a8f9d;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.favorite-button.active {
  color: #fff;
  background: var(--brand);
}

.detail-images.vertical {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
}

.detail-images.vertical img {
  aspect-ratio: 16 / 10;
}

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

.auth-page {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(320px, 1fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: stretch;
}

.auth-visual {
  display: grid;
  align-content: end;
  min-height: 520px;
  border-radius: 10px;
  padding: 26px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(238, 77, 45, 0.18), rgba(238, 77, 45, 0.88)),
    url("https://images.unsplash.com/photo-1607082349566-187342175e2f?auto=format&fit=crop&w=900&q=82");
  background-size: cover;
  background-position: center;
}

.auth-visual h1 {
  margin: 0 0 8px;
  font-size: 38px;
}

.auth-visual p {
  margin: 0;
  line-height: 1.7;
}

.auth-card {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(36, 38, 47, 0.04);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  position: relative;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-tabs button.active {
  color: var(--brand);
}

.auth-tabs button.active::after {
  content: "";
  position: absolute;
  right: 20%;
  bottom: 0;
  left: 20%;
  height: 3px;
  background: var(--brand);
}

.auth-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-card input,
.verify-row input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
}

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

.verify-row button,
.social-buttons button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 0 12px;
  font-weight: 800;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.auth-links a {
  color: var(--brand);
  font-weight: 800;
}

.social-login {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.social-login span {
  height: 1px;
  background: var(--line);
}

.social-login em {
  font-style: normal;
}

.social-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.account-card,
.checkout-panel,
.checkout-summary,
.order-card {
  padding: 18px;
}

.me-page {
  display: grid;
  gap: 12px;
}

.me-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  padding: 20px;
}

.avatar {
  display: grid;
  width: 64px;
  height: 64px;
  border: 3px solid rgba(255,255,255,.78);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  place-items: center;
  font-size: 26px;
  font-weight: 900;
}

.me-hero h2,
.me-hero p {
  margin: 0;
}

.me-hero p {
  margin-top: 5px;
  color: rgba(255,255,255,.86);
}

.me-hero .outline-button {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-color: rgba(255,255,255,.5);
}

.me-wallet,
.me-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.me-wallet {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.me-wallet a {
  display: grid;
  gap: 4px;
  min-height: 78px;
  place-items: center;
  border-right: 1px solid var(--line);
}

.me-wallet a:last-child {
  border-right: 0;
}

.me-wallet strong {
  color: var(--brand);
  font-size: 22px;
}

.me-wallet span,
.me-order-icons span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.me-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.me-panel-head a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.me-order-icons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.me-order-icons a {
  display: grid;
  gap: 6px;
  min-height: 86px;
  place-items: center;
}

.me-order-icons b {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #fff1ed;
  color: var(--brand);
  place-items: center;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
}

.service-grid a {
  display: grid;
  min-height: 72px;
  background: #fff;
  place-items: center;
  text-align: center;
  font-weight: 800;
}

.account-card h2,
.checkout-panel h3,
.checkout-summary h3 {
  margin-top: 0;
}

.account-card label,
.checkout-panel label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.account-card input,
.checkout-panel input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
}

.checkout-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.checkout-main {
  display: grid;
  gap: 12px;
}

.checkout-main h2 {
  margin: 0;
}

.radio-line {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 10px !important;
}

.radio-line input {
  min-height: 0;
  width: 18px;
  height: 18px;
}

.hint {
  color: var(--muted);
  line-height: 1.6;
}

.summary-line,
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.summary-line span {
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.summary-line small {
  color: var(--ink);
  font-size: 12px;
}

.summary-total {
  border-bottom: 0;
  align-items: center;
}

.summary-total strong {
  color: var(--brand);
  font-size: 26px;
}

.order-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.order-card div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.order-card span {
  color: var(--muted);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.timeline span {
  border-radius: 999px;
  background: #f1f2f5;
  padding: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline span.done {
  color: #fff;
  background: var(--brand);
}

.orders-page {
  display: grid;
  gap: 12px;
}

.orders-header {
  border-radius: 10px;
  background: #fff;
  padding: 18px;
  border: 1px solid var(--line);
}

.orders-header h2 {
  margin: 0 0 4px;
}

.orders-header p {
  margin: 0;
  color: var(--muted);
}

.order-tabs {
  position: sticky;
  top: 78px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.order-tabs button {
  position: relative;
  min-height: 54px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: #444;
  font-weight: 800;
}

.order-tabs button:last-child {
  border-right: 0;
}

.order-tabs button.active {
  color: var(--brand);
}

.order-tabs button.active::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 0;
  left: 20px;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: var(--brand);
}

.order-tabs b {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  border-radius: 99px;
  background: #fff1ed;
  color: var(--brand);
  place-items: center;
  font-size: 12px;
}

.shopee-order-card {
  display: grid;
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.order-shop-row,
.order-id-row,
.order-total-row,
.order-action-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
}

.order-shop-row {
  border-bottom: 1px solid var(--line);
}

.order-id-row {
  color: var(--muted);
  font-size: 13px;
}

.order-status {
  color: var(--brand);
  font-weight: 900;
}

.order-status.warn {
  color: #c47b00;
}

.order-status.ship {
  color: var(--brand);
}

.order-status.done {
  color: var(--ok);
}

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

.order-product-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid #f1f1f1;
}

.order-product-row img {
  width: 84px;
  height: 84px;
  border-radius: 6px;
  object-fit: cover;
}

.order-product-row h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.4;
}

.order-product-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.order-product-row strong {
  color: var(--ink);
  white-space: nowrap;
}

.order-logistics {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px;
  border-radius: 8px;
  background: #fff7f4;
  padding: 12px;
  color: #6d3a2d;
}

.order-logistics b {
  color: var(--brand);
}

.shopee-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 14px 16px;
}

.shopee-progress span {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shopee-progress i {
  display: grid;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #e9e9e9;
  color: #777;
  place-items: center;
  font-style: normal;
}

.shopee-progress span.active {
  color: var(--brand);
}

.shopee-progress span.active i {
  background: var(--brand);
  color: #fff;
}

.order-total-row {
  border-top: 1px solid var(--line);
  background: #fffdfc;
}

.order-total-row span {
  color: var(--muted);
}

.order-total-row strong {
  color: var(--brand);
  font-size: 18px;
}

.order-action-row {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: #fff;
}

.order-action-row button {
  min-width: 96px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.mobile-tabbar {
  display: none;
}

@media (max-width: 620px) {
  body {
    padding-bottom: 66px;
  }

  .quick-actions {
    display: none;
  }

  .header-main {
    gap: 10px;
    padding: 10px 12px;
  }

  .brand-logo {
    width: 132px;
    height: 38px;
  }

  .banner-carousel {
    min-height: 260px;
    border-radius: 10px;
  }

  .banner-slide {
    padding: 22px;
  }

  .banner-slide h1 {
    font-size: 34px;
  }

  .shop-service-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shop-service-row div {
    padding: 10px;
  }

  .shop-service-row strong {
    font-size: 13px;
  }

  .shop-service-row span {
    font-size: 12px;
  }

  .grid,
  .product-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px;
  }

  .product-body {
    padding: 9px;
  }

  .product-title {
    min-height: 38px;
    font-size: 13px;
  }

  .price {
    font-size: 18px;
  }

  .original-price,
  .shop-meta {
    font-size: 11px;
  }

  .card-actions {
    gap: 6px;
  }

  .card-actions button {
    min-height: 34px;
    padding: 6px;
    font-size: 12px;
  }

  .detail-layout,
  .account-layout,
  .auth-page,
  .checkout-page {
    grid-template-columns: 1fr !important;
  }

  .auth-visual {
    min-height: 220px;
  }

  .me-hero {
    grid-template-columns: auto 1fr;
  }

  .me-hero .outline-button {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
  }

  .me-wallet,
  .me-order-icons {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

  .detail-actions .success-button {
    grid-column: 1 / -1;
  }

  .detail-images.vertical {
    grid-template-columns: 1fr;
  }

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

  .mobile-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

.mobile-tabbar a,
  .mobile-tabbar button {
    display: grid;
    min-height: 58px;
    border: 0;
    background: transparent;
    color: var(--muted);
    place-items: center;
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-tabbar small {
    display: block;
    color: var(--brand);
    font-size: 11px;
    line-height: 1;
  }

  .order-tabs {
    top: 112px;
    grid-template-columns: repeat(7, 96px);
    border-radius: 0;
    margin-right: -12px;
    margin-left: -12px;
  }

  .order-product-row {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .order-product-row img {
    width: 68px;
    height: 68px;
  }

  .order-product-row strong {
    grid-column: 2;
  }

  .order-logistics,
  .order-total-row,
  .order-action-row,
  .order-id-row,
  .order-shop-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .shopee-progress {
    grid-template-columns: 1fr;
  }

  .order-action-row button {
    width: 100%;
  }
}

/* Final storefront skin override. Keep this block last so older rules cannot wash out the marketplace header. */
.site-header {
  background: linear-gradient(180deg, #ff5000 0%, #ff6a00 100%) !important;
  border-bottom: 0 !important;
  color: #fff !important;
}

.site-header .category-strip {
  color: var(--ink);
}

.site-header .quick-actions a,
.site-header .cart-button {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}

.site-header .cart-button small {
  color: #fff !important;
}

.site-header .cart-button span {
  color: #ff5000 !important;
  background: #fff !important;
}
