/* JK SYSTEMS - store styling (professional pass)
   Palette: deep graphite + circuit-amber accent, built for a technical/hardware brand.
   Display font: Sora (headings) / Body font: Inter
*/
:root {
  --ink:        #10151c;
  --ink-2:      #1a222c;
  --panel:      #1a222c;
  --paper:      #f6f7f9;
  --line:       #2a3542;
  --amber:      #E11D2E;
  --amber-dim:  #B0121F;
  --status-pending: #e09a1e;
  --green-ok:   #2fa85e;
  --red-err:    #e5544a;
  --text-muted: #6b7683;
  --radius: 6px;
  /* Vibrant accent palette used across the homepage (category tiles, badges,
     trust icons) to give the store a more colorful, energetic feel. */
  --accent-blue:   #2f6fed;
  --accent-purple: #8b5cf6;
  --accent-teal:   #0fb8ad;
  --accent-orange: #f2872e;
  --accent-pink:   #ec4899;
  --accent-yellow: #f0b429;
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* guards against any stray element pushing the page wider than the screen on mobile */
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
}

/* ---------------- Announcement bar ---------------- */
.announce-bar {
  background: var(--amber); color: #fff;
  font-size: 13px; font-weight: 600; padding: 9px 0;
  overflow: hidden; white-space: nowrap;
}
.announce-track {
  display: inline-flex; align-items: center;
  animation: announce-scroll 22s linear infinite;
}
.announce-item { display: inline-flex; align-items: center; padding: 0 28px; flex-shrink: 0; }
.announce-item::after { content: '•'; margin-left: 28px; opacity: 0.7; }
.announce-bar a { text-decoration: underline; color: #fff; }

@keyframes announce-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Respect users who've asked their device to reduce motion */
@media (prefers-reduced-motion: reduce) {
  .announce-track { animation: none; }
}

/* ---------------- Header ---------------- */
.site-header {
  background: #fff; border-bottom: 1px solid #e5e8eb;
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  padding: 16px 24px;
}
.logo { display: flex; align-items: center; gap: 2px; font-family: var(--font-display); }
.logo-img { height: 34px; width: auto; display: block; }
.logo-lg .logo-img { height: 44px; }
@media (max-width: 640px) {
  .logo-img { height: 28px; }
  .logo-lg .logo-img { height: 36px; }
}
.logo-mark {
  background: var(--amber); color: #fff; font-weight: 800; font-size: 15px;
  padding: 3px 7px; border-radius: 4px; letter-spacing: 0.5px;
}
.logo-word { color: var(--ink); font-weight: 700; font-size: 19px; margin-left: 6px; }

/* Bigger logo on the homepage only */
.logo-lg .logo-mark { font-size: 20px; padding: 5px 10px; border-radius: 5px; }
.logo-lg .logo-word { font-size: 26px; margin-left: 8px; }
@media (max-width: 780px) {
  .logo-lg .logo-mark { font-size: 17px; padding: 4px 8px; }
  .logo-lg .logo-word { font-size: 21px; }
}
/* Search bar: now the dominant element in the header row (categories live
   in their own bar below), so it gets full room to breathe and reads as a
   proper store-search field rather than a cramped afterthought. */
.search-form {
  display: flex; align-items: center; gap: 10px;
  background: #f2f4f6; border: 1px solid #dfe3e7; border-radius: 24px;
  padding: 8px 8px 8px 18px; flex: 1 1 auto; max-width: 640px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.search-form:focus-within {
  background: #fff; border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(225,29,46,0.08);
}
.search-form-icon { color: #9aa3ad; flex-shrink: 0; }
.search-form:focus-within .search-form-icon { color: var(--amber); }
.search-form input { background: none; border: none; outline: none; color: var(--ink); font-size: 15.5px; flex: 1; font-family: var(--font-body); }
.search-form input::placeholder { color: #8a94a0; }
.search-form button { background: var(--amber); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.15s ease; }
.search-form button:hover { background: var(--amber-dim); }

/* Quick links (Shop / Deals / Contact) + account/cart cluster, top-right of the header row */
.header-actions { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.quick-link { color: var(--ink); font-weight: 600; font-size: 14.5px; transition: color 0.15s; white-space: nowrap; }
.quick-link:hover { color: var(--amber); }
.header-actions-divider { width: 1px; height: 20px; background: #e2e5e9; flex-shrink: 0; }
.header-account-link { display: flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 600; font-size: 14px; transition: color 0.15s; white-space: nowrap; }
.header-account-link:hover { color: var(--amber); }

.cart-link { display: flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 600; font-size: 14px; transition: color 0.15s; white-space: nowrap; }
.cart-link:hover { color: var(--amber); }
.cart-badge {
  background: var(--amber); color: #fff; font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 10px;
}

/* ---------------- Category nav strip (sits under the search row, above the banner) ---------------- */
.category-nav { background: var(--ink); }
.category-nav-inner {
  display: flex; align-items: center; gap: 4px;
}
.category-nav-scroller { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.category-nav-scroller::before, .category-nav-scroller::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 28px; z-index: 2;
  pointer-events: none; opacity: 0; transition: opacity 0.15s ease;
}
.category-nav-scroller::before { left: 0; background: linear-gradient(to right, var(--ink), transparent); }
.category-nav-scroller::after { right: 0; background: linear-gradient(to left, var(--ink), transparent); }
.category-nav-scroller.fade-left::before { opacity: 1; }
.category-nav-scroller.fade-right::after { opacity: 1; }
.category-nav-scroll-btn {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.1);
  color: #fff; font-size: 18px; line-height: 1; border: none; cursor: pointer;
  transition: background 0.15s ease;
}
.category-nav-scroll-btn:hover { background: rgba(255,255,255,0.22); }
.category-nav-scroll-btn[hidden] { display: none; }
.category-nav-list {
  display: flex; align-items: stretch; gap: 2px; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.category-nav-list::-webkit-scrollbar { display: none; }
.category-nav-item { position: relative; flex-shrink: 0; }
.category-nav-item > a {
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
  color: #e7e9ec; font-weight: 600; font-size: 14px; padding: 12px 14px;
  transition: color 0.15s ease, background 0.15s ease;
}
.category-nav-item > a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.category-nav-item.has-dropdown > a svg { transition: transform 0.15s ease; opacity: 0.7; }
.category-nav-item.has-dropdown:hover > a svg { transform: rotate(180deg); }

.category-nav-dropdown {
  position: fixed; top: var(--nav-bottom, 128px); left: 0; right: 0; background: #fff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 40;
}
.category-nav-item.has-dropdown:hover .category-nav-dropdown,
.category-nav-item.has-dropdown:focus-within .category-nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.category-nav-dropdown-inner {
  display: flex; align-items: flex-start; gap: 48px; padding: 32px 24px;
}
.subcat-list { display: flex; flex-direction: column; flex: 0 0 240px; }
.subcat-list a {
  color: var(--ink); font-weight: 500; font-size: 15px; padding: 12px 4px;
  white-space: nowrap; border-bottom: 1px solid #f1f2f4;
}
.subcat-list a:last-child { border-bottom: none; }
.subcat-list a:first-child { font-weight: 700; }
.subcat-list a:hover { color: var(--amber); }
.subcat-promo {
  flex: 1; align-self: stretch; display: flex; border-radius: 14px; overflow: hidden;
  background: #f4f5f7; max-height: 320px; box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}
.subcat-promo a { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 14px; }
.subcat-promo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
  transition: transform 0.35s ease;
}
.subcat-promo a:hover img { transform: scale(1.04); }

/* Dims the rest of the page while a mega-menu is open, like a modal backdrop */
.category-nav-backdrop {
  position: fixed; top: var(--nav-bottom, 128px); left: 0; right: 0; bottom: 0;
  background: rgba(16,21,28,0.45);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s;
  z-index: 35;
}
.category-nav:has(.category-nav-item.has-dropdown:hover) + .category-nav-backdrop,
.category-nav:has(.category-nav-item.has-dropdown:focus-within) + .category-nav-backdrop {
  opacity: 1; visibility: visible;
}

@media (max-width: 900px) {
  .category-nav { display: none; } /* mobile drawer already covers full category nav */
  .category-nav-backdrop { display: none; }
}

/* ---------------- Mobile header controls (hidden on desktop) ---------------- */
.mobile-menu-btn {
  display: none; background: none; border: none; color: var(--ink); cursor: pointer;
  padding: 6px; align-items: center; justify-content: center;
}

/* ---------------- Mobile slide-in menu ---------------- */
.mobile-drawer-overlay {
  display: none; position: fixed; inset: 0; background: rgba(16,21,28,0.5); z-index: 998;
}
.mobile-drawer {
  display: none; position: fixed; top: 0; left: 0; bottom: 0; width: 78%; max-width: 300px;
  background: #fff; z-index: 999; transform: translateX(-100%); transition: transform 0.25s ease;
  padding: 24px 20px; overflow-y: auto;
}
body.drawer-open .mobile-drawer-overlay { display: block; }
body.drawer-open .mobile-drawer { display: block; transform: translateX(0); }
.mobile-drawer h3 { margin: 0 0 6px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); }
.mobile-drawer a { display: block; padding: 13px 0; border-bottom: 1px solid #eef0f2; font-weight: 700; font-size: 15px; color: var(--ink); }

/* Mobile drawer: expandable accordion for categories with sub-categories */
.drawer-accordion { border-bottom: 1px solid #eef0f2; }
.drawer-accordion-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0; border: none; background: none; font-weight: 700; font-size: 15px;
  color: var(--ink); font-family: var(--font-body); cursor: pointer;
}
.drawer-accordion-trigger svg { transition: transform 0.2s ease; flex-shrink: 0; }
.drawer-accordion.open .drawer-accordion-trigger svg { transform: rotate(180deg); }
.drawer-accordion-panel {
  max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
}
.drawer-accordion.open .drawer-accordion-panel { max-height: 600px; }
.drawer-accordion-panel a {
  padding: 10px 0 10px 16px; font-size: 14px; font-weight: 600; color: var(--text-muted); border-bottom: none;
}
.drawer-accordion-panel a:last-child { padding-bottom: 14px; }

.mobile-drawer-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none;
  font-size: 26px; line-height: 1; cursor: pointer; color: var(--text-muted);
}

/* ---------------- Mobile bottom nav bar ---------------- */
.mobile-bottom-nav { display: none; }

@media (max-width: 760px) {
  .mobile-menu-btn { display: flex; }

  /* 3-column grid (menu | logo | blank spacer of equal width) guarantees the
     logo sits in the true geometric centre of the header, independent of the
     hamburger button's width — the flex/order approach this replaced could
     drift off-centre and was fragile to unrelated CSS changes elsewhere. */
  .header-inner {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; row-gap: 12px; column-gap: 12px;
  }
  .mobile-menu-btn { grid-column: 1; justify-self: start; }
  .logo { grid-column: 2; justify-self: center; }
  .search-form { grid-column: 1 / -1; }
  .header-actions { display: none; } /* replaced on mobile by the bottom nav */

  body:not(.has-buy-bar) { padding-bottom: 66px; } /* reserve space for the fixed bottom nav */

  .mobile-bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 997;
    background: #fff; border-top: 1px solid #e6e9ec;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around; align-items: center;
    box-shadow: 0 -6px 18px rgba(16,21,28,0.08);
  }
  .mobile-bottom-nav a, .mobile-bottom-nav button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; color: var(--ink); font-size: 11.5px; font-weight: 700; cursor: pointer;
    font-family: var(--font-body);
  }
  .mbn-icon-wrap { position: relative; }
  .mbn-cart-badge {
    position: absolute; top: -5px; right: -9px; background: var(--amber); color: #fff; font-size: 10px;
    width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
  }

  /* Product pages already have their own persistent Add to cart / Buy now
     bar, so the generic bottom nav is hidden there to avoid stacking two
     fixed bottom bars. */
  body.has-buy-bar .mobile-bottom-nav { display: none; }

  /* Raise the WhatsApp button and Google rating badge above whichever
     fixed bottom bar is present on the current page. */
  body:not(.has-buy-bar) .whatsapp-float { bottom: 78px; }
  body:not(.has-buy-bar) .google-rating-badge { bottom: 148px; }
}

/* ---------------- Hero (coded, fully responsive — no image cropping ever) ---------------- */
.hero-pro {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ink) 0%, #241016 55%, var(--amber-dim) 130%);
  color: #fff; padding: clamp(40px, 7vw, 84px) 0;
}
.hero-pro-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 640px 420px at 88% 12%, rgba(225,29,46,0.35), transparent),
    radial-gradient(ellipse 520px 420px at 6% 92%, rgba(225,29,46,0.18), transparent);
}
.hero-pro-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center;
  gap: clamp(24px, 4vw, 56px);
}
.hero-pro-eyebrow {
  font-family: var(--font-mono); color: #ff8b93; font-size: 12.5px;
  letter-spacing: 2px; text-transform: uppercase; margin: 0 0 14px; font-weight: 700;
}
.hero-pro-copy h1 {
  font-size: clamp(28px, 4vw, 46px); line-height: 1.14; margin: 0 0 16px; font-weight: 800;
}
.hero-pro-copy h1 span { color: var(--amber); -webkit-text-stroke: 0; }
.hero-pro-sub {
  color: #cfd6dd; font-size: clamp(14.5px, 1.4vw, 17px); max-width: 520px; margin: 0 0 24px;
}
.hero-pro-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.hero-pro-badges span {
  font-size: 12.5px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  padding: 6px 13px; border-radius: 20px; backdrop-filter: blur(2px);
}
.hero-pro-media { display: flex; align-items: center; justify-content: center; min-width: 0; }
.hero-pro-image-wrap {
  position: relative; width: 100%; max-width: 420px; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.hero-pro-image-wrap::before {
  content: ''; position: absolute; inset: 6%;
  background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.04) 55%, transparent 75%);
  border-radius: 50%;
}
.hero-pro-image-wrap img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 22px 34px rgba(0,0,0,0.45));
}

@media (max-width: 860px) {
  .hero-pro-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-pro-badges, .hero-cta { justify-content: center; }
  .hero-pro-sub { margin-left: auto; margin-right: auto; }
  .hero-pro-media { order: -1; }
  .hero-pro-image-wrap { max-width: 260px; margin: 0 auto 8px; }
}

.btn {
  display: inline-block; border: none; border-radius: var(--radius);
  padding: 13px 24px; font-weight: 700; font-size: 14.5px; cursor: pointer;
  text-align: center; font-family: var(--font-body); transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #232e3a; }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(225,29,46,0.35); background: var(--amber-dim); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid #3a4552; }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-block { width: 100%; }
.btn-outline { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------------- Promo strip (secondary admin-uploaded banners) ---------------- */
.promo-strip {
  position: relative; overflow: hidden; background: var(--ink);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-pink), var(--accent-orange)) 1;
}
.promo-track { display: flex; transition: transform 0.6s cubic-bezier(.4,0,.2,1); }
.promo-slide {
  min-width: 100%; position: relative; display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  /* Recommended upload size: 1600x640px (2.5:1). object-fit:cover fills the
     box edge-to-edge with no letterbox bars — a slight crop on off-ratio
     uploads looks far more professional than visible black padding. */
  aspect-ratio: 5 / 2;
  max-height: 640px;
}
.promo-slide img { width: 100%; height: 100%; object-fit: cover; }
.promo-slide-text {
  position: absolute; left: 0; bottom: 0; width: 100%; padding: 18px 24px;
  background: linear-gradient(0deg, rgba(16,21,28,0.88) 0%, transparent 100%);
  color: #fff; text-align: left;
}
.promo-slide-text h3 { font-size: clamp(16px, 2.4vw, 24px); margin: 0 0 4px; font-weight: 800; }
.promo-slide-text p { font-size: clamp(12.5px, 1.4vw, 15px); margin: 0; color: #d3d9df; }
.promo-dots { position: absolute; bottom: 12px; right: 16px; display: flex; gap: 8px; }
.promo-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); border: none; cursor: pointer; padding: 0; }
.promo-dot.active { background: linear-gradient(90deg, var(--accent-orange), var(--accent-pink)); width: 22px; border-radius: 4px; }
@media (max-width: 760px) {
  .promo-slide { max-height: 320px; }
}

/* ---------------- Category carousel (auto-scrolling) ---------------- */
/* Styled to match a clean "icon over label" row (no cards, no borders,
   no shadows) — just a photo/emoji icon and a name underneath. */
.category-carousel-wrap { position: relative; display: flex; align-items: center; gap: 8px; }
.category-carousel {
  overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; flex: 1;
}
.category-carousel::-webkit-scrollbar { display: none; }
.category-track { display: flex; gap: 44px; width: max-content; }
.category-nav-btn {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: 1px solid #e6e9ec; box-shadow: 0 4px 12px rgba(16,21,28,0.1);
  display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1;
  color: var(--ink); cursor: pointer; transition: box-shadow 0.15s ease, transform 0.15s ease; z-index: 2;
}
.category-nav-btn:hover { box-shadow: 0 8px 18px rgba(16,21,28,0.16); transform: translateY(-1px); }
@media (max-width: 640px) { .category-nav-btn { display: none; } }

.category-tile {
  background: none; border: none; flex: 0 0 96px;
  padding: 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: transform 0.15s ease;
}
.category-tile:hover { transform: translateY(-3px); }
.category-tile:hover .category-tile-icon { box-shadow: 0 10px 22px rgba(16,21,28,0.12); border-color: var(--accent-blue, #2f6fed); }
.category-tile-icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: #fff; border: 1px solid #e9ebee; box-shadow: 0 4px 12px rgba(16,21,28,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-blue, #2f6fed);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.category-tile-icon svg { width: 32px; height: 32px; }
.category-tile strong { font-size: 13.5px; font-weight: 600; line-height: 1.25; color: var(--ink); }

/* Uploaded category icons (small, ideally transparent PNGs) sit inside the
   same circle, centered and fully visible rather than cropped like a photo. */
.category-tile-photo {
  background: #fff !important; overflow: hidden; padding: 12px; border-color: #e9ebee;
}
.category-tile-photo img { width: 100%; height: 100%; object-fit: contain; }

/* Parent category tiles are buttons that reveal their sub-categories */
button.category-tile-parent {
  font: inherit; cursor: pointer;
}

/* ---------------- Sub-category reveal panel ---------------- */
.subcategory-panel { margin-top: 16px; }
.subcat-back-btn {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px;
  background: none; border: none; padding: 0; font: inherit; font-weight: 600;
  color: var(--accent-blue, #2f6fed); cursor: pointer;
}
.subcat-back-btn:hover { text-decoration: underline; }
/* The sub-category row now mirrors the top-level carousel structure:
   .subcategory-carousel is the fixed-width scrollable box, and
   .subcategory-track (which also has .category-track, so it's
   width:max-content) is the inner strip that's free to grow past it —
   that's what makes overflow-x below actually have something to scroll. */
.subcategory-carousel {
  overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
  scrollbar-width: none; flex: 1;
}
.subcategory-carousel::-webkit-scrollbar { display: none; }
.subcategory-track {
  padding-bottom: 4px;
}
.subcategory-track::-webkit-scrollbar { display: none; }

/* ---------------- Explore Our Range (comic-burst feature cards) ---------------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  position: relative; overflow: hidden; border-radius: 18px;
  min-height: 420px; padding: 32px 22px 30px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; text-align: center; gap: 12px;
  box-shadow: 0 14px 30px rgba(16,21,28,0.16);
  /* Fill the tile and crop from the center, whatever size image gets
     uploaded from the admin panel, instead of showing it at native size. */
  background-size: cover; background-position: center; background-repeat: no-repeat;
  /* Purely decorative — not a link, not clickable */
  cursor: default;
}

/* Sunburst rays behind everything, drawn with a repeating conic gradient
   so no image asset is needed — colour comes from each variant below. */
.feature-card::before {
  content: ''; position: absolute; inset: -20%; z-index: 0;
  background: repeating-conic-gradient(var(--fc-ray-a) 0deg 10deg, var(--fc-ray-b) 10deg 20deg);
  opacity: 0.9;
}
.feature-card::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at 50% 38%, transparent 0%, var(--fc-base) 74%);
}

.feature-card-blue   { --fc-base: var(--accent-blue);   --fc-ray-a: #5b8ff9; --fc-ray-b: var(--accent-blue); }
.feature-card-teal   { --fc-base: var(--accent-teal);   --fc-ray-a: #34d1c4; --fc-ray-b: var(--accent-teal); }
.feature-card-purple { --fc-base: var(--accent-purple); --fc-ray-a: #a78bfa; --fc-ray-b: var(--accent-purple); }
.feature-card-orange { --fc-base: var(--accent-orange); --fc-ray-a: #f7a55c; --fc-ray-b: var(--accent-orange); }
.feature-card-pink    { --fc-base: var(--accent-pink);   --fc-ray-a: #f472b6; --fc-ray-b: var(--accent-pink); }
.feature-card-yellow  { --fc-base: var(--accent-yellow); --fc-ray-a: #f8cc5c; --fc-ray-b: var(--accent-yellow); }

/* Small scattered comic-sticker stars in each corner, like the reference */
.feature-card-star {
  position: absolute; z-index: 1; color: rgba(255,255,255,0.85); font-size: 20px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
}
.feature-card-star-tl { top: 18px; left: 20px; font-size: 16px; }
.feature-card-star-tr { top: 26px; right: 22px; font-size: 26px; }
.feature-card-star-bl { bottom: 30px; left: 18px; font-size: 22px; }
.feature-card-star-br { bottom: 20px; right: 20px; font-size: 15px; }

.feature-card-icon {
  position: relative; z-index: 1; font-size: 110px; line-height: 1;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.3)); margin-bottom: 4px;
}
.feature-card-title {
  position: relative; z-index: 1; margin: 0; font-size: 30px; font-weight: 800;
  letter-spacing: 0.5px; color: #fff700;
  -webkit-text-stroke: 1.5px #10151c; text-stroke: 1.5px #10151c;
  text-shadow: 2px 2px 0 #10151c;
}
.feature-card-tag {
  position: relative; z-index: 1; font-size: 13.5px; font-weight: 700; color: #fff;
  background: rgba(16,21,28,0.4); padding: 6px 14px; border-radius: 999px;
  letter-spacing: 0.3px;
}

/* ---------------- Admin: multi-photo picker (Flipkart-style) ---------------- */
.image-dropzone {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
  border: 1.5px dashed #d3d8dd; border-radius: 10px; padding: 14px;
  margin-bottom: 18px; background: #fafbfc; transition: border-color 0.15s ease, background 0.15s ease;
}
.image-dropzone-active { border-color: var(--accent-blue, #2f6fed); background: #f0f5ff; }
.image-preview-grid { display: contents; }
.image-preview-item {
  position: relative; width: 90px; height: 90px; border-radius: 8px; overflow: hidden;
  border: 1px solid #e6e9ec; flex: 0 0 auto;
}
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-preview-remove {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(16,21,28,0.65); color: #fff; border: none; cursor: pointer;
  font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0;
}
.image-preview-remove:hover { background: rgba(190,30,30,0.85); }
.image-add-tile {
  width: 90px; height: 90px; border-radius: 8px; border: 1.5px dashed #c7cdd3; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; color: var(--text-muted); font-size: 11.5px; flex: 0 0 auto;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.image-add-tile:hover { border-color: var(--accent-blue, #2f6fed); color: var(--accent-blue, #2f6fed); }
.image-add-icon { font-size: 22px; line-height: 1; font-weight: 300; }

/* ---------------- Deals section ---------------- */
.deals-section { position: relative; }
.deals-section .section-heading h2 {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-orange); /* fallback for browsers without background-clip:text support */
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-pink));
  -webkit-background-clip: text; background-clip: text;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .deals-section .section-heading h2 { color: transparent; }
}
.deals-section .section-heading::after {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-pink));
}
.section-link { font-size: 13.5px; font-weight: 700; color: var(--amber-dim); }
.discount-badge {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(135deg, var(--accent-teal), var(--green-ok)); color: #fff;
  font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 20px; z-index: 2;
  box-shadow: 0 2px 8px rgba(15,184,173,0.4);
}
.card-img { position: relative; }

/* ---------------- Filter bar ---------------- */
.filter-bar { margin-bottom: 20px; }
.filter-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-form select {
  padding: 9px 12px; border: 1px solid #d6dbe0; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 13.5px; background: #fff; cursor: pointer;
}
.filter-clear { font-size: 13px; color: var(--text-muted); text-decoration: underline; }

/* ---------------- Trust strip ---------------- */
.trust-strip { background: #fff; border-bottom: 1px solid #e8eaed; padding: 28px 0; }
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.trust-item { display: flex; align-items: center; gap: 14px; }
.trust-icon {
  font-size: 20px; line-height: 1; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.trust-item:nth-child(1) .trust-icon { background: rgba(47,111,237,0.12); }
.trust-item:nth-child(2) .trust-icon { background: rgba(242,135,46,0.14); }
.trust-item:nth-child(3) .trust-icon { background: rgba(139,92,246,0.13); }
.trust-item:nth-child(4) .trust-icon { background: rgba(15,184,173,0.14); }
.trust-item strong { display: block; font-size: 14px; font-weight: 700; }
.trust-item span:not(.trust-icon) { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------------- Brands ("Discover Leading Brands") ---------------- */
.brands-section { text-align: center; }
.brands-heading { max-width: 620px; margin: 0 auto 38px; }
.brands-heading h2 { font-size: 30px; margin: 0 0 10px; }
.brands-heading p { color: var(--text-muted); font-size: 15px; margin: 0; }
.brand-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 34px 44px; margin-bottom: 38px;
}
.brand-circle {
  width: 116px; height: 116px; border-radius: 50%; background: #f4f5f7;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
a.brand-circle:hover { box-shadow: 0 10px 22px rgba(16,21,28,0.12); transform: translateY(-3px); }
.brand-circle img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brands-shop-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink, #101418); color: #fff; font-weight: 600; font-size: 14.5px;
  padding: 14px 32px; border-radius: 999px; text-decoration: none;
  transition: background 0.15s ease;
}
.brands-shop-btn:hover { background: #000; }
@media (max-width: 640px) {
  .brand-grid { gap: 22px 26px; }
  .brand-circle { width: 84px; height: 84px; padding: 16px; }
  .brands-heading h2 { font-size: 22px; }
}

/* ---------------- Product grid ---------------- */
.section { padding-top: 48px; padding-bottom: 48px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; position: relative; padding-bottom: 14px; }
.section-heading::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
}
.section-heading h2 { font-size: 24px; margin: 0; }
.section-count { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: #fff; border: 1px solid #e6e9ec; border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { box-shadow: 0 16px 34px rgba(16,21,28,0.12); transform: translateY(-4px); border-color: #d8dce0; }
.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; flex: 1; }
.card-buy-now { padding: 0 16px 16px; }
.buy-now-btn { width: 100%; padding: 10px 16px; font-size: 13.5px; border-radius: var(--radius); }
.card-img {
  aspect-ratio: 1/1; background: #f2f3f5; display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 10px;
}
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-img .placeholder { color: #b7bfc7; font-family: var(--font-mono); font-size: 12px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 {
  font-size: 14.5px; margin: 0; font-family: var(--font-body); font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em;
}
.price-row { display: flex; align-items: baseline; gap: 9px; margin-top: 4px; flex-wrap: wrap; }
.price { font-family: var(--font-mono); font-weight: 800; font-size: 18px; color: var(--amber); }
.mrp { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); text-decoration: line-through; }
.gst-note { font-size: 11px; color: var(--text-muted); margin-top: -4px; }
.stock-tag { font-size: 12px; color: var(--green-ok); font-weight: 600; margin-top: auto; }
.stock-tag.out { color: var(--red-err); }

/* ---------------- Product detail ---------------- */
.product-view { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 48px; padding-bottom: 48px; align-items: start; }
.product-view .card-img { border-radius: var(--radius); border: 1px solid #e6e9ec; position: relative; }
.product-info { position: sticky; top: 24px; }
.product-info h1 { font-size: 27px; margin: 10px 0 6px; line-height: 1.3; }
.product-info .price-row { margin: 14px 0 2px; font-size: 20px; align-items: baseline; }
.product-info .stock-tag { display: inline-block; margin-top: 0; }
.discount-pill {
  background: rgba(47,168,94,0.12); color: var(--green-ok); font-size: 12.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; font-family: var(--font-mono);
}

/* Description block with expand/collapse */
.desc-block { margin: 24px 0; padding-top: 20px; border-top: 1px solid #e6e9ec; }
.desc-heading { font-size: 15px; margin: 0 0 10px; font-weight: 700; }
.desc { color: #4a5561; font-size: 14.5px; line-height: 1.75; }
.desc-clamped {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden;
}
.desc-toggle {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; background: none; border: none;
  color: var(--amber-dim); font-weight: 700; font-size: 13.5px; cursor: pointer; padding: 0; font-family: var(--font-body);
}
.desc-toggle:hover { text-decoration: underline; }

.qty-row { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; }
.qty-row input {
  width: 64px; padding: 9px; text-align: center; border: 1px solid #d6dbe0; border-radius: var(--radius);
  font-family: var(--font-mono);
}
.action-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-icon { display: inline-flex; align-items: center; gap: 8px; flex: 1; justify-content: center; min-width: 160px; }
.btn-block { display: flex; }
.whatsapp-link {
  display: inline-block; margin-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--text-muted);
}
.whatsapp-link:hover { color: var(--amber-dim); }

.trust-mini {
  list-style: none; margin: 26px 0 0; padding: 20px 0 0; border-top: 1px solid #e6e9ec;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.trust-mini li { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; text-align: center; }
.trust-mini-icon {
  font-size: 18px; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.trust-mini li:nth-child(1) .trust-mini-icon { background: rgba(47,111,237,0.12); }
.trust-mini li:nth-child(2) .trust-mini-icon { background: rgba(242,135,46,0.14); }
.trust-mini li:nth-child(3) .trust-mini-icon { background: rgba(15,184,173,0.14); }
.trust-mini-label { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }

@media (max-width: 780px) {
  .product-view { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; padding-bottom: 28px; }
  .product-info { position: static; }

  /* Add to cart / Buy now stay pinned to the bottom of the screen at all
     times on mobile, no matter how far the page is scrolled - matches the
     standard Flipkart/Amazon mobile product-page pattern. */
  .buy-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; margin: 0; gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #e6e9ec;
    box-shadow: 0 -8px 24px rgba(16,21,28,0.14);
  }
  .buy-bar .btn-icon { min-width: 0; padding: 12px 10px; font-size: 13.5px; }
}

/* ---------------- Cart / checkout ---------------- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart-table th, .cart-table td { text-align: left; padding: 13px 10px; border-bottom: 1px solid #e6e9ec; font-size: 14px; }
.cart-table th { font-family: var(--font-mono); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; color: var(--text-muted); }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .cart-table { min-width: 560px; }
.qty-input { width: 58px; padding: 7px; border: 1px solid #d6dbe0; border-radius: var(--radius); font-family: var(--font-mono); }

/* ---------------- Checkout layout ---------------- */
.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.summary-box {
  background: #fff; border: 1px solid #e6e9ec; border-radius: var(--radius); padding: 22px;
  max-width: 370px; margin-left: auto;
}
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.summary-row.total { font-weight: 800; font-size: 18px; border-top: 1px solid #e6e9ec; margin-top: 8px; padding-top: 13px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid #d6dbe0; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 16px;
}
.payment-note {
  background: #fff8ea; border: 1px solid #f0d99b; color: #7a5a10;
  padding: 13px 16px; border-radius: var(--radius); font-size: 13px; margin: 20px 0;
}
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: #9aa5b1; padding: 48px 0 0; margin-top: 60px; font-size: 13.5px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.8px; margin: 0 0 4px; }
.footer-col a { color: #9aa5b1; }
.footer-col a:hover { color: var(--amber); }
.footer-logo { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: #fff; margin-bottom: 6px; }
.footer-logo span { color: var(--amber); }
.footer-logo-img { height: 40px; width: auto; display: block; margin-bottom: 10px; }
.footer-about { color: #7c8896; line-height: 1.6; max-width: 280px; }
.footer-note { color: #7c8896; }
.footer-bottom {
  border-top: 1px solid #232d38; padding: 18px 24px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 6px;
}
.site-footer .fine-print { color: #5c6672; }

/* ---------------- WhatsApp floating button ---------------- */
.whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; width: 58px; height: 58px;
  background: #25D366; color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28); z-index: 999;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ---------------- Google rating floating badge ---------------- */
.google-rating-badge {
  position: fixed; right: 0; bottom: 100px; z-index: 998;
  background: var(--ink); color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 8px; border-radius: 10px 0 0 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.google-rating-badge:hover { transform: translateX(-4px); }
.grb-score { font-family: var(--font-mono); font-size: 12px; font-weight: 700; line-height: 1; }
.grb-count { font-size: 9px; color: #b8c0c9; line-height: 1.2; text-align: center; max-width: 54px; }

/* Login/register/forgot-password/reset-password pages are short forms
   with little room to scroll, so a fixed floating badge has nowhere to
   sit without covering the form or its buttons. Hide both floating
   widgets on these pages entirely; they still show everywhere else. */
body.auth-page .whatsapp-float,
body.auth-page .google-rating-badge {
  display: none;
}

/* On mobile, collapse the badge from a tall stacked box into a small
   horizontal pill sitting directly above the WhatsApp button. A tall box
   can sit on top of 2-3 lines of text while scrolling; a slim pill only
   has a small footprint, so it practically never covers readable text. */
@media (max-width: 780px) {
  .google-rating-badge {
    flex-direction: row; align-items: center; gap: 5px;
    padding: 6px 10px; border-radius: 20px 0 0 20px;
    bottom: 78px; /* sits just above the WhatsApp button */
  }
  .grb-score { font-size: 11px; }
  .grb-star, .grb-g { width: 14px; height: 14px; }
  .grb-count { display: none; }
}

/* On the product page, the Add to cart / Buy now bar is pinned to the
   bottom of the screen on mobile (see .buy-bar above), so the WhatsApp
   button and Google rating badge need to sit higher up to avoid
   overlapping it. Order from the bottom: buy-bar, then WhatsApp, then the
   Google rating badge above that. */
@media (max-width: 780px) {
  body.has-buy-bar .whatsapp-float { bottom: 88px; }
  body.has-buy-bar .google-rating-badge { bottom: 148px; }
}

/* ---------------- Admin ---------------- */
.admin-shell { display: flex; min-height: 100vh; font-family: var(--font-body); }
.admin-sidebar { width: 220px; background: var(--ink); color: #fff; padding: 24px 0; flex-shrink: 0; }
.admin-sidebar a { display: block; padding: 10px 22px; color: #cfd6dd; font-size: 14px; font-weight: 600; }
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--amber); background: #202a35; }
.admin-sidebar .brand { padding: 0 22px 20px; font-weight: 800; font-size: 18px; font-family: var(--font-display); }
.admin-main { flex: 1; padding: 30px 34px; background: var(--paper); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
table.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e6e9ec; }
table.admin-table th, table.admin-table td { padding: 11px 13px; border-bottom: 1px solid #eef0f2; font-size: 14px; text-align: left; }
table.admin-table th { background: #f7f8fa; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }

/* ---------------- Admin: categories table (collapsible sub-categories + inline edit) ---------------- */
.cat-row-sub td { background: #fafbfc; }
.cat-toggle-btn {
  background: none; border: none; cursor: pointer; font-size: 11px; color: var(--text-muted);
  display: inline-block; width: 16px; transition: transform 0.15s ease; padding: 0; vertical-align: middle;
}
.cat-toggle-btn.cat-toggle-open { transform: rotate(90deg); }
.cat-child-count {
  margin-left: 8px; font-size: 11.5px; font-weight: 400; color: var(--accent-blue, #2f6fed);
  background: #eef3ff; border-radius: 20px; padding: 2px 9px;
}
.cat-row-edit td { background: #fbfbfc; padding: 16px 13px; }
.cat-edit-form { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.cat-edit-form input[type="text"], .cat-edit-form select {
  min-width: 200px; padding: 7px 9px; border: 1px solid #d3d8dd; border-radius: 6px; font-size: 13.5px;
}
.badge { padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-paid { background: #e6f7ec; color: var(--green-ok); }
.badge-pending { background: #fdf1e0; color: var(--status-pending); }
.badge-failed { background: #fbe7e6; color: var(--red-err); }
.login-box { max-width: 360px; margin: 90px auto; background: #fff; padding: 32px; border-radius: var(--radius); border: 1px solid #e6e9ec; }
.alert { padding: 11px 15px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fbe7e6; color: #9a2e27; }
.alert-success { background: #e6f7ec; color: #1f7a41; }

@media (max-width: 900px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .header-inner { gap: 16px; }
  .header-actions { gap: 14px; }
  .search-form { max-width: 380px; }
}
@media (max-width: 760px) {
  .search-form { flex: 1 1 100%; max-width: none; margin: 0; }
  .product-view { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; overflow-x: auto; padding: 12px 0; }
  .admin-sidebar .brand { display: none; }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: 1fr; gap: 6px; }
  .checkout-grid { grid-template-columns: 1fr; gap: 24px; }
  .cart-table th, .cart-table td { padding: 10px 8px; font-size: 13px; }

  .whatsapp-float { right: 12px; width: 50px; height: 50px; }
}

/* Flipkart-style compact product grid on phones: 2 columns instead of the
   desktop single-column-per-240px stack, with tighter spacing/typography
   so more products are visible per screen instead of one long scroll. */
@media (max-width: 640px) {
  .section { padding-top: 24px; padding-bottom: 24px; }
  .section-heading { margin-bottom: 14px; padding-bottom: 10px; }
  .section-heading h2 { font-size: 18px; }
  .deals-section .section-heading h2 { font-size: 18px; }
  .section-link { font-size: 12px; }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .card { border-radius: 8px; }
  .card-img { padding: 6px; }
  .card-body { padding: 8px 10px 10px; gap: 3px; }
  .card-body h3 { font-size: 12.5px; min-height: 2.4em; line-height: 1.3; }
  .price-row { gap: 6px; margin-top: 2px; }
  .price { font-size: 14.5px; }
  .mrp { font-size: 11px; }
  .stock-tag { font-size: 10.5px; }
  .discount-badge { font-size: 10px; padding: 3px 7px; top: 6px; left: 6px; }
  .card-buy-now { padding: 0 10px 10px; }
  .buy-now-btn { padding: 8px 10px; font-size: 12px; }

  .filter-bar { margin-bottom: 12px; }
  .filter-form { gap: 8px; }
  .filter-form select { padding: 7px 9px; font-size: 12.5px; }
}

/* Extra safety pass for small phones (iPhone SE / small Android, ~360px
   and under) - tighter nav spacing so links never wrap awkwardly, and
   slightly smaller floating buttons so they don't crowd the screen. */
@media (max-width: 400px) {
  .logo-word { font-size: 17px; }
  .logo-lg .logo-word { font-size: 19px; }
  .cart-link .cart-label { display: none; } /* keep just the cart icon + count, "Cart" label hides */
  .whatsapp-float { width: 50px; height: 50px; right: 14px; }
  .grb-g, .grb-star { width: 13px; height: 13px; }
  .grb-score { font-size: 10px; }
}

/* ---------------- Customer auth (login/register/reset) ---------------- */
.auth-form { display: flex; flex-direction: column; gap: 4px; }
.auth-form label { font-size: 13px; font-weight: 600; margin-top: 12px; }
.auth-form input {
  padding: 11px 13px; border: 1px solid #d6dbe0; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 16px; background: #fff;
}
.auth-form input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(225,29,46,0.1); }
.form-error {
  background: #fdecea; border: 1px solid #f5c2be; color: var(--red-err);
  padding: 11px 14px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 16px;
}

/* ---------------- Account dashboard ---------------- */
.account-grid { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.account-card {
  background: #fff; border: 1px solid #e6e9ec; border-radius: 10px; padding: 22px;
}
.account-card h3 { margin: 0 0 12px; font-size: 16px; }
.account-card p { margin: 3px 0; font-size: 14px; color: var(--ink); }
.order-list { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.order-row {
  display: grid; grid-template-columns: 1.4fr 0.8fr 1fr 0.6fr; gap: 12px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid #eef0f2; font-size: 13.5px;
}
.order-row:last-child { border-bottom: none; }
.order-status-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; background: var(--paper); border: 1px solid #dfe3e7;
}

/* ---------------- Product image gallery ---------------- */
.product-gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery-main { aspect-ratio: 1/1; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumb {
  width: 60px; height: 60px; padding: 0; border-radius: 6px; overflow: hidden;
  border: 2px solid #e6e9ec; background: #f2f3f5; cursor: pointer; flex-shrink: 0;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--amber); }
.gallery-thumb:hover { border-color: #b7bfc7; }

/* ---------------- Rich product description ---------------- */
.desc { font-size: 14.5px; line-height: 1.7; color: var(--ink); }
.desc p { margin: 0 0 14px; }
.desc img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; display: block; }
.desc ul, .desc ol { margin: 0 0 14px; padding-left: 22px; }
.desc a { color: var(--amber); }
