:root {
  --bg: #f1f3f6;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --line: #d9e1ef;
  --text: #1e2b45;
  --text-soft: #5a6784;
  --primary: #1664c0;
  --primary-2: #0f4ea7;
  --accent: #ff9f1c;
  --ok: #2a9d4b;
  --warn: #f08c00;
  --danger: #d9480f;
  --shadow-sm: 0 10px 22px rgba(21, 43, 79, 0.08);
  --shadow-md: 0 24px 52px rgba(16, 36, 71, 0.14);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Manrope', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 5% -8%, rgba(22, 100, 192, 0.18), transparent 28%),
    radial-gradient(circle at 95% 8%, rgba(255, 159, 28, 0.14), transparent 30%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

.app-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 18px 96px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(16, 41, 82, 0.08);
  background: linear-gradient(100deg, var(--primary-2), var(--primary));
  box-shadow: 0 10px 30px rgba(14, 58, 121, 0.28);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.topbar-inner > * {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  color: #fff;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  min-width: 0;
  white-space: nowrap;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-dot {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: inherit;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  transition: 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 0 12px;
}

.search-pill input {
  border: none;
  outline: none;
  width: 100%;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 180ms ease;
  position: relative;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.dot {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  display: none;
}

.dot.active {
  display: block;
}

.dropdown {
  position: absolute;
  right: 0;
  top: 50px;
  width: 240px;
  max-width: min(240px, calc(100vw - 16px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: none;
  z-index: 8;
}

.dropdown.show {
  display: block;
}

.dropdown a,
.dropdown .info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
}

.dropdown a:hover {
  background: #f4f7fb;
}

.dropdown .info {
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.page-title {
  font-family: var(--font-heading);
  margin: 0;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 0.84rem;
  margin-top: 6px;
}

.crumbs strong {
  color: var(--text);
}

.hero {
  margin-top: 14px;
  border-radius: var(--radius-lg);
  min-height: 308px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: linear-gradient(120deg, #0f4ea7, #1664c0);
}

.hero::before {
  content: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 420ms ease;
  padding: 34px;
  display: grid;
  align-content: center;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(95deg, rgba(8, 21, 43, 0.78), rgba(8, 21, 43, 0.4)),
    linear-gradient(180deg, rgba(8, 21, 43, 0.15), rgba(8, 21, 43, 0.35));
}

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

.hero-content {
  max-width: 560px;
  color: #fff;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(9, 24, 49, 0.76), rgba(9, 24, 49, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 14px 26px rgba(7, 18, 36, 0.28);
  backdrop-filter: blur(2px);
}

.hero-kicker {
  margin: 0 0 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.65rem);
  line-height: 1.16;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.32);
}

.hero-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.52;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: 180ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

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

.btn-accent {
  background: linear-gradient(135deg, #ffac2f, #ff8f00);
  color: #fff;
}

.btn-strong {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid rgba(22, 100, 192, 0.34);
}

.btn-ghost {
  background: #eef3fb;
  color: var(--text-soft);
  border: 1px solid var(--line);
}

.section {
  margin-top: 22px;
}

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

.section-head h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.3rem;
}

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

.trust-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.trust-chip .material-symbols-rounded {
  color: var(--primary);
  font-size: 20px;
}

.trust-chip strong {
  display: block;
  font-size: 0.88rem;
}

.trust-chip p {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 3px;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.chip.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

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

.card {
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.product-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 340px;
  cursor: pointer;
  transition: 220ms ease;
  isolation: isolate;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(17, 37, 70, 0.13);
}

.product-image {
  height: 190px;
  background: linear-gradient(180deg, #fdfefe, #f1f4f8);
  padding: 10px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #eef2f8;
  position: relative;
  z-index: 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 180ms ease;
}

.product-card:hover .product-image img {
  transform: scale(1.02);
}

.product-body {
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;
  position: relative;
  z-index: 1;
  background: #fff;
}

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

.tag {
  width: max-content;
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f4ea7;
  background: rgba(15, 78, 167, 0.1);
  border-radius: 7px;
  padding: 5px 7px;
}

.stock-pill {
  font-size: 0.7rem;
  font-weight: 800;
  color: #1f8441;
  background: #eaf8ef;
  border: 1px solid #caecd6;
  border-radius: 999px;
  padding: 4px 8px;
}

.product-name {
  margin: 0;
  font-size: 0.97rem;
  font-weight: 800;
  line-height: 1.34;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.6em;
}

.product-desc {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.4em;
}

.product-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.price {
  font-size: 1.18rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: #0f4ea7;
}

.mini-note {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.75rem;
}

.desc-card {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
}

.desc-title {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--primary-2);
}

.desc-text {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 0.9rem;
}

.round-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(22, 100, 192, 0.22);
  background: rgba(22, 100, 192, 0.08);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.notice {
  border: 1px dashed #cbd5e9;
  border-radius: 14px;
  padding: 22px;
  color: var(--text-soft);
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
}

.detail-wrap {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 18px;
  margin-top: 8px;
}

.media-box,
.panel {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.media-box {
  padding: 16px;
  min-height: 470px;
  display: grid;
  align-content: start;
  gap: 14px;
  background: linear-gradient(180deg, #fdfefe, #f4f7fb);
}

.media-box img {
  width: 100%;
  height: 390px;
  object-fit: contain;
}

.main-image-wrap {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
}

.main-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.thumb-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.thumb-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  width: 68px;
  height: 68px;
  padding: 4px;
  cursor: pointer;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumb-btn.active {
  border-color: rgba(22, 100, 192, 0.46);
  box-shadow: 0 0 0 3px rgba(22, 100, 192, 0.12);
}

.panel {
  padding: 20px;
}

.rating-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

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

.kv div {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.kv b {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 0.91rem;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.stars {
  color: #ff9f1c;
  font-size: 0.9rem;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid #cbd5e9;
  border-radius: 10px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  background: #fff;
}

.textarea {
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(22, 100, 192, 0.5);
  box-shadow: 0 0 0 4px rgba(22, 100, 192, 0.12);
}

.form-row {
  display: grid;
  gap: 10px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 18px;
}

.cart-trust-row,
.order-trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.trust-mini {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.trust-mini:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 34, 68, 0.11);
}

.trust-mini .material-symbols-rounded {
  color: var(--primary);
  font-size: 20px;
}

.trust-mini strong {
  display: block;
  font-size: 0.86rem;
}

.trust-mini p {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 12px;
  align-items: center;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.item .thumb {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f7f9fc;
  overflow: hidden;
}

.item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 34, 68, 0.09);
}

.cart-item.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.item-title {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 800;
}

.item-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.item-price-line {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.item-total {
  display: block;
  margin-top: 5px;
  font-family: var(--font-heading);
}

.qty-wrap {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 4px;
  background: #fff;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.qty-btn:hover {
  background: rgba(22, 100, 192, 0.1);
  color: var(--primary);
  border-color: rgba(22, 100, 192, 0.35);
}

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

.qty-value {
  min-width: 22px;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.remove-btn {
  border: none;
  background: transparent;
  color: #ca3c2d;
  font-size: 0.78rem;
  cursor: pointer;
  font-weight: 800;
}

.summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  position: sticky;
  top: 92px;
  box-shadow: var(--shadow-sm);
}

.summary-card {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--text-soft);
}

.summary-total {
  border-top: 1px dashed var(--line);
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-family: var(--font-heading);
}

.summary-note {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.secure-line {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #1f6a2f;
  background: #edf8ef;
  border: 1px solid #cde8d4;
  border-radius: 999px;
  padding: 5px 9px;
}

.secure-line .material-symbols-rounded {
  font-size: 16px;
}

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

.metric-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.metric-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-heading);
  font-size: 1.08rem;
}

.status-pill {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
}

.order-card {
  padding: 14px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.order-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 34, 68, 0.11);
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.order-head h4 {
  margin: 0;
  font-size: 1rem;
}

.order-meta {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.order-ref {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.order-progress {
  margin-top: 10px;
}

.order-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #e7edf7;
  overflow: hidden;
}

.order-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #4a8be6);
  transition: width 260ms ease;
}

.order-progress-labels {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  font-size: 0.73rem;
  color: var(--text-soft);
}

.order-foot {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.order-foot strong {
  font-family: var(--font-heading);
  font-size: 1.12rem;
}

.order-foot p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 0.82rem;
}

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

.link-btn {
  border-radius: 999px;
  border: 1px solid rgba(22, 100, 192, 0.3);
  padding: 7px 12px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  background: #fff;
  transition: 150ms ease;
}

.link-btn:hover {
  background: rgba(22, 100, 192, 0.08);
}

.checkout-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkout-badges span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff;
}

.checkout-badges .material-symbols-rounded {
  font-size: 16px;
  color: var(--primary);
}

.status-placed {
  background: #e7f2ff;
  color: #1c4e80;
}

.status-processing {
  background: #fff4e6;
  color: #9c5800;
}

.status-shipped,
.status-delivered {
  background: #e9f9ec;
  color: #146c2e;
}

.status-cancelled {
  background: #fff0ef;
  color: #ab2f20;
}

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-pane {
  display: grid;
  place-items: center;
  padding: 28px;
  background: #fff;
}

.auth-panel {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.auth-panel .brand {
  color: var(--text);
}

.auth-panel .brand-dot {
  background: #fff;
  border: 1px solid var(--line);
}

.auth-side {
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 159, 28, 0.34), transparent 35%),
    linear-gradient(145deg, #123972 0%, #1664c0 70%);
  color: #fff;
  padding: 42px;
  display: grid;
  align-content: center;
}

.auth-side h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  margin: 0 0 12px;
}

.alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
}

.alert-error {
  background: #fff3f2;
  color: #b52a1f;
  border: 1px solid #ffd4d1;
}

.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 70;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: none;
  padding: 8px;
  box-shadow: var(--shadow-sm);
}

.bottom-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bottom-nav a {
  border-radius: 10px;
  padding: 8px;
  color: var(--text-soft);
  display: grid;
  justify-items: center;
  gap: 2px;
  font-size: 0.71rem;
  font-weight: 700;
}

.bottom-nav a.active {
  background: rgba(22, 100, 192, 0.12);
  color: var(--primary);
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 86px;
  z-index: 100;
  background: #1f334f;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  display: none;
}

.dialog {
  width: min(520px, calc(100% - 24px));
  border: none;
  border-radius: 18px;
  padding: 0;
  box-shadow: var(--shadow-md);
}

.dialog::backdrop {
  background: rgba(5, 24, 50, 0.45);
  backdrop-filter: blur(4px);
}

.dialog-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
}

.dialog-body {
  padding: 16px;
}

.image-viewer .dialog-body {
  padding: 10px;
}

.image-viewer img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 10px;
  background: #f7f9fc;
}

.site-footer {
  margin-top: 26px;
  background: #112540;
  color: rgba(231, 240, 255, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 18px 16px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.footer-title {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  color: #fff;
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
}

.footer-links a {
  color: rgba(231, 240, 255, 0.8);
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: rgba(231, 240, 255, 0.72);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

.reveal {
  animation: reveal 360ms ease;
}

@media (max-width: 1120px) {
  .detail-wrap,
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .summary {
    position: static;
  }

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

  .cart-trust-row,
  .order-trust-row {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .topbar-inner > .search-pill,
  .topbar-inner > .nav-links {
    grid-column: 1 / -1;
  }

  .topbar-inner > .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .topbar-inner > .nav-links::-webkit-scrollbar {
    display: none;
  }

  .topbar-inner > .search-pill {
    order: 3;
    width: 100%;
    height: 40px;
  }

  .action-row .nav-links {
    display: none;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-side {
    display: none;
  }

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

  .product-grid {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .product-grid::-webkit-scrollbar {
    height: 6px;
  }

  .product-grid > .product-card {
    flex: 0 0 224px;
    max-width: 224px;
    min-height: 326px;
    scroll-snap-align: start;
  }
}

@media (max-width: 780px) {
  .nav-links {
    display: none;
  }

  .app-shell {
    padding: 12px 12px 96px;
  }

  .hero {
    min-height: 238px;
    border-radius: 16px;
  }

  .hero-slide {
    padding: 20px;
  }

  .hero-content {
    max-width: 100%;
    padding: 14px;
  }

  .hero-kicker {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
  }

  .product-image {
    height: 154px;
  }

  .bottom-nav {
    display: block;
  }

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

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

@media (max-width: 520px) {
  .trust-row {
    grid-template-columns: 1fr;
  }

  .product-grid > .product-card {
    flex-basis: 206px;
    max-width: 206px;
    min-height: 312px;
  }

  .item {
    grid-template-columns: 64px 1fr;
  }

  .qty-wrap {
    grid-column: 2;
    justify-items: start;
  }

  .item-meta {
    gap: 4px;
  }

  .cart-trust-row,
  .order-trust-row {
    grid-template-columns: 1fr;
  }

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

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

  .media-box img {
    height: 250px;
  }

  .main-image-wrap {
    border-radius: 12px;
  }

  .thumb-strip {
    gap: 8px;
    padding-bottom: 4px;
  }

  .thumb-btn {
    width: 58px;
    height: 58px;
    border-radius: 8px;
  }

  .hero-content {
    padding: 12px;
    border-radius: 12px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(1.28rem, 6vw, 1.55rem);
    line-height: 1.24;
  }

  .hero-content p {
    font-size: 0.88rem;
    margin-bottom: 14px;
  }

  .media-box {
    min-height: 0;
    padding: 12px;
  }

  .order-foot {
    align-items: flex-start;
  }
}

@media (max-width: 414px) {
  .topbar-inner {
    padding: 9px 10px;
    gap: 8px;
  }

  .brand {
    font-size: 1rem;
    gap: 8px;
  }

  .brand-dot {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 17px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .topbar-inner > .search-pill {
    height: 38px;
    padding: 0 10px;
  }

  .search-pill input {
    font-size: 0.88rem;
  }

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

  .section {
    margin-top: 18px;
  }

  .section-head {
    margin-bottom: 10px;
    gap: 8px;
  }

  .section-head h3 {
    font-size: 1.16rem;
  }

  .hero {
    margin-top: 10px;
    min-height: 214px;
  }

  .hero-slide {
    padding: 14px;
  }

  .hero-content {
    padding: 10px;
  }

  .trust-chip,
  .trust-mini {
    padding: 9px 10px;
    gap: 8px;
  }

  .chip {
    padding: 7px 11px;
    font-size: 0.8rem;
  }

  .product-body {
    padding: 10px;
    gap: 7px;
  }

  .product-image {
    height: 150px;
  }

  .round-btn {
    width: 34px;
    height: 34px;
  }

  .detail-wrap {
    gap: 12px;
  }

  .panel {
    padding: 14px;
  }

  .item {
    padding: 10px;
    gap: 10px;
  }

  .summary {
    padding: 14px;
  }

  .order-card {
    padding: 12px;
  }

  .order-progress-labels {
    font-size: 0.69rem;
    gap: 4px;
  }

  .footer-inner {
    padding: 22px 12px 14px;
  }

  .bottom-nav {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 6px;
  }

  .bottom-nav a {
    padding: 7px 6px;
    font-size: 0.67rem;
  }

  .toast {
    bottom: 78px;
  }

  .dialog {
    width: calc(100% - 16px);
  }
}

@media (max-width: 390px) {
  .brand span:last-child {
    max-width: 106px;
  }

  .topbar-inner > .search-pill {
    height: 36px;
  }

  .app-shell {
    padding: 9px 9px 90px;
  }

  .hero {
    min-height: 206px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(1.2rem, 5.8vw, 1.45rem);
  }

  .hero-content p {
    font-size: 0.84rem;
    margin-bottom: 12px;
  }

  .price {
    font-size: 1.08rem;
  }

  .qty-btn {
    width: 26px;
    height: 26px;
  }

  .qty-value {
    min-width: 18px;
    font-size: 0.84rem;
  }

  .order-progress-labels {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 360px) {
  .brand span:last-child {
    max-width: 90px;
  }

  .topbar-inner {
    padding: 8px;
    gap: 7px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .topbar-inner > .search-pill {
    height: 34px;
    padding: 0 9px;
  }

  .search-pill input {
    font-size: 0.84rem;
  }

  .section-head h3 {
    font-size: 1.08rem;
  }

  .product-name {
    font-size: 0.9rem;
  }

  .product-desc {
    font-size: 0.8rem;
  }

  .item-title {
    font-size: 0.9rem;
  }

  .item-price-line,
  .item-meta {
    font-size: 0.76rem;
  }

  .summary-note {
    font-size: 0.74rem;
  }

  .footer-copy {
    font-size: 0.74rem;
  }
}
  .product-grid > .product-card {
    flex-basis: 196px;
    max-width: 196px;
    min-height: 300px;
  }

  .product-grid > .product-card {
    flex-basis: 184px;
    max-width: 184px;
    min-height: 292px;
  }
