@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --header-h: 70px;
  --sidebar-w: 280px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.dark-mode {
  --bg: #090d16;
  --surface: #111827;
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #475569;
  --border: #1f2937;
  --border-light: #111827;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
}

.theme-toggle {
  background: var(--bg);
  border: none;
  color: var(--text);
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--border);
}

body.dark-mode .theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

body.dark-mode .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: var(--text);
  padding: 0 24px;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 100px);
  max-width: 1920px;
  z-index: 100;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

body.dark-mode header {
  background: rgba(9, 13, 22, 0.85);
  border-color: rgba(255, 255, 255, 0.05);
  color: white;
}

.header-inner {
  max-width: 1920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.logo {
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  user-select: none;
}

.logo h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent) 0%, #1e40af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-mode .logo h1 {
  background: linear-gradient(135deg, #fff 60%, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo span {
  font-size: 0.7rem;
  opacity: 0.5;
  display: none;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 480px;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-box::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(0,0,0,0.3)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

body.dark-mode .search-box::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: none;
  font-size: 0.88rem;
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition);
  border-radius: var(--radius-sm);
}

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

.search-box input:focus {
  outline: none;
  background: var(--border-light);
}

body.dark-mode .search-box input {
  background: rgba(255,255,255,0.1);
  color: white;
}

body.dark-mode .search-box input::placeholder {
  color: rgba(255,255,255,0.4);
}

body.dark-mode .search-box input:focus {
  background: rgba(255,255,255,0.18);
}

.cart-btn {
  background: var(--bg);
  border: none;
  color: var(--text);
  padding: 9px 16px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background var(--transition);
  white-space: nowrap;
  position: relative;
  border-radius: var(--radius-sm);
}

.cart-btn:hover {
  background: var(--border);
}

body.dark-mode .cart-btn {
  background: rgba(255,255,255,0.08);
  color: white;
}

body.dark-mode .cart-btn:hover {
  background: rgba(255,255,255,0.16);
}

.cart-count {
  background: var(--danger);
  color: white;
  font-size: 0.6rem;
  padding: 2px 6px;
  font-weight: 700;
  line-height: 1;
  min-width: 18px;
  text-align: center;
  border-radius: 100px;
}

/* Layout */
.layout {
  display: flex;
  max-width: 1920px;
  width: calc(100% - 100px);
  margin: calc(20px + var(--header-h) + 20px) auto 0;
  padding: 24px 0;
  gap: 28px;
  flex: 1;
}

/* Sidebar */
aside {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(20px + var(--header-h) + 20px);
  height: calc(100vh - 20px - var(--header-h) - 60px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  transition: transform var(--transition);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.close-sidebar {
  display: none;
}

aside h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--text);
}

/* Collapsible Tree Categories */
.category-item {
  display: flex !important;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 0.88rem;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  user-select: none;
  position: relative;
}

.category-item:hover {
  background: var(--bg);
}

.category-item.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

.category-item.active .count {
  color: rgba(255, 255, 255, 0.7);
}

.category-item.active .category-toggle {
  color: rgba(255, 255, 255, 0.7);
}

.category-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  font-size: 0.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
  z-index: 2;
}

.category-toggle.expanded {
  transform: rotate(90deg);
}

.category-toggle:hover {
  color: var(--text);
}

.category-toggle-spacer {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.category-icon {
  color: var(--text-secondary);
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-right: 2px;
}
.category-item.active .category-icon {
  color: rgba(255, 255, 255, 0.8);
  opacity: 1;
}

.category-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-label .count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 4px;
}

.category-group {
  margin-bottom: 2px;
}

.category-children {
  margin-left: 12px;
  border-left: 1px solid var(--border);
  padding-left: 4px;
}

.category-grandchildren {
  margin-left: 12px;
  border-left: 1px solid var(--border);
  padding-left: 4px;
}

/* Main */
main {
  flex: 1;
  min-width: 0;
}

#viewContainer {
  background: var(--surface);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  min-height: 500px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.breadcrumb span {
  cursor: pointer;
  color: var(--text);
  padding: 2px 6px;
  transition: background 0.15s;
  border-radius: var(--radius-sm);
}

.breadcrumb span:hover {
  background: var(--bg);
}

/* View Header */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.view-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.view-header .count-badge {
  color: var(--text-secondary);
  font-size: 0.85rem;
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.sort-select {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  font-size: 0.85rem;
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
  transition: border-color var(--transition);
  border-radius: var(--radius-sm);
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent);
}

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

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.product-card .image-wrap {
  aspect-ratio: 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
  padding: 20px;
  position: relative;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover img {
  transform: scale(1.08);
}

.product-card .card-body {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card .brand {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}

.product-card h3 {
  font-size: 0.88rem;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  color: var(--text);
}

.product-card .cod {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  font-family: 'SF Mono', Monaco, monospace;
}

.product-card .price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.product-card .price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.product-card .stock {
  font-size: 0.68rem;
  padding: 3px 10px;
  font-weight: 600;
  border-radius: 100px;
}

.product-card .pret-fara-tva {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.product-detail .pret-fara-tva {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.product-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

/* Card thumbs AliExpress style */
.card-thumbs-overlay {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 5;
}

.product-card:hover .card-thumbs-overlay {
  opacity: 1;
  pointer-events: auto;
}

.card-thumb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.2);
  border: 1px solid white;
  transition: all var(--transition);
  cursor: pointer;
}

.card-thumb-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card .card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card .brand {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 4px;
}

.product-card h3 {
  font-size: 0.86rem;
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
  color: var(--text);
}

.product-card .cod {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  font-family: 'SF Mono', Monaco, monospace;
}

.product-card .price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.product-card .price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.product-card .stock {
  font-size: 0.67rem;
  padding: 2px 8px;
  font-weight: 500;
  border-radius: 100px;
}

.stock.in-stoc {
  color: #10b981;
  background: var(--success-bg);
}

.stock.stoc-limitat {
  color: #f59e0b;
  background: var(--warning-bg);
}

.stock.stoc-epuizat {
  color: #ef4444;
  background: var(--danger-bg);
}

.card-add-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 28px);
  margin: 0 14px 14px 14px;
  justify-content: center;
  letter-spacing: 0.3px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.card-add-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.card-add-btn:active {
  transform: scale(0.97);
}

.card-add-btn.added {
  background: #10b981 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2) !important;
}

/* Product Detail */
.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
}

.product-detail .gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-detail .main-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  padding: 32px;
  cursor: zoom-in;
  position: relative;
  border-radius: var(--radius-lg);
}

.product-detail .main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-detail .main-image:hover img {
  transform: scale(1.4);
}

.product-detail .main-image .zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 4px 10px;
  font-size: 0.7rem;
  border-radius: 100px;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 4px;
}
.product-detail .main-image:hover .zoom-hint {
  opacity: 1;
}

.product-detail .thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.product-detail .thumb {
  width: 64px;
  height: 64px;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 8px;
  background: var(--bg);
  flex-shrink: 0;
  transition: all var(--transition);
  border-radius: var(--radius-sm);
}
.product-detail .thumb:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.product-detail .thumb.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.product-detail .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail .info .brand {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  font-weight: 700;
}

.product-detail .info h2 {
  font-size: 1.6rem;
  margin: 8px 0 6px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.25;
  color: var(--text);
}

.product-detail .info .cod {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  margin-bottom: 12px;
  font-family: 'SF Mono', Monaco, monospace;
}

.product-detail .info .descriere {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 16px 0;
}

.product-detail .info .descriere p {
  margin-bottom: 10px;
}

/* Product Specs Table */
.product-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.82rem;
}
.product-specs .spec-label {
  color: var(--text-tertiary);
  font-weight: 500;
}
.product-specs .spec-value {
  color: var(--text);
  font-weight: 600;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.78rem;
}

/* Sticky Buy Box */
.buy-box-sticky {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s;
}
.buy-box-sticky.scrolled {
  box-shadow: var(--shadow-lg);
}

/* Lightbox Gallery */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
}
.lightbox-overlay.show {
  display: flex;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.1);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1001;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1001;
}
.lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
}
.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }
.lightbox-counter {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-top: 16px;
}

.add-to-cart-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 18px 32px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  margin-top: 20px;
  letter-spacing: 0.3px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  position: relative;
  overflow: hidden;
}

.add-to-cart-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.add-to-cart-btn:hover::after {
  transform: translateX(100%);
}

.add-to-cart-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.add-to-cart-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.add-to-cart-btn.added {
  background: #10b981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}
.add-to-cart-btn.added:hover {
  background: #059669 !important;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4) !important;
}

/* Sticky mobile add to cart bar */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  align-items: center;
  gap: 12px;
}
.mobile-sticky-bar .msb-price {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  white-space: nowrap;
}
.mobile-sticky-bar .add-to-cart-btn {
  margin-top: 0;
  padding: 12px 20px;
  font-size: 0.9rem;
  flex: 1;
}

/* ─── Product Page Enhancements ────────────────────────────────────────── */

/* Layout Switcher */
.layout-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.layout-switcher-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-right: 4px;
}
.layout-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-family: var(--font);
}
.layout-btn:hover { border-color: var(--accent); color: var(--accent); }
.layout-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Qty Selector */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 14px 0;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}
.qty-btn:hover { background: var(--accent-soft); }
.qty-input {
  width: 52px;
  height: 40px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Price Box */
.price-section { margin: 16px 0 12px; }
.price-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.price-old {
  font-size: 1rem;
  color: var(--text-tertiary);
  text-decoration: line-through;
}
.price-new {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.price-badge {
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Stock Section */
.stock-section { margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.stock-badge {
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.stock-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.stock-badge.in-stoc { color: var(--success); }
.stock-badge.in-stoc::before { background: var(--success); }
.stock-badge.stoc-limitat { color: var(--warning); }
.stock-badge.stoc-limitat::before { background: var(--warning); }
.stock-badge.stoc-epuizat { color: var(--danger); }
.stock-badge.stoc-epuizat::before { background: var(--danger); }
.stock-plus { font-size: 0.75rem; color: var(--text-tertiary); }

/* Product badge on image */
.prod-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  background: var(--danger);
  color: white;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Trust Badges */
.trust-badges {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.trust-badge .material-icons-round {
  font-size: 1rem;
  color: var(--accent);
}

/* Recommended Products */
.recommended-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.recommended-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.rec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}
.rec-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.rec-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 12px;
  background: #fafafa;
}
.rec-info {
  padding: 10px 12px;
}
.rec-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.rec-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-top: 4px;
}

/* ─── Product V2 (Modern Hero) ────────────────────────────────────────── */
.product-v2 .hero-section {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.product-v2 .gallery-hero {
  padding: 0;
}
.product-v2 .gallery-hero .main-image {
  border: none;
  border-radius: 0;
  aspect-ratio: auto;
  min-height: 420px;
}
.product-v2 .hero-info {
  padding: 32px 28px;
  border-left: 1px solid var(--border);
}
.product-v2 .hero-info h2 {
  font-size: 1.3rem;
  margin: 8px 0 4px;
}

/* ─── Product V3 (Compact) ────────────────────────────────────────────── */
.product-v3 .compact-hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
}
.product-v3 .compact-sticky {
  position: sticky;
  top: calc(var(--header-h) + 100px);
  height: fit-content;
}
.product-v3 .compact-sticky h2 {
  font-size: 1.2rem;
  margin: 6px 0;
  font-weight: 700;
  line-height: 1.3;
}
.product-v3 .compact-info {
  margin-top: 28px;
}
.product-v3 .compact-info .descriere {
  max-width: 700px;
}
.descriere-full {
  padding: 24px 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 800px;
}
.descriere-full p { margin-bottom: 10px; }

/* Description collapse/expand */
.descriere-collapsed {
  max-height: 80px;
  overflow: hidden;
  position: relative;
}
.descriere-collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--surface));
  pointer-events: none;
}
.desc-toggle {
  display: inline-block;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 4px;
  font-family: var(--font);
}
.desc-toggle:hover {
  opacity: 0.8;
}
.descriere-wrap {
  margin-top: 16px;
}

/* ─── Mobile Responsive Product ────────────────────────────────────────── */
@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .product-detail .main-image {
    aspect-ratio: 1;
    padding: 20px;
  }
  .product-detail .main-image:hover img {
    transform: none;
  }
  .product-detail .thumbnails {
    gap: 6px;
  }
  .product-detail .thumb {
    width: 48px;
    height: 48px;
    padding: 4px;
  }
  .product-v2 .hero-section {
    grid-template-columns: 1fr;
  }
  .product-v2 .hero-info {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 20px;
  }
  .product-v2 .gallery-hero .main-image {
    min-height: 280px;
  }
  .product-v3 .compact-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .product-v3 .compact-sticky {
    position: static;
  }
  .trust-badges {
    flex-direction: column;
    gap: 8px;
  }
  .rec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .buy-box-sticky {
    position: static;
  }
  .mobile-sticky-bar {
    display: flex;
  }
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .product-specs {
    grid-template-columns: 1fr 1fr;
  }
}

/* Cart */
.cart-view h2 {
  margin-bottom: 24px;
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-count-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.cart-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.cart-empty .cart-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.cart-empty p {
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 500;
}

.cart-empty a {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.cart-item:hover {
  border-color: var(--text-tertiary);
  box-shadow: var(--shadow-sm);
}

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fafafa;
  border-radius: var(--radius-sm);
  padding: 6px;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
  font-size: 0.92rem;
  line-height: 1.3;
}

.cart-item-name:hover {
  color: var(--accent);
}

.cart-item-unit-price {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.cart-item-unit-price span {
  color: var(--text-tertiary);
  font-size: 0.7rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.cart-item-total {
  text-align: right;
  flex-shrink: 0;
  min-width: 100px;
}

.cart-item-total-price {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.cart-item-total-tva {
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

.cart-item .qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.cart-item .qty-controls button {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--bg);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item .qty-controls button:hover {
  background: var(--border);
}

.cart-item .qty-controls span {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
}

.cart-item .remove-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 1rem;
  padding: 6px 10px;
  transition: all 0.15s;
  border-radius: var(--radius-sm);
}

.cart-item .remove-btn:hover {
  color: #fff;
  background: var(--danger);
}

.cart-total {
  padding: 24px 0 0;
  border-top: 2px solid var(--border);
  margin-top: 24px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cart-total .total-label {
  font-size: 1rem;
  color: var(--text-secondary);
}

.cart-total .total-amount {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
}

.cart-total-tva {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 4px;
}

.cart-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.checkout-btn {
  background: var(--success);
  color: white;
  border: none;
  padding: 14px 40px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.3px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.checkout-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.checkout-btn:active {
  transform: translateY(0);
}

/* ─── Checkout Step 1: Review ─── */
.checkout-step {
  display: block;
}

.checkout-review-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 320px;
  overflow-y: auto;
}

.checkout-review-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.checkout-review-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #fafafa;
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.review-item-info {
  flex: 1;
  min-width: 0;
}

.review-item-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-item-price {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.review-item-qty {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.88rem;
  white-space: nowrap;
}

.review-item-total {
  font-weight: 700;
  color: var(--text);
  font-size: 0.92rem;
  white-space: nowrap;
  min-width: 70px;
  text-align: right;
}

.checkout-review-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.checkout-review-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0 0;
  border-top: 2px solid var(--border);
  font-size: 1.15rem;
  font-weight: 700;
}

/* ─── Checkout Step 2: Form ─── */
.checkout-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.checkout-col {
  min-width: 0;
}

.checkout-summary {
  margin-top: 16px;
  background: #fefef9;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

body.dark-mode .checkout-summary {
  background: #1a1a14;
  border-color: #3d3d30;
}

.checkout-summary-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.checkout-summary-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 0 16px;
}

.checkout-summary-body {
  padding: 10px 16px;
}

.checkout-summary .modal-items {
  margin-bottom: 0;
}

.checkout-summary .modal-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px dotted var(--border-light);
  font-size: 0.8rem;
  gap: 8px;
}

.checkout-summary .modal-item:last-child {
  border-bottom: 1px dotted var(--border-light);
}

.checkout-summary .modal-item-name {
  flex: 1;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.checkout-summary .modal-item-qty {
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.78rem;
}

.checkout-summary .modal-item-price {
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.82rem;
}

.checkout-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  border-top: 2px dashed var(--border);
}

.checkout-summary-tva {
  padding: 4px 16px 14px;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-align: right;
}

.checkout-summary-footer {
  padding: 10px 16px 14px;
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

/* Sidebar toggle mobile */
.sidebar-toggle {
  display: none;
  background: var(--bg);
  border: none;
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background var(--transition);
  line-height: 1;
  border-radius: var(--radius-sm);
}

.sidebar-toggle:hover {
  background: var(--border);
}

body.dark-mode .sidebar-toggle {
  background: rgba(255,255,255,0.08);
  color: white;
}

body.dark-mode .sidebar-toggle:hover {
  background: rgba(255,255,255,0.16);
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  background: var(--accent);
  color: white;
  padding: 14px 22px;
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  border-radius: var(--radius-md);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(60px) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Footer */
footer {
  background: rgba(15, 23, 42, 0.96);
  color: rgba(255,255,255,0.65);
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 36px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.footer-brand p {
  font-size: 0.85rem;
  opacity: 0.5;
  line-height: 1.5;
}

.footer-links h4 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 14px;
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 5px 0;
  cursor: pointer;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  opacity: 0.45;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-bottom a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

.footer-bottom a:hover {
  opacity: 0.75;
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 20px 28px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 14px 20px;
  }
}

/* No Results */
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.no-results .no-results-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.no-results p {
  font-size: 1.1rem;
}

/* Infinite Scroll Sentinel */
.scroll-sentinel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px 12px;
  color: var(--text-tertiary);
  font-size: 0.82rem;
  font-weight: 500;
}

.scroll-loader {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.15s;
  min-width: 40px;
  border-radius: var(--radius-sm);
}

.pagination button:hover {
  background: var(--bg);
  border-color: var(--text-tertiary);
}

.pagination button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--surface);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h2 {
  font-size: 1.4rem;
  margin-bottom: 4px;
  font-weight: 700;
}

.modal .modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.modal .modal-items {
  margin-bottom: 20px;
}

.modal .modal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
}

.modal .modal-item:last-child {
  border-bottom: none;
}

.modal .modal-item-name {
  flex: 1;
  margin-right: 12px;
}

.modal .modal-item-qty {
  color: var(--text-secondary);
  margin-right: 12px;
  white-space: nowrap;
}

.modal .modal-item-price {
  font-weight: 600;
  white-space: nowrap;
}

.modal .modal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 2px solid var(--border);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.modal .modal-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg);
  line-height: 1.5;
  border-radius: var(--radius-sm);
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions button {
  flex: 1;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--radius-md);
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
}

.modal-actions .btn-primary {
  background: var(--success);
  color: white;
  border: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.modal-actions .btn-primary:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.modal-actions .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.modal-actions .btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.modal-actions .btn-secondary:hover {
  background: var(--border);
  border-color: var(--text-tertiary);
}

/* Checkout Form */
.checkout-modal {
  max-width: 780px;
}

.form-section {
  margin-bottom: 20px;
}

.form-section-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  color: var(--text-secondary);
  background: var(--bg);
  user-select: none;
}

.radio-option:hover {
  border-color: var(--accent);
  color: var(--text);
}

.radio-option.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.radio-option.active .radio-indicator {
  border-color: var(--accent);
  background: var(--accent);
}

.radio-option.active .radio-indicator::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

.form-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.form-fields-grid.form-fields-full {
  grid-template-columns: 1fr;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.form-field .required-star {
  color: var(--danger);
  font-weight: 700;
}

.form-field input {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition);
  width: 100%;
}

.form-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-field input::placeholder {
  color: var(--text-tertiary);
}

.form-field input:required:invalid {
  border-color: var(--border);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 8px;
  font-style: italic;
}

/* Card Payment Box */
.card-payment-box {
  background: #ffffff;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.card-brand-icons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.card-brand {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 4px;
  color: white;
}

.card-brand.visa { background: #1a1f71; }
.card-brand.mc { background: #eb001b; }

.card-payment-box .form-field label {
  color: var(--text-secondary) !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.card-payment-box .form-field input {
  background: #f8f9fb;
  border: 1.5px solid #e2e4ea;
  color: var(--text);
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.card-payment-box .form-field input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
  background: #fff;
  outline: none;
}

.card-payment-box .form-field input::placeholder {
  color: #b0b5c0;
}

.card-payment-box .required-star {
  color: #ef4444 !important;
}

.card-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* Product Detail back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 6px 12px;
  transition: all 0.15s;
  margin-bottom: 16px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
}

.back-btn:hover {
  background: var(--bg);
  color: var(--text);
}

/* Sidebar toggle fix for manual category items */
.sidebar-category-link {
  cursor: pointer;
}

/* Mobile */
@media (max-width: 768px) {
  header {
    padding: 0 16px;
    top: 16px;
    width: calc(100% - 32px);
  }

  .header-inner {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 10px;
  }

  .logo h1 {
    font-size: 1.15rem;
  }

  .header-controls {
    order: 3;
    max-width: none;
    flex-basis: 100%;
  }

  .sidebar-toggle {
    display: block;
  }

  .overlay.show {
    display: block;
  }

  .layout {
    width: calc(100% - 24px);
    margin: calc(16px + var(--header-h) + 16px) auto 0;
    padding: 16px 0;
    gap: 0;
  }

  #viewContainer {
    padding: 18px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-detail .main-image:hover img {
    transform: none;
  }

  .cart-item {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    position: relative;
  }
  
  .cart-item img {
    width: 56px;
    height: 56px;
  }
  
  .cart-item-info {
    flex: 1 1 60%;
  }
  
  .cart-item-total {
    min-width: auto;
    text-align: left;
    order: 3;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
  }

  .cart-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
  }

  .modal {
    padding: 24px;
    margin: 12px;
  }

  .checkout-modal {
    max-width: 100% !important;
  }

  .checkout-columns {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-fields-grid {
    grid-template-columns: 1fr;
  }

  .radio-group {
    flex-direction: column;
  }

  .modal-actions {
    flex-direction: row;
    gap: 10px;
  }
  .modal-actions button {
    padding: 12px 16px;
    font-size: 0.88rem;
  }
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  width: 100%;
  height: 400px;
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.carousel-slides {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-direction: row;
  padding: 24px 64px;
  color: white;
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.carousel-slide.no-image {
  flex-direction: row-reverse;
}

/* Carousel image side - crisp at native resolution */
.carousel-img-side {
  flex: 0 0 auto;
  width: 50%;
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  padding: 12px;
}
.carousel-img-side img {
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.carousel-slide.active .carousel-img-side img {
  transform: scale(1);
}
.carousel-slide:not(.active) .carousel-img-side img {
  transform: scale(0.95);
}

.carousel-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.carousel-content {
  flex: 0 0 auto;
  width: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 12px;
}
.carousel-slide.no-image .carousel-content {
  max-width: 60%;
  align-items: flex-end;
  text-align: right;
}

.carousel-badge {
  background: rgba(255,255,255,0.15);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 100px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
  display: inline-block;
  width: fit-content;
}

.carousel-content h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.carousel-content p {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.5;
  margin: 0 0 4px 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.carousel-btn {
  background: white;
  color: #0f172a;
  border: none;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  width: fit-content;
}

.carousel-btn:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.carousel-graphic {
  font-size: 8rem;
  opacity: 0.12;
  user-select: none;
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.carousel-slide.active .carousel-graphic {
  transform: translateY(-50%) rotate(-5deg) scale(1.1);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.25);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), opacity var(--transition);
  z-index: 10;
  backdrop-filter: blur(4px);
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.5);
}

.carousel-arrow.prev {
  left: 16px;
}

.carousel-arrow.next {
  right: 16px;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: background var(--transition), width var(--transition);
  padding: 0;
}

.carousel-dot.active {
  background: white;
  width: 24px;
  border-radius: 100px;
}

@media (max-width: 768px) {
  .carousel-container {
    margin-bottom: 16px;
  }
  .carousel-slide {
    padding: 12px 44px;
    gap: 8px;
    flex-direction: column !important;
  }
  .carousel-img-side {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    height: 110px;
    padding: 4px;
  }
  .carousel-img-side img {
    max-height: 100px;
  }
  .carousel-content {
    width: 100%;
    padding-right: 0;
    text-align: center;
    align-items: center;
  }
  .carousel-slide.no-image .carousel-content {
    max-width: 100%;
    align-items: flex-start;
    text-align: left;
  }
  .carousel-content h2 {
    font-size: 1.2rem;
  }
  .carousel-content p {
    font-size: 0.8rem;
  }
  .carousel-graphic {
    display: none;
  }
  .carousel-arrow {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
}

/* Category Search Bar Sidebar */
.category-search-box {
  margin-bottom: 12px;
  position: relative;
}

.category-search-box::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(0,0,0,0.4)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

body.dark-mode .category-search-box::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

.category-search-box input {
  width: 100%;
  padding: 8px 10px 8px 30px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition);
}

.category-search-box input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Card hover slices (AliExpress Style) */
.card-hover-slices {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  z-index: 4;
}

.card-hover-slice {
  flex: 1;
  height: 100%;
  cursor: pointer;
  background: transparent;
}

/* --- EXQUISITE DESIGN UPDATES BY OPENCODE --- */

/* Cart Dropdown Wrapper */
.cart-btn-wrapper {
  position: relative;
  display: inline-block;
}

/* Elegant Cart Dropdown */
.cart-dropdown {
  position: absolute;
  top: calc(100% + 25px); /* 10px distance from navbar bottom on desktop */
  right: 0;
  width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
  overflow: hidden;
}

.cart-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown Empty State */
.cart-dropdown-empty {
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cart-dropdown-empty p {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
}

/* Dropdown Items List */
.cart-dropdown-items {
  max-height: 280px;
  overflow-y: auto;
  padding: 12px 0;
}

.cart-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.cart-dropdown-item:hover {
  background: var(--bg-hover);
}

.cart-dropdown-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: #fafafa;
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.cart-dropdown-item-info {
  flex: 1;
  min-width: 0;
}

.cart-dropdown-item-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.cart-dropdown-item-name:hover {
  color: var(--accent);
}

.cart-dropdown-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cart-dropdown-item-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

/* Dropdown Qty Controls - extra sleek */
.dd-qty-controls.qty-controls {
  gap: 4px;
  background: var(--bg);
  padding: 2px 4px;
  border-radius: 4px;
}

.dd-qty-controls.qty-controls button {
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
}

.dd-qty-controls.qty-controls span {
  font-size: 0.75rem;
  min-width: 14px;
}

.remove-btn-dd {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  font-size: 0.8rem;
  transition: color 0.15s;
}

.remove-btn-dd:hover {
  color: #ef4444;
}

/* Dropdown Footer */
.cart-dropdown-footer {
  padding: 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.cart-dropdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cart-dropdown-total span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.cart-dropdown-total .total-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.cart-dropdown-actions {
  display: flex;
  gap: 10px;
}

.cart-dropdown-actions button {
  flex: 1;
}

.btn-sm {
  padding: 10px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}
.btn-sm.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-sm.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-sm.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-sm.btn-secondary:hover {
  background: var(--border);
}


/* --- Offers and Discounts Promo Section --- */
.promo-section-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.promo-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.promo-info {
  flex: 1;
  min-width: 280px;
}

.promo-badge {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  color: #b91c1c;
  padding: 5px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 10px;
  letter-spacing: 0.8px;
}

body.dark-mode .promo-badge {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.promo-info h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text);
  letter-spacing: -0.2px;
}

.promo-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Countdown Timer */
.promo-timer-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.timer-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.promo-countdown {
  font-family: monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 4px;
}

body.dark-mode .promo-countdown {
  color: #f87171;
}

.timer-unit {
  background: rgba(239, 68, 68, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

body.dark-mode .timer-unit {
  background: rgba(239, 68, 68, 0.2);
}

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

/* Custom Offer Ribbon and badges */
.offer-badge-ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  padding: 3px 9px;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 5px;
  box-shadow: 0 3px 6px rgba(220, 38, 38, 0.2);
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.price-container-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.old-price {
  font-size: 0.72rem;
  text-decoration: line-through;
  color: var(--text-tertiary);
  font-weight: 500;
}

.price.promo-price {
  color: #dc2626 !important;
  font-weight: 700;
}

body.dark-mode .price.promo-price {
  color: #f87171 !important;
}

.promo-add-btn {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  font-weight: 600 !important;
}

.promo-add-btn:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* Mobile responsive menu */
@media (max-width: 768px) {
  /* Dynamic Header Menu Dropdown */
  aside {
    position: fixed;
    top: var(--header-h) !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: calc(100vh - var(--header-h) - 16px) !important;
    background: var(--surface) !important;
    z-index: 300 !important;
    transform: translateY(-110%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease !important;
    border-radius: 0 0 16px 16px !important;
    border-bottom: 3px solid var(--accent) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18) !important;
    padding: 20px !important;
  }
  
  aside.open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .close-sidebar {
    display: none !important;
  }

  /* Adjust promo header */
  .promo-banner-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .promo-timer-box {
    width: 100%;
    align-items: center;
  }

  .cart-dropdown {
    width: calc(100vw - 32px);
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    top: calc(100% + 12px);
  }
  .cart-dropdown.show {
    transform: translateX(-50%) translateY(0);
  }
}

/* --- FLOATING VIEWPORT WIDTH CAROUSEL BANNER SYSTEM --- */
#heroCarouselContainer {
  display: none;
  width: calc(100% - 100px);
  max-width: 1920px;
  margin: calc(20px + var(--header-h) + 20px) auto 0 auto;
  background: var(--bg);
  border-radius: var(--radius-md);
  overflow: hidden;
}

body.has-hero #heroCarouselContainer {
  display: block;
}

body.has-hero .layout {
  margin-top: 16px !important;
}

/* Override carousel style inside the floating wrapper for a high-impact cinematic layout */
#heroCarouselContainer .carousel-container {
  border-radius: var(--radius-md);
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

#heroCarouselContainer .carousel-slide {
  padding: 24px 64px;
}

@media (max-width: 768px) {
  #heroCarouselContainer {
    width: calc(100% - 24px);
    margin-top: calc(24px + var(--header-h) + 54px);
  }
  
  #heroCarouselContainer .carousel-container {
    border-radius: var(--radius-sm);
  }
  
  #heroCarouselContainer .carousel-slide {
    padding: 12px 44px;
  }

  .carousel-arrow {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
  .carousel-arrow.prev { left: 4px; }
  .carousel-arrow.next { right: 4px; }
  .carousel-dots { bottom: 10px; }
}

/* ─── Admin Panel Styles ──────────────────────────────────────── */
#adminModal .modal {
  max-width: 800px;
}

#adminView input[type="range"] {
  cursor: pointer;
}

#adminView input[type="number"]::-webkit-inner-spin-button {
  opacity: 1;
}

#adminView table tbody tr:hover {
  background: var(--bg);
}

#adminView table tbody tr {
  border-bottom: 1px solid var(--border-light);
}

#adminView table tbody tr:last-child {
  border-bottom: none;
}

#adminView::-webkit-scrollbar,
#adminView table tbody::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#adminView::-webkit-scrollbar-track,
#adminView table tbody::-webkit-scrollbar-track {
  background: var(--bg);
}

#adminView::-webkit-scrollbar-thumb,
#adminView table tbody::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

#adminView::-webkit-scrollbar-thumb:hover,
#adminView table tbody::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ─── Urgency Signals ─────────────────────────────────────────── */
.urgency-signal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  line-height: 1.3;
}

.urgency-signal.pulse {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
body.dark-mode .urgency-signal.pulse {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.2);
}

.urgency-signal.warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
body.dark-mode .urgency-signal.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.2);
}

.urgency-signal.success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
body.dark-mode .urgency-signal.success {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.2);
}

.urgency-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
body.dark-mode .urgency-dot {
  background: #60a5fa;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

/* ─── Price Enhancements ──────────────────────────────────────── */
.price-save {
  font-size: 0.75rem;
  color: #059669;
  font-weight: 600;
  margin-top: 2px;
}
body.dark-mode .price-save {
  color: #34d399;
}

.price-new.promo-color {
  color: #dc2626 !important;
}
body.dark-mode .price-new.promo-color {
  color: #f87171 !important;
}

.offer-badge-pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ─── Swipe Hint ─────────────────────────────────────────────── */
.swipe-hint {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 4px 10px;
  font-size: 0.7rem;
  border-radius: 100px;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-image:hover .swipe-hint,
.main-image:active .swipe-hint {
  opacity: 1;
}

/* ─── Bundle Section (Frequently Bought Together) ────────────── */
.bundle-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 32px;
  box-shadow: var(--shadow-sm);
}

.bundle-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.bundle-icon {
  font-size: 2rem;
  line-height: 1;
}

.bundle-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px 0;
}

.bundle-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
}

.bundle-products {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.bundle-product {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  flex: 1;
  min-width: 180px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}

.bundle-product:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.bundle-product.main-product {
  border-color: var(--accent);
  background: var(--accent-soft);
  cursor: default;
}

.bundle-product img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: white;
  padding: 4px;
  border: 1px solid var(--border-light);
}

.bundle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bundle-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  font-weight: 700;
}

.bundle-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bundle-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.bundle-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  color: var(--text-tertiary);
  font-size: 0.9rem;
  background: var(--surface);
}

.bundle-check.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.bundle-product.main-product .bundle-check {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.bundle-plus {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.bundle-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.bundle-total-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-right: 8px;
}

.bundle-total {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

.bundle-add-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  white-space: nowrap;
}

.bundle-add-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

/* ─── Enhanced Recommended Section ───────────────────────────── */
.recommended-section-enhanced {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.rec-section-header {
  margin-bottom: 20px;
}

.rec-section-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px 0;
}

.rec-section-header p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0;
}

.rec-grid-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.rec-card-enhanced {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.rec-card-enhanced:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.rec-card-img-wrap {
  aspect-ratio: 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  border-bottom: 1px solid var(--border-light);
}

.rec-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.rec-card-enhanced:hover .rec-card-img-wrap img {
  transform: scale(1.06);
}

.rec-offer-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #dc2626;
  color: white;
  padding: 2px 7px;
  font-size: 0.6rem;
  font-weight: 800;
  border-radius: 4px;
  letter-spacing: 0.3px;
  z-index: 2;
}

.rec-hot-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(245, 158, 11, 0.9);
  color: white;
  padding: 2px 7px;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 4px;
  z-index: 2;
}

.rec-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.rec-card-brand {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: 2px;
}

.rec-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.rec-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.rec-card-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.rec-card-stock {
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 100px;
  font-weight: 600;
}

.rec-card-stock.in-stoc {
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
}

.rec-card-stock.stoc-limitat {
  color: #d97706;
  background: rgba(245, 158, 11, 0.08);
}

.rec-card-stock.stoc-epuizat {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
}

.rec-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.rec-add-btn:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

/* ─── Mobile Sticky Bar Enhanced ─────────────────────────────── */
.msb-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.msb-discount {
  font-size: 0.7rem;
  font-weight: 700;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.msb-atc {
  margin-top: 0 !important;
  padding: 12px 16px !important;
  font-size: 0.85rem !important;
}

/* ─── Bundle responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .bundle-products {
    flex-direction: column;
    gap: 8px;
  }

  .bundle-plus {
    transform: rotate(90deg);
  }

  .bundle-product {
    min-width: 0;
    width: 100%;
  }

  .bundle-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .bundle-add-btn {
    justify-content: center;
  }

  .rec-grid-enhanced {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .rec-card-body {
    padding: 8px;
  }

  .rec-card-name {
    font-size: 0.75rem;
  }

  .rec-card-price {
    font-size: 0.85rem;
  }

  .urgency-signal {
    font-size: 0.73rem;
    padding: 6px 10px;
  }
}
