/* ============================================================
   JadideShop — Design system on top of Bootstrap 5.3
   Brand: deep green. Font: Inter. Clean, responsive, a11y.
   ============================================================ */

:root {
  --jp: #0a5c44;
  --jp-dark: #07422f;
  --jp-soft: #eef3ef;
  --ink: #12160f;
  --bg: #fdfdfc;
  --surface: #ffffff;
  --muted: #7b837c;
  --muted-2: #9aa29b;
  --line: #eceeec;
  --line-2: #e2e6e2;
  --danger: #c0392b;
  --gold: #a06b00;
  --ok: #0a7d4f;
  --dark-1: #0d1f17;

  /* Bootstrap overrides */
  --bs-primary: var(--jp);
  --bs-primary-rgb: 10, 92, 68;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-border-radius: .75rem;
  --bs-link-color: var(--jp);
  --bs-link-hover-color: var(--jp-dark);
  --bs-link-color-rgb: 10, 92, 68;
}

@media (min-width: 1400px) { .container-xxl { max-width: 1280px; } }

html { scroll-behavior: smooth; }
body {
  font-family: var(--bs-body-font-family);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---- Focus visibility for a11y ---- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--jp);
  outline-offset: 2px;
}

.text-brand { color: var(--jp) !important; }
.text-muted-2 { color: var(--muted-2) !important; }
.bg-brand { background: var(--jp) !important; }
.bg-brand-soft { background: var(--jp-soft) !important; }
.bg-ink { background: var(--ink) !important; }
.bg-darkgreen { background: var(--dark-1) !important; }

/* ============ BUTTONS ============ */
.btn { --bs-btn-border-radius: .75rem; font-weight: 700; border-radius: .75rem; }
.btn-brand {
  background: var(--jp); border-color: var(--jp); color: #fff;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-brand:hover, .btn-brand:focus { background: var(--jp-dark); border-color: var(--jp-dark); color: #fff; }
.btn-brand.shadow-cta { box-shadow: 0 10px 24px -10px rgba(10,92,68,.5); }
.btn-brand.shadow-cta:hover { transform: translateY(-1px); }

.btn-outline-brand {
  background: #fff; border: 1px solid var(--jp); color: var(--jp);
  transition: all .2s;
}
.btn-outline-brand:hover, .btn-outline-brand:focus { background: var(--jp); color: #fff; }

.btn-ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ink:hover, .btn-ink:focus { background: #2a2f2b; border-color: #2a2f2b; color: #fff; }

/* ============ ANNOUNCEMENT BAR ============ */
.announce { background: var(--jp); color: #eaf4ef; font-size: 13px; letter-spacing: .02em; }
.announce a { color: #fff; font-weight: 600; text-decoration: underline; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(253,253,252,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid #ecefec;
}
.brand-logo { height: 46px; width: auto; border-radius: 10px; }

.search-pill {
  background: #f3f5f3; border: 1px solid #e7eae7; border-radius: 999px; overflow: hidden;
}
.search-pill input { border: 0; background: transparent; outline: none; color: var(--ink); }
.search-pill .btn { border-radius: 999px; margin: 3px; }

.icon-link {
  position: relative; border: 0; background: transparent; border-radius: 12px;
  padding: 9px 11px; font-size: 13px; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 7px; transition: background .2s; text-decoration: none;
}
.icon-link:hover { background: #f0f3f0; color: var(--ink); }
.icon-badge {
  position: absolute; top: 2px; right: 2px; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 999px; min-width: 16px; height: 16px; display: flex; align-items: center;
  justify-content: center; padding: 0 4px;
}
.icon-badge.cart { background: var(--danger); }
.icon-badge.wish { background: var(--jp); }

/* mega nav */
.mega-nav { border-top: 1px solid #eceeec; background: #f7f9f7; }
.mega-nav a, .mega-nav button {
  padding: 12px 14px; font-size: 13.5px; font-weight: 500; color: #454b46;
  white-space: nowrap; text-decoration: none; background: none; border: 0; transition: color .15s;
}
.mega-nav a:hover, .mega-nav button:hover { color: var(--jp); }
.mega-nav a.active { color: var(--ink); border-bottom: 2px solid var(--jp); }
.mega-nav .all-cats { color: var(--jp); font-weight: 700; cursor: pointer; }

/* ============ HERO ============ */
.hero { border-radius: 16px; overflow: hidden; background: var(--dark-1); }
.hero .carousel-item { min-height: 460px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,20,15,.82) 0%, rgba(10,20,15,.55) 45%, rgba(10,20,15,.05) 75%);
}
.hero-content { position: relative; max-width: 640px; padding: 56px 24px 72px 56px; }
.hero-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9fd6bd; }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; font-weight: 800; color: #fdfdfc; letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.hero p { font-size: 16px; line-height: 1.6; color: #dde8e1; max-width: 440px; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
@media (max-width: 575px) { .hero-content { padding: 40px 20px 56px; } }

/* ============ SECTION HEADINGS ============ */
.section { max-width: 1280px; }
.section-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.viewall { font-size: 13.5px; font-weight: 600; text-decoration: none; }

/* ============ CATEGORY CARDS + MARQUEE ============ */
.marquee-mask { -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee { display: flex; gap: 14px; width: max-content; }
.marquee.left { animation: marqueeL 32s linear infinite; }
.marquee.right { animation: marqueeR 32s linear infinite; }
.marquee-mask:hover .marquee { animation-play-state: paused; }
@keyframes marqueeL { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqueeR { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .marquee { animation: none !important; } }

.cat-card {
  flex: 0 0 auto; width: 180px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 14px; text-align: center; color: var(--ink);
  transition: all .25s; text-decoration: none; display: block;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -14px rgba(10,40,25,.16); border-color: #d8e4dc; color: var(--ink); }
.cat-ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: var(--jp-soft); color: var(--jp); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.cat-name { font-size: 13.5px; font-weight: 600; }
.cat-count { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ============ PRODUCT CARD ============ */
.product-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; transition: all .25s; display: flex; flex-direction: column; height: 100%;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -16px rgba(10,40,25,.18); border-color: #d8e4dc; }
.product-media {
  position: relative; aspect-ratio: 1/1;
  background: repeating-linear-gradient(45deg,#eef1ef,#eef1ef 13px,#e7ebe8 13px,#e7ebe8 26px);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-label { font-family: monospace; font-size: 11px; color: #8a938c; text-align: center; padding: 0 12px; }
.stretched-cover { position: absolute; inset: 0; }
.badge-disc { position: absolute; top: 12px; left: 12px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge-flash { position: absolute; top: 12px; left: 12px; background: var(--jp); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge-rank { position: absolute; top: 12px; left: 12px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

.card-action {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid #e5e8e5;
  background: #fff; cursor: pointer; font-size: 15px; color: #454b46; transition: all .2s;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card-action:hover { border-color: var(--jp); color: var(--jp); transform: scale(1.08); }
.card-action.wish:hover { border-color: var(--danger); color: var(--danger); }
.card-action.is-wished { color: var(--danger); }

.product-body { padding: 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-brand { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.product-rating { font-size: 12px; font-weight: 600; color: var(--gold); }
.product-name { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.product-name a { color: var(--ink); transition: color .15s; text-decoration: none; }
.product-name a:hover { color: var(--jp); }
.price-now { font-size: 18px; font-weight: 800; color: var(--jp); }
.price-old { font-size: 13px; color: var(--muted-2); text-decoration: line-through; }
.stock { font-size: 11.5px; font-weight: 600; }
.stock.in { color: var(--ok); }
.stock.low { color: var(--gold); }
.stock.out { color: var(--danger); }

/* ============ FLASH SALE ============ */
.flash-section { background: var(--dark-1); }
.flash-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9fd6bd; }
.count-box { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 10px 0; min-width: 62px; font-size: 24px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; text-align: center; }
.count-label { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #8fa79a; }
.flash-card { flex: 0 0 auto; width: 250px; background: #fff; border-radius: 16px; overflow: hidden; }
.flash-progress { height: 6px; border-radius: 999px; background: #eef1ef; overflow: hidden; }
.flash-progress > span { display: block; height: 100%; background: linear-gradient(90deg,#c0392b,#e67e22); border-radius: 999px; }

/* ============ PROMO ============ */
.promo-card { border-radius: 16px; overflow: hidden; padding: 40px; min-height: 200px; display: flex; flex-direction: column; justify-content: center; transition: transform .25s; text-decoration: none; }
.promo-card:hover { transform: translateY(-3px); }
.promo-green { background: linear-gradient(120deg,#0a5c44,#0d3d2f); }
.promo-light { background: #f3f5f3; border: 1px solid #e9ece9; }

/* ============ FEATURES / REVIEWS ============ */
.feature-card { background: #fff; border-radius: 16px; padding: 28px 24px; text-align: center; transition: all .25s; height: 100%; }
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -14px rgba(10,40,25,.14); }
.feature-ico { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 999px; background: var(--jp-soft); color: var(--jp); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; transition: box-shadow .25s; height: 100%; margin: 0; }
.review-card:hover { box-shadow: 0 16px 32px -14px rgba(10,40,25,.14); }
.review-stars { color: var(--gold); letter-spacing: 2px; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--jp); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }

/* ============ NEWSLETTER ============ */
.newsletter { background: linear-gradient(120deg,#0a5c44,#0d3d2f); border-radius: 16px; padding: 52px 32px; text-align: center; }
.newsletter input { border: 0; border-radius: 999px; padding: 13px 22px; outline: none; }

/* ============ FOOTER ============ */
.site-footer { background: var(--dark-1); color: #c4d4ca; }
.site-footer a { color: #c4d4ca; text-decoration: none; font-size: 13.5px; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-title { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.social { width: 36px; height: 36px; border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; transition: background .2s; }
.social:hover { background: var(--jp); color: #fff; }
.pay-chip { background: #fff; color: var(--ink); font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: 8px; }
.pay-chip.soft { background: #f3f5f3; }

/* ============ DRAWERS / OFFCANVAS ============ */
.offcanvas .cart-item { display: flex; gap: 12px; align-items: center; background: #fbfcfb; border: 1px solid #eef1ee; border-radius: 14px; padding: 10px; }
.cart-thumb { width: 58px; height: 58px; border-radius: 10px; background: repeating-linear-gradient(45deg,#eef1ef,#eef1ef 9px,#e7ebe8 9px,#e7ebe8 18px); flex-shrink: 0; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; }
.qty-stepper button { border: 0; background: transparent; width: 30px; height: 30px; font-size: 14px; cursor: pointer; color: var(--ink); }
.qty-stepper span { min-width: 24px; text-align: center; font-size: 13px; font-weight: 700; }
.drawer-cat { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; transition: background .15s; color: var(--ink); text-decoration: none; }
.drawer-cat:hover { background: #f2f6f3; color: var(--ink); }
.drawer-cat .cat-ico { width: 38px; height: 38px; margin: 0; border-radius: 10px; font-size: 16px; }

/* ============ TOAST ============ */
.jp-toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 1090;
  background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600; padding: 12px 22px;
  border-radius: 999px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.jp-toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* ============ FLOATING BUTTONS ============ */
.fab { position: fixed; right: 20px; z-index: 1020; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -8px rgba(0,0,0,.3); transition: transform .2s, bottom .2s; }
.fab-wa { bottom: 20px; width: 52px; height: 52px; border-radius: 999px; background: #25d366; color: #fff; font-size: 22px; }
.fab-wa:hover { transform: scale(1.1); color: #fff; }
.fab-top { bottom: 82px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 16px; cursor: pointer; opacity: 0; visibility: hidden; }
.fab-top.show { opacity: 1; visibility: visible; }
.fab-top:hover { border-color: var(--jp); color: var(--jp); }

/* ============ FORMS ============ */
.form-control, .form-select { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: var(--ink); }
.form-control:focus, .form-select:focus { border-color: var(--jp); box-shadow: 0 0 0 .2rem rgba(10,92,68,.12); }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.auth-panel { background: linear-gradient(150deg,#0a5c44,#0d1f17); color: #fff; }
.auth-check { width: 26px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px -24px rgba(10,40,25,.16); }

/* strength meter */
.str-seg { flex: 1; height: 4px; border-radius: 999px; background: var(--line); transition: background .2s; }

/* ============ FILTER SIDEBAR (Category) ============ */
.filter-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.filter-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
input[type=range] { accent-color: var(--jp); width: 100%; }
.chip { border: 1px solid #d8e4dc; background: var(--jp-soft); color: var(--jp); font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--danger); color: var(--danger); background: #fdeeec; }

/* ============ PRODUCT DETAILS ============ */
.gallery-main { position: relative; aspect-ratio: 1/1; border-radius: 16px; border: 1px solid var(--line); background: repeating-linear-gradient(45deg,#eef1ef,#eef1ef 16px,#e7ebe8 16px,#e7ebe8 32px); overflow: hidden; }
.thumb { flex: 1; aspect-ratio: 1/1; border-radius: 12px; border: 2px solid var(--line); background: repeating-linear-gradient(45deg,#eef1ef,#eef1ef 9px,#e7ebe8 9px,#e7ebe8 18px); cursor: pointer; }
.thumb.active { border-color: var(--jp); }
.pill-info { background: #f3f5f3; border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; line-height: 1.4; }
.detail-tab { border: 0; background: transparent; padding: 13px 20px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.detail-tab.active { font-weight: 700; color: var(--jp); border-bottom-color: var(--jp); }
.spec-row:nth-child(odd) { background: #f7f9f7; }

/* ============ CHECKOUT ============ */
.step-dot { width: 30px; height: 30px; border-radius: 999px; border: 2px solid var(--line-2); background: #fff; color: var(--muted-2); display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; transition: all .3s; }
.step.active .step-dot, .step.done .step-dot { background: var(--jp); border-color: var(--jp); color: #fff; }
.step-line { width: 52px; height: 2px; background: var(--line-2); margin: 0 12px; }
.step.done + .step .step-line, .step.done .step-line { background: var(--jp); }
.pay-method { display: flex; align-items: center; gap: 14px; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 15px 16px; cursor: pointer; text-align: left; width: 100%; transition: all .15s; }
.pay-method:hover { border-color: var(--jp); }
.pay-method.active { border-color: var(--jp); background: var(--jp-soft); }
.pay-radio { width: 20px; height: 20px; border-radius: 999px; border: 2px solid #c9cfc9; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pay-method.active .pay-radio { border-color: var(--jp); }
.pay-radio > span { width: 10px; height: 10px; border-radius: 999px; background: transparent; }
.co-pane { display: flex; flex-direction: column; gap: 1rem; }
.pay-method.active .pay-radio > span { background: var(--jp); }

/* ============ TRACKING TIMELINE ============ */
.tl-dot { width: 30px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; border: 2px solid var(--line-2); background: #fff; color: var(--muted-2); }
.tl-step.done .tl-dot, .tl-step.active .tl-dot { background: var(--jp); border-color: var(--jp); color: #fff; }
.tl-step.active .tl-dot { animation: pulse 1.6s infinite; }
.tl-line { width: 2px; flex: 1; min-height: 34px; background: var(--line-2); }
.tl-step.done .tl-line { background: var(--jp); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(10,92,68,.35); } 50% { box-shadow: 0 0 0 8px rgba(10,92,68,0); } }

/* ============ 404 ============ */
.big-404 { font-size: clamp(80px,14vw,130px); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: #eef1ef; position: relative; }
.float-cart { animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ============ UTIL ============ */
.divider { height: 1px; background: var(--line); }
.rounded-16 { border-radius: 16px; }
.fade-up { animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .fade-up, .float-cart { animation: none; } }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.min-h-name { min-height: 39px; }
