/* ==========================================================================
   ZABATAHA AUTO SPARE - CSS DESIGN SYSTEM (AUTO SPARE MATCHING THEME)
   ========================================================================== */

:root {
  --brand-red: #db3030;
  --brand-red-hover: #b92b2b;
  --brand-navy: #0e2f44;
  --brand-navy-hover: #081d2b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #1f2937;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --border-hover: #cbd5e1;
  --font-cairo: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-outfit: 'Outfit', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: var(--font-cairo);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  direction: rtl;
  text-align: right;
}

.app-view {
  display: none;
}
.app-view.active {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

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

.font-outfit {
  font-family: var(--font-outfit);
}

.text-red { color: var(--brand-red); }
.text-navy { color: var(--brand-navy); }
.text-success { color: #16a34a; }
.text-gold { color: #d97706; }
.text-white { color: #ffffff; }

/* ===== TOAST NOTIFICATION STACK ===== */
#app-toast-stack {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 360px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-right: 4px solid var(--brand-red);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.app-toast.success { border-right-color: #16a34a; }
.app-toast.error { border-right-color: #dc2626; }
.app-toast.info { border-right-color: var(--brand-navy); }

.app-toast-icon {
  font-size: 18px;
  color: var(--brand-red);
}
.app-toast.success .app-toast-icon { color: #16a34a; }
.app-toast.error .app-toast-icon { color: #dc2626; }

.app-toast-message {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

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

/* ===== ANNOUNCEMENT BAR ===== */
.top-announcement-bar {
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.announcement-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
}

.divider { opacity: 0.4; }

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

.badge-db {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.btn-text-link {
  color: #fbbf24;
  font-weight: 700;
  font-size: 12px;
  transition: opacity 0.2s;
}
.btn-text-link:hover { opacity: 0.85; }

/* ===== MAIN HEADER ===== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--brand-red);
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(219, 48, 48, 0.3);
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--brand-navy);
  line-height: 1;
}

.brand-sub {
  font-family: var(--font-outfit);
  color: var(--brand-red);
  font-size: 16px;
  font-weight: 800;
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-search-wrapper {
  flex: 1;
  max-width: 540px;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-group input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 50px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #f1f5f9;
  font-size: 13.5px;
  transition: all 0.2s;
}

.search-input-group input:focus {
  background: #ffffff;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(219, 48, 48, 0.15);
}

.search-btn {
  position: absolute;
  left: 6px;
  width: 36px;
  height: 34px;
  background: var(--brand-red);
  color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s;
}
.search-btn:hover { background: var(--brand-red-hover); }

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

.nav-btn {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  color: var(--brand-navy);
  background: #f1f5f9;
  transition: all 0.2s;
}
.nav-btn:hover { background: #e2e8f0; }

.cart-btn {
  position: relative;
  background: var(--brand-red);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(219, 48, 48, 0.3);
  transition: all 0.2s;
}
.cart-btn:hover {
  background: var(--brand-red-hover);
  transform: translateY(-1px);
}

.cart-count-badge {
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ===== HERO BANNER ===== */
.hero-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 40px 0;
  margin-bottom: 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(219, 48, 48, 0.1);
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--brand-navy);
  line-height: 1.3;
  margin-bottom: 14px;
}

.text-highlight { color: var(--brand-red); }

.hero-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 580px;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.feature-item {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
}

.btn-primary-red {
  background: var(--brand-red);
  color: #ffffff;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(219, 48, 48, 0.3);
  transition: all 0.2s;
}
.btn-primary-red:hover {
  background: var(--brand-red-hover);
  transform: translateY(-2px);
}

.btn-navy-outline {
  background: var(--brand-navy);
  color: #ffffff;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-navy-outline:hover {
  background: var(--brand-navy-hover);
  transform: translateY(-2px);
}

.hero-image-box {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 280px;
}

.hero-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-overlay {
  position: absolute;
  bottom: 0;
  inset-x: 0;
  background: linear-gradient(to top, rgba(14, 47, 68, 0.95), transparent);
  padding: 20px;
  color: #ffffff;
}

.overlay-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-red);
  background: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.overlay-text {
  font-size: 13px;
  font-weight: 700;
}

/* ===== VEHICLE FILTER BAR ===== */
.filter-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.filter-icon {
  width: 44px;
  height: 44px;
  background: rgba(14, 47, 68, 0.08);
  color: var(--brand-navy);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.filter-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-navy);
}

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

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
}

.filter-controls select {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  transition: border-color 0.2s;
}

.filter-controls select:focus {
  border-color: var(--brand-navy);
}

.btn-reset {
  height: 44px;
  padding: 0 18px;
  background: #f1f5f9;
  color: var(--text-dark);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.btn-reset:hover { background: #e2e8f0; }

/* ===== SECTION BLOCKS ===== */
.section-block {
  margin-bottom: 40px;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-navy);
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.link-btn {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-red);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}
.link-btn:hover { opacity: 0.8; }

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

.category-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

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

.category-img-box {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f1f5f9;
}

.category-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
}

/* ===== PRODUCTS GRID & PRODUCT CARDS (NOON/AUTO SPARE DUAL BUTTON MECHANISM) ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
  position: relative;
}

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

.product-image-box {
  position: relative;
  height: 190px;
  background: #f8fafc;
  overflow: hidden;
  cursor: pointer;
}

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

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

.badge-oem-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(14, 47, 68, 0.9);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-outfit);
}

.badge-brand-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.product-info-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.part-number-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-red);
  font-family: var(--font-outfit);
  margin-bottom: 4px;
}

.product-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.product-title:hover { color: var(--brand-red); }

.product-compat {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.product-price-stock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  margin-bottom: 14px;
}

.price-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-navy);
}

.stock-status {
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: 50px;
}

.stock-status.out {
  color: #dc2626;
  background: #fef2f2;
}

/* ===== DUAL BUTTON ACTIONS (AUTO SPARE / NOON STYLE) ===== */
.product-actions-group {
  display: flex;
  gap: 8px;
}

.btn-add-cart-std {
  flex: 1;
  height: 40px;
  background: var(--brand-red);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}
.btn-add-cart-std:hover { background: var(--brand-red-hover); }

.noon-qty-control {
  flex: 1;
  height: 40px;
  background: var(--brand-red);
  color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.noon-qty-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s;
}
.noon-qty-btn:hover { background: rgba(0, 0, 0, 0.15); }

.noon-qty-val {
  font-size: 14px;
  font-weight: 900;
  font-family: var(--font-outfit);
}

.btn-buy-now {
  flex: 1;
  height: 40px;
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}
.btn-buy-now:hover { background: var(--brand-navy-hover); }

/* ===== CATALOG & CHECKOUT VIEWS ===== */
.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.catalog-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.search-status-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--brand-red);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-tag {
  cursor: pointer;
  color: var(--brand-red);
}

/* Checkout view */
.checkout-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  margin-bottom: 40px;
}

.checkout-form-card, .order-summary-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.checkout-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--brand-navy);
  margin-bottom: 4px;
}

.checkout-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.required { color: var(--brand-red); }

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--brand-red);
}

.payment-method-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-submit-order {
  width: 100%;
  height: 48px;
  background: var(--brand-red);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(219, 48, 48, 0.3);
  margin-top: 10px;
  transition: background 0.2s;
}
.btn-submit-order:hover { background: var(--brand-red-hover); }

.summary-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-navy);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
}

.summary-items-list {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.summary-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 13px;
}

.summary-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 2px solid var(--brand-navy);
  font-size: 16px;
  font-weight: 900;
  color: var(--brand-navy);
}

.summary-price { font-size: 22px; color: var(--brand-red); }

.checkout-assurance {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 14px;
}

/* ===== CART DRAWER ===== */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
}

.cart-drawer-overlay.active { display: block; }

.cart-drawer-content {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.cart-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-navy);
}

.cart-close-btn {
  font-size: 20px;
  color: var(--text-muted);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-item-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 12px;
}

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

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

.cart-item-part {
  font-size: 10px;
  font-weight: 800;
  color: var(--brand-red);
  font-family: var(--font-outfit);
}

.cart-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.cart-item-price {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--brand-navy);
  margin-top: 4px;
}

.cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.btn-remove-item {
  color: #dc2626;
  font-size: 13px;
}

.cart-qty-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 2px 6px;
}

.cart-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  background: #f8fafc;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 10px;
}

.cart-total-amount { font-size: 20px; color: var(--brand-red); }

.cart-notice {
  font-size: 11.5px;
  color: #16a34a;
  margin-bottom: 14px;
}

.btn-checkout {
  width: 100%;
  height: 44px;
  background: var(--brand-red);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.admin-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 20px;
  color: var(--text-muted);
}

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

.admin-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
  overflow-x: auto;
}

.admin-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.admin-tab.active {
  color: var(--brand-red);
  border-bottom-color: var(--brand-red);
}

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  background: #f8fafc;
  font-weight: 800;
  color: var(--brand-navy);
}

.admin-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.btn-add-product {
  background: var(--brand-red);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
}

.excel-form-box {
  background: #f8fafc;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ===== FOOTER ===== */
.main-footer {
  background: var(--brand-navy);
  color: #ffffff;
  padding-top: 40px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 30px;
}

.footer-desc {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 10px;
}

.footer-col-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #ffffff;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 13px;
  color: #cbd5e1;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--brand-red); }

.footer-bottom {
  background: #081d2b;
  padding: 16px 0;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */
@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-image-box { display: none; }
  .checkout-wrapper { grid-template-columns: 1fr; }
  .filter-controls { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-container { flex-wrap: wrap; height: auto; padding: 10px 16px; }
  .header-search-wrapper { order: 3; min-width: 100%; margin-top: 10px; }
  .hero-title { font-size: 24px; }
}

/* ===== AUTO SPARE TARGET THEME CUSTOM DESIGN SYSTEM ===== */

/* Auto Spare Logo Badge */
.logo-badge-as {
  background: radial-gradient(circle at 30% 30%, #ff5252, #e53935);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  white-space: nowrap;
}

/* Header Nav Links */
.main-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-nav-links .nav-link {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  position: relative;
  padding: 6px 4px;
  transition: color 0.2s;
}

.main-nav-links .nav-link:hover,
.main-nav-links .nav-link.active {
  color: #e53935;
}

.main-nav-links .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: #e53935;
  border-radius: 2px;
}

.btn-login-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s;
}
.btn-login-pill:hover { background: #e2e8f0; }

.btn-add-car {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.2s, background 0.2s;
}
.btn-add-car:hover { background: #1e293b; transform: translateY(-1px); }

.cart-icon-badge {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #0f172a;
  transition: background 0.2s;
}
.cart-icon-badge:hover { background: #e2e8f0; }

.cart-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e53935;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Auto Spare Hero Banner & Dynamic Slider */
.hero-as-banner {
  position: relative;
  background: #0b2238;
  color: #ffffff;
  min-height: 380px;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  width: 100%;
  min-height: 380px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out, transform 1.2s ease-out;
  transform: scale(1.04);
  background-size: cover;
  background-position: center;
  padding: 60px 0 75px 0;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-as-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 34, 56, 0.95) 35%, rgba(11, 34, 56, 0.45) 100%);
}

.hero-as-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 20px;
}

.hero-slider-dots {
  position: absolute;
  bottom: 65px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  gap: 10px;
  align-items: center;
}

.hero-slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-slider-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.hero-slider-dot.active {
  width: 32px;
  border-radius: 12px;
  background: #e53935;
  border-color: #e53935;
  box-shadow: 0 0 12px rgba(229, 57, 53, 0.7);
}

.hero-text-side {
  max-width: 600px;
}

.hero-as-title {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-as-sub {
  font-size: 20px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 28px;
}

.hero-as-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-shop-now {
  background: #22c55e;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
  transition: all 0.25s;
}
.btn-shop-now:hover {
  background: #16a34a;
  transform: scale(1.03);
}

.installment-badge {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

/* Vehicle Filter Box ("اختر السيارة والقسم المطلوب") */
.car-filter-wrapper {
  margin-top: -55px;
  position: relative;
  z-index: 10;
}

.filter-box-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 30px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.09);
  border: 1px solid #e2e8f0;
}

.filter-box-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
  text-align: center;
}

.filter-dropdowns-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.filter-select-group select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  transition: border-color 0.2s;
  cursor: pointer;
}
.filter-select-group select:focus {
  border-color: #e53935;
  background-color: #ffffff;
}

.btn-filter-search {
  height: 48px;
  padding: 0 28px;
  background: #e53935;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.15s;
}
.btn-filter-search:hover {
  background: #c62828;
  transform: translateY(-1px);
}

/* Trust Features Bar */
.trust-features-bar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 14px;
  padding: 18px 24px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  margin-top: 24px;
  margin-bottom: 20px;
}

.trust-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: flex-wrap;
  gap: 16px;
}

.trust-item {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.trust-item i {
  color: #38bdf8;
  font-size: 16px;
}

/* Sections Styling */
.section-as-header {
  margin-bottom: 24px;
}

.section-as-title {
  font-size: 22px;
  font-weight: 900;
  color: #0f2b48;
}

.section-sub-title {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.link-more-btn {
  font-size: 13.5px;
  font-weight: 800;
  color: #e53935;
  transition: opacity 0.2s;
}
.link-more-btn:hover { opacity: 0.8; }

/* Categories Capsule Grid (Target Site Parity) */
.categories-capsule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.category-capsule-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.category-capsule-card:hover {
  border-color: #e53935;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(229, 57, 53, 0.12);
}

.category-capsule-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #e53935;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.category-capsule-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

/* Product Cards (Auto Spare Target Design) */
.product-card-as {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.25s ease;
}

.product-card-as:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}

.product-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 3;
}

.badge-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  color: #ffffff;
}
.badge-tag.new { background: #059669; }
.badge-tag.offer { background: #d97706; }
.badge-tag.discount { background: #dc2626; }

.btn-wishlist-heart {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-wishlist-heart:hover,
.btn-wishlist-heart.active {
  color: #e53935;
  background: #ffe4e6;
  border-color: #fecdd3;
}

.product-image-container {
  width: 100%;
  height: 160px;
  margin: 20px 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

.product-brand-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.product-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 39px;
}

.product-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-box del {
  font-size: 12px;
  color: #94a3b8;
  font-family: 'Outfit', sans-serif;
  margin-bottom: -2px;
}

.price-current {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  font-family: 'Outfit', sans-serif;
}
.price-current span {
  font-size: 12px;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
}

.btn-add-to-cart-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-add-to-cart-icon:hover {
  background: #e53935;
  color: #ffffff;
  border-color: #e53935;
}

/* Brands Grid */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.brand-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  cursor: pointer;
  transition: all 0.25s ease;
}

.brand-card:hover {
  border-color: #e53935;
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.brand-card img {
  max-width: 65px;
  max-height: 45px;
  object-fit: contain;
}

.brand-card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
}

/* Promotional Callout Banner */
.promo-banner-card {
  margin: 40px 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 20px;
  padding: 36px 40px;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
}

.promo-banner-content h3 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
}

.promo-banner-content p {
  font-size: 14.5px;
  color: #94a3b8;
  margin-bottom: 20px;
}

.btn-banner-action {
  background: #e53935;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  padding: 12px 30px;
  border-radius: 50px;
  transition: background 0.2s, transform 0.15s;
}
.btn-banner-action:hover {
  background: #c62828;
  transform: scale(1.02);
}

.social-icon-circle {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: background 0.2s;
}
.social-icon-circle:hover {
  background: #e53935;
}

@media (max-width: 991px) {
  .filter-dropdowns-grid {
    grid-template-columns: 1fr 1fr;
  }
  .btn-filter-search {
    grid-column: span 2;
    justify-content: center;
  }
  .hero-as-title { font-size: 32px; }
}

@media (max-width: 640px) {
  .filter-dropdowns-grid {
    grid-template-columns: 1fr;
  }
  .btn-filter-search {
    grid-column: span 1;
  }
  .hero-as-title { font-size: 26px; }
  .categories-capsule-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Circular Subcategories Grid Styling */
.subcat-circle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 6px;
}

.subcat-circle-card:hover {
  transform: translateY(-5px);
}

.subcat-circle-img-wrap {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: all 0.25s ease;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.subcat-circle-card:hover .subcat-circle-img-wrap {
  border-color: #e53935;
  box-shadow: 0 8px 24px rgba(229, 57, 53, 0.15);
}

.subcat-circle-img-wrap img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.subcat-circle-img-wrap i {
  font-size: 38px;
  color: #e53935;
}

.subcat-circle-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
  text-align: center;
  max-width: 125px;
  transition: color 0.2s ease;
}

.subcat-circle-card:hover .subcat-circle-title {
  color: #e53935;
}


