/* ============================================================
   Dark Store Theme for OpenCart 3.0.5
   ============================================================ */

/* Dark theme (default) */
:root {
  --bg-primary:     #0f0f13;
  --bg-secondary:   #17171e;
  --bg-card:        #1e1e28;
  --bg-hover:       #252530;
  --bg-input:       #1a1a24;
  --border:         #2a2a38;
  --border-light:   #353545;
  --text-primary:   #e8e8f0;
  --text-secondary: #9090a8;
  --text-muted:     #606078;
  --accent:         #ff6b35;
  --accent-hover:   #ff8555;
  --accent-dark:    #cc4f1e;
  --success:        #2ecc71;
  --danger:         #e74c3c;
  --warning:        #f39c12;
  --info:           #3498db;
  --radius:         8px;
  --radius-lg:      14px;
  --radius-xl:      20px;
  --shadow:         0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.6);
  --shadow-accent:  0 4px 20px rgba(255,107,53,0.25);
  --transition:     0.2s ease;
  --font:           'Manrope', 'Segoe UI', sans-serif;
}

/* Light theme */
body.light-theme {
  --bg-primary:     #f5f5f7;
  --bg-secondary:   #ffffff;
  --bg-card:        #ffffff;
  --bg-hover:       #f0f0f5;
  --bg-input:       #f8f8fa;
  --border:         #e0e0ea;
  --border-light:   #d0d0de;
  --text-primary:   #1a1a2e;
  --text-secondary: #555570;
  --text-muted:     #888899;
  --accent:         #ff6b35;
  --accent-hover:   #ff5520;
  --accent-dark:    #cc4f1e;
  --success:        #27ae60;
  --danger:         #e74c3c;
  --warning:        #e67e22;
  --info:           #2980b9;
  --shadow:         0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.15);
  --shadow-accent:  0 4px 20px rgba(255,107,53,0.20);
}

/* Theme toggle button */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   HEADER
   ============================================================ */
#header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.header-top { display: none; }
/* Burger button — desktop hidden, mobile visible */
#burger-btn {
  display: none;
}
@media (max-width: 768px) {
  #burger-btn { display: flex !important; align-items: center; justify-content: center; flex-shrink: 0; }
}


.header-top a { color: var(--text-muted); }
.header-top a:hover { color: var(--text-primary); }

.header-main {
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
#logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
#logo img { height: 40px; width: auto; }
#logo span.accent { color: var(--accent); }

/* Search */
#search {
  flex: 1;
  max-width: 560px;
}
#search .input-group {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-input);
  transition: border-color var(--transition);
}
#search .input-group:focus-within { border-color: var(--accent); }

#search input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
}
#search input::placeholder { color: var(--text-muted); }

#search button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 16px;
  transition: background var(--transition);
  display: flex;
  align-items: center;
}
#search button:hover { background: var(--accent-hover); }

/* Header icons */
.header-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.header-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  background: transparent;
  border: none;
}
.header-icon-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.header-icon-btn i { font-size: 20px; }

.header-cart-btn {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: var(--radius);
}
.header-cart-btn:hover { background: var(--accent-hover) !important; }

.badge-count {
  position: absolute;
  top: 4px;
  right: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---- Navbar ---- */
#navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

#navbar .navbar-nav > li > a {
  color: var(--text-secondary);
  padding: 12px 16px;
  display: block;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  border-radius: var(--radius);
}
#navbar .navbar-nav > li > a:hover,
#navbar .navbar-nav > li.active > a {
  color: var(--accent);
  background: rgba(255,107,53,0.08);
}

/* Dropdown */
.dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 200px;
}
.dropdown-menu li a {
  color: var(--text-secondary);
  padding: 8px 12px;
  display: block;
  border-radius: 6px;
  font-size: 13px;
  transition: all var(--transition);
}
.dropdown-menu li a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb li a { color: var(--text-muted); }
.breadcrumb li a:hover { color: var(--accent); }
.breadcrumb li + li::before {
  content: '/';
  margin-right: 4px;
  color: var(--border-light);
}
.breadcrumb li:last-child { color: var(--text-secondary); }

/* ============================================================
   PRODUCT PAGE
   ============================================================ */
.product-page { padding: 30px 0 60px; }

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* ---- Gallery ---- */
.product-gallery { position: sticky; top: 80px; }
@media (max-width: 768px) {
  .product-gallery { position: static !important; top: auto !important; }
}

.product-image-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  position: relative;
}
.product-image-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: transform 0.4s ease;
}
.product-image-main:hover img { transform: scale(1.05); }

.product-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-sale  { background: var(--danger);  color: #fff; }
.badge-hit   { background: var(--warning); color: #000; }
.badge-top   { background: var(--accent);  color: #fff; }
.badge-new   { background: var(--info);    color: #fff; }

.product-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.product-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
  background: var(--bg-card);
  flex-shrink: 0;
}
.product-thumb:hover,
.product-thumb.active { border-color: var(--accent); }
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* ---- Product Info ---- */
.product-info-panel {}

.product-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.product-brand-img { height: 28px; width: auto; filter: brightness(0.8); }

.product-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.product-meta span strong { color: var(--text-secondary); }

/* Rating */
.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.stars { color: var(--warning); font-size: 16px; letter-spacing: 2px; }
.rating-count { color: var(--text-muted); font-size: 13px; }
.rating-score {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

/* Stock */
.product-stock {
  margin-bottom: 18px;
}
.stock-in {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 14px;
  font-weight: 600;
}
.stock-in::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}
.stock-out {
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

/* Price */
.product-price-block {
  margin-bottom: 24px;
}
.price-old {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 16px;
  margin-bottom: 4px;
}
.price-current {
  font-size: 36px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
}
.price-discount {
  display: inline-block;
  background: rgba(231,76,60,0.15);
  color: var(--danger);
  border: 1px solid rgba(231,76,60,0.3);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
  margin-left: 10px;
  vertical-align: middle;
}

/* Options */
.product-options {
  margin-bottom: 20px;
}
.option-group { margin-bottom: 16px; }
.option-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.option-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239090a8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.option-select:focus { border-color: var(--accent); }

/* Qty + Add to cart */
.product-cart-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-input);
}
.qty-btn {
  width: 40px;
  height: 46px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.qty-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.qty-input {
  width: 52px;
  height: 46px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  font-family: var(--font);
  outline: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.3px;
  font-family: var(--font);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  flex: 1;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255,107,53,0.4);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  color: var(--text-primary);
}
.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline-accent:hover {
  background: var(--accent);
  color: #fff;
}
.btn-quick-order {
  width: 100%;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.btn-quick-order:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255,107,53,0.05);
}
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-wishlist {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 13px;
  border-radius: var(--radius);
}
.btn-wishlist:hover { border-color: var(--danger); color: var(--danger); background: rgba(231,76,60,0.08); }
.btn-wishlist.active { border-color: var(--danger); color: var(--danger); background: rgba(231,76,60,0.08); }

/* ---- Delivery block ---- */
.delivery-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 20px;
}
.delivery-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.delivery-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.delivery-item:last-child { border-bottom: none; padding-bottom: 0; }
.delivery-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: invert(1) opacity(0.6);
}
.delivery-item-info { flex: 1; }
.delivery-item-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.delivery-item-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- Payment icons ---- */
.payment-icons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  align-items: center;
}
.payment-icons img {
  height: 24px;
  width: auto;
  filter: invert(1) opacity(0.4);
  transition: opacity var(--transition);
}
.payment-icons img:hover { opacity: 0.8; }

/* ============================================================
   PRODUCT TABS
   ============================================================ */
.product-tabs { margin-top: 40px; }

.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: all var(--transition);
  margin-bottom: -2px;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content { display: none; padding: 30px 0; }
.tab-content.active { display: block; }

/* Description */
.description-content {
  color: var(--text-secondary);
  line-height: 1.8;
}
.description-content h2,
.description-content h3 { color: var(--text-primary); margin: 20px 0 10px; }
.description-content p { margin-bottom: 14px; }
.description-content ul { padding-left: 20px; }
.description-content li { margin-bottom: 6px; }

/* Specifications */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}
.spec-table tr:nth-child(odd) td { background: var(--bg-secondary); }
.spec-table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}
.spec-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  width: 40%;
  background: var(--bg-card) !important;
}

/* ============================================================
   REVIEWS
   ============================================================ */
.reviews-summary {
  display: flex;
  gap: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.review-score {
  text-align: center;
  min-width: 100px;
}
.review-score .big-num {
  font-size: 56px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}
.review-score .stars { font-size: 20px; margin: 6px 0; }
.review-score .count { color: var(--text-muted); font-size: 12px; }

.review-bars { flex: 1; }
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.bar-row .bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  overflow: hidden;
}
.bar-row .bar-fill {
  height: 100%;
  background: var(--warning);
  border-radius: 3px;
}
.bar-row .bar-cnt { min-width: 24px; text-align: right; }

.review-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.review-author { font-weight: 700; color: var(--text-primary); }
.review-date { color: var(--text-muted); font-size: 12px; }
.review-text { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.review-pros { color: var(--success); font-size: 13px; margin-top: 8px; }
.review-pros::before { content: '+ '; font-weight: 700; }
.review-cons { color: var(--danger); font-size: 13px; margin-top: 4px; }
.review-cons::before { content: '− '; font-weight: 700; }

/* Review form */
.review-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
}
.review-form h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}
.form-control:focus { border-color: var(--accent); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ============================================================
   RELATED PRODUCTS
   ============================================================ */
.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}
.product-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.3s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.06); }

.product-card-body { padding: 14px; }
.product-card-code { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.product-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.product-card-price .old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.product-card-price .current { font-size: 18px; font-weight: 800; color: var(--text-primary); }

/* ============================================================
   CART OFFCANVAS
   ============================================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.6);
}
.cart-panel.open { transform: translateX(0); }

.cart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-panel-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}
.cart-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.cart-close:hover { border-color: var(--danger); color: var(--danger); background: rgba(231,76,60,0.08); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}
.cart-empty-icon { font-size: 52px; opacity: 0.3; }
.cart-empty h4 { color: var(--text-secondary); font-size: 16px; }
.cart-empty p { font-size: 13px; }

.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item-options { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.cart-item-qty button {
  width: 28px; height: 28px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-qty button:hover { background: var(--bg-hover); color: var(--text-primary); }
.cart-item-qty span {
  padding: 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  height: 28px;
  display: flex;
  align-items: center;
}
.cart-item-price { font-weight: 800; font-size: 15px; color: var(--text-primary); }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  transition: color var(--transition);
}
.cart-item-remove:hover { color: var(--danger); }

.cart-panel-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cart-total-label { font-size: 13px; color: var(--text-muted); }
.cart-total-value { font-size: 24px; font-weight: 900; color: var(--text-primary); }

.cart-btns { display: flex; flex-direction: column; gap: 8px; }

/* ============================================================
   QUICK ORDER MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  padding: 20px;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}
.modal-overlay.open .modal-box { transform: none; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}
.modal-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { border-color: var(--danger); color: var(--danger); background: rgba(231,76,60,0.08); }

.modal-body { padding: 26px; }

.quick-product-preview {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 22px;
}
.quick-product-preview img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: var(--radius);
  padding: 4px;
  background: var(--bg-input);
}
.quick-product-preview .qp-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.quick-product-preview .qp-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}

.modal-body .form-group { margin-bottom: 14px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 40px; }
.input-icon-wrap .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.modal-footer {
  padding: 0 26px 26px;
}
.modal-agree {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-align: center;
}
.modal-agree a { color: var(--accent); }

/* ============================================================
   CHECKOUT PAGE
   ============================================================ */
.checkout-page { padding: 30px 0 60px; }
.checkout-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  align-items: start;
}

.checkout-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.checkout-section h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkout-section h3 .step-num {
  width: 28px; height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  flex-shrink: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Shipping methods */
.shipping-methods, .payment-methods { display: flex; flex-direction: column; gap: 10px; }

.method-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-input);
}
.method-card:hover { border-color: var(--border-light); }
.method-card.selected {
  border-color: var(--accent);
  background: rgba(255,107,53,0.05);
}
.method-card input[type="radio"] { display: none; }
.method-card .method-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.method-card .method-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.method-card .method-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.method-card .method-price {
  margin-left: auto;
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
}

/* Order summary sidebar */
.order-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.order-summary h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.order-items { margin-bottom: 16px; }
.order-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.order-item:last-child { border-bottom: none; }
.order-item-img {
  width: 50px; height: 50px;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px solid var(--border);
  overflow: hidden;
}
.order-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.order-item-title { font-size: 12px; font-weight: 600; color: var(--text-primary); flex: 1; line-height: 1.3; }
.order-item-qty { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.order-item-price { font-size: 14px; font-weight: 800; color: var(--text-primary); white-space: nowrap; }

.order-totals { border-top: 1px solid var(--border); padding-top: 14px; }
.total-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.total-row.grand {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
}
.total-row.grand .total-label { color: var(--text-primary); }

/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.category-page { padding: 24px 0 60px; }

.category-layout {
  display: block;
}

/* Filter sidebar */
.filter-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.filter-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.filter-block-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.price-range-inputs { display: flex; gap: 8px; align-items: center; }
.price-range-inputs input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}
.price-range-inputs input:focus { border-color: var(--accent); }
.price-range-sep { color: var(--text-muted); font-size: 12px; }

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
}
.filter-checkbox input[type="checkbox"] { display: none; }
.filter-checkbox .checkbox-custom {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: transparent;
}
.filter-checkbox:has(input:checked) .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.filter-checkbox:hover .checkbox-custom { border-color: var(--accent); }

/* Sort & toolbar */
.category-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 18px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.toolbar-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.toolbar-sort:first-child { flex: 1; min-width: 0; }
.toolbar-sort select { max-width: 100%; min-width: 0; }
.toolbar-sort select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}
.toolbar-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 50px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: var(--text-muted);
  font-size: 13px;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-newsletter {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 12px;
}
.footer-newsletter input {
  flex: 1;
  background: var(--bg-input);
  border: none;
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}
.footer-newsletter button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  transition: background var(--transition);
}
.footer-newsletter button:hover { background: var(--accent-hover); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.social-links { display: flex; gap: 10px; }
.social-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 15px;
  transition: all var(--transition);
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255,107,53,0.08);
}

/* ============================================================
   ALERTS & TOASTS
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: rgba(46,204,113,0.1); border: 1px solid rgba(46,204,113,0.3); color: var(--success); }
.alert-danger  { background: rgba(231,76,60,0.1);  border: 1px solid rgba(231,76,60,0.3);  color: var(--danger); }
.alert-info    { background: rgba(52,152,219,0.1);  border: 1px solid rgba(52,152,219,0.3);  color: var(--info); }

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: slideInRight 0.3s ease;
  border-left: 3px solid var(--accent);
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }

@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}
.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.pagination .page-link:hover { border-color: var(--accent); color: var(--accent); }
.pagination .page-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   FEEDBACK WIDGET (floating)
   ============================================================ */
.feedback-widget {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.feedback-toggle {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.feedback-toggle:hover { background: var(--accent-hover); transform: scale(1.05); }

.feedback-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}
.feedback-links.open { max-height: 300px; }

.feedback-link {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 18px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.feedback-link:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
}
.scroll-top.visible { opacity: 1; pointer-events: all; }
.scroll-top:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}

@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; }
  .category-layout { grid-template-columns: 1fr; }
  .filter-sidebar { display: none; }
  .filter-sidebar { display: none; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 600px) {
  .header-main { flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cart-panel { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .product-cart-row { flex-wrap: wrap; }
  .reviews-summary { flex-direction: column; }
}

/* ============================================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================================ */

/* Page load fade-in */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; }
  to   { opacity:1; }
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,107,53,0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(255,107,53,0); }
}
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

/* Apply to main content blocks */
.product-layout,
.checkout-section,
.product-card,
.review-item,
.cart-item {
  animation: fadeInUp 0.35s ease both;
}
.product-card:nth-child(2) { animation-delay: 0.05s; }
.product-card:nth-child(3) { animation-delay: 0.10s; }
.product-card:nth-child(4) { animation-delay: 0.15s; }
.product-card:nth-child(5) { animation-delay: 0.20s; }
.product-card:nth-child(6) { animation-delay: 0.25s; }

/* Accent button pulse on hover */
.btn-primary:hover {
  animation: pulse 0.6s ease;
}

/* Stock indicator pulse */
.stock-in::before {
  animation: pulse 2s infinite;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius);
}

/* Image zoom container */
.product-image-main::after {
  content: '🔍';
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 18px;
  opacity: 0;
  transition: opacity var(--transition);
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.product-image-main:hover::after { opacity: 1; }

/* Smooth cart count update */
.badge-count {
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), background-color 0.2s ease;
}
.badge-count.bump {
  transform: scale(1.4);
  background: var(--warning);
}

/* Button loading state */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   MOBILE IMPROVEMENTS
   ============================================================ */
@media (max-width: 768px) {

  /* Hide desktop navbar — categories are in mob-menu */
  #navbar { display: none !important; }

  /* Hide desktop header icons except cart + theme toggle */
  .header-icons .header-icon-btn:not(.header-cart-btn) {
    display: none;
  }

  /* Compact single-row header on mobile */
  .header-main {
    padding: 8px 0;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
  }

  /* Logo compact */
  #logo a { font-size: 16px; }
  #logo img { height: 28px; max-width: 120px; object-fit: contain; }

  /* Search takes remaining space, no wrap to new line */
  #search { order: 0; flex: 1; min-width: 0; max-width: none; }
  #search input { font-size: 13px; padding: 8px 10px; }

  /* Header icons compact */
  .header-icons { gap: 4px; flex-shrink: 0; }
  .header-icon-btn span { display: none; }
  .header-icon-btn { padding: 8px; min-width: 40px; }

  /* Theme toggle small on mobile */
  .theme-toggle { width: 34px; height: 34px; font-size: 14px; }

  /* Cart button on mobile — icon only */
  .header-cart-btn { padding: 8px; }

  /* Product page stacked */
  .product-title { font-size: 20px; }
  .price-current { font-size: 28px; }

  /* Sticky buy bar on mobile product page */
  .product-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 800;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    transform: translateY(0);
    transition: transform 0.3s ease;
  }
  .product-sticky-bar.hidden { transform: translateY(100%); }
  .product-sticky-bar .price { font-size: 20px; font-weight: 900; color: var(--text-primary); }

  /* Cart panel full width on mobile */
  .cart-panel { width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; top: auto; bottom: 0; height: 92vh; transform: translateY(100%); }
  .cart-panel.open { transform: translateY(0); }

  /* Modal full width on mobile */
  .modal-box { border-radius: var(--radius-xl) var(--radius-xl) 0 0; position: fixed; bottom: 0; left: 0; right: 0; max-width: none; margin: 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }

  /* Hide feedback widget on mobile (using bottom bar instead) */
  .feedback-widget { display: none; }
  .scroll-top { bottom: 70px; }

  /* Checkout full width */
  .checkout-layout { grid-template-columns: 1fr; }

  /* Filter sidebar becomes a bottom sheet on mobile — hidden until .open */
  .filter-sidebar {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    z-index: 1500;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    padding: 20px;
    overflow-y: auto;
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    visibility: hidden;
  }
  .filter-sidebar.open {
    transform: translateY(0);
    visibility: visible;
  }

  /* Filter trigger + header on mobile */
  .filter-trigger-mob { display: flex !important; }
  .filter-mob-header { display: flex !important; }
  #filter-sidebar { display: block; } /* override the 900px display:none */

  /* Toolbar wraps on mobile */
  .category-toolbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }
  .toolbar-sort { flex-wrap: wrap; }
  .toolbar-count { width: 100%; text-align: right; font-size: 12px; }
  .toolbar-sort select { font-size: 12px; padding: 5px 8px; }

  /* Products grid 2 col on mobile */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-card-body { padding: 10px; }
  .product-card-title { font-size: 12px; }
  .product-card-price .current { font-size: 15px; }
}

@media (max-width: 400px) {
  .products-grid { grid-template-columns: 1fr; }
  .product-title { font-size: 18px; }
}

/* ============================================================
   SPECIAL OFFERS / COUNTDOWN BANNER
   ============================================================ */
.offer-banner {
  background: linear-gradient(135deg, #1a0a00 0%, #2d1200 50%, #1a0a00 100%);
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.offer-banner-text {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}
.offer-banner-text span { color: var(--accent); }

.countdown {
  display: flex;
  gap: 8px;
}
.countdown-block {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,107,53,0.2);
  border-radius: var(--radius);
  padding: 6px 10px;
  text-align: center;
  min-width: 48px;
}
.countdown-num {
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.countdown-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ============================================================
   GALLERY LIGHTBOX (CSS-only backdrop)
   ============================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
  padding: 20px;
}
.lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.lightbox-close:hover { background: var(--danger); border-color: var(--danger); }

/* ============================================================
   BREADCRUMB SCHEMA.ORG HIDDEN LIST (accessibility)
   ============================================================ */
.breadcrumb li { animation: none; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  #header, #footer, .feedback-widget, .scroll-top,
  .toast-container, #cart-panel, #cart-overlay,
  .modal-overlay, #mob-menu, #mob-overlay, #mob-bottom-bar { display: none !important; }
  body { background: #fff; color: #000; }
  .product-card { border: 1px solid #ccc; }
  .btn { display: none; }
}

/* ============================================================
   OC3 MENU OVERRIDES — Style the default OC3 navbar HTML
   ============================================================ */

/* Reset OC3 navbar wrapper styles */
#navbar nav.navbar,
#navbar #menu {
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: unset !important;
  border-radius: 0 !important;
}
#navbar .navbar-header { display: none !important; }
#navbar .container { padding: 0 !important; }
#navbar .collapse { display: block !important; height: auto !important; }
#navbar .navbar-collapse { padding: 0 !important; border: none !important; box-shadow: none !important; }

/* Nav items */
#navbar .nav.navbar-nav { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 0; margin: 0; }
#navbar .nav.navbar-nav > li { float: none; }
#navbar .nav.navbar-nav > li > a {
  color: var(--text-secondary) !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: var(--radius) !important;
  transition: all 0.2s !important;
  background: transparent !important;
  white-space: nowrap;
}
#navbar .nav.navbar-nav > li > a:hover,
#navbar .nav.navbar-nav > li.open > a {
  color: var(--accent) !important;
  background: rgba(255,107,53,0.08) !important;
}

/* OC3 dropdown-menu with dropdown-inner */
#navbar .dropdown-menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 8px !important;
  margin-top: 0 !important;
}
#navbar .dropdown-menu .dropdown-inner {
  display: flex;
  gap: 0;
}
#navbar .dropdown-menu .list-unstyled { margin: 0; padding: 0; min-width: 160px; }
#navbar .dropdown-menu .list-unstyled li a {
  color: var(--text-secondary) !important;
  padding: 7px 12px !important;
  display: block !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  transition: all 0.2s !important;
}
#navbar .dropdown-menu .list-unstyled li a:hover {
  color: var(--text-primary) !important;
  background: var(--bg-hover) !important;
}
#navbar .dropdown-menu .see-all {
  display: block;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent) !important;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ============================================================
   MOBILE MENU — Hide OC3 navbar-toggle, show flat links
   ============================================================ */
#mob-nav nav.navbar,
#mob-nav #menu { background: transparent !important; border: none !important; padding: 0 !important; margin: 0 !important; }
#mob-nav .navbar-header { display: none !important; }
#mob-nav .container { padding: 0 !important; }
#mob-nav .collapse { display: block !important; height: auto !important; }
#mob-nav .navbar-collapse { padding: 0 !important; border: none !important; box-shadow: none !important; }
#mob-nav .nav.navbar-nav { display: flex !important; flex-direction: column !important; padding: 0 !important; margin: 0 !important; }
#mob-nav .nav.navbar-nav > li { float: none !important; width: 100%; }
#mob-nav .nav.navbar-nav > li > a {
  display: block !important;
  padding: 12px 20px !important;
  color: var(--text-secondary) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-bottom: 1px solid rgba(42,42,56,0.4) !important;
  background: transparent !important;
}
#mob-nav .nav.navbar-nav > li > a:hover { color: var(--accent) !important; }
#mob-nav .nav.navbar-nav > li.open > a { color: var(--accent) !important; }

/* Mobile dropdown */
#mob-nav .dropdown-menu {
  position: static !important;
  float: none !important;
  display: none !important;
  background: var(--bg-primary) !important;
  border: none !important;
  border-top: 1px solid var(--border) !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
#mob-nav .dropdown.open .dropdown-menu { display: block !important; }
#mob-nav .dropdown-menu .dropdown-inner { flex-direction: column; }
#mob-nav .dropdown-menu .list-unstyled { padding: 0; margin: 0; }
#mob-nav .dropdown-menu .list-unstyled li a {
  padding: 9px 20px 9px 36px !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  display: block !important;
  border-bottom: 1px solid rgba(42,42,56,0.3) !important;
}
#mob-nav .dropdown-menu .list-unstyled li a:hover { color: var(--accent) !important; }
#mob-nav .dropdown-menu .see-all {
  padding: 9px 20px 9px 36px !important;
  color: var(--accent) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: block !important;
  border-bottom: 1px solid var(--border) !important;
}

/* Fix OC3 navbar container alignment */
#navbar > nav > .container,
#navbar .navbar > .container { padding-left: 15px !important; padding-right: 15px !important; }

/* Fix OC3 dropdown z-index */
#navbar .dropdown-menu { z-index: 1100 !important; }

/* ============================================================
   FILTER SIDEBAR MOBILE HEADER
   ============================================================ */
.filter-mob-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.filter-mob-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.filter-mob-close:hover { color: var(--danger); border-color: var(--danger); }

/* ============================================================
   LIGHT THEME OVERRIDES FOR BOOTSTRAP ELEMENTS
   ============================================================ */
body.light-theme .navbar,
body.light-theme #navbar {
  background: var(--bg-secondary);
  border-color: var(--border);
}
body.light-theme .dropdown-menu {
  background: var(--bg-secondary);
  border-color: var(--border);
}
body.light-theme .dropdown-menu a { color: var(--text-secondary); }
body.light-theme .dropdown-menu a:hover { color: var(--accent); background: var(--bg-hover); }
body.light-theme .breadcrumb-section { background: var(--bg-secondary); }
body.light-theme .product-card { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
body.light-theme input,
body.light-theme textarea,
body.light-theme select { color: var(--text-primary); background: var(--bg-input); border-color: var(--border); }
body.light-theme .spec-table tr:nth-child(odd) td { background: var(--bg-hover); }

@media (max-width: 767px) {
  #mob-bottom-bar { display: flex !important; }
  body { padding-bottom: 60px; }
}
@media (min-width: 768px) {
  #mob-bottom-bar { display: none !important; }
}

/* ============================================================
   GLOBAL MOBILE OVERFLOW FIX
   ============================================================ */
@media (max-width: 768px) {
  body, .container { overflow-x: hidden; max-width: 100vw; }
  .category-layout { grid-template-columns: 1fr !important; }
  .category-page .container { padding-left: 12px; padding-right: 12px; }
  #search input { min-width: 0; width: 100%; }
  .header-main { overflow: visible; }
}

/* Hide breadcrumb on mobile — saves space */
@media (max-width: 768px) {
  .breadcrumb-section { display: none; }
}

/* Input text visibility fix for mobile */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
textarea,
select {
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  background: var(--bg-input) !important;
}
input::placeholder { color: var(--text-muted) !important; opacity: 1; }
body.light-theme input::placeholder { color: #aaa !important; }

/* Header search input */
#search input {
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  background: var(--bg-input) !important;
}
#search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-secondary) !important;
}

/* ============================================================
   MOBILE SEARCH BUTTON + TOOLBAR + BOTTOM BAR FIXES
   ============================================================ */

/* Desktop: show input, hide mob-search-btn */
#mob-search-btn { display: none !important; }

@media (max-width: 768px) {
  /* Hide desktop search input, show icon button */
  #search { display: none !important; }
  #mob-search-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 17px;
    flex-shrink: 0;
    transition: var(--transition);
  }
  #mob-search-btn:hover,
  #mob-search-btn:active { color: var(--accent); border-color: var(--accent); }

  /* Make cart and search buttons same size */
  .header-cart-btn,
  #mob-search-btn {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    min-width: 42px !important;
  }
  .header-cart-btn i,
  #mob-search-btn i { font-size: 17px; }

  /* Bottom bar — hidden while header in view */
  #mob-bottom-bar {
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  #mob-bottom-bar.bar-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }

  /* Less space above category title on mobile */
  .category-page { padding: 8px 0 60px; }
  .category-page .container > h1 { margin-top: 8px; margin-bottom: 10px; font-size: 20px; }

  /* Toolbar single line on mobile */
  .category-toolbar {
    padding: 8px 10px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .category-toolbar .toolbar-sort { flex-shrink: 1; min-width: 0; }
  .category-toolbar .toolbar-sort i { display: none; }
  .toolbar-sort select { font-size: 12px; padding: 6px 8px; width: 100%; }
  .toolbar-count { font-size: 11px; white-space: nowrap; flex-shrink: 0; max-width: 80px; overflow: hidden; text-overflow: ellipsis; }

  /* Hide limit selector on mobile */
  .toolbar-limit { display: none !important; }
}

/* Product sticky bar padding fix */
@media (max-width: 768px) {
  .description-content,
  .product-tabs { padding-bottom: 80px; }
  .tab-content { padding-bottom: 80px; }
}

/* Product page — ensure sticky bar doesn't overlap content */
@media (max-width: 768px) {
  .product-layout,
  #main-content .container { padding-bottom: 80px; }
}
