/* ============================================
   ShopVerse - Full E-Commerce Platform
   Modern Dark Theme • Fully Responsive
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --bg-elevated: #22222e;
  --bg-hover: #2a2a38;
  --border: #2e2e3a;
  --border-light: #3a3a4a;
  --text-primary: #f5f5f7;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;
  --accent: #7c5cfc;
  --accent-hover: #6a4ae8;
  --accent-glow: rgba(124, 92, 252, 0.25);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

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

.section {
  padding: 60px 0;
}

/* ========== HEADER / NAV ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo span {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

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

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-box {
  position: relative;
  display: none;
}

.search-box input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 16px 10px 42px;
  color: var(--text-primary);
  width: 240px;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* ========== HERO ========== */
.hero {
  padding: 80px 0 60px;
  background: radial-gradient(ellipse at top, rgba(124, 92, 252, 0.12) 0%, transparent 60%);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent), #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6a4ae8);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ========== CATEGORIES ========== */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.category-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ========== PRODUCTS GRID ========== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

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

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--border-light);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-img {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-elevated);
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
}

.product-badge.sale {
  background: var(--danger);
}

.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.product-card:hover .wishlist-btn {
  opacity: 1;
}

.product-info {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stars {
  color: #fbbf24;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 14px;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.price-old {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-actions {
  display: flex;
  gap: 8px;
}

.product-actions .btn {
  flex: 1;
}

/* ========== PRODUCT DETAIL ========== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-gallery {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.product-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-meta h1 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.product-meta .price-current {
  font-size: 1.8rem;
}

.product-desc {
  color: var(--text-secondary);
  margin: 20px 0;
  line-height: 1.7;
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
  margin-bottom: 20px;
}

.qty-selector button {
  width: 42px;
  height: 42px;
  background: var(--bg-elevated);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.2rem;
}

.qty-selector input {
  width: 50px;
  height: 42px;
  text-align: center;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  outline: none;
}

/* ========== CART ========== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

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

.cart-item {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  align-items: center;
}

.cart-item img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.cart-item-info .price {
  color: var(--accent);
  font-weight: 600;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 6px;
}

.cart-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 90px;
}

.cart-summary h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.summary-row.total {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.empty-state svg {
  margin-bottom: 20px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.4rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ========== CHECKOUT ========== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.checkout-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.payment-methods {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.payment-option:hover {
  border-color: var(--border-light);
}

.payment-option.selected {
  border-color: var(--accent);
  background: rgba(124, 92, 252, 0.08);
}

.payment-option input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.payment-icon {
  font-size: 1.4rem;
  width: 36px;
  text-align: center;
}

.payment-info h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.payment-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========== ADMIN ========== */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-logo {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.admin-nav {
  list-style: none;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-right: 3px solid var(--accent);
}

.admin-main {
  padding: 32px;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.stat-card h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-card .value {
  font-size: 1.8rem;
  font-weight: 700;
}

.stat-card .change {
  font-size: 0.8rem;
  margin-top: 6px;
}

.change.up { color: var(--success); }
.change.down { color: var(--danger); }

.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-elevated);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-hover);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--info); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 1.3rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer p, .footer a {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer a:hover {
  color: var(--accent);
}

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

/* ========== TOAST ========== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  min-width: 280px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ========== LOGIN ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(124, 92, 252, 0.1) 0%, transparent 60%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.6rem;
}

.login-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .product-detail,
  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: fixed;
    left: -280px;
    z-index: 1500;
    transition: left 0.3s ease;
    width: 260px;
  }
  .admin-sidebar.open {
    left: 0;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .search-box {
    display: none !important;
  }
  .hero {
    padding: 50px 0 40px;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .cart-item {
    flex-wrap: wrap;
  }
}

@media (min-width: 768px) {
  .search-box {
    display: block;
  }
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }


/* ========== v2 IMPROVEMENTS ========== */

/* Better Categories */
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--cat-color, var(--accent)) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.category-card:hover::before { opacity: 0.12; }
.category-card:hover {
  border-color: var(--cat-color, var(--accent));
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.category-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  transition: var(--transition);
}
.category-card:hover .category-icon-wrap {
  transform: scale(1.1);
}
.category-icon { font-size: 1.8rem; }

/* Sale Timer */
.sale-timer, .sale-timer-card {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 10px 0;
  animation: pulse 1.5s infinite;
}
.sale-timer-card {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 0.72rem;
  padding: 4px 10px;
  z-index: 2;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* Product thumbs */
.thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
}
.thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: var(--transition);
}
.thumbs img.active, .thumbs img:hover {
  border-color: var(--accent);
  opacity: 1;
}

/* Theme Switcher */
#theme-switcher {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
}
.theme-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.theme-btn:hover { transform: scale(1.1); }
.theme-panel {
  display: none;
  position: absolute;
  bottom: 60px;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
  width: 160px;
}
#theme-switcher.open .theme-panel { display: flex; }
.theme-option {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}
.theme-option:hover { transform: scale(1.15); }

/* Layout helpers */
.products-grid.layout-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.products-grid.layout-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.products-grid.layout-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* Improved product card */
.product-card {
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}


/* ========== v3 UI POLISH ========== */
.brand-logo-img {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  border-radius: 8px;
}

.wa-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: white;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  z-index: 998;
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
}
.wa-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

.category-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  overflow: hidden;
  transition: transform 0.3s;
}
.category-card:hover .category-icon-wrap { transform: scale(1.08); }

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s, border-color 0.3s;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  border-color: var(--accent);
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent), #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .value {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

#theme-switcher { z-index: 997; }
