:root {
  --navy: #052048;
  --navy-2: #0a2f66;
  --blue: #1463c9;
  --blue-light: #4f9cff;
  --gold: #f3b42a;
  --gold-2: #d99a12;
  --cream: #fff8e9;
  --milk: #ffffff;
  --ink: #eaf2ff;
  --radius: 10px;

  --fs-eyebrow: clamp(0.75rem, 1.4vw, 0.9rem);
  --fs-hero: clamp(2rem, 5.5vw, 3.6rem);
  --fs-h2: clamp(1.6rem, 3.6vw, 2.4rem);
  --fs-h3: clamp(1.05rem, 2vw, 1.3rem);
  --fs-body: clamp(0.95rem, 1.4vw, 1.05rem);
  --fs-small: clamp(0.8rem, 1.1vw, 0.9rem);
  --pad-side: clamp(1.2rem, 5vw, 4rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app-header, #app-footer { flex: 0 0 auto; }
main.app-root { flex: 1 0 auto; padding-left: 1rem; padding-right: 1rem; }

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

h1, h2, h3, .brand, .eyebrow {
  font-family: 'Baloo 2', 'Segoe UI', sans-serif;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.d-none { display: none !important; }

/* ---------- Header / nav ---------- */
header.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--pad-side);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand img { height: 60px; display: block; z-index: 2; }
nav.mainnav { display: flex; gap: 1.8rem; }
nav.mainnav a { font-weight: 600; color: var(--ink); transition: color .2s ease; }
nav.mainnav a:hover { color: var(--gold); }
.header-icon-link,
.header-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.header-nav-icon,
.drawer-nav-icon {
  font-size: 22px;
  line-height: 1;
}
.header-link-btn {
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  font-size: inherit;
  display: inline-flex;
  align-items: center;
}
.header-link-btn:hover { color: var(--gold); }
.header-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-badge {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 6px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.68rem;
  line-height: 18px;
  text-align: center;
  font-weight: 800;
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  z-index: 60;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
  transform-origin: center;
}
.nav-toggle span:nth-child(1) { width: 24px; }
.nav-toggle span:nth-child(2) { width: 18px; }
.nav-toggle span:nth-child(3) { width: 22px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 24px; }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 24px; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, rgba(3, 15, 38, 0.97) 0%, rgba(5, 32, 72, 0.97) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 5rem var(--pad-side) 2.5rem;
  gap: 0.2rem;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.mobile-drawer.open { transform: translateX(0); pointer-events: auto; }
.mobile-drawer a,
.mobile-drawer button {
  display: block;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--ink);
  opacity: 0;
  transform: translateX(28px);
  transition: color .2s, opacity .35s ease, transform .35s ease;
}

.mobile-drawer.open a,
.mobile-drawer.open button { opacity: 1; transform: translateX(0); }
.mobile-drawer a:nth-child(1) { transition-delay: .05s; }
.mobile-drawer a:nth-child(2) { transition-delay: .10s; }
.mobile-drawer a:nth-child(3) { transition-delay: .15s; }
.mobile-drawer a:nth-child(4) { transition-delay: .20s; }
.mobile-drawer a:hover,
.mobile-drawer button:hover { color: var(--gold); }
.mobile-drawer .drawer-logout {
  text-align: left;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
}
.drawer-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mobile-drawer hr { display: block; border: none; border-top: 1px solid rgba(255, 255, 255, 0.15); margin: 0.4rem 0; }

@media (max-width: 560px) {
  nav.mainnav { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Shared section layout ---------- */
main.app-root section { position: relative; padding: clamp(3rem, 8vw, 6rem) 0; }
.content { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: 0 var(--pad-side); }
.panel {
  background: rgba(4, 22, 52, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 3rem);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
h2 { font-size: var(--fs-h2); color: var(--milk); margin: 0 0 1rem; }
p.lead { font-size: var(--fs-body); line-height: 1.7; opacity: 0.9; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  margin-top: 5px;
  margin-bottom: 5px;
  font-size: var(--fs-body);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn.primary { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: var(--navy); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(243, 180, 42, 0.35); }
.btn.ghost { border: 2px solid rgba(255, 255, 255, 0.35); color: var(--ink); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.hero-cta { display: flex; gap: .2rem; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- Hero ---------- */
.hero { display: flex; align-items: center; overflow: hidden; }
@media (min-width: 768px) {
  .hero { min-height: 92vh; }
}
@media (max-width: 768px) {
  .hero { min-height: 2vh; }
}
.bg-video { -webkit-appearance: none; appearance: none; position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--navy); z-index: -2; display: none; }
.bg-video-potrait { display: none; }
.bg-scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(3, 15, 38, 0.55) 0%, rgba(3, 15, 38, 0.85) 100%);
  display: none;
}
.scrub-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  z-index: 70;
  background: linear-gradient(90deg, var(--gold), var(--blue-light));
  display: none;
}
body.page-home .bg-scrim,
body.page-home .scrub-progress { display: block; }
@media (min-width: 768px) {
  body.page-home .bg-video-landscape { display: block !important; }
  body.page-home .bg-video-potrait { display: none !important; }
}
@media (max-width: 767px) {
  body.page-home .bg-video-landscape { display: none !important; }
  body.page-home .bg-video-potrait { display: block !important; }
  .scroll-cue { display: none !important; }
}
.hero .content { max-width: 760px; }
.hero h1 { font-size: var(--fs-hero); line-height: 1.1; color: var(--milk); margin: 0; }
.hero h1 .accent { display: block; color: var(--gold); }
.hero p.lead { margin-top: 1.4rem; max-width: 560px; }
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-small);
  opacity: 0.75;
}
.scroll-cue .stick { width: 2px; height: 34px; border-radius: 2px; background: linear-gradient(180deg, var(--gold), transparent); }

/* ---------- Stats (tentang) ---------- */
.stats { display: flex; gap: clamp(1.4rem, 4vw, 3rem); margin-top: 2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: clamp(1.6rem, 3.5vw, 2.2rem); color: var(--gold); font-family: 'Baloo 2', sans-serif; }
.stat span { font-size: var(--fs-small); opacity: 0.85; }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; margin: 1.8rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1.4rem; }
.steps li { display: flex; gap: 1rem; align-items: flex-start; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  flex: 0 0 auto;
  width: clamp(34px, 3.4vw, 42px);
  height: clamp(34px, 3.4vw, 42px);
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-small);
}
.step-text h3 { font-size: var(--fs-h3); color: var(--milk); margin: 0; }
.step-text p { margin: 0.3em 0 0; font-size: var(--fs-small); opacity: 0.85; line-height: 1.5; }

/* ---------- Jual ternak: lamb, bibit, anakan ---------- */
.livestock-panel {
  background:
    radial-gradient(circle at top right, rgba(243, 180, 42, 0.14), transparent 42%),
    rgba(4, 22, 52, 0.62);
}
.livestock-head {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}
.livestock-pill {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(243, 180, 42, 0.55);
  color: var(--gold);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
}
.livestock-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.livestock-tags span {
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(234, 242, 255, 0.92);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.livestock-grid {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.livestock-card {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}
.livestock-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  color: var(--milk);
  font-family: 'Baloo 2', sans-serif;
}
.livestock-card p {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.55;
  opacity: 0.9;
}
.livestock-card ul {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.livestock-card li {
  font-size: 0.82rem;
  color: rgba(234, 242, 255, 0.92);
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}
.livestock-card li::before {
  content: '\2713';
  color: var(--gold);
  font-weight: 700;
  flex: 0 0 auto;
}
.livestock-card-meta {
  margin-top: 0.9rem;
  font-size: 0.74rem;
  color: rgba(243, 180, 42, 0.92);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.livestock-bullets {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.livestock-bullets div {
  border: 1px dashed rgba(243, 180, 42, 0.42);
  border-radius: 10px;
  background: rgba(5, 32, 72, 0.45);
  padding: 0.72rem 0.78rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(234, 242, 255, 0.9);
}
.livestock-bullets b {
  color: var(--gold);
  margin-right: 0.2rem;
}
.livestock-cta-row {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

@media (max-width: 920px) {
  .livestock-grid { grid-template-columns: 1fr; }
  .livestock-bullets { grid-template-columns: 1fr; }
  .livestock-pill { order: -1; }
}

/* ---------- Kontak ---------- */
.contact-list { margin: 1.6rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.7rem; font-size: var(--fs-body); }
.contact-list li { display: flex; gap: 0.7rem; align-items: center; word-break: break-word; }
.contact-list b { color: var(--gold); font-family: 'Baloo 2', sans-serif; }

/* ---------- Produk: horizontal drag-to-scroll carousel ---------- */
.landing-products-wrap { max-width: 100% !important; }
.lp-track-outer {
  margin-top: 1.6rem;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  cursor: grab;
}
.lp-track-outer:active { cursor: grabbing; }
.lp-track-outer::-webkit-scrollbar { height: 4px; }
.lp-track-outer::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 4px; }
.lp-track-outer::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
.lp-track { display: flex; gap: 14px; padding: 4px 2px 8px; width: max-content; }
.lp-card {
  flex: 0 0 auto;
  width: 180px;
  background: rgba(4, 22, 52, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--ink);
  overflow: hidden;
  display: block;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.lp-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); border-color: rgba(243, 180, 42, 0.45); color: var(--ink); }
.lp-card-img { position: relative; aspect-ratio: 1/1; overflow: hidden; background: rgba(5, 32, 72, 0.55); }
.lp-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.lp-card:hover .lp-card-img img { transform: scale(1.06); }
.lp-badge { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; color: #fff; line-height: 1.3; }
.lp-badge--flash-sale, .lp-badge--diskon { background: #dc3545; }
.lp-badge--paling-laku { background: #1f9d55; }
.lp-badge--new { background: var(--blue); }
.lp-card-body { padding: 12px 14px 14px; }
.lp-cat { display: block; font-size: 0.7rem; color: rgba(234, 242, 255, 0.55); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.lp-name {
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.92rem;
  color: var(--milk);
  margin: 0 0 8px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lp-price { display: flex; flex-direction: column; gap: 2px; }
.lp-price strong { font-size: 0.88rem; color: var(--gold); font-family: 'Baloo 2', sans-serif; }
.lp-price s { font-size: 0.72rem; color: rgba(234, 242, 255, 0.45); }
.lp-scroll-hint { margin-top: 10px; font-size: 0.75rem; color: rgba(234, 242, 255, 0.45); letter-spacing: 0.04em; }
@media (min-width: 900px) { .lp-scroll-hint { display: none; } }

/* ---------- Footer ---------- */
#app-footer {
  position: relative;
  z-index: 1;
  padding: 2rem var(--pad-side) 2.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: var(--fs-small);
  opacity: 0.75;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(3, 15, 38, 0.75);
}
.footer-content p, .footer-content span { margin: 0; }

/* ---------- Marketplace / article page shell ---------- */
.section-padding { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title h3, .section-title h4 { margin: 0; color: var(--milk); font-family: 'Baloo 2', sans-serif; }
.show-all { color: var(--gold); font-weight: 600; font-size: 14px; }

.marketplace-filters { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.marketplace-filters input, .marketplace-filters select {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.product-card {
  background:
    linear-gradient(180deg, rgba(13, 41, 84, 0.72), rgba(5, 24, 55, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  overflow: hidden;
  display: block;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  color: var(--ink);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(2, 11, 29, 0.42);
  border-color: rgba(243, 180, 42, 0.4);
  color: var(--ink);
}
.product-card-img { position: relative; aspect-ratio: 1/1; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.product-card:hover .product-card-img img { transform: scale(1.06); }
.product-badge { position: absolute; top: 10px; left: 10px; background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.product-card-body { padding: 12px 13px 14px; }
.product-category { font-size: 11px; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.06em; }
.product-name {
  font-size: 15px;
  margin: 6px 0;
  min-height: 38px;
  overflow: hidden;
  color: var(--milk);
  line-height: 1.26;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.product-rating-row small { color: rgba(234, 242, 255, 0.72); font-size: 11px; }
.product-rating-stars { display: inline-flex; gap: 1px; line-height: 1; }
.product-rating-stars .star { font-size: 13px; }
.product-rating-stars .star.full { color: var(--gold); }
.product-rating-stars .star.empty { color: rgba(255, 255, 255, 0.24); }
.product-rating-stars .star.half {
  background: linear-gradient(90deg, var(--gold) 50%, rgba(255, 255, 255, 0.24) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.product-price .old-price { text-decoration: line-through; opacity: 0.5; font-size: 12px; }
.product-price span:not(.old-price) { font-weight: 700; color: var(--gold); font-size: 16px; }

.infinite-loading,
.infinite-end {
  margin-top: 14px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(234, 242, 255, 0.72);
}
.infinite-sentinel { width: 100%; height: 2px; margin-top: 8px; }

/* ---------- Product detail ---------- */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.product-detail-main-img { width: 100%; border-radius: var(--radius); }
.product-detail-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.product-detail-thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; }
.product-detail-info h2 { margin-top: 4px; }
.current-price { font-size: 24px; font-weight: 700; color: var(--gold); }
.product-detail-actions {
  margin-top: 14px;
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.detail-option-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-option-wrap label { font-size: 0.8rem; opacity: 0.82; }
.detail-option-wrap select {
  min-width: 210px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0.55rem 0.65rem;
}
.detail-qty-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-qty-wrap label { font-size: 0.8rem; opacity: 0.82; }
.detail-qty-wrap input {
  width: 90px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0.55rem 0.65rem;
}
.product-description-wrap { margin-top: 14px; }
.product-description,
.product-description * {
  color: var(--milk) !important;
}
.product-description {
  line-height: 1.65;
  opacity: 0.94;
  position: relative;
}
.product-description.is-collapsed {
  max-height: 170px;
  overflow: hidden;
}
.product-description.is-collapsed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  background: linear-gradient(180deg, rgba(5, 24, 55, 0), rgba(5, 24, 55, 0.98));
}
.description-toggle {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
}
.description-toggle:hover { text-decoration: underline; }
.review-item { border-bottom: 1px solid rgba(255, 255, 255, 0.12); padding: 10px 0; }

/* ---------- Articles ---------- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.article-card { background: rgba(4, 22, 52, 0.72); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius); overflow: hidden; padding-bottom: 12px; }
.article-card img { width: 100%; height: 140px; object-fit: cover; }
.article-card h4, .article-card p { padding: 0 12px; }

/* ---------- Auth page ---------- */
.auth-page { padding-top: clamp(1rem, 3vw, 2rem); }
.auth-card {
  max-width: 460px;
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(13, 41, 84, 0.72), rgba(5, 24, 55, 0.82));
}
.auth-form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.auth-form label {
  font-size: 0.85rem;
  color: rgba(234, 242, 255, 0.86);
  font-weight: 600;
}
.auth-form input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  padding: 0.68rem 0.8rem;
}
.auth-form input:focus {
  outline: none;
  border-color: rgba(243, 180, 42, 0.65);
  box-shadow: 0 0 0 2px rgba(243, 180, 42, 0.2);
}
.auth-submit { margin-top: 0.6rem; width: 100%; }
.auth-divider {
  margin: 1rem 0 0.85rem;
  display: flex;
  align-items: center;
  color: rgba(234, 242, 255, 0.55);
  gap: 0.7rem;
  font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  flex: 1;
}
.auth-google { width: 100%; }
.auth-message {
  min-height: 20px;
  margin-top: 0.75rem;
  font-size: 0.84rem;
  color: rgba(234, 242, 255, 0.85);
}

.btn-sm {
  padding: 0.52rem 0.95rem;
  font-size: 0.82rem;
}

.muted-text {
  color: rgba(234, 242, 255, 0.72);
  margin: 0;
}

.commerce-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr);
  gap: 18px;
}

.commerce-hero,
.profile-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(243, 180, 42, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(13, 41, 84, 0.82), rgba(5, 24, 55, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.commerce-hero h2,
.profile-hero h2 {
  margin: 0.2rem 0 0.5rem;
  color: var(--milk);
}

.commerce-hero .lead,
.profile-hero .lead {
  max-width: 720px;
}

.commerce-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.commerce-stats-grid,
.profile-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.commerce-stat-card,
.profile-hero-stat {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.commerce-stat-card span,
.profile-hero-stat span {
  display: block;
  font-size: 0.75rem;
  color: rgba(234, 242, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.commerce-stat-card strong,
.profile-hero-stat strong {
  display: block;
  color: var(--milk);
  font-size: 1rem;
  line-height: 1.4;
}

.checkout-sticky {
  position: sticky;
  top: 92px;
}

.checkout-subsection {
  padding: 12px 12px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.checkout-subsection-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.checkout-subsection-head span {
  font-weight: 700;
  color: var(--milk);
}

.checkout-subsection-head small {
  color: rgba(234, 242, 255, 0.66);
}

.inline-note {
  font-size: 0.84rem;
  color: rgba(234, 242, 255, 0.72);
  margin: 0 0 10px;
}

.cart-item-topline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.cart-item-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(243, 180, 42, 0.18);
  color: var(--gold);
  border: 1px solid rgba(243, 180, 42, 0.32);
}

.cart-item-pill.subtle {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(234, 242, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
}

.cart-item-content h5 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.empty-commerce-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 26px 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.empty-commerce-state.compact {
  padding: 20px 18px;
}

.empty-commerce-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(243, 180, 42, 0.14);
  color: var(--gold);
  font-size: 1.2rem;
}

.empty-commerce-state h5 {
  margin: 0;
  color: var(--milk);
  font-size: 1rem;
}

.empty-commerce-state p {
  margin: 0;
  color: rgba(234, 242, 255, 0.74);
  font-size: 0.88rem;
}

.commerce-card {
  margin-bottom: 16px;
  border-radius: 16px;
}

.commerce-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.commerce-header-row h4,
.checkout-summary h4,
.profile-panel h4 {
  margin: 0;
  color: var(--milk);
}

.cart-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 10px;
}

.cart-item img {
  width: 86px;
  height: 86px;
  border-radius: 10px;
  object-fit: cover;
}

.cart-item-content h5 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.cart-item-price {
  margin-top: 8px;
  color: var(--gold);
  font-weight: 700;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.cart-item-actions label {
  font-size: 0.78rem;
  opacity: 0.74;
}

.cart-qty-input {
  width: 78px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0.45rem 0.6rem;
}

.cart-item-btns {
  display: flex;
  gap: 6px;
}

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

.address-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.address-card.compact {
  align-items: flex-start;
  cursor: pointer;
}

.address-card.compact input[type='radio'] {
  margin-top: 3px;
}

.address-card p {
  margin: 4px 0;
  font-size: 0.86rem;
  color: rgba(234, 242, 255, 0.8);
}

.address-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.address-badge {
  margin-left: 8px;
  background: rgba(243, 180, 42, 0.2);
  color: var(--gold);
  border: 1px solid rgba(243, 180, 42, 0.45);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
}

.shipping-actions {
  margin-top: 10px;
}

.shipment-rate-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.shipment-rate-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  gap: 10px;
  cursor: pointer;
}

.shipment-rate-card p {
  margin: 4px 0;
  font-size: 0.84rem;
  color: rgba(234, 242, 255, 0.78);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  color: rgba(234, 242, 255, 0.92);
}

.summary-row.total {
  font-size: 1.07rem;
  color: var(--milk);
}

.summary-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  margin: 8px 0;
}

.checkout-btn {
  width: 100%;
  margin-top: 14px;
}

.payment-channel-select {
  width: 100%;
  margin: 6px 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  padding: 0.65rem 0.8rem;
}

.profile-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px;
}

.profile-tab {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
}

.profile-tab.is-active {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--navy);
}

.profile-panel {
  border-radius: 16px;
}

.profile-hero-main {
  display: flex;
  gap: 16px;
  align-items: center;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--navy);
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.profile-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.profile-meta-pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(234, 242, 255, 0.9);
}

.profile-meta-pill.subtle,
.status-chip.subtle {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(234, 242, 255, 0.72);
}

.status-chip.is-success {
  background: rgba(29, 185, 84, 0.14);
  border-color: rgba(29, 185, 84, 0.25);
  color: #8df0b2;
}

.status-chip.is-danger {
  background: rgba(220, 53, 69, 0.14);
  border-color: rgba(220, 53, 69, 0.25);
  color: #ffb4bd;
}

.status-chip.is-warn {
  background: rgba(243, 180, 42, 0.14);
  border-color: rgba(243, 180, 42, 0.28);
  color: var(--gold);
}

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

.profile-section-head h4 {
  margin: 0;
  color: var(--milk);
}

.profile-note-box {
  margin-top: 12px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-note-box p {
  margin: 0;
  color: rgba(234, 242, 255, 0.8);
  font-size: 0.9rem;
}

.profile-note-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(243, 180, 42, 0.16);
  color: var(--gold);
  font-weight: 800;
  flex: 0 0 auto;
}

.address-card-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.address-card-topline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.address-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.address-card-meta span {
  color: rgba(234, 242, 255, 0.68);
}

.order-status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

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

.order-summary-row p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.order-summary-row p span {
  color: rgba(234, 242, 255, 0.68);
}

.order-summary-row p strong {
  color: var(--milk);
}

.order-date {
  color: rgba(234, 242, 255, 0.68);
  font-size: 0.82rem;
}

.commerce-empty-auth {
  max-width: 560px;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.profile-info-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
}

.profile-info-item span {
  display: block;
  font-size: 0.74rem;
  color: rgba(234, 242, 255, 0.66);
}

.profile-info-item strong {
  color: var(--milk);
}

.address-form {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.address-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.address-form input,
.address-form textarea {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  padding: 0.65rem 0.8rem;
}

.checkbox-line {
  font-size: 0.86rem;
  color: rgba(234, 242, 255, 0.85);
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

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

.order-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.order-card p {
  margin: 6px 0;
  font-size: 0.86rem;
  color: rgba(234, 242, 255, 0.86);
}

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

.loading-state, .error-state { height:100vh; 
    display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
    padding: 60px 20px; text-align: center; opacity: 0.7; }

.loading-state::before {
  content: '';
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(234, 242, 255, 0.15);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .product-detail-grid { grid-template-columns: 1fr; }
  .commerce-grid { grid-template-columns: 1fr; }
  .commerce-hero,
  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .commerce-stats-grid,
  .profile-hero-stats {
    grid-template-columns: 1fr 1fr;
  }
  .checkout-sticky {
    position: static;
  }
  .cart-item {
    grid-template-columns: 1fr;
  }
  .cart-item img {
    width: 100%;
    height: 180px;
  }
  .cart-item-actions {
    align-items: flex-start;
  }
  .address-card {
    flex-direction: column;
  }
  .address-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .profile-hero-main {
    align-items: flex-start;
  }
  .order-summary-row {
    grid-template-columns: 1fr;
  }
}
