/* CSS Reset & Variable Design System */
:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #f1f5f9;
  --border-color: rgba(15, 23, 42, 0.08);
  --border-glow: rgba(124, 58, 237, 0.1);
  
  /* Text colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  /* Brand Accents */
  --accent-primary: #7c3aed;     /* Indigo 600 */
  --accent-primary-hover: #6d28d9;
  --accent-dark: #4c1d95;        /* Deep violet */
  
  /* Status/Visual Indicators */
  --color-emerald: #059669;      /* Emerald 600 */
  --color-rose: #e11d48;         /* Rose 600 */
  --color-amber: #d97706;        /* Amber 600 */
  --color-glass: rgba(255, 255, 255, 0.85);
  
  /* UI Layout details */
  --shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 15px rgba(124, 58, 237, 0.05);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Transparent UI element backgrounds for Light Theme */
  --bg-input: rgba(0, 0, 0, 0.03);
  --bg-input-hover: rgba(0, 0, 0, 0.05);
  --bg-toggle: rgba(0, 0, 0, 0.08);
  --chart-grid: rgba(0, 0, 0, 0.05);
  --chart-container-bg: #f8fafc;
  --tooltip-bg: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dark);
}

/* Header styling */
.main-header {
  height: 70px;
  background-color: var(--color-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-highlight {
  background: linear-gradient(135deg, var(--accent-primary) 30%, var(--accent-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-search-container {
  flex: 1;
  max-width: 580px;
  margin: 0 40px;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 14px;
  transition: var(--transition-smooth);
}

.search-box:focus-within {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  background-color: var(--bg-input-hover);
}

.search-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  height: 38px;
  width: 100%;
  padding-left: 10px;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.btn-search {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 20px;
  height: 36px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-search:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
}

/* Country selector dropdown */
.country-selector {
  position: relative;
  cursor: pointer;
}

.selected-country {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.selected-country:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-input-hover);
}

.flag-icon {
  font-size: 16px;
}

.chevron-icon {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 4px;
}

.country-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-main);
  list-style: none;
  width: 180px;
  display: none;
  overflow: hidden;
  z-index: 110;
}

.country-dropdown.show {
  display: block;
  animation: dropdownFade 0.25s ease-out;
}

.country-dropdown li {
  padding: 10px 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.country-dropdown li:hover {
  background-color: var(--bg-input-hover);
  color: var(--accent-primary);
}

/* App Layout */
.app-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: calc(100vh - 70px);
}

/* Sidebar filter styling */
.sidebar-filters {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  max-height: calc(100vh - 70px);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.sidebar-header h2 {
  font-size: 18px;
  color: var(--text-primary);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-link:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

/* Category lists */
.category-tree-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.category-item:hover, .category-item.active {
  background-color: var(--bg-input-hover);
  color: var(--accent-primary);
}

/* Brand items selection */
.brand-search-box input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.brand-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.brand-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 0;
}

.brand-checkbox-label input[type="radio"] {
  accent-color: var(--accent-primary);
}

/* Price inputs */
.price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-input-group {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  flex: 1;
}

.price-input-group input {
  width: 100%;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  padding-left: 4px;
}

.currency-symbol {
  color: var(--text-muted);
  font-size: 13px;
}

.range-divider {
  color: var(--text-muted);
  font-size: 12px;
}

/* Slider */
.discount-slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--accent-primary);
  margin-bottom: 6px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* Select inputs */
.filter-select {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  height: 38px;
  color: var(--text-primary);
  padding: 0 10px;
  outline: none;
  font-size: 13px;
}

/* Toggle Switches */
.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
}

.toggle-switch input {
  display: none;
}

.toggle-switch .slider {
  width: 36px;
  height: 20px;
  background-color: var(--bg-toggle);
  border-radius: 20px;
  position: relative;
  transition: var(--transition-smooth);
}

.toggle-switch .slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #fff;
  top: 3px;
  left: 3px;
  transition: var(--transition-smooth);
}

.toggle-switch input:checked + .slider {
  background-color: var(--color-emerald);
}

.toggle-switch input:checked + .slider::before {
  transform: translateX(16px);
}

.label-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Main Content Area */
.main-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  max-height: calc(100vh - 70px);
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.results-info {
  font-size: 14px;
  color: var(--text-secondary);
}

#resultsCount {
  font-weight: 600;
  color: var(--accent-primary);
}

.sort-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.sort-select {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  height: 36px;
  padding: 0 10px;
  outline: none;
  font-size: 13px;
}

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* Product Card */
.product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(167, 139, 250, 0.05);
}

/* Card badges */
.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}

.badge {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-discount {
  background-color: var(--color-emerald);
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.badge-bestseller {
  background-color: var(--color-amber);
  color: #0b0e17;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.badge-choice {
  background-color: #0088cc;
  color: #fff;
}

.card-image-wrap {
  height: 180px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
}

.card-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.card-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-brand-logo {
  height: 18px;
  max-width: 60px;
  object-fit: contain;
  filter: grayscale(1) invert(0.8) brightness(1.2);
}

.card-brand-name {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 40px;
}

.card-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.rating-stars {
  color: var(--color-amber);
}

.reviews-count {
  color: var(--text-muted);
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.card-price-current {
  font-size: 20px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
}

.card-price-old {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Coupon info badge */
.coupon-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-emerald);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}

/* Pagination container */
.pagination-container {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

/* Loading indicators */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(167, 139, 250, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-primary);
  animation: spin 0.8s linear infinite;
  margin: 100px auto;
}

.loading-spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(167, 139, 250, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-primary);
  animation: spin 0.8s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Drawer Detail Overlay and Panel */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(5, 5, 10, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 540px;
  height: 100vh;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  z-index: 1010;
  box-shadow: var(--shadow-main);
  transform: translateX(100%);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.detail-drawer.active {
  transform: translateX(0);
}

.btn-close-drawer {
  position: absolute;
  top: 20px;
  left: -20px;
  width: 40px;
  height: 40px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 50% 0 0 50%;
  color: var(--text-primary);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  box-shadow: -4px 4px 10px rgba(0,0,0,0.3);
}

.btn-close-drawer:hover {
  color: var(--accent-primary);
}

.drawer-content {
  height: 100%;
  overflow-y: auto;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Product Detail inside Drawer */
.detail-meta-brand {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.detail-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 4px;
}

.detail-image-box {
  width: 100%;
  height: 220px;
  background-color: #fff;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.detail-image-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Price Cards Grid */
.detail-price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.price-card {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-card.low {
  border-color: rgba(16, 185, 129, 0.3);
  background-color: rgba(16, 185, 129, 0.05);
}

.price-card.high {
  border-color: rgba(244, 63, 94, 0.3);
  background-color: rgba(244, 63, 94, 0.05);
}

.price-card-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.price-card-value {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.price-card.low .price-card-value { color: var(--color-emerald); }
.price-card.high .price-card-value { color: var(--color-rose); }

/* SVG Chart styling */
.chart-container {
  background-color: var(--chart-container-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
}

.chart-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.chart-title-row h4 {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.chart-svg-wrap {
  width: 100%;
  height: 180px;
  position: relative;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* SVG Elements styles */
.chart-grid-line {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--text-muted);
  font-size: 9px;
  font-family: 'Inter', sans-serif;
}

.chart-path-area {
  fill: url(#areaGrad);
  opacity: 0.15;
}

.chart-path-line {
  stroke: url(#lineGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.chart-hover-line {
  stroke: rgba(167, 139, 250, 0.25);
  stroke-width: 1;
  stroke-dasharray: 4;
  display: none;
}

.chart-hover-dot {
  fill: var(--accent-primary);
  stroke: #fff;
  stroke-width: 2;
  r: 4;
  display: none;
  filter: drop-shadow(0 0 5px var(--accent-primary));
}

/* Chart Tooltip */
.chart-tooltip {
  position: absolute;
  background-color: var(--tooltip-bg);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-primary);
  pointer-events: none;
  box-shadow: var(--shadow-main);
  display: none;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.tooltip-date {
  color: var(--text-muted);
  margin-bottom: 2px;
}

.tooltip-price {
  font-weight: 700;
  font-size: 13px;
  color: var(--color-emerald);
}

/* Description inside drawer */
.detail-description {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
}

/* Buy Drawer Action Bar */
.drawer-buy-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.btn-buy-amazon {
  width: 100%;
  background: linear-gradient(135deg, #FF9900 0%, #E68A00 100%);
  color: #0b0e17;
  border: none;
  height: 46px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-buy-amazon:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.4);
}

.btn-secondary {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  height: 44px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background-color: var(--bg-input-hover);
  border-color: var(--accent-primary);
}

/* Loading Overlay for Tracking link redirect */
.tracking-loader-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 200px;
}

/* Dropdown animation */
@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Search Container (Hidden on desktop) */
.mobile-search-container {
  display: none;
  margin-bottom: 15px;
}

/* Featured Products Carousel */
.featured-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-main);
  margin-bottom: 20px;
}
.featured-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.featured-scroll-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.featured-scroll-container::-webkit-scrollbar {
  height: 4px;
}
.featured-scroll-container::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 2px;
}
.featured-card {
  flex: 0 0 160px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.featured-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}
.featured-card-img {
  height: 80px;
  background-color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.featured-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.featured-card-title {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 28px;
}
.featured-card-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-emerald);
  margin-top: auto;
}

/* Mobile Filters FAB styling */
.mobile-filter-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 24px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.mobile-filter-fab:hover {
  transform: translateY(-2px);
}

.btn-close-sidebar {
  display: none;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

/* Responsive queries */
@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar-filters {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    z-index: 1500;
    transform: translateX(-100%);
    transition: var(--transition-smooth);
    background-color: var(--bg-card);
    box-shadow: var(--shadow-main);
  }
  
  .sidebar-filters.active {
    transform: translateX(0);
  }
  
  .btn-close-sidebar {
    display: block;
  }
  
  .mobile-filter-fab {
    display: flex;
  }
}

@media (max-width: 600px) {
  .header-search-container {
    display: none;
  }
  .mobile-search-container {
    display: block;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card {
    border-radius: var(--radius-md);
  }
  .card-content {
    padding: 10px;
    gap: 6px;
  }
  .card-title {
    font-size: 12px;
    height: 32px;
  }
  .card-price-current {
    font-size: 16px;
  }
  .card-image-wrap {
    height: 130px;
  }
  .detail-drawer {
    width: 100%;
  }
}

/* Sub category tree styles */
.category-node {
  display: flex;
  flex-direction: column;
}
.category-children {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.category-toggle-icon {
  font-size: 8px;
  width: 12px;
  display: inline-block;
  color: var(--text-muted);
  cursor: pointer;
}

/* PWA Install Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  width: 90%;
  max-width: 480px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 40px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pwa-banner-icon {
  font-size: 28px;
  line-height: 1;
}

.pwa-banner-text h4 {
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.pwa-banner-text p {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-pwa-install {
  padding: 8px 16px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  height: 32px !important;
}

.btn-close-banner {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.btn-close-banner:hover {
  color: var(--text-primary);
}

@media (max-width: 576px) {
  .pwa-install-banner {
    bottom: 0px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 16px;
    animation: slideUpMobile 0.3s ease forwards;
  }
  
  @keyframes slideUpMobile {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}
