:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --primary-soft: #dbeafe;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  --header-h: 74px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

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

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.topbar {
  background: linear-gradient(90deg, #0f172a, #1e3a8a);
  color: #e2e8f0;
  font-size: 0.85rem;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  flex-wrap: wrap;
}

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

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
}

.logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
  flex-shrink: 0;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.28);
}

.logo-text span {
  color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  max-width: 520px;
  width: 100%;
  margin-inline: auto;
}

.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0.8rem 1rem;
}

.search-box button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 1rem;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  font-weight: 600;
  color: var(--muted);
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  position: relative;
}

.cart-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  padding: 0 0.35rem;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.main-nav {
  border-top: 1px solid var(--line);
  background: white;
}

.nav-links {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.55rem 0;
}

.nav-links a {
  white-space: nowrap;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.hero {
  padding: 3rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.hero h1,
.page-header h1,
.section-head h2,
.cta-box h2 {
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin-bottom: 1rem;
  max-width: 14ch;
}

.hero-desc,
.muted,
.footer-about {
  color: var(--muted);
}

.hero-desc {
  max-width: 48ch;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.hero-actions,
.detail-actions,
.qty-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero-stats strong {
  display: block;
  font-size: 1.35rem;
}

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

.hero-visual {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

.hero-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.hero-card-1 {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: white;
  min-height: 180px;
}

.hero-card-1 p,
.hero-card-1 h3 {
  color: white;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 20px rgba(29, 78, 216, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: white;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-light {
  background: white;
  color: var(--primary-dark);
}

.btn-danger {
  background: #fee2e2;
  color: var(--danger);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
}

.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, #eef4ff, transparent);
}

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

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.link-more {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

.features-grid,
.category-grid,
.product-grid,
.promo-grid,
.footer-grid {
  display: grid;
  gap: 1rem;
}

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

.feature-card,
.filter-card,
.summary-card,
.cart-item,
.checkout-card,
.product-card,
.category-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-card {
  padding: 1.25rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  margin-bottom: 0.9rem;
  font-size: 1.3rem;
}

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

.category-card {
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
}

.category-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: var(--accent-soft);
  flex-shrink: 0;
}

.category-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.category-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: #bfdbfe;
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1.05;
  background: linear-gradient(160deg, #dbeafe, #f8fafc 55%, #e2e8f0);
  display: grid;
  place-items: center;
  font-size: 4rem;
  overflow: hidden;
}

.product-media img,
.detail-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.05);
}

.product-icon-fallback {
  font-size: inherit;
  line-height: 1;
}

/* ---------- Galeri foto produk (detail) ---------- */
.gallery-main {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: zoom-in;
}

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

.gallery-zoom {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 23, 42, 0.55);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease;
}

.gallery-zoom:hover {
  background: rgba(15, 23, 42, 0.8);
}

.gallery-thumbs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  z-index: 2;
}

.gallery-thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 2px solid transparent;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: white;
  opacity: 0.85;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

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

.gallery-thumb:hover,
.gallery-thumb.active {
  border-color: var(--primary);
  opacity: 1;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 12, 24, 0.92);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.lightbox img {
  max-width: min(92vw, 900px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 46px;
  height: 46px;
  font-size: 1.2rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  font-size: 1.4rem;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-counter {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #cbd5e1;
  font-weight: 600;
}

/* ---------- Halaman Syarat & Kebijakan ---------- */
.legal-content {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  white-space: pre-line;
  line-height: 1.8;
  max-width: 860px;
}

/* ---------- Akun pelanggan ---------- */
.account-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.account-nav .account-link {
  background: #f1f5f9;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.9rem;
}

.account-nav .account-link:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.auth-wrap {
  display: grid;
  place-items: center;
  padding: 1.5rem 0 3rem;
}

.auth-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 2rem;
  width: min(100%, 440px);
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.auth-card form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.account-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.account-profile-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
}

.account-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: white;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
}

.account-profile-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.account-profile-card .muted {
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.account-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.order-history-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.order-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.order-history-head strong {
  display: block;
  font-size: 1rem;
}

.order-history-total {
  font-weight: 800;
  color: var(--primary-dark);
}

.order-history-items {
  list-style: none;
  display: grid;
  gap: 0.3rem;
  padding: 0.6rem 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  margin-bottom: 0.7rem;
  font-size: 0.92rem;
}

.order-history-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.badge-order-baru { background: #fef3c7; color: #92400e; }
.badge-order-dibayar { background: #dcfce7; color: #166534; }
.badge-order-dikirim { background: var(--primary-soft); color: var(--primary-dark); }
.badge-order-selesai { background: #ede9fe; color: #5b21b6; }
.badge-order-batal { background: #fecaca; color: #991b1b; }

.badge-pay-menunggu { background: #fef3c7; color: #92400e; }
.badge-pay-terbayar { background: #dcfce7; color: #166534; }
.badge-pay-kadaluarsa { background: #fecaca; color: #991b1b; }
.badge-pay-gagal { background: #fecaca; color: #991b1b; }
.badge-pay-tunai { background: var(--primary-soft); color: var(--primary-dark); }

.order-history-item .badge {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

@media (max-width: 1024px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

.product-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

.product-body {
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.product-category {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-body h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.product-price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary-dark);
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.promo-grid {
  grid-template-columns: 1.2fr 1fr;
}

.promo-card {
  border-radius: var(--radius);
  padding: 1.8rem;
  color: white;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
}

.promo-blue {
  background: linear-gradient(135deg, #1d4ed8, #2563eb 45%, #0ea5e9);
}

.promo-green {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.promo-orange {
  background: linear-gradient(135deg, #c2410c, #f97316 45%, #fb923c);
}

.promo-purple {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6 45%, #a78bfa);
}

.promo-red {
  background: linear-gradient(135deg, #b91c1c, #ef4444 45%, #f87171);
}

.promo-tag {
  opacity: 0.9;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cta-section {
  padding-top: 1rem;
}

.cta-box {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: white;
  border-radius: 28px;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.cta-box p {
  color: #cbd5e1;
  max-width: 52ch;
  margin-top: 0.4rem;
}

.site-footer {
  margin-top: 3rem;
  background: #0b1220;
  color: #cbd5e1;
  padding-top: 3rem;
}

.footer-grid {
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-grid h4 {
  color: white;
  margin-bottom: 0.9rem;
}

.footer-grid a,
.footer-grid p {
  display: block;
  margin-bottom: 0.45rem;
  color: #94a3b8;
}

.footer-about {
  margin-top: 1rem;
  max-width: 34ch;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 1rem 0 1.4rem;
  color: #64748b;
  font-size: 0.9rem;
}

.page {
  padding: 2rem 0 3rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.catalog-layout,
.cart-layout,
.checkout-layout,
.detail-layout {
  display: grid;
  gap: 1.25rem;
}

.catalog-layout {
  grid-template-columns: 260px 1fr;
  align-items: start;
}

.filters {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 110px;
}

.filter-card {
  padding: 1.1rem;
}

.filter-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.filter-list {
  display: grid;
  gap: 0.35rem;
}

.filter-btn {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.select,
.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  outline: none;
}

.select:focus,
.input:focus,
.textarea:focus {
  border-color: #93c5fd;
  background: white;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.25);
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.detail-layout {
  grid-template-columns: 1fr 1fr;
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-media {
  background: linear-gradient(160deg, #dbeafe, #f8fafc 55%, #e2e8f0);
  min-height: 480px;
  display: grid;
  place-items: center;
  font-size: 8rem;
  position: relative;
  overflow: hidden;
}

.detail-content {
  padding: 2rem;
}

.detail-content h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0.4rem 0 0.8rem;
  line-height: 1.2;
}

.detail-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 1rem 0;
}

.detail-desc {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.option-group {
  margin-bottom: 1.1rem;
}

.option-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.size-btn {
  min-width: 48px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  font-weight: 700;
  padding: 0 0.8rem;
}

.size-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.qty-control button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  font-weight: 700;
}

.qty-control input {
  width: 70px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  height: 42px;
  background: #f8fafc;
}

.detail-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
}

.detail-list li {
  list-style: none;
  padding-left: 1.3rem;
  position: relative;
}

.detail-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}

.cart-layout,
.checkout-layout {
  grid-template-columns: 1.4fr 0.8fr;
  align-items: start;
}

.cart-list,
.form-grid {
  display: grid;
  gap: 1rem;
}

.cart-item {
  padding: 1rem;
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 1rem;
  align-items: center;
}

.cart-thumb {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  background: linear-gradient(160deg, #dbeafe, #f8fafc);
  display: grid;
  place-items: center;
  font-size: 2rem;
  overflow: hidden;
}

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

.cart-item h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cart-item .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
}

.cart-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cart-item-total {
  font-weight: 800;
  text-align: right;
}

.summary-card,
.checkout-card {
  padding: 1.25rem;
  position: sticky;
  top: 110px;
}

.summary-card h3,
.checkout-card h3 {
  margin-bottom: 1rem;
}

.summary-row,
.order-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  color: var(--muted);
}

.summary-row.total,
.order-line.total {
  color: var(--text);
  font-weight: 800;
  font-size: 1.1rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.8rem;
  margin-top: 0.5rem;
}

.free-note {
  background: var(--accent-soft);
  color: #115e59;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.8rem 0 1rem;
}

.form-grid.two {
  grid-template-columns: 1fr 1fr;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-weight: 700;
  font-size: 0.92rem;
}

.field .error {
  color: var(--danger);
  font-size: 0.82rem;
  min-height: 1em;
}

.order-items {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.order-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.empty-state,
.loading-state,
.success-state {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.empty-icon,
.success-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.empty-state h3,
.success-state h3 {
  margin-bottom: 0.4rem;
}

.empty-state p,
.success-state p,
.loading-state {
  color: var(--muted);
}

.empty-state .btn,
.success-state .btn {
  margin-top: 1rem;
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

/* ---------- Opsi pengiriman (checkout) ---------- */
.shipping-options {
  display: grid;
  gap: 0.6rem;
}

.shipping-option {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  background: white;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.shipping-option:hover {
  border-color: #93c5fd;
}

.shipping-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.shipping-option input {
  margin-top: 0.25rem;
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.shipping-option strong {
  display: block;
  font-size: 0.95rem;
}

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

/* ---------- Halaman Panduan Ukuran ---------- */
.guide-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.guide-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.guide-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.guide-head h2 {
  font-size: 1.15rem;
}

.guide-head p {
  color: var(--muted);
  font-size: 0.9rem;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
}

.guide-table th,
.guide-table td {
  text-align: center;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
}

.guide-table th:first-child,
.guide-table td:first-child {
  text-align: left;
}

.guide-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}

.guide-table tbody tr:last-child td {
  border-bottom: 0;
}

.guide-table tbody tr:hover td {
  background: #f8fafc;
}

@media (max-width: 600px) {
  .guide-table th,
  .guide-table td {
    padding: 0.55rem 0.5rem;
    font-size: 0.85rem;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(120%);
  background: #0f172a;
  color: white;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 100;
  opacity: 0;
  transition: 0.25s ease;
  max-width: min(92vw, 420px);
  text-align: center;
  font-weight: 600;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Halaman sukses checkout ---------- */
.order-number {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  padding: 0.6rem 1.2rem;
  border-radius: 14px;
  margin: 0.6rem 0 1rem;
}

.pay-instructions {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 1.1rem;
  margin: 1.25rem auto 1.25rem;
  max-width: 480px;
  text-align: left;
}

.pay-instructions h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.pay-instructions p {
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.pay-accounts {
  font-family: inherit;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  white-space: pre-wrap;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

/* ---------- Info pembayaran (VA / QRIS) ---------- */
.pay-info {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin: 1rem 0;
}

.pay-info h3 {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.pay-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}

.pay-info-row strong {
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.pay-status-box {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  margin: 0.8rem auto 0;
  max-width: 420px;
}

.pay-status-result {
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 600;
}

.related-section {
  margin-top: 2rem;
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .hero-grid,
  .detail-layout,
  .cart-layout,
  .checkout-layout,
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .filters,
  .summary-card,
  .checkout-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .search-box {
    grid-column: 1 / -1;
    order: 3;
    max-width: none;
  }

  .nav-link {
    display: none;
  }

  .account-nav .account-link {
    display: inline-flex;
  }

  .cart-btn span:not(.cart-count) {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
  }

  .main-nav.open {
    display: block;
  }

  .hero {
    padding-top: 1.5rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .features-grid,
  .category-grid,
  .product-grid,
  .promo-grid,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .cart-item-total {
    grid-column: 1 / -1;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .detail-media {
    min-height: 280px;
    font-size: 5rem;
  }

  .topbar-contact {
    display: none;
  }
}

@media (max-width: 480px) {
  .product-actions {
    grid-template-columns: 1fr;
  }

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