/* ============================================================
   BuyZenix — Full Responsive Theme
   ============================================================ */

/* ---------- Aggressive Form Reset ---------- */
#mobileMenu { display: none !important; visibility: hidden !important; height: 0 !important; overflow: hidden !important; }
#mobileMenu.active { display: flex !important; visibility: visible !important; height: auto !important; overflow: visible !important; }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="search"],
.field select,
.field textarea {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: .7rem .9rem !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  font-size: .95rem !important;
  color: var(--text) !important;
  background: #fff !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  line-height: 1.5 !important;
  transition: border-color .2s, box-shadow .2s !important;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1) !important;
}

/* ---------- Reset & Variables ---------- */
:root {
  --header-h: 64px;
  --primary: #4f46e5;
  --primary-2: #4338ca;
  --purple: #9333ea;
  --text: #111827;
  --text-muted: #6b7280;
  --bg: #f8fafc;
  --bg-2: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 40px rgba(99,102,241,.12), 0 8px 16px rgba(0,0,0,.06);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; }

/* ---------- Product names uppercase ---------- */
.pd-info h1,
.product-body h3,
.pd-info h4,
.cart-item strong,
.pd-specs-key { text-transform: uppercase; letter-spacing: .02em; }

/* ---------- Container ---------- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: .75rem;
}
.brand { display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand .z {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Desktop nav */
.main-nav { display: none; gap: .25rem; }
@media (min-width: 860px) { .main-nav { display: flex; } }
.main-nav a { padding: .5rem 1rem; color: var(--text-muted); font-weight: 500; border-radius: .75rem; transition: all .3s; }
.main-nav a:hover { color: var(--primary); background: #eef2ff; }
.nav-filter { padding: .5rem 1.5rem .5rem 1rem; color: var(--text-muted); font-weight: 500; font-size: inherit; border: none; background: transparent; cursor: pointer; border-radius: .75rem; transition: all .3s; appearance: none; -webkit-appearance: none; -moz-appearance: none; background-image: url("data:image/svg+xml,%3Csvg fill='%236b7280' height='14' viewBox='0 0 24 24' width='14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; font-family: inherit; }
.nav-filter:hover { color: var(--primary); background: #eef2ff; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: .4rem; }
@media (min-width: 640px) { .header-actions { gap: .5rem; } }
.search-box { display: none; align-items: center; gap: .4rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: .75rem; padding: .35rem .7rem; }
@media (min-width: 640px) { .search-box { display: flex; } }
.search-box input { border: none; outline: none; background: transparent; width: 120px; color: var(--text); font-size: .9rem; }
@media (min-width: 768px) { .search-box input { width: 160px; } }
@media (min-width: 1024px) { .search-box input { width: 180px; } }
.currency-select { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: .75rem; padding: .35rem .4rem; font-size: .75rem; cursor: pointer; }
@media (min-width: 640px) { .currency-select { padding: .4rem .6rem; font-size: .85rem; } }
.cart-link { position: relative; padding: .35rem .45rem; color: var(--text-muted); font-weight: 600; border-radius: .75rem; transition: all .3s; white-space: nowrap; font-size: .85rem; }
@media (min-width: 640px) { .cart-link { padding: .35rem .5rem; font-size: .9rem; } }
.cart-link:hover { color: var(--primary); background: #eef2ff; }
.cart-text { display: none; }
@media (min-width: 480px) { .cart-text { display: inline; } }
.cart-badge { position: absolute; top: -4px; right: -4px; background: linear-gradient(to right, #ef4444, #ec4899); color: #fff; font-size: .6rem; font-weight: 700; border-radius: 9999px; min-width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.header-actions .account-link { display: none; }
@media (min-width: 768px) { .header-actions .account-link { display: inline-flex; } }

/* ---------- Mobile menu */
.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(20px);
  z-index: 49;
  padding: 1.5rem;
  flex-direction: column;
  gap: .5rem;
  /* Animation via transform + opacity */
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .25s ease, visibility .25s ease;
  display: flex !important;
}
.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}
.mobile-menu a {
  display: block; padding: .85rem 1rem; font-size: 1.05rem; font-weight: 500;
  color: var(--text); border-radius: var(--radius); transition: all .2s;
}
.mobile-menu a:hover { background: #eef2ff; color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; border-radius: 12px;
  padding: .65rem 1.2rem; font-weight: 600; font-size: .9rem;
  cursor: pointer; transition: all .3s cubic-bezier(.175,.885,.32,1.275);
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn-sm { padding: .4rem .8rem; font-size: .82rem; border-radius: 10px; }
.btn-lg { padding: .9rem 2rem; font-size: 1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,70,229,.3), inset 0 1px 0 rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.1);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(79,70,229,.4); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-outline { border: 1.5px solid var(--primary); color: var(--primary); background: #fff; }
.btn-outline:hover { background: #eef2ff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.1); }

/* ---------- Forms ---------- */
.form-wrap {
  width: 100%; max-width: 520px; margin: 0 auto;
}
@media (min-width: 768px) { .form-wrap { max-width: 560px; } }
.form-card {
  background: #fff; border-radius: 20px; padding: 1.5rem;
  box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,.04);
}
@media (min-width: 640px) { .form-card { padding: 2.5rem; } }
.form-card h2 { margin: 0 0 .5rem; font-size: 1.5rem; font-weight: 800; }
.form-card h3 { margin: 0 0 .5rem; font-size: 1.25rem; font-weight: 700; }
.form-card h4 { margin: 1rem 0 .5rem; font-size: .95rem; font-weight: 700; color: var(--text); }
.form-card h4:first-of-type { margin-top: 0; }
.form-card > p:first-of-type { margin-top: 0; }

.form-grid {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}
.form-grid .field { grid-column: 1 / -1; }

.field {
  display: flex; flex-direction: column; gap: .35rem;
}
.field label {
  font-size: .85rem; font-weight: 600; color: var(--text);
}
.field textarea { resize: vertical; min-height: 100px; }
.field input::placeholder,
.field textarea::placeholder { color: #9ca3af; }
.error { color: #dc2626; font-size: .8rem; margin-top: .15rem; }

/* ---------- Dashboard form classes ---------- */
.form-group {
  display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem;
}
.form-group label {
  font-size: .85rem; font-weight: 600; color: var(--text);
}
.form-input {
  display: block; width: 100%; padding: .7rem .9rem;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: .95rem; color: var(--text); background: #fff;
  font-family: inherit; line-height: 1.5;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { cursor: pointer; appearance: auto; }
.form-check {
  width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer;
}

/* ---------- Alerts & Utilities ---------- */
.alert { padding: .85rem 1.1rem; border-radius: 10px; margin-bottom: 1rem; }
.alert-info { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.text-muted { color: var(--text-muted); }
.badge { display: inline-block; padding: .25rem .6rem; border-radius: 9999px; font-size: .72rem; font-weight: 600; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #fef3c7; color: #92400e; }
.sep { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.ph { display: flex; align-items: center; justify-content: center; }

/* ---------- Hero ---------- */
.hero-banner-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 1rem;
  overflow: hidden;
}
.hero-banner-wrap::before {
  content: ''; position: absolute; inset: -2px; z-index: 0;
  background: linear-gradient(135deg, #a855f7, #6366f1, #eab308, #a855f7);
  animation: heroBorderGlow 4s ease-in-out infinite;
}
@keyframes heroBorderGlow {
  0%, 100% { opacity: .15; filter: blur(0px); }
  50% { opacity: .3; filter: blur(0px); }
}
.hero-banner-wrap::after {
  content: none;
}
@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(1.15); opacity: .9; }
}
.hero-banner {
  background: linear-gradient(135deg, #0f0a1a 0%, #1a0f2e 30%, #12082a 60%, #0d0618 100%);
  color: #fff;
  padding: 2rem 1.5rem; text-align: center;
  position: relative; z-index: 1; overflow: hidden;
  border: none;
  box-shadow: 0 30px 30px rgba(10, 10, 26, .4);
}
@media (min-width: 768px) { .hero-banner { padding: 2.5rem 0 2.5rem 1.5rem; } }
.hero-banner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(168,85,247,.05) 0%, transparent 100%);
  pointer-events: none;
}
.hero-banner::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(168,85,247,.3) 50%, transparent 95%);
  pointer-events: none;
}
.hero-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: auto 1fr; gap: 2rem; }
}
.hero-side { display: none; }
@media (min-width: 768px) { .hero-side { display: flex; } }
.hero-left {
  justify-content: center; align-items: center; padding: 1rem;
  border-right: 1px solid rgba(168, 85, 247, .2);
  position: relative;
}
.hero-left::after {
  content: ''; position: absolute; right: 0; top: 10%; height: 80%; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(168,85,247,.4), rgba(234,179,8,.3), rgba(168,85,247,.4), transparent);
}
.hero-center { text-align: center; padding: 0 1rem; }
.hero-layout { display: flex; align-items: stretch; gap: 0; width: 100%; }

/* Round logo with animated glow ring */
.hero-logo-card {
  width: 160px; height: 160px; border-radius: 50%; overflow: visible; flex-shrink: 0;
  position: relative;
  padding: 3px;
  z-index: 2;
}
.hero-logo-card::before {
  content: ''; position: absolute; inset: -3px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, #a855f7, #6366f1, #eab308, #f97316, #ec4899, #a855f7);
  animation: logoRingSpin 4s linear infinite;
}
.hero-logo-card::after {
  content: ''; position: absolute; inset: -14px; border-radius: 50%; z-index: -2;
  background: conic-gradient(from 0deg, #a855f7, #6366f1, #eab308, #f97316, #ec4899, #a855f7);
  filter: blur(20px); opacity: .35;
  animation: logoRingSpin 4s linear infinite;
}
@keyframes logoRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero-logo-card img {
  position: relative; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 50%;
  border: 3px solid #0f0a1a;
}
.hero-logo-card::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%; z-index: 0;
  background: conic-gradient(from 0deg, #a855f7, #6366f1, #eab308, #f97316, #ec4899, #a855f7);
  animation: logoRingSpin 4s linear infinite;
}
.hero-logo-card::after {
  content: ''; position: absolute; inset: -14px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, #a855f7, #6366f1, #eab308, #f97316, #ec4899, #a855f7);
  filter: blur(20px); opacity: .35;
  animation: logoRingSpin 4s linear infinite;
}
@keyframes logoRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero-logo-card img {
  position: relative; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 50%;
  border: 3px solid #0f0a1a;
}
.hero-logo-card:hover {
  transform: scale(1.05);
  transition: transform .4s ease;
}
@media (min-width: 1024px) { .hero-logo-card { width: 200px; height: 200px; } }
.hero-banner h1 {
  font-size: clamp(1.75rem, 5vw, 3.5rem); font-weight: 900;
  margin: 0 0 1rem; letter-spacing: -.03em; line-height: 1.1; color: #fff;
}
.hero-banner h1 span {
  color: #fff; -webkit-text-fill-color: #fff;
}
.hero-banner p { color: #6366f1; font-weight: 500; font-size: 1rem; margin: 0 auto 1.75rem; max-width: 28rem; line-height: 1.6; }
@media (min-width: 768px) { .hero-banner p { font-size: 1.15rem; margin-bottom: 2rem; } }
.hero-actions { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.hero-actions .btn-outline {
  border: 1.5px solid rgba(249,115,22,.4); color: #fff; background: linear-gradient(135deg, #f97316, #ea580c);
  backdrop-filter: blur(8px);
}
.hero-actions .btn-outline:hover { background: linear-gradient(135deg, #ea580c, #dc2626); border-color: #f97316; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(249,115,22,.3); }
.hero-actions .btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff;
  box-shadow: 0 8px 24px rgba(79, 70, 229, .3); border: 1px solid rgba(255,255,255,.2);
}
.hero-actions .btn-primary:hover { box-shadow: 0 12px 32px rgba(79, 70, 229, .4); transform: translateY(-2px); }

/* ---------- Sections ---------- */
.section { padding: 2.5rem 0; }
@media (min-width: 768px) { .section { padding: 4rem 0; } }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .5rem; }
.section-head h2 { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 800; color: var(--text); margin: 0; letter-spacing: -.02em; }
.section-head a { color: var(--primary); font-weight: 600; transition: all .3s; display: inline-flex; align-items: center; gap: .25rem; }
.section-head a:hover { color: var(--primary-2); gap: .5rem; }

.featured-section { background: var(--bg-2); position: relative; }
.featured-section::before,
.featured-section::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: calc(100% - 6rem); max-width: 1280px; height: 1px; background: var(--border);
}
.featured-section::before { top: 0; }
.featured-section::after { bottom: 0; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }
.cat-card {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-md);
  overflow: hidden; transition: all .4s cubic-bezier(.175,.885,.32,1.275);
  border: 1px solid rgba(0, 0, 0, .04); position: relative;
}
.cat-card::after {
  content: ''; position: absolute; inset: 0; border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -1px 0 rgba(0,0,0,.05);
  pointer-events: none;
}
.cat-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px rgba(99,102,241,.15), 0 8px 16px rgba(0,0,0,.08); }
.cat-img { height: 8rem; overflow: hidden; background: linear-gradient(135deg, #e0e7ff, #f3e8ff); position: relative; }
@media (min-width: 640px) { .cat-img { height: 9rem; } }
@media (min-width: 1024px) { .cat-img { height: 10rem; } }
.cat-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,.05)); }
.cat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.175,.885,.32,1.275); }
.cat-card:hover .cat-img img { transform: scale(1.1); }
.cat-name { padding: .85rem .75rem; text-align: center; font-weight: 700; color: #1f2937; transition: color .3s; font-size: .85rem; }
@media (min-width: 640px) { .cat-name { padding: 1rem; font-size: .95rem; } }
.cat-card:hover .cat-name { color: var(--primary); }

/* ---------- Product grid & card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; align-items: stretch; }
@media (min-width: 640px) { .product-grid { gap: 1.25rem; } }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }

.product-card {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-md);
  overflow: hidden; transition: all .4s cubic-bezier(.175,.885,.32,1.275);
  border: 1px solid rgba(0, 0, 0, .04); position: relative;
  display: flex; flex-direction: column; height: 100%;
}
.product-card::after {
  content: ''; position: absolute; inset: 0; border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -1px 0 rgba(0,0,0,.05);
  pointer-events: none;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.product-thumb { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: linear-gradient(135deg, #e0e7ff, #f3e8ff); width: 100%; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.175,.885,.32,1.275); }
.product-card:hover .product-thumb img { transform: scale(1.06); }
.product-thumb .ph { width: 100%; height: 100%; font-size: 2.5rem; font-weight: 700; color: #a5b4fc; }
.product-body { padding: .85rem; display: flex; flex-direction: column; flex: 1; }
@media (min-width: 640px) { .product-body { padding: 1rem; } }
.product-body .cat { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .25rem; font-weight: 600; }
.product-body h3 { margin: 0 0 .3rem; font-size: .9rem; font-weight: 600; line-height: 1.3; }
@media (min-width: 640px) { .product-body h3 { font-size: 1rem; } }
.product-body h3 a { color: #1f2937; transition: color .3s; }
.product-card:hover .product-body h3 a { color: var(--primary); }
.stock { display: inline-block; font-size: .75rem; color: #16a34a; margin-bottom: .3rem; }
.price { display: block; font-size: 1.05rem; font-weight: 800; margin-bottom: .65rem; }
@media (min-width: 640px) { .price { font-size: 1.15rem; margin-bottom: .85rem; } }
.product-body form { margin-top: auto; }

/* ---------- Two column layout ---------- */
.two-col { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .two-col { grid-template-columns: 1fr 340px; gap: 2rem; } }
@media (min-width: 1024px) { .two-col { grid-template-columns: 1fr 380px; } }

/* ---------- Cart item ---------- */
.cart-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: .75rem;
  border: 1px solid rgba(0,0,0,.04);
  transition: box-shadow .2s;
}
.cart-item:hover { box-shadow: var(--shadow-md); }
.cart-item .thumb {
  width: 72px; height: 72px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
  display: flex; align-items: center; justify-content: center;
}
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item > div:nth-child(2) { flex: 1; min-width: 0; }
.cart-item > div:nth-child(3) { flex-shrink: 0; text-align: right; }

@media (max-width: 480px) {
  .cart-item { flex-wrap: wrap; }
  .cart-item > div:nth-child(3) { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--border); }
}

/* ---------- Summary / Order box ---------- */
.summary {
  background: #fff; border-radius: 16px; padding: 1.25rem;
  box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,.04);
  position: sticky; top: calc(var(--header-h) + 1rem);
}
@media (min-width: 640px) { .summary { padding: 1.5rem; } }
.summary h3 { margin: 0 0 1rem; font-size: 1.1rem; font-weight: 700; }
.summary .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem 0; font-size: .9rem; color: var(--text-muted);
}
.summary .row.total {
  border-top: 2px solid var(--border); margin-top: .5rem; padding-top: .75rem;
  font-weight: 800; font-size: 1.05rem; color: var(--text);
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center; padding: 3rem 1.5rem;
  background: #fff; border-radius: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.04);
}
.empty-state h3 { margin: 0 0 .5rem; font-size: 1.25rem; }
.empty-state p { color: var(--text-muted); margin: 0 0 1.5rem; }

/* ---------- Product detail ---------- */
.pd-grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
}
@media (min-width: 768px) { .pd-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }

.pd-grid .product-thumb {
  border-radius: var(--radius-lg); aspect-ratio: 1 / 1;
}
.pd-grid .product-thumb img { border-radius: var(--radius-lg); }
.pd-info .cat-label {
  display: inline-block; color: var(--primary-2); text-transform: uppercase;
  font-size: .75rem; letter-spacing: .5px; font-weight: 600;
  margin-bottom: .5rem;
}
.pd-info h1 { margin: 0 0 .75rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.pd-info .price { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
.pd-info p { color: var(--text-muted); margin: 0 0 1rem; }
.pd-add-form { display: flex; gap: .75rem; margin-top: 1.25rem; max-width: 360px; }
.pd-add-form input[type="number"] {
  width: 80px; padding: .65rem .75rem; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: .95rem; color: var(--text); background: #fff;
  text-align: center;
}
.pd-add-form input[type="number"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.pd-related { margin-top: 2rem; }
.pd-related h4 { margin: 0 0 1rem; font-size: 1rem; font-weight: 700; }
.pd-related .product-grid { grid-template-columns: repeat(2, 1fr); }

/* --- Sticky add-to-cart bar for mobile product pages --- */
.pd-sticky-cart {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  padding: .75rem 1rem;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.pd-sticky-cart.visible {
  transform: translateY(0);
}
.pd-sticky-cart .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  max-width: 100%;
  padding: 0 .75rem;
}
.pd-sticky-cart .pd-sticky-info {
  flex: 1;
  min-width: 0;
}
.pd-sticky-cart .pd-sticky-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-sticky-cart .pd-sticky-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: .15rem;
}
.pd-sticky-cart .btn {
  min-height: 44px;
  padding: .65rem 1rem;
  font-size: .9rem;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .pd-sticky-cart { display: block; }
}

/* --- Sticky checkout bar for mobile cart page --- */
.cart-sticky-checkout {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  padding: .75rem 1rem;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.cart-sticky-checkout.visible {
  transform: translateY(0);
}
.cart-sticky-checkout .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  max-width: 100%;
  padding: 0 .75rem;
}
.cart-sticky-checkout .cart-sticky-info {
  flex: 1;
  min-width: 0;
}
.cart-sticky-checkout .cart-sticky-count {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
}
.cart-sticky-checkout .cart-sticky-total {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: .15rem;
}
.cart-sticky-checkout .btn {
  min-height: 44px;
  padding: .65rem 1rem;
  font-size: .9rem;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .cart-sticky-checkout { display: block; }
}

/* --- Sticky order summary for mobile checkout --- */
.checkout-sticky-summary {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  padding: .75rem 1rem;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.checkout-sticky-summary.visible {
  transform: translateY(0);
}
.checkout-sticky-summary .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  max-width: 100%;
  padding: 0 .75rem;
}
.checkout-sticky-summary .checkout-sticky-total {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-width: 0;
}
.checkout-sticky-summary .checkout-sticky-total span:first-child {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
}
.checkout-sticky-summary .checkout-sticky-total span:last-child {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}
.checkout-sticky-summary .btn {
  min-height: 44px;
  padding: .65rem 1rem;
  font-size: .9rem;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .checkout-sticky-summary { display: block; }
}

/* --- Mobile bottom tab bar --- */
.mobile-tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255,255,255,.97);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-tab-bar .mtab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-height: 56px;
  padding: 6px 4px 8px;
  color: #94a3b8;
  font-size: .62rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s;
}
.mobile-tab-bar .mtab svg {
  flex-shrink: 0;
}
.mobile-tab-bar .mtab.active {
  color: var(--primary);
}
.mobile-tab-bar .mtab-cart-icon {
  position: relative;
  display: inline-flex;
}
.mobile-tab-bar .mtab-cart-badge {
  position: absolute;
  top: -7px;
  right: -11px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(239,68,68,.4);
}
@media (max-width: 767px) {
  .mobile-tab-bar { display: flex; }
  body { padding-bottom: 64px; }
  .pd-sticky-cart,
  .cart-sticky-checkout,
  .checkout-sticky-summary {
    bottom: calc(56px + env(safe-area-inset-bottom));
  }
}
@media (min-width: 768px) {
  .mobile-tab-bar { display: none; }
  body { padding-bottom: 0; }
}

@media (max-width: 767px) {
  .container { padding: 0 1rem; }

  .hero-layout {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .hero-center {
    padding: 0 0.25rem;
  }

  .hero-center h1 {
    font-size: clamp(1.75rem, 8vw, 2.6rem);
    margin-bottom: .75rem;
  }

  .hero-center p {
    margin-bottom: 1.25rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-promo-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
    min-height: 0 !important;
    padding: 1.25rem 1rem !important;
  }

  .hero-logo-card {
    width: 120px;
    height: 120px;
  }

  .hero-banner {
    padding: 1.5rem 1rem;
  }

  .hero-marquee {
    opacity: .28;
  }

  .hero-marquee-track {
    gap: .75rem;
  }

  .hero-marquee-item img,
  .hero-marquee-placeholder {
    width: 56px;
  }

  .cat-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand-col {
    max-width: 100%;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-links-col {
    text-align: center;
  }

  .footer-links-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links-col a:hover {
    transform: none;
    padding-left: 0;
  }

  .footer-links-col a::before {
    display: none;
  }

  .footer-bottom {
    text-align: center;
  }
}

/* ---------- Specs table ---------- */
.pd-specs-section { margin-top: 1rem; }
.pd-specs-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pd-specs-table tr { border-bottom: 1px solid var(--border); }
.pd-specs-table tr:last-child { border-bottom: none; }
.pd-specs-table td { padding: .6rem .85rem; font-size: .88rem; vertical-align: top; }
.pd-specs-key {
  font-weight: 600; color: var(--text); white-space: nowrap;
  background: #f8fafc; width: 1%;
}
.pd-specs-val { color: var(--text-muted); }

/* ---------- Warranty box ---------- */
.pd-warranty-box {
  display: flex; align-items: flex-start; gap: .75rem;
  margin-top: 1rem; padding: .85rem 1rem;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #bbf7d0; border-radius: 12px;
  color: #166534;
}
.pd-warranty-box strong { display: block; margin-bottom: .15rem; color: #166534; }
.pd-warranty-icon { font-size: 1.5rem; line-height: 1; }

/* ---------- Buy Now button ---------- */
.pd-buy-now-btn {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff; font-weight: 700; padding: .75rem 1.5rem;
  border-radius: 10px; border: none; cursor: pointer;
  font-size: 1rem; letter-spacing: .02em;
  transition: all .2s;
}
.pd-buy-now-btn:hover { box-shadow: 0 4px 14px rgba(239,68,68,.35); transform: translateY(-1px); }
.pd-buy-now-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(160deg, #050510 0%, #0c0c24 30%, #111132 60%, #0e0e2a 100%);
  color: #cbd5e1;
  margin: 4rem 1rem 0;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0,0,0,.3), 0 -2px 10px rgba(99,102,241,.06);
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(129,140,248,.4), rgba(147,51,234,.4), transparent);
}
.footer-glow {
  position: absolute;
  top: -120px; right: -80px;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(99,102,241,.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
@media (min-width: 768px) { .site-footer { margin: 5rem 1.5rem 0; border-radius: 28px 28px 0 0; } }
@media (min-width: 1200px) { .site-footer { margin: 5rem 2rem 0; border-radius: 32px 32px 0 0; } }
.site-footer .container { position: relative; z-index: 1; padding-top: 3.5rem; padding-bottom: 2.5rem; max-width: 1140px; }
@media (min-width: 768px) { .site-footer .container { padding-top: 4rem; padding-bottom: 3rem; } }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 480px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 3rem; } }

/* Brand column */
.footer-brand-col { max-width: 320px; }
.footer-brand {
  display: inline-flex;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-brand .z {
  background: linear-gradient(135deg, #c084fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-tagline {
  color: #94a3b8;
  font-size: .9rem;
  line-height: 1.6;
  margin: .75rem 0 1.25rem;
}

.footer-social {
  display: flex;
  gap: .5rem;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  color: #64748b;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}
.footer-social a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, var(--glow, rgba(129,140,248,.2)), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
}
.footer-social a:hover::before { opacity: 1; }
.footer-social a:hover {
  color: #fff;
  border-color: rgba(255,255,255,.12);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(0,0,0,.3);
}
.footer-social a[data-color="#E4405F"]:hover { --glow: rgba(228,64,95,.25); color: #E4405F; }
.footer-social a[data-color="#fff"]:hover { --glow: rgba(255,255,255,.15); color: #fff; }
.footer-social a[data-color="#0A66C2"]:hover { --glow: rgba(10,102,194,.25); color: #0A66C2; }
.footer-social a[data-color="#1877F2"]:hover { --glow: rgba(24,119,242,.25); color: #1877F2; }

/* Link columns */
.footer-links-col h4 {
  color: #fff;
  margin: 0 0 1rem;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .02em;
  position: relative;
  padding-bottom: .65rem;
}
.footer-links-col h4::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 24px; height: 2px;
  background: linear-gradient(90deg, #818cf8, #c084fc);
  border-radius: 1px;
}
.footer-links-col a {
  display: block;
  color: #94a3b8;
  padding: .4rem 0;
  font-size: .88rem;
  transition: all .25s;
  position: relative;
}
.footer-links-col a:hover {
  color: #c7d2fe;
  transform: translateX(6px);
  padding-left: 4px;
}
.footer-links-col a::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #818cf8;
  transform: translateY(-50%) scale(0);
  transition: transform .25s;
}
.footer-links-col a:hover::before { transform: translateY(-50%) scale(1); }

/* Divider */
.footer-divider {
  height: 1px;
  margin: 2.5rem 0 1.5rem;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06) 20%, rgba(255,255,255,.06) 80%, transparent);
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .82rem;
  color: #475569;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-tech {
  color: #475569;
  letter-spacing: .01em;
}

/* ---------- Filter buttons (shop page) ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }

/* ---------- Order page ---------- */
.order-header { margin-bottom: 1.5rem; }
.order-header h2 { margin: 0 0 .25rem; }
.order-meta { color: var(--text-muted); font-size: .9rem; }

/* ---------- Dashboard header ---------- */
.dash-header {
  display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .dash-header { flex-direction: row; justify-content: space-between; align-items: center; }
}
.dash-header h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.5rem); }
.dash-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Checkout responsive ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .checkout-layout { grid-template-columns: 1fr 360px; } }

/* ============================================================
   MOBILE RESPONSIVENESS (comprehensive)
   ============================================================ */

/* --- Mobile search --- */
.mobile-search {
  display: flex; align-items: center; gap: .4rem;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: .75rem; padding: .35rem .7rem;
}
.mobile-search input {
  border: none; outline: none; background: transparent;
  width: 100%; color: var(--text); font-size: .9rem;
}
@media (min-width: 640px) { .mobile-search { display: none; } }

/* --- Header mobile --- */
@media (max-width: 859px) {
  .header-actions { gap: .25rem; }
  .brand { font-size: 1.15rem; }
  .cart-link { padding: .35rem .5rem; }
  .currency-select { padding: .3rem .4rem; font-size: .7rem; }
  .mobile-toggle { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
}
@media (max-width: 480px) {
  .header-actions { gap: .2rem; }
  .brand { font-size: 1.05rem; }
  .cart-link { padding: .3rem .4rem; }
  .currency-select { padding: .25rem .35rem; font-size: .65rem; }
}

/* --- Product detail mobile --- */
@media (max-width: 767px) {
  .pd-grid { gap: 1.25rem; }
  .pd-info h1 { font-size: 1.3rem; }
  .pd-info .price { font-size: 1.3rem; }
  .pd-add-form { max-width: 100%; }
  .pd-add-form input[type="number"] { width: 60px; }
  .pd-specs-table td { padding: .5rem .65rem; font-size: .82rem; }
  .pd-specs-key { white-space: normal; }
  .pd-related .product-grid { grid-template-columns: repeat(2, 1fr); }
  .share-row { flex-wrap: wrap; }
  .share-row input { min-width: 0; flex-basis: 100%; margin-bottom: .5rem; }
  .share-row .btn { flex-shrink: 0; }
}

/* --- Home banner mobile --- */
@media (max-width: 767px) {
  .banner-overlay { padding: 0 1rem !important; }
  .banner-img { height: 200px !important; max-height: 200px !important; }
  .hero-center { padding: 0 .5rem; }
  .hero-center h1 { font-size: clamp(1.4rem, 7vw, 2rem); }
}

/* --- Product grid single column on small screens --- */
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-thumb { aspect-ratio: 1 / 1; }
  .product-body { padding: .65rem; }
  .product-body h3 { font-size: .8rem; }
  .price { font-size: .9rem; }
  .product-body .cat { font-size: .55rem; }
}

/* --- Cart mobile --- */
@media (max-width: 480px) {
  .cart-item { padding: .75rem; gap: .75rem; }
  .cart-item .thumb { width: 56px; height: 56px; }
  .cart-item strong { font-size: .85rem; }
  .summary { padding: 1rem; }
}

/* --- Forms mobile --- */
@media (max-width: 480px) {
  .form-card { padding: 1.25rem; }
  .form-grid .field { grid-column: 1 / -1; }
  .form-group[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* --- Touch-friendly tap targets --- */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .main-nav a { padding: .6rem 1rem; min-height: 44px; display: flex; align-items: center; }
  .cart-link { min-height: 44px; display: flex; align-items: center; }
  .mobile-toggle { min-width: 44px; min-height: 44px; }
}

/* --- Tables horizontal scroll --- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Dashboard tables: auto-scroll on mobile */
@media (max-width: 767px) {
  .card-body table,
  .card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

/* --- Mobile menu improvements --- */
@media (max-width: 859px) {
  .mobile-menu {
    padding-top: 1rem;
  }
  .mobile-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .mobile-menu .mobile-search-form {
    display: flex !important;
    margin-bottom: .5rem;
  }
}

/* ============================================================
   Product Gallery v2 — modern viewer (photos, 360, video)
   ============================================================ */
.bx-gallery {
  --g-border: #eef2f7;
  --g-chip: rgba(255,255,255,.92);
  --g-shadow: 0 18px 40px rgba(15,23,42,.08), 0 2px 8px rgba(15,23,42,.04);
  position: relative;
}

/* ---- Tabs ---- */
.bx-g-tabs {
  display: flex; gap: .35rem; margin-bottom: .75rem;
  background: #fff; padding: .3rem; border-radius: 12px;
  border: 1px solid var(--g-border); width: fit-content;
  box-shadow: var(--shadow-sm);
}
.bx-g-tab {
  border: none; background: transparent; cursor: pointer;
  padding: .42rem .95rem; border-radius: 9px;
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  color: var(--text-muted); transition: all .2s ease;
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: inherit;
}
.bx-g-tab:hover { color: var(--text); }
.bx-g-tab.active {
  background: var(--primary); color: #fff;
  box-shadow: 0 3px 10px rgba(79,70,229,.3);
}
.bx-g-tab.active:hover { color: #fff; }

/* ---- Panels ---- */
.bx-g-panel { display: none; }
.bx-g-panel.active { display: block; animation: bxGIn .35s ease; }
@keyframes bxGIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Main stage ---- */
.bx-g-stage {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-lg);
  background: #fff; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--g-border);
  box-shadow: var(--g-shadow);
  touch-action: pan-y;
}
.bx-g-stage.bx-zooming { cursor: crosshair; }
.bx-g-stage img.bx-g-main-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  user-select: none; -webkit-user-drag: none; touch-action: none;
  transition: opacity .3s ease;
}

/* ---- Magnifier lens ---- */
.bx-g-lens {
  display: none; position: absolute; z-index: 5;
  width: 170px; height: 170px; border-radius: 50%;
  border: 2.5px solid #fff; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.25), 0 0 0 1px rgba(15,23,42,.08);
  background-repeat: no-repeat; background-color: #fff;
  transform: translate(-50%, -50%);
}
@media (hover: hover) and (pointer: fine) {
  .bx-g-stage:hover .bx-g-lens { display: block; }
}

/* ---- Nav arrows ---- */
.bx-g-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(15,23,42,.08); background: rgba(255,255,255,.9);
  color: var(--text); font-size: 1.15rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(15,23,42,.12);
  opacity: 0; transition: opacity .25s ease, transform .2s ease;
  padding: 0; font-family: inherit;
}
.bx-g-stage:hover .bx-g-nav, .bx-g-nav.bx-show { opacity: 1; }
.bx-g-nav:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-50%) scale(1.06); }
.bx-g-nav.bx-prev { left: 12px; }
.bx-g-nav.bx-next { right: 12px; }

/* Always show nav arrows on mobile */
@media (hover: none) and (pointer: coarse) {
  .bx-g-nav { opacity: 1; }
  .bx-g-top { opacity: 1; }
  .bx-g-counter { opacity: 1; }
  .bx-g-badges { opacity: 1; }
}

/* ---- Top-right controls ---- */
.bx-g-top {
  position: absolute; top: 12px; right: 12px; z-index: 6;
  display: flex; gap: .45rem; align-items: center;
}
.bx-g-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(15,23,42,.08); background: var(--g-chip);
  color: var(--text); cursor: pointer; font-size: 1.05rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgba(15,23,42,.1);
  transition: all .2s ease; padding: 0; font-family: inherit;
}
.bx-g-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: scale(1.05); }

/* ---- Counter + badges ---- */
.bx-g-counter {
  position: absolute; bottom: 12px; left: 12px; z-index: 6;
  background: rgba(15,23,42,.55); color: #fff; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; padding: .28rem .7rem; border-radius: 9999px;
  backdrop-filter: blur(4px); pointer-events: none;
}
.bx-g-badges {
  position: absolute; bottom: 12px; right: 12px; z-index: 6;
  display: flex; gap: .45rem; pointer-events: none;
}
.bx-g-badge {
  background: var(--g-chip); color: var(--text); font-size: .68rem; font-weight: 700;
  padding: .3rem .65rem; border-radius: 9999px; letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(15,23,42,.1); display: inline-flex; align-items: center; gap: .3rem;
  border: 1px solid var(--g-border);
}

/* ---- Main image label ---- */
.bx-g-main-label {
  margin-top: .5rem; text-align: center; font-size: .8rem; font-weight: 700;
  color: var(--text); min-height: 1.1em; letter-spacing: .02em;
}

/* ---- Thumbnails ---- */
.bx-g-thumbs {
  display: flex; gap: .6rem; margin-top: .85rem;
  overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.bx-g-thumbs::-webkit-scrollbar { height: 5px; }
.bx-g-thumbs::-webkit-scrollbar-thumb { background: #d7dee8; border-radius: 4px; }
.bx-g-thumb-wrap {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer;
}
.bx-g-thumb {
  width: 74px; height: 74px; object-fit: cover; border-radius: 12px;
  border: 2px solid var(--g-border); transition: all .2s ease;
  background: #fff;
}
.bx-g-thumb:hover { border-color: #c7cde0; transform: translateY(-1px); }
.bx-g-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.bx-g-thumb-label {
  font-size: .62rem; color: #94a3b8; text-align: center; max-width: 82px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- 360 viewer ---- */
.bx-g-spin {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fbfcfe, #f1f5f9); overflow: hidden;
  border: 1px solid var(--g-border); box-shadow: var(--g-shadow);
  touch-action: none; user-select: none; cursor: grab;
}
.bx-g-spin.bx-dragging { cursor: grabbing; }
.bx-g-spin-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .18s ease, transform .3s ease;
  pointer-events: none;
}
.bx-g-spin-frame.bx-active { opacity: 1; }
.bx-g-spin-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(15,23,42,.6); color: #fff; font-size: .72rem; font-weight: 600;
  padding: .35rem .8rem; border-radius: 9999px; backdrop-filter: blur(4px);
  display: flex; align-items: center; gap: .45rem; white-space: nowrap;
  letter-spacing: .02em; pointer-events: none;
}
.bx-g-spin-ctrl {
  position: absolute; top: 12px; right: 12px; z-index: 6; display: flex; gap: .45rem;
}
.bx-g-spin-cols {
  position: absolute; bottom: 14px; right: 14px; z-index: 6;
  background: rgba(255,255,255,.9); border: 1px solid var(--g-border);
  border-radius: 8px; font-size: .7rem; font-weight: 700; color: var(--text-muted);
  padding: .3rem .6rem; letter-spacing: .02em;
}

/* Always show nav arrows on mobile for 360 viewer */
@media (hover: none) and (pointer: coarse) {
  .bx-g-spin-hint { display: none; }
  .bx-g-spin-ctrl { opacity: 1; }
}

/* ---- Video viewer ---- */
.bx-g-video {
  aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--g-border); background: #000; box-shadow: var(--g-shadow);
}
.bx-g-video iframe, .bx-g-video video { width: 100%; height: 100%; border: none; display: block; background: #000; }

/* ---- Lightbox (fullscreen) ---- */
.bx-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(9,12,20,.92); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.bx-lightbox.bx-open { opacity: 1; visibility: visible; }
.bx-lightbox img {
  max-width: 92vw; max-height: 88vh; border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55); transform: scale(.94);
  transition: transform .35s cubic-bezier(.175,.885,.32,1.275);
  object-fit: contain; user-select: none; -webkit-user-drag: none;
}
.bx-lightbox.bx-open img { transform: scale(1); }
.bx-lightbox .bx-lb-close, .bx-lightbox .bx-lb-nav {
  position: absolute; z-index: 1001; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); transition: all .2s ease; padding: 0; font-family: inherit;
}
.bx-lightbox .bx-lb-close {
  top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%; font-size: 1.15rem;
}
.bx-lightbox .bx-lb-close:hover { background: #ef4444; border-color: #ef4444; }
.bx-lightbox .bx-lb-nav {
  top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  font-size: 1.3rem; line-height: 1;
}
.bx-lightbox .bx-lb-nav:hover { background: var(--primary); border-color: var(--primary); }
.bx-lightbox .bx-lb-prev { left: 24px; }
.bx-lightbox .bx-lb-next { right: 24px; }
.bx-lightbox .bx-lb-count {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.8); font-size: .8rem; font-weight: 700; letter-spacing: .06em;
}
@media (max-width: 767px) {
  .bx-lightbox .bx-lb-nav { width: 40px; height: 40px; font-size: 1.05rem; }
  .bx-lightbox .bx-lb-prev { left: 10px; }
  .bx-lightbox .bx-lb-next { right: 10px; }
  .bx-g-thumb { width: 64px; height: 64px; }
  .bx-g-lens { display: none !important; }
}
@media (hover: none), (pointer: coarse) {
  .bx-g-stage { cursor: default; }
}
