/* =========================================================
   SHIFT AUTO SUPPLY — Components
   Product Cards, Filters, Payment Cards, Order Timeline, etc.
   ========================================================= */

/* ─── Product Card ──────────────────────────────────────── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
  min-width: 0;
  box-sizing: border-box;
  height: 100%;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.product-card-img {
  aspect-ratio: 4/3;
  background: var(--bg-elevated);
  overflow: hidden;
  position: relative;
  min-height: 150px;
}
.product-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.product-card-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-card-wishlist {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 32px; height: 32px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  opacity: 0;
}
.product-card:hover .product-card-wishlist { opacity: 1; }
.product-card-wishlist:hover { color: var(--crimson); background: var(--crimson-50); }
.product-card-wishlist.active { color: var(--crimson); opacity: 1; }

.product-card-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-2);
}
.product-card-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.product-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-compat {
  font-size: 12px;
  color: var(--text-muted);
}
.product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.stars { display: flex; gap: 1px; }
.star { width: 12px; height: 12px; color: #F59E0B; fill: #F59E0B; }
.star.empty { color: var(--neutral-300); fill: none; }

.product-card-footer {
  margin-top: auto;
  padding: var(--space-4);
  padding-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

@media (max-width: 768px) {
  .product-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  .product-card-img { min-height: 120px; }
  .product-card { max-height: 420px; }
}

@media (max-width: 480px) {
  .product-card-footer { padding: var(--space-3); }
  .product-card-img { min-height: 110px; }
  .product-card { max-height: 360px; }
}
.product-price {
  display: flex;
  flex-direction: column;
}
.product-price-sale {
  font-size: 18px;
  font-weight: 700;
  color: var(--crimson);
  font-family: var(--font-head);
}
.product-price-current {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-head);
}
.product-price-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.product-card-add {
  width: 36px; height: 36px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.product-card-add:hover { background: var(--blue-dark); transform: scale(1.05); }
.product-card-add:active { transform: scale(0.95); }

/* Out of stock overlay */
.product-card.out-of-stock .product-card-img::after {
  content: 'Out of Stock';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}
.product-card.out-of-stock .product-card-add { background: var(--neutral-400); cursor: not-allowed; }
.product-card.out-of-stock .product-card-add:hover { background: var(--neutral-400); transform: none; }

/* ─── Filter Sidebar ─────────────────────────────────────── */
.filter-sidebar {
  width: 260px;
  flex-shrink: 0;
  z-index: 2;
}
.filter-group {
  border-bottom: 1px solid var(--border);
  padding: var(--space-5) 0;
}
.filter-group:first-child { padding-top: 0; }
.filter-group:last-child { border-bottom: none; }
.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: var(--space-4);
}
.filter-group-header h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.filter-group-header svg { color: var(--text-muted); transition: transform var(--transition-fast); }
.filter-group-header.collapsed svg { transform: rotate(-90deg); }

.filter-options { display: flex; flex-direction: column; gap: var(--space-2); }
.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition-fast);
}
.filter-option:hover { color: var(--blue); }
.filter-option input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.filter-option-label { font-size: 14px; }
.filter-option-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.price-range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}
.price-range-inputs input {
  padding: 8px var(--space-3);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  text-align: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.price-range-inputs input:focus { border-color: var(--blue); }

.filter-clear { 
  font-size: 12px; 
  color: var(--crimson); 
  cursor: pointer; 
  font-weight: 600;
  transition: opacity var(--transition-fast);
}
.filter-clear:hover { opacity: 0.8; }

/* ─── Cart Item ──────────────────────────────────────────── */
.cart-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 80px; height: 80px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  overflow: hidden;
  flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-brand { font-size: 11px; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: 0.06em; }
.cart-item-name { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.cart-item-sku { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.cart-item-price { font-size: 16px; font-weight: 700; color: var(--text-primary); font-family: var(--font-head); }
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.qty-btn {
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 16px;
  font-weight: 700;
}
.qty-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.qty-value {
  min-width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0 var(--space-2);
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-remove { color: var(--text-muted); font-size: 12px; cursor: pointer; transition: color var(--transition-fast); }
.cart-item-remove:hover { color: var(--crimson); }

/* ─── Order Summary ──────────────────────────────────────── */
.order-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.order-summary h3 { font-size: 17px; font-weight: 700; margin-bottom: var(--space-5); }
.order-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: var(--space-2) 0;
}
.order-summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: var(--space-3);
  padding-top: var(--space-4);
  font-size: 18px;
  font-weight: 700;
}
.order-summary-row.total .price { color: var(--blue); }
.order-summary-row .label { color: var(--text-secondary); }
.order-summary-row .free { color: #22C55E; font-weight: 600; }

/* ─── Payment Method Card ────────────────────────────────── */
.payment-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-card);
}

/* Hint container shown under payment methods */
#paymentMethodHint { margin-top: var(--space-4); }
.payment-card:hover:not(.maintenance):not(.inactive) { border-color: var(--blue); background: var(--blue-50); }
.payment-card.selected { border-color: var(--blue); background: var(--blue-50); }
.payment-card.maintenance { opacity: 0.65; cursor: not-allowed; }
.payment-card.inactive { opacity: 0.5; cursor: not-allowed; }

.payment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.payment-card-left { display: flex; align-items: center; gap: var(--space-3); }
.payment-card-icon {
  width: 44px; height: 44px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}
.payment-card-name { font-size: 15px; font-weight: 700; }
.payment-card-radio {
  width: 20px; height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.payment-card.selected .payment-card-radio { border-color: var(--blue); }
.payment-card.selected .payment-card-radio::after {
  content: '';
  width: 10px; height: 10px;
  background: var(--blue);
  border-radius: 50%;
}
.payment-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  display: inline-block;
}
.payment-status-dot.active { background: #22C55E; }
.payment-status-dot.maintenance { background: #F59E0B; }
.payment-status-dot.inactive { background: var(--neutral-400); }

.payment-card-maintenance-msg {
  font-size: 12px;
  color: #92400E;
  background: #FEF3C7;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-top: var(--space-3);
}
[data-theme="dark"] .payment-card-maintenance-msg {
  color: #FCD34D;
  background: rgba(251, 191, 36, 0.1);
}

/* ─── Order Timeline ─────────────────────────────────────── */
.order-timeline {
  position: relative;
  padding-left: 32px;
}
.order-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--border);
}
.timeline-step {
  position: relative;
  margin-bottom: var(--space-6);
}
.timeline-step:last-child { margin-bottom: 0; }
.timeline-step-dot {
  position: absolute;
  left: -32px;
  top: 4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 1;
}
.timeline-step.completed .timeline-step-dot {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.timeline-step.current .timeline-step-dot {
  background: var(--bg-card);
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-50);
  animation: pulse 2s infinite;
}
.timeline-step-content { padding-top: 2px; }
.timeline-step-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.timeline-step.pending .timeline-step-title { color: var(--text-muted); }
.timeline-step-note  { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.timeline-step-time  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ─── Trust Badges ──────────────────────────────────────── */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: left;
  flex: 1;
  min-width: 200px;
}
.trust-badge-icon {
  width: 44px; height: 44px;
  background: var(--blue-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}
.trust-badge-text h4 { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.trust-badge-text p  { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ─── Category Card ─────────────────────────────────────── */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}
.category-card:hover {
  border-color: var(--blue);
  background: var(--blue-50);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.category-card-icon {
  width: 56px; height: 56px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  transition: all var(--transition-fast);
}
.category-card:hover .category-card-icon { background: var(--blue); color: #fff; }
.category-card-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.category-card-count { font-size: 11px; color: var(--text-muted); }

/* ─── Review Card ───────────────────────────────────────── */
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.review-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.review-avatar {
  width: 40px; height: 40px;
  background: var(--blue-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
}
.review-author-name  { font-size: 14px; font-weight: 700; }
.review-author-date  { font-size: 12px; color: var(--text-muted); }
.review-title { font-size: 15px; font-weight: 700; margin-bottom: var(--space-2); }
.review-body  { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.review-verified { font-size: 11px; color: #22C55E; font-weight: 600; display: flex; align-items: center; gap: 4px; }

/* ─── BMW Quick Finder ──────────────────────────────────── */
.bmw-finder {
  background: linear-gradient(135deg, var(--neutral-900) 0%, #1a2744 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-12) var(--space-12);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.bmw-finder::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,102,204,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.bmw-finder-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(0,102,204,0.2);
  border: 1px solid rgba(0,102,204,0.4);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7BB5F0;
  margin-bottom: var(--space-4);
}
.bmw-finder h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}
.bmw-finder p {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-8);
  max-width: 400px;
}
.bmw-finder-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: var(--space-3);
}
.bmw-finder-select {
  padding: 12px var(--space-4);
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.bmw-finder-select:focus { border-color: var(--blue-light); }
.bmw-finder-select option { background: #1a2744; color: #fff; }
.bmw-finder-select::placeholder { color: rgba(255,255,255,0.4); }

@media (max-width: 768px) {
  .bmw-finder { padding: var(--space-8); }
  .bmw-finder-form { grid-template-columns: 1fr 1fr; }
  .bmw-finder-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .bmw-finder-form { grid-template-columns: 1fr; }
}

/* ─── Tracking Widget ────────────────────────────────────── */
.tracking-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tracking-header {
  background: var(--blue);
  padding: var(--space-5) var(--space-6);
  color: #fff;
}
.tracking-header .order-num { font-size: 12px; opacity: 0.8; }
.tracking-header .order-title { font-size: 20px; font-weight: 800; }
.tracking-body { padding: var(--space-6); }
.tracking-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.tracking-info-item {}
.tracking-info-item label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.tracking-info-item span  { font-size: 14px; font-weight: 600; color: var(--text-primary); display: block; margin-top: 2px; }

/* ─── Alert / Notice ─────────────────────────────────────── */
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-info    { background: var(--blue-50);    color: var(--blue-dark);  border: 1px solid var(--blue-100); }
.alert-success { background: #F0FDF4; color: #14532D; border: 1px solid #BBF7D0; }
.alert-warning { background: #FFFBEB; color: #78350F; border: 1px solid #FDE68A; }
.alert-error   { background: var(--crimson-50); color: var(--crimson-dark); border: 1px solid rgba(224,36,36,0.2); }
[data-theme="dark"] .alert-info    { background: rgba(0,102,204,.1); color: #7BB5F0; border-color: rgba(0,102,204,.2); }
[data-theme="dark"] .alert-success { background: rgba(34,197,94,.08); color: #4ADE80; border-color: rgba(34,197,94,.2); }
[data-theme="dark"] .alert-warning { background: rgba(245,158,11,.08); color: #FCD34D; border-color: rgba(245,158,11,.2); }

/* ─── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
}
.page-btn {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Search Suggestions ─────────────────────────────────── */
.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.search-suggestion-item:hover { background: var(--bg-elevated); }
.search-suggestion-item img {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.search-suggestion-name  { font-size: 14px; font-weight: 600; }
.search-suggestion-brand { font-size: 12px; color: var(--text-muted); }
.search-suggestion-price { font-size: 14px; font-weight: 700; color: var(--blue); margin-left: auto; white-space: nowrap; }

/* ─── Admin Dashboard Components ─────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
.stat-card-info {}
.stat-card-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.stat-card-value { font-size: 32px; font-weight: 800; font-family: var(--font-head); color: var(--text-primary); margin-top: 4px; letter-spacing: -0.03em; }
.stat-card-change { font-size: 12px; font-weight: 600; margin-top: 4px; }
.stat-card-change.up   { color: #22C55E; }
.stat-card-change.down { color: var(--crimson); }
.stat-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-card-icon.blue   { background: var(--blue-50);    color: var(--blue); }
.stat-card-icon.green  { background: #F0FDF4;            color: #16A34A; }
.stat-card-icon.yellow { background: #FFFBEB;            color: #D97706; }
.stat-card-icon.crimson{ background: var(--crimson-50);  color: var(--crimson); }

[data-theme="dark"] .stat-card-icon.green  { background: rgba(34,197,94,.1);  color: #4ADE80; }
[data-theme="dark"] .stat-card-icon.yellow { background: rgba(217,119,6,.1);  color: #FCD34D; }

/* Admin data table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px var(--space-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  padding: 14px var(--space-4);
  border-bottom: 1px solid var(--divider);
  font-size: 14px;
  color: var(--text-primary);
}
.data-table tr:hover td { background: var(--bg-elevated); }
.data-table tr:last-child td { border-bottom: none; }
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
}

/* Payment method admin card */
.payment-admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.payment-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
}
.payment-admin-body { padding: var(--space-5) var(--space-6); }
.toggle-switch {
  position: relative;
  width: 44px; height: 24px;
  background: var(--neutral-300);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.toggle-switch.on { background: var(--blue); }
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}
.toggle-switch.on::after { transform: translateX(20px); }

/* =========================================================
   RESPONSIVE FIXES — Product Cards, Filter, Layout
   ========================================================= */

/* Product card — prevent overflow at all sizes */
.product-card {
  max-width: 100%;
  word-break: break-word;
}

/* Product card footer — always flex row on desktop, column only on very small */
.product-card-footer {
  flex-direction: row;
  align-items: center;
}
@media (max-width: 380px) {
  .product-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  .product-card-add { align-self: flex-end; }
}

/* Price range inputs — prevent overflow inside filter sidebar */
.price-range-inputs {
  overflow: hidden;
  width: 100%;
}
.price-range-inputs input {
  max-width: 100%;
  min-width: 0;
}

/* Filter sidebar — no overflow */
.filter-sidebar {
  overflow: hidden;
}

/* Product grid — consistent equal-height rows */
.product-grid {
  align-items: start;
}
.product-grid > .product-card {
  min-height: 0;
}

/* Image consistent aspect ratio - no cropping issues */
.product-card-img {
  aspect-ratio: 4/3;
  min-height: unset;
}

@media (max-width: 640px) {
  .product-card-img {
    aspect-ratio: 1/1;
  }
  .product-card-name {
    font-size: 13px;
  }
  .product-price-sale,
  .product-price-current {
    font-size: 15px;
  }
}

/* Cart item responsive */
@media (max-width: 420px) {
  .cart-item { gap: var(--space-3); }
  .cart-item-img { width: 64px; height: 64px; }
  .cart-item-name { font-size: 13px; }
}

/* Payment cards responsive */
.payment-card-header {
  flex-wrap: wrap;
  gap: var(--space-3);
}
@media (max-width: 480px) {
  .payment-card-header { flex-direction: row; align-items: center; }
  .payment-card-left { min-width: 0; }
  .payment-card-name { font-size: 14px; }
}

/* Admin sidebar — fully hidden on mobile */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    position: fixed;
    z-index: 300;
    height: 100vh;
    overflow-y: auto;
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .admin-main {
    margin-left: 0 !important;
    padding: var(--space-5) var(--space-4) !important;
  }
  .admin-topbar {
    flex-wrap: wrap;
    gap: var(--space-3);
  }
  .admin-page-title { font-size: 20px; }
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Badge overflow fix */
.badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Order summary rows */
.order-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: 14px;
  gap: var(--space-3);
}
.order-summary-row .label { color: var(--text-muted); }
.order-summary-row.total {
  font-size: 16px;
  font-weight: 800;
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  margin-top: var(--space-2);
}
.order-summary-row .price { color: var(--blue); }
.order-summary-row .free { color: #22C55E; font-weight: 700; }
