/* ==========================================================================
   SMART E-COMMERCE - storefront styles
   Colours come from Admin > Settings > Appearance through CSS variables
   (--primary, --accent, --dark, --bg, --text) printed in layouts/store.blade.php
   ========================================================================== */

:root {
  --primary: #5b21b6;
  --accent: #f97316;
  --dark: #1e1b2e;
  --bg: #f4f3f8;
  --text: #1f2937;

  --primary-soft: color-mix(in srgb, var(--primary) 10%, white);
  --primary-deep: color-mix(in srgb, var(--primary) 78%, black);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
  --dark-2: color-mix(in srgb, var(--dark) 85%, white);
  --muted: color-mix(in srgb, var(--text) 55%, white);
  --line: color-mix(in srgb, var(--text) 10%, white);
  --surface: #ffffff;
  --success: #15803d;
  --danger: #dc2626;
  --warn: #b45309;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 12, 40, .06), 0 4px 14px rgba(16, 12, 40, .05);
  --shadow-lg: 0 12px 34px rgba(16, 12, 40, .14);
  --container: 1320px;
  --font: "Plus Jakarta Sans", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.2em; }
.ic-fill { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  padding: .62em 1.15em; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--primary); color: #fff; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s; white-space: nowrap; line-height: 1.3;
}
.btn:hover { background: var(--primary-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 85%, black); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: var(--primary-soft); color: var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn-light { background: #fff; color: var(--text); border-color: var(--line); }
.btn-light:hover { background: var(--bg); color: var(--primary); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: .4em .8em; font-size: 13px; }
.btn-lg { padding: .85em 1.6em; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

.form-group { margin-bottom: 14px; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.form-label .req { color: var(--danger); }
.form-control {
  width: 100%; padding: .65em .8em; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.form-control { min-height: 100px; resize: vertical; }
.form-error { color: var(--danger); font-size: 12.5px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--primary); }

/* ---------- Alerts / toast ---------- */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; font-weight: 500; }
.alert-success { background: #ecfdf3; border-color: #a7f3c5; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 25%, white); color: var(--primary-deep); }
.toast-wrap { position: fixed; right: 16px; bottom: 84px; z-index: 300; display: grid; gap: 8px; }
.toast {
  background: var(--dark); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  max-width: 340px; animation: toastIn .25s ease; display: flex; gap: 10px; align-items: center;
}
.toast.err { background: var(--danger); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Top bar ---------- */
.topbar { background: var(--dark); color: color-mix(in srgb, #fff 78%, var(--dark)); font-size: 12.5px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 16px; }
.topbar a:hover { color: #fff; }
.topbar-links { display: flex; gap: 18px; align-items: center; }
.topbar-links a { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Header ---------- */
.site-header { background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.site-header.is-light { background: #fff; color: var(--text); border-bottom: 1px solid var(--line); }
.header-main { display: flex; align-items: center; gap: 22px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { max-height: 46px; width: auto; }
.brand-text { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.brand-text small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .02em; opacity: .8; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 18px;
  background: var(--accent); color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15);
}

.search { position: relative; flex: 1; max-width: 640px; }
.search form { display: flex; background: #fff; border-radius: 999px; overflow: hidden; border: 2px solid transparent; }
.site-header.is-light .search form { border-color: var(--primary); }
.search input { flex: 1; border: 0; padding: 11px 18px; outline: none; color: var(--text); min-width: 0; background: transparent; }
.search button { border: 0; background: var(--accent); color: #fff; padding: 0 20px; cursor: pointer; }
.search-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; color: var(--text);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; display: none; z-index: 120;
}
.search-suggest.open { display: block; }
.search-suggest a { display: flex; gap: 12px; padding: 9px 14px; align-items: center; border-bottom: 1px solid var(--line); }
.search-suggest a:hover { background: var(--primary-soft); }
.search-suggest img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.search-suggest .s-name { font-weight: 600; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-suggest .s-price { color: var(--accent); font-weight: 700; font-size: 13px; }
.search-suggest .s-all { justify-content: center; font-weight: 600; color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.h-action { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); position: relative; }
.h-action:hover { background: rgba(255,255,255,.12); color: inherit; }
.site-header.is-light .h-action:hover { background: var(--primary-soft); color: var(--primary); }
.h-action .ic { width: 24px; height: 24px; }
.h-action .h-label { font-size: 12px; line-height: 1.2; }
.h-action .h-label b { display: block; font-size: 13.5px; }
.h-badge {
  position: absolute; top: 2px; left: 24px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.btn-pcb { background: var(--accent); color: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }
.btn-pcb:hover { color: #fff; background: color-mix(in srgb, var(--accent) 85%, black); }
.menu-toggle { display: none; background: transparent; border: 0; color: inherit; padding: 6px; cursor: pointer; }
.menu-toggle .ic { width: 26px; height: 26px; }

/* ---------- Category nav / mega menu ---------- */
.cat-nav { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 90; }
.cat-nav > .container { display: flex; align-items: stretch; }
.cat-nav-list { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.cat-nav-list::-webkit-scrollbar { display: none; }
.cat-nav-item { position: static; }
.cat-nav-item > a {
  display: flex; align-items: center; gap: 5px; padding: 12px 14px; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.cat-nav-item:hover > a { color: var(--primary); border-bottom-color: var(--primary); }
.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: var(--shadow-lg);
  border-top: 1px solid var(--line); display: none; padding: 22px 0 26px;
}
.cat-nav-item:hover .mega, .cat-nav-item:focus-within .mega { display: block; }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px 28px; }
.mega-col h4 { font-size: 13.5px; margin-bottom: 8px; }
.mega-col h4 a { color: var(--primary); }
.mega-col li a { display: block; padding: 3px 0; color: var(--muted); font-size: 13px; }
.mega-col li a:hover { color: var(--primary); padding-left: 4px; transition: padding .15s; }
.mega-all { margin-top: 16px; font-weight: 600; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Notice ---------- */
.notice-bar { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 70%, black); font-size: 13px; font-weight: 500; }
.notice-bar .container { padding-top: 7px; padding-bottom: 7px; display: flex; gap: 8px; align-items: center; }

/* ---------- Off-canvas (mobile) ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 10, 30, .5); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(330px, 86vw); background: #fff; z-index: 210;
  transform: translateX(-102%); transition: transform .25s ease; display: flex; flex-direction: column;
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--primary); color: #fff; }
.drawer-head button { background: transparent; border: 0; color: #fff; cursor: pointer; }
.drawer-body { overflow-y: auto; flex: 1; padding: 8px 0 20px; }
.drawer-cat > div { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-cat > div a { flex: 1; padding: 12px 16px; font-weight: 600; }
.drawer-cat > div button { background: transparent; border: 0; padding: 12px 16px; cursor: pointer; color: var(--muted); }
.drawer-cat ul { display: none; background: var(--bg); }
.drawer-cat.open ul { display: block; }
.drawer-cat.open > div button .ic { transform: rotate(180deg); }
.drawer-cat ul a { display: block; padding: 10px 16px 10px 30px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.drawer-links a { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }

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

/* ---------- Generic blocks ---------- */
main { min-height: 50vh; }
.section { margin: 26px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 20px; margin: 0; position: relative; padding-left: 12px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: var(--accent); }
.section-head p { margin: 2px 0 0 12px; color: var(--muted); font-size: 13px; }
.section-head .more { font-weight: 600; color: var(--primary); display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-title { font-size: 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); padding: 14px 0; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: .5; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1.4; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-muted { background: #f1f5f9; color: #475569; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 14px; margin-top: 16px; }
.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--dark); aspect-ratio: 16 / 6.4; min-height: 220px; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.slide.active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-caption {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 6%;
  color: #fff; background: linear-gradient(90deg, rgba(10, 6, 25, .62), rgba(10, 6, 25, 0) 70%); max-width: 100%;
}
.slide-caption h2 { font-size: clamp(22px, 3.2vw, 40px); max-width: 520px; margin-bottom: 8px; letter-spacing: -.02em; }
.slide-caption p { max-width: 440px; opacity: .9; font-size: clamp(13px, 1.3vw, 16px); }
.slide-caption .btn { align-self: flex-start; }
.slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; z-index: 3; }
.slider-dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; transition: width .2s; }
.slider-dots button.active { width: 26px; background: #fff; }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(255,255,255,.85); border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: var(--dark); }
.slider-nav.prev { left: 12px; } .slider-nav.next { right: 12px; }
.hero-side { display: grid; gap: 14px; grid-template-rows: 1fr 1fr; }
.side-banner { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--dark); min-height: 120px; }
.side-banner img { width: 100%; height: 100%; object-fit: cover; }
.side-banner .cap { position: absolute; left: 16px; bottom: 14px; right: 16px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.side-banner .cap b { display: block; font-size: 17px; }

.usp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.usp-item { background: #fff; border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); }
.usp-item .ic { width: 30px; height: 30px; color: var(--primary); }
.usp-item b { display: block; font-size: 13.5px; }
.usp-item span { font-size: 12px; color: var(--muted); }

/* ---------- Category icons ---------- */
.cat-icons { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.cat-icon {
  background: #fff; border-radius: var(--radius); padding: 16px 8px 12px; text-align: center; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cat-icon:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cat-icon .ci-img { width: 54px; height: 54px; border-radius: 14px; background: var(--primary-soft); display: grid; place-items: center; color: var(--primary); font-weight: 800; font-size: 20px; overflow: hidden; }
.cat-icon .ci-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cat-icon span { font-size: 12.5px; font-weight: 600; line-height: 1.3; }

/* ---------- Product grid & card ---------- */
.p-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.p-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.p-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column;
  position: relative; overflow: hidden; transition: box-shadow .2s, transform .2s; border: 1px solid transparent;
}
.p-card:hover { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 20%, white); }
.p-media { display: block; padding: 18px 18px 6px; aspect-ratio: 1 / 1; }
.p-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.p-card:hover .p-media img { transform: scale(1.04); }
.p-flags { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; z-index: 2; }
.flag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; color: #fff; background: var(--accent); }
.flag.new { background: var(--primary); }
.flag.stock { background: #64748b; }
.p-quick { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; opacity: 0; transform: translateX(6px); transition: .2s; }
.p-card:hover .p-quick { opacity: 1; transform: none; }
.p-quick button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--text); }
.p-quick button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.p-body { padding: 4px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.p-name { font-weight: 600; font-size: 13.5px; line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.p-feat { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.p-feat li { position: relative; padding-left: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-feat li::before { content: ""; position: absolute; left: 2px; top: .65em; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.p-price { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { color: var(--accent); font-weight: 800; font-size: 17px; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.p-actions { display: flex; gap: 6px; margin-top: 10px; }
.p-actions .btn { flex: 1; font-size: 13px; padding: .55em .6em; }
.p-actions .btn-icon { flex: none; width: 38px; padding: 0; }

/* list view */
.p-grid.list-view { grid-template-columns: 1fr !important; }
.p-grid.list-view .p-card { flex-direction: row; }
.p-grid.list-view .p-media { width: 210px; flex: none; }
.p-grid.list-view .p-body { padding: 18px; }
.p-grid.list-view .p-feat li { white-space: normal; }
.p-grid.list-view .p-name { -webkit-line-clamp: 3; min-height: 0; font-size: 15px; }

/* horizontal scroll row */
.p-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 56px) / 5); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.p-row > * { scroll-snap-align: start; }

/* ---------- Middle banner & brands ---------- */
.wide-banner { display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--dark); }
.wide-banner img { width: 100%; height: auto; min-height: 120px; object-fit: cover; }
.wide-banner .cap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 5%; color: #fff; }
.wide-banner .cap b { font-size: clamp(18px, 2.6vw, 30px); }
.brand-strip { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; }
.brand-tile { background: #fff; border-radius: var(--radius); height: 70px; display: grid; place-items: center; padding: 10px; box-shadow: var(--shadow); font-weight: 700; color: var(--muted); text-align: center; font-size: 13px; transition: color .15s, box-shadow .15s; }
.brand-tile:hover { color: var(--primary); box-shadow: var(--shadow-lg); }
.brand-tile img { max-height: 44px; width: auto; filter: grayscale(1); opacity: .8; transition: .2s; }
.brand-tile:hover img { filter: none; opacity: 1; }

/* ---------- Listing page ---------- */
.listing { display: grid; grid-template-columns: 268px 1fr; gap: 18px; align-items: start; }
.filters { position: sticky; top: 140px; display: grid; gap: 12px; max-height: calc(100vh - 160px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 6px; }
.filter-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.filter-box > summary { list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.filter-box > summary::-webkit-details-marker { display: none; }
.filter-box:not([open]) > summary { border-bottom: 0; }
.filter-box[open] > summary .ic { transform: rotate(180deg); }
.filter-body { padding: 10px 14px 14px; display: grid; gap: 7px; max-height: 240px; overflow-y: auto; }
.filter-body label { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13px; }
.filter-body input[type=checkbox] { accent-color: var(--primary); width: 15px; height: 15px; }
.price-inputs { display: flex; gap: 8px; align-items: center; }
.price-inputs input { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.filters-close { display: none; }
.listing-head { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.listing-head h1 { font-size: 18px; margin: 0; }
.listing-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.listing-tools select { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.view-toggle { display: flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button { border: 0; background: #fff; padding: 7px 9px; cursor: pointer; color: var(--muted); }
.view-toggle button.active { background: var(--primary); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { padding: 6px 13px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.chip:hover, .chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.chip-x { display: inline-flex; gap: 6px; align-items: center; }
.btn-filter-open { display: none; }
.empty { text-align: center; padding: 50px 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.empty .ic { width: 52px; height: 52px; color: var(--muted); margin: 0 auto 10px; display: block; }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 22px 0 6px; }
.pagination a, .pagination span { min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); font-weight: 600; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: .45; }

/* ---------- Product page ---------- */
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.gallery-main { aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; padding: 18px; position: relative; overflow: hidden; cursor: zoom-in; background: #fff; }
.gallery-main img { max-height: 100%; object-fit: contain; transition: transform .2s; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs button { width: 72px; height: 72px; flex: none; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 4px; cursor: pointer; }
.gallery-thumbs button.active { border-color: var(--primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-info h1 { font-size: 22px; letter-spacing: -.01em; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.pd-meta .pill { background: var(--bg); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; }
.pd-meta .pill b { color: var(--primary); }
.pd-feat { background: var(--primary-soft); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.pd-feat h3 { font-size: 14px; margin-bottom: 6px; }
.pd-feat li { padding: 3px 0 3px 18px; position: relative; }
.pd-feat li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 7px; height: 7px; border-radius: 2px; background: var(--primary); }
.pd-prices { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.price-box { border: 1px dashed var(--line); border-radius: var(--radius); padding: 10px 16px; min-width: 150px; }
.price-box small { display: block; color: var(--muted); font-size: 12px; }
.price-box b { font-size: 22px; color: var(--accent); }
.price-box.alt b { color: var(--text); font-size: 18px; }
.price-box s { color: var(--muted); font-size: 13px; margin-left: 6px; }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; height: 44px; }
.qty button { width: 40px; border: 0; background: var(--bg); cursor: pointer; font-size: 18px; }
.qty input { width: 52px; text-align: center; border: 0; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy-row .btn { height: 44px; }
.pd-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.pd-links button, .pd-links a { background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-weight: 600; }
.pd-links button:hover, .pd-links a:hover { color: var(--primary); }
.pd-links .saved { color: var(--danger); }
.emi-note { display: flex; gap: 10px; align-items: center; background: var(--accent-soft); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }

.pd-lower { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; margin-top: 18px; align-items: start; }
.tabs-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; position: sticky; top: 118px; z-index: 5; background: var(--bg); padding: 6px 0; }
.tabs-nav a { padding: 9px 16px; border-radius: var(--radius-sm); background: #fff; font-weight: 600; box-shadow: var(--shadow); }
.tabs-nav a:hover { background: var(--primary); color: #fff; }
.pd-section { scroll-margin-top: 180px; margin-bottom: 18px; }
.spec-table th, .spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th { width: 32%; font-weight: 500; color: var(--muted); }
.spec-table .spec-group td { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.rich { line-height: 1.75; overflow-wrap: anywhere; }
.rich img { border-radius: var(--radius-sm); margin: 10px 0; }
.rich table { margin: 10px 0; }
.rich table td, .rich table th { border: 1px solid var(--line); padding: 6px 10px; }
.qa-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.qa-item:last-child { border-bottom: 0; }
.qa-q { font-weight: 600; display: flex; gap: 8px; }
.qa-a { margin-top: 6px; display: flex; gap: 8px; color: var(--muted); }
.qa-tag { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--primary); }
.qa-a .qa-tag { background: var(--accent); }
.stars { color: #f59e0b; letter-spacing: 1px; }
.stars .off { color: #d1d5db; }
.rating-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rating-pick input { display: none; }
.rating-pick label { font-size: 26px; color: #d1d5db; cursor: pointer; line-height: 1; }
.rating-pick input:checked ~ label, .rating-pick label:hover, .rating-pick label:hover ~ label { color: #f59e0b; }
.mini-list a { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mini-list a:last-child { border-bottom: 0; }
.mini-list img { width: 64px; height: 64px; object-fit: contain; flex: none; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.mini-list .n { font-size: 13px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-list .price { font-size: 14px; }

/* ---------- Cart & checkout ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.cart-table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item img { width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius-sm); flex: none; }
.cart-item a { font-weight: 600; }
.icon-btn { background: transparent; border: 0; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 6px; }
.icon-btn:hover { color: var(--danger); background: #fee2e2; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; }
.summary-row.total { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 17px; font-weight: 800; }
.summary-row.total span:last-child { color: var(--accent); }
.coupon-form { display: flex; gap: 8px; margin: 12px 0; }
.option-cards { display: grid; gap: 10px; }
.option-card { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.option-card:hover { border-color: color-mix(in srgb, var(--primary) 40%, white); }
.option-card input { margin-top: 3px; accent-color: var(--primary); }
.option-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.option-card b { display: block; }
.option-card small { color: var(--muted); }
.option-card .fee { margin-left: auto; font-weight: 700; white-space: nowrap; }
.step-title { display: flex; gap: 10px; align-items: center; font-size: 16px; margin-bottom: 14px; }
.step-title span { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 13px; }
.mini-cart-line { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mini-cart-line img { width: 46px; height: 46px; object-fit: contain; flex: none; }
.mini-cart-line .n { flex: 1; }
.mini-cart-line .n span { color: var(--muted); }

/* order complete / tracking */
.success-hero { text-align: center; padding: 30px 20px; }
.success-hero .check-circle { width: 74px; height: 74px; border-radius: 50%; background: #dcfce7; color: var(--success); display: grid; place-items: center; margin: 0 auto 14px; }
.success-hero .check-circle .ic { width: 38px; height: 38px; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.info-grid div { background: var(--bg); border-radius: var(--radius-sm); padding: 12px; }
.info-grid small { display: block; color: var(--muted); font-size: 12px; }
.info-grid b { font-size: 14px; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-bottom: 16px; }
.timeline li::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.progress-steps { display: grid; grid-template-columns: repeat(5, 1fr); margin: 22px 0; }
.progress-steps div { text-align: center; position: relative; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.progress-steps div::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 6px; border-radius: 50%; background: var(--line); position: relative; z-index: 1; }
.progress-steps div::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.progress-steps div:first-child::after { display: none; }
.progress-steps div.done { color: var(--primary); }
.progress-steps div.done::before, .progress-steps div.done::after { background: var(--primary); }

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.track-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 640px) { .split-2, .track-form { grid-template-columns: 1fr; } }

/* ---------- Compare ---------- */
.compare-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.compare-table { min-width: 720px; }
.compare-table th, .compare-table td { border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
.compare-table th { width: 190px; background: var(--bg); text-align: left; font-weight: 600; }
.compare-table .grp td, .compare-table .grp th { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.compare-prod { text-align: center; }
.compare-prod img { width: 130px; height: 130px; object-fit: contain; margin: 0 auto 8px; }

/* ---------- PC builder ---------- */
.pcb-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.pcb-total { background: var(--dark); color: #fff; padding: 10px 18px; border-radius: var(--radius); text-align: right; }
.pcb-total small { display: block; opacity: .7; font-size: 12px; }
.pcb-total b { font-size: 22px; color: var(--accent); }
.pcb-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.pcb-row:last-child { border-bottom: 0; }
.pcb-icon { width: 64px; height: 64px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; overflow: hidden; }
.pcb-icon img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pcb-slot small { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.pcb-slot .req { color: var(--danger); }
.pcb-slot b { display: block; font-size: 14px; }
.pcb-price { font-weight: 800; color: var(--accent); white-space: nowrap; }

/* ---------- Account ---------- */
.account { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.account-nav a { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.account-nav a.active { color: var(--primary); background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.account-nav button { width: 100%; text-align: left; border: 0; background: none; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 12px 16px; font-weight: 600; color: var(--danger); }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; gap: 12px; align-items: center; }
.stat-card .ic { width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.stat-card b { font-size: 22px; display: block; line-height: 1.1; }
.stat-card span { color: var(--muted); font-size: 12.5px; }
.data-table th { text-align: left; padding: 10px 12px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--bg); }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.auth-box { max-width: 440px; margin: 30px auto; }

/* ---------- Footer ---------- */
.newsletter { background: var(--primary); color: #fff; margin-top: 40px; }
.newsletter .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.newsletter h3 { margin: 0; font-size: 19px; }
.newsletter p { margin: 2px 0 0; opacity: .85; font-size: 13px; }
.newsletter form { display: flex; gap: 0; background: #fff; border-radius: 999px; overflow: hidden; flex: 1; max-width: 460px; }
.newsletter input { flex: 1; border: 0; padding: 12px 18px; outline: none; color: var(--text); min-width: 0; }
.newsletter button { border: 0; background: var(--accent); color: #fff; padding: 0 22px; font-weight: 700; cursor: pointer; }
.site-footer { background: var(--dark); color: color-mix(in srgb, #fff 72%, var(--dark)); font-size: 13.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding: 40px 0 30px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer li { padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand .brand-text { color: #fff; }
.footer-brand p { margin-top: 12px; }
.contact-line { display: flex; gap: 10px; padding: 5px 0; align-items: flex-start; }
.contact-line .ic { margin-top: 3px; color: var(--accent); }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; background: var(--dark-2); display: grid; place-items: center; color: #fff; }
.socials a:hover { background: var(--accent); }
.pay-logos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pay-logos span { background: #fff; color: var(--dark); border-radius: 4px; padding: 3px 8px; font-size: 11px; font-weight: 800; }
.footer-bottom { border-top: 1px solid var(--dark-2); padding: 14px 0; font-size: 12.5px; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.back-top { position: fixed; right: 16px; bottom: 20px; width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff; border: 0; cursor: pointer; display: none; place-items: center; z-index: 80; box-shadow: var(--shadow-lg); }
.back-top.show { display: grid; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10, 6, 25, .9); z-index: 400; display: none; place-items: center; padding: 20px; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 88vh; background: #fff; border-radius: var(--radius); padding: 10px; }
.lightbox button { position: absolute; top: 16px; right: 16px; background: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
  .p-grid { grid-template-columns: repeat(4, 1fr); }
  .p-row { grid-auto-columns: calc((100% - 42px) / 4); }
  .cat-icons { grid-template-columns: repeat(6, 1fr); }
  .brand-strip { grid-template-columns: repeat(6, 1fr); }
  .h-action .h-label { display: none; }
}

@media (max-width: 991px) {
  .topbar-links.hide-md { display: none; }
  .menu-toggle { display: block; }
  .cat-nav { display: none; }
  .header-main { flex-wrap: wrap; gap: 10px 14px; padding: 10px 0; min-height: 0; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .btn-pcb { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .usp { grid-template-columns: repeat(2, 1fr); }
  .p-grid, .p-grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
  .p-row { grid-auto-columns: calc((100% - 28px) / 3); }
  .listing { grid-template-columns: 1fr; }
  .filters {
    position: fixed; top: 0; bottom: 0; left: 0; width: min(330px, 88vw); max-height: none; z-index: 210; background: var(--bg);
    padding: 14px; transform: translateX(-102%); transition: transform .25s; align-content: start;
  }
  body.filters-open .filters { transform: none; }
  body.filters-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
  .filters-close { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 16px; }
  .btn-filter-open { display: inline-flex; }
  .pd { grid-template-columns: 1fr; padding: 16px; }
  .pd-lower, .two-col, .account { grid-template-columns: 1fr; }
  .tabs-nav { top: 110px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.06); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav .ic { width: 22px; height: 22px; }
  .bottom-nav .h-badge { left: auto; right: calc(50% - 20px); top: 2px; }
  body { padding-bottom: 62px; }
  .back-top { bottom: 76px; }
  .toast-wrap { bottom: 76px; }
}

@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .container { padding: 0 12px; }
  .topbar .container { justify-content: center; }
  .topbar-links.hide-sm { display: none; }
  .brand-text { font-size: 18px; }
  .brand img { max-height: 38px; }
  .brand-mark { width: 34px; height: 34px; font-size: 15px; }
  .header-actions .h-action.hide-sm { display: none; }
  .slider { aspect-ratio: 16 / 9; }
  .hero-side { grid-template-columns: 1fr 1fr; gap: 10px; }
  .side-banner { min-height: 96px; }
  .side-banner .cap b { font-size: 14px; }
  .usp { grid-template-columns: 1fr 1fr; gap: 8px; }
  .usp-item { padding: 10px; gap: 8px; }
  .usp-item .ic { width: 24px; height: 24px; }
  .cat-icons { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cat-icon { padding: 10px 4px; }
  .cat-icon .ci-img { width: 42px; height: 42px; font-size: 16px; }
  .cat-icon span { font-size: 11px; }
  .p-grid, .p-grid.cols-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-row { grid-auto-columns: calc((100% - 10px) / 2); gap: 10px; }
  .p-media { padding: 12px 12px 4px; }
  .p-body { padding: 4px 10px 10px; }
  .p-feat { display: none; }
  .price { font-size: 15px; }
  .p-quick { opacity: 1; transform: none; }
  .p-quick button { width: 30px; height: 30px; }
  .p-actions .btn-icon { display: none; }
  .p-grid.list-view .p-card { flex-direction: column; }
  .p-grid.list-view .p-media { width: auto; }
  .brand-strip { grid-template-columns: repeat(3, 1fr); }
  .section-head h2 { font-size: 17px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .stat-cards { grid-template-columns: 1fr; }
  .pcb-row { grid-template-columns: 52px minmax(0, 1fr); padding: 12px 14px; }
  .pcb-row .pcb-price { grid-column: 2; }
  .pcb-row .pcb-act { grid-column: 1 / -1; display: flex; gap: 8px; }
  .pcb-row .pcb-act .btn { flex: 1; }
  .pcb-icon { width: 50px; height: 50px; }
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .cart-table td { border: 0; padding: 6px 4px; }
  .cart-table td:first-child { grid-column: 1 / -1; }
  .pd-info h1 { font-size: 18px; }
  .progress-steps div { font-size: 10.5px; }
}

@media print {
  .topbar, .site-header, .cat-nav, .notice-bar, .newsletter, .site-footer, .bottom-nav, .back-top, .no-print { display: none !important; }
  body { background: #fff; padding: 0; }
  .card { box-shadow: none; }
}

/* ==========================================================================
   v1.1 - language switcher & device-friendly improvements
   ========================================================================== */
.lang-switch { display: inline-flex; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; flex: none; }
.lang-switch a { padding: 3px 11px; font-size: 12px; font-weight: 700; line-height: 1.6; color: inherit; }
.lang-switch a.active { background: var(--accent); color: #fff; }
.lang-switch a:not(.active):hover { background: rgba(255,255,255,.12); color: #fff; }
.drawer-head .lang-switch { border-color: rgba(255,255,255,.4); margin-left: auto; margin-right: 8px; }
html[lang="bn"] body { font-family: "Hind Siliguri", var(--font); }
html[lang="bn"] body { font-size: 14.5px; }

/* Mobile sticky buy bar on the product page */
.m-buybar { display: none; }

/* Touch devices: never hide controls behind hover */
@media (hover: none) {
  .p-quick { opacity: 1; transform: none; }
  .cat-nav-item:hover .mega { display: none; }
}

/* Big screens (1600px+) */
@media (min-width: 1600px) {
  :root { --container: 1520px; }
  .p-grid { grid-template-columns: repeat(6, 1fr); }
  .p-grid.cols-4 { grid-template-columns: repeat(5, 1fr); }
  .p-row { grid-auto-columns: calc((100% - 70px) / 6); }
  .cat-icons { grid-template-columns: repeat(8, 1fr); }
}

/* Laptops & small desktops (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .listing { grid-template-columns: 230px 1fr; }
  .p-grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
  .header-main { gap: 14px; }
  .btn-pcb { padding: 8px 12px; }
  .cat-nav-item > a { padding: 12px 10px; font-size: 13px; }
  .hero { grid-template-columns: 1fr 250px; }
}

/* Tablets (641px - 991px) */
@media (min-width: 641px) and (max-width: 991px) {
  .container { padding: 0 20px; }
  .cat-icons { grid-template-columns: repeat(6, 1fr); }
  .brand-strip { grid-template-columns: repeat(5, 1fr); }
  .pd { gap: 20px; }
  .account { grid-template-columns: 1fr; }
  .account-nav { display: flex; flex-wrap: wrap; overflow: hidden; }
  .account-nav > div { width: 100%; }
  .account-nav a, .account-nav form { flex: 1 1 auto; }
  .account-nav a { border-bottom: 0; justify-content: center; }
  .stat-cards { grid-template-columns: repeat(3, 1fr); }
}

/* Phones & tablets */
@media (max-width: 991px) {
  .topbar .container { min-height: 34px; }
  .form-control, .search input, .newsletter input, .listing-tools select, .price-inputs input { font-size: 16px; } /* stops iOS zoom */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 36px; }
  .h-action { padding: 8px; }
  .filter-body label { padding: 4px 0; }
  .filter-body input[type=checkbox] { width: 18px; height: 18px; }
  .tabs-nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs-nav a { white-space: nowrap; }
  .m-buybar {
    display: flex; position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 140;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.08); padding: 8px 12px; gap: 8px; align-items: center;
  }
  .m-buybar .price { font-size: 16px; flex: 1; line-height: 1.2; }
  .m-buybar .price small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
  body.has-buybar { padding-bottom: 124px; }
  body.has-buybar .back-top, body.has-buybar .toast-wrap { bottom: 140px; }
}

/* Phones */
@media (max-width: 640px) {
  .topbar .container { justify-content: space-between; }
  .topbar-links { gap: 12px; }
  .topbar-links a:not(:first-child) span, .topbar-links .ic { display: inline; }
  .listing-head { padding: 10px; }
  .listing-head h1 { font-size: 16px; }
  .listing-tools { width: 100%; }
  .listing-tools form { flex: 1; }
  .listing-tools select { flex: 1; min-width: 0; }
  .view-toggle { display: none; }
  .pd { padding: 12px; }
  .gallery-thumbs button { width: 60px; height: 60px; }
  .buy-row .qty { width: 100%; justify-content: space-between; }
  .buy-row .qty input { flex: 1; }
  .buy-row .btn { flex: 1; }
  .pd-prices .price-box { flex: 1; min-width: 0; }
  .two-col { gap: 12px; }
  .card-pad { padding: 14px; }
  .option-card { padding: 10px 12px; }
  .info-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .newsletter .container { flex-direction: column; align-items: stretch; text-align: center; }
  .newsletter form { max-width: none; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
  .compare-table th { width: 120px; }
  .breadcrumb { padding: 10px 0; font-size: 12px; }
  /* tables become cards */
  .data-table thead { display: none; }
  .data-table tr { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 6px 10px; }
  .data-table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 0; text-align: right !important; }
  .data-table td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
  .data-table td[colspan] { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Hero interactive tech layer (follows the cursor) ---------- */
.hero-fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; perspective: 900px; overflow: hidden; }
.fx-net { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.3), #000 45%); mask-image: linear-gradient(90deg, rgba(0,0,0,.3), #000 45%); }
.fx-item { position: absolute; left: var(--x); top: var(--y); width: var(--w); transform-style: preserve-3d; will-change: transform;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); transition: filter .3s; }
.fx-item.near { filter: drop-shadow(0 0 14px rgba(103,232,249,.55)) drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.fx-in { animation: fx-float 7s ease-in-out infinite; animation-delay: var(--dl, 0s); }
.fx-item svg { display: block; width: 100%; height: auto; overflow: visible; }
.fx-g { fill: rgba(255,255,255,.09); stroke: rgba(255,255,255,.85); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.fx-scr { fill: rgba(103,232,249,.16); stroke: rgba(103,232,249,.5); stroke-width: 1.5; }
.fx-ln { fill: rgba(255,255,255,.55); } .fx-ln.o { fill: var(--accent); } .fx-ln.c { fill: #67e8f9; }
.fx-led { fill: #4ade80; animation: fx-blink 1.6s steps(2) infinite; } .fx-led.o { fill: var(--accent); }
.fx-led.d1 { animation-delay: .4s; } .fx-led.d2 { animation-delay: .8s; }
.fx-fan { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 3; stroke-dasharray: 10 6; transform-box: fill-box; transform-origin: center; animation: fx-spin 3s linear infinite; }
.fx-wave { fill: none; stroke: #67e8f9; stroke-width: 5; stroke-linecap: round; opacity: .2; animation: fx-wave 1.8s ease-in-out infinite; }
.fx-wave.w2 { animation-delay: .25s; } .fx-wave.w3 { animation-delay: .5s; }
.fx-chart { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; animation: fx-draw 4s ease-in-out infinite; }
.fx-pin { stroke: rgba(255,255,255,.75); stroke-width: 4; stroke-linecap: round; }
.fx-core { fill: rgba(249,115,22,.35); stroke: var(--accent); stroke-width: 2; animation: fx-pulse 2.4s ease-in-out infinite; }
.fx-item.near .fx-wave { animation-duration: .9s; } .fx-item.near .fx-fan { animation-duration: .8s; }

/* positions (kept away from the caption on the left) */
.fx-desktop { --x: 3%;  --y: 5%;  --w: 10%; --dl: -1s; }
.fx-router  { --x: 45%; --y: 6%;  --w: 11%; --dl: -3s; }
.fx-laptop  { --x: 43%; --y: 56%; --w: 15%; --dl: -5s; }
.fx-server  { --x: 89%; --y: 6%;  --w: 5.5%; --dl: -2s; }
.fx-chip    { --x: 4%;  --y: 78%; --w: 5%;  --dl: -4s; }
.fx-mouse   { --x: 62%; --y: 78%; --w: 3.4%; --dl: -6s; }

@keyframes fx-float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
@keyframes fx-blink { 50% { opacity: .25 } }
@keyframes fx-spin { to { transform: rotate(360deg) } }
@keyframes fx-wave { 0%,100% { opacity: .15 } 50% { opacity: 1 } }
@keyframes fx-draw { 0% { stroke-dashoffset: 160 } 45%,80% { stroke-dashoffset: 0 } 100% { stroke-dashoffset: -160 } }
@keyframes fx-pulse { 50% { fill: rgba(249,115,22,.75) } }

@media (max-width: 900px) { .fx-desktop, .fx-chip { display: none; } }
@media (max-width: 640px) {
  .fx-server, .fx-mouse { display: none; }
  .fx-router { --x: 70%; --y: 8%; --w: 18%; }
  .fx-laptop { --x: 62%; --y: 60%; --w: 26%; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-in, .fx-led, .fx-fan, .fx-wave, .fx-chart, .fx-core { animation: none; }
  .fx-wave { opacity: .6; } .fx-chart { stroke-dasharray: none; }
}

/* ---------- Side banners: electronic effects that follow the cursor ---------- */
.side-banner[data-sb-fx] { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s ease, box-shadow .35s ease; will-change: transform; isolation: isolate; }
.side-banner[data-sb-fx].sb-on { transition: transform .08s linear, box-shadow .35s ease; box-shadow: 0 14px 30px rgba(0,0,0,.22); }
.side-banner[data-sb-fx] img { transform: translate(var(--px, 0px), var(--py, 0px)) scale(1.06); transition: transform .35s ease; }
.side-banner[data-sb-fx].sb-on img { transition: transform .08s linear; }
.side-banner .sb-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; mix-blend-mode: screen; }
.side-banner .sb-glow { position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.22), transparent 60%); }
.side-banner.sb-on .sb-glow { opacity: 1; }
.side-banner[data-sb-fx] .cap { z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .side-banner[data-sb-fx], .side-banner[data-sb-fx] img { transform: none !important; }
}

/* ---------- Listing header: gradient hero with a drawn device that reacts to the cursor ---------- */
.lh-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "text art" "tools tools";
  align-items: center; gap: 6px 14px; padding: 18px 18px 12px; min-height: 200px; color: #fff; box-shadow: 0 10px 28px rgba(30,20,80,.18); }
.lh-hero > * { position: relative; z-index: 2; }
.lh-hero .lh-art { position: static; grid-area: art; z-index: auto; }
.lh-art::before { content: ""; position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c2) 85%, #fff 15%), transparent 55%),
  linear-gradient(120deg, var(--c1), var(--c2)); }
.lh-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 70%) var(--my, 40%), rgba(255,255,255,.18), transparent 65%); }
.lh-hero.lh-on::after { opacity: 1; }
.lh-hero .lh-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.lh-text { grid-area: text; align-self: center; padding-left: 4px; }
.lh-hero h1 { font-size: clamp(22px, 3vw, 34px); margin: 0 0 8px; color: #fff; letter-spacing: -.3px; text-shadow: 0 2px 14px rgba(0,0,0,.25); }
.lh-count { display: inline-block; font-size: 12.5px; padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(4px); }
.lh-svg { position: relative; z-index: 2; display: block; width: 300px; height: auto; overflow: visible;
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate(var(--tx, 0px), var(--ty, 0px));
  transition: transform .4s ease; filter: drop-shadow(0 14px 22px rgba(0,0,0,.3)); animation: lh-float 6s ease-in-out infinite; }
.lh-hero.lh-on .lh-svg { transition: transform .08s linear; }
.lh-shadow { fill: rgba(0,0,0,.25); }
.lh-name { font-weight: 800; fill: #fff; font-family: inherit; letter-spacing: .3px; paint-order: stroke; }
.lh-name.dark { fill: #1f2433; }
.lh-pill { fill: #fff; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.lh-cursor { fill: #fff; animation: lh-caret 1s steps(2) infinite; }
.lh-blink { animation: lh-caret 1.4s steps(2) infinite; }
.lh-pin { stroke: #e5e8ef; stroke-width: 6; stroke-linecap: round; }
.lh-wave { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; opacity: .25; animation: lh-wave 1.8s ease-in-out infinite; }
.lh-wave.w2 { animation-delay: .25s; } .lh-wave.w3 { animation-delay: .5s; }
.lh-fan { transform-box: fill-box; transform-origin: center; animation: lh-spin 2.5s linear infinite; }
.lh-key { animation: lh-key 2.4s ease-in-out infinite; }
.lh-paper { animation: lh-paper 3s ease-in-out infinite; }
.lh-hero.lh-on .lh-fan { animation-duration: .7s; } .lh-hero.lh-on .lh-wave { animation-duration: .8s; }
.lh-spark { position: absolute; z-index: 2; width: 10px; height: 10px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff, rgba(255,255,255,0) 70%); transform: translate(var(--sx, 0px), var(--sy, 0px)); transition: transform .5s ease; }
.lh-spark.s1 { right: 34%; top: 18%; } .lh-spark.s2 { right: 4%; top: 64%; width: 14px; height: 14px; }
.lh-spark.s3 { right: 28%; bottom: 30%; width: 7px; height: 7px; } .lh-spark.s4 { right: 12%; top: 10%; width: 8px; height: 8px; }
.lh-hero .listing-tools { grid-area: tools; justify-self: stretch; justify-content: flex-end; background: rgba(255,255,255,.95); color: var(--text, #1f2433);
  border-radius: calc(var(--radius) - 2px); padding: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
@keyframes lh-float { 0%,100% { translate: 0 0 } 50% { translate: 0 -6px } }
@keyframes lh-caret { 50% { opacity: 0 } }
@keyframes lh-wave { 0%,100% { opacity: .15 } 50% { opacity: .95 } }
@keyframes lh-spin { to { transform: rotate(360deg) } }
@keyframes lh-key { 0%,100% { fill: #c9ced9 } 50% { fill: var(--c2) } }
@keyframes lh-paper { 0%,100% { transform: translateY(0) } 50% { transform: translateY(5px) } }
@media (max-width: 900px) { .lh-svg { width: 220px; } }
@media (max-width: 640px) {
  .lh-hero { min-height: 0; padding: 14px 12px 10px; grid-template-columns: 1fr 130px; }
  .lh-svg { width: 130px; }
  .lh-hero .listing-tools { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .lh-svg, .lh-wave, .lh-fan, .lh-key, .lh-paper, .lh-cursor, .lh-blink { animation: none; } }

/* ---------- Product gallery upgrades ---------- */
.gallery-main img { transition: transform .25s ease, opacity .12s ease; }
.gallery-main img.g-fade { opacity: 0; }
.gallery-main.zooming img { transform: scale(2.1); transition: opacity .12s ease; }
.gallery-main:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.g-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); box-shadow: 0 4px 14px rgba(0,0,0,.15); font-size: 24px; line-height: 1; color: #1f2433; opacity: 0; transition: opacity .2s, transform .2s; }
.g-nav.prev { left: 10px; } .g-nav.next { right: 10px; }
.gallery-main:hover .g-nav, .gallery-main:focus-within .g-nav { opacity: 1; }
.g-nav:hover { transform: scale(1.08); }
.g-count { position: absolute; left: 12px; bottom: 10px; z-index: 2; font-size: 12px; background: rgba(17,24,39,.7); color: #fff; padding: 3px 10px; border-radius: 99px; }
.g-hint { position: absolute; right: 12px; bottom: 10px; z-index: 2; font-size: 11px; color: var(--muted, #6b7280); background: rgba(255,255,255,.85); padding: 2px 8px; border-radius: 99px; transition: opacity .2s; }
.gallery-main.zooming .g-hint, .gallery-main.zooming .g-count { opacity: 0; }
.gallery-thumbs button { transition: border-color .2s, transform .2s; }
.gallery-thumbs button:hover { transform: translateY(-2px); }
.lightbox .lb-nav { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 30px; cursor: pointer; }
.lightbox .lb-nav.prev { left: 16px; right: auto; } .lightbox .lb-nav.next { right: 16px; }
.lightbox .lb-count { position: absolute; bottom: 16px; left: 50%; translate: -50% 0; color: #fff; font-size: 13px; opacity: .8; }
@media (hover: none) { .g-nav { opacity: 1; } .g-hint { display: none; } .gallery-main.zooming img { transform: none; } }

/* ---------- 360° view ---------- */
.g-360 { position: absolute; left: 12px; top: 12px; z-index: 3; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-weight: 800; font-size: 14px;
  background: conic-gradient(from 0deg, var(--primary), #f97316, var(--primary)); box-shadow: 0 6px 18px rgba(0,0,0,.2); animation: g360-spin 6s linear infinite; }
.g-360 span { display: grid; place-items: center; position: absolute; inset: 4px; border-radius: 50%; background: var(--primary); animation: g360-spin 6s linear infinite reverse; }
.g-360:hover { transform: scale(1.06); }
.gallery-main.spinning .g-360 { display: none; }
@keyframes g360-spin { to { rotate: 360deg; } }
.spin-view { position: absolute; inset: 0; z-index: 2; background: #fff; display: grid; place-items: center; cursor: grab; touch-action: pan-y; user-select: none; }
.spin-view.grabbing { cursor: grabbing; }
.spin-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.spin-progress { position: absolute; left: 20%; right: 20%; bottom: 46px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; transition: opacity .4s; }
.spin-progress i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.spin-view.spin-ready .spin-progress { opacity: 0; }
.spin-tip { position: absolute; bottom: 12px; left: 50%; translate: -50% 0; font-size: 12px; background: rgba(17,24,39,.75); color: #fff; padding: 4px 12px; border-radius: 99px; pointer-events: none; white-space: nowrap; }
.gallery-main.spinning .g-count, .gallery-main.spinning .g-hint { display: none; }
.gallery-thumbs .thumb-360 { position: relative; }
.gallery-thumbs .thumb-360 b { position: absolute; inset: auto 2px 2px 2px; font-size: 10px; background: var(--primary); color: #fff; border-radius: 6px; }
.gallery-thumbs .thumb-360.active { border-color: var(--primary); }
.spin-view[hidden] { display: none; }
