/* ==========================================================================
   سوقي ستور (Suki Store) - الأنماط والتصميم العام (RTL First)
   تصميم عصري مستوحى من نون وأمازون بروح عربية راقية ومريحة للعين
   ========================================================================== */

:root {
  /* Color Palette */
  --primary: #059669;        /* Emerald 600 */
  --primary-hover: #047857;  /* Emerald 700 */
  --primary-light: #ecfdf5;  /* Emerald 50 */
  --primary-dark: #064e3b;   /* Emerald 900 */
  
  --secondary: #1e293b;      /* Slate 800 */
  --accent: #f59e0b;         /* Amber 500 (Gold) */
  --accent-hover: #d97706;   /* Amber 600 */
  --accent-light: #fffbeb;   /* Amber 50 */
  
  --danger: #ef4444;         /* Red 500 */
  --danger-light: #fef2f2;
  --success: #10b981;        /* Green 500 */
  --success-light: #ecfdf5;
  --info: #3b82f6;           /* Blue 500 */
  --info-light: #eff6ff;

  --bg-page: #f8fafc;        /* Slate 50 */
  --bg-card: #ffffff;
  --text-main: #0f172a;      /* Slate 900 */
  --text-muted: #64748b;     /* Slate 500 */
  --text-light: #94a3b8;     /* Slate 400 */
  --border: #e2e8f0;         /* Slate 200 */
  --border-light: #f1f5f9;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* iOS & Modern Mobile Safe Areas */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  padding-bottom: 0;
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Prevent iOS Safari automatic zoom on form input focus */
@media screen and (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  select,
  textarea,
  .form-control,
  .search-input {
    font-size: 16px !important;
  }
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: var(--transition);
}

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

/* Utilities */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-grow { flex-grow: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.hidden { display: none !important; }

/* ==========================================================================
   TOP BAR & NAVBAR
   ========================================================================== */
.top-bar {
  background-color: #047857;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

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

.top-bar-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.top-bar-links a {
  color: #ffffff;
  font-weight: 600;
  transition: var(--transition);
}

.top-bar-links a:hover {
  color: #fef08a;
}

.site-navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.navbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.navbar-top-row {
  display: contents;
}

@media (max-width: 767px) {
  .navbar-main {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 10px;
  }

  .navbar-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .search-wrapper {
    width: 100%;
    max-width: 100%;
  }

  .brand-logo {
    gap: 8px;
  }

  .brand-logo-img {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .brand-tagline {
    font-size: 0.68rem;
  }

  .nav-actions {
    gap: 6px;
  }

  .action-btn {
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .pwa-install-pill {
    padding: 5px 9px;
    font-size: 0.72rem;
  }

  .pwa-install-label {
    display: none;
  }
}

@media (min-width: 641px) and (max-width: 767px) {
  .pwa-install-label {
    display: inline;
  }
}

@media (max-width: 640px) {
  .navbar-top-row .pwa-install-pill {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .brand-logo-img {
    width: 32px;
    height: 32px;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .brand-tagline {
    font-size: 0.62rem;
  }
  .action-btn {
    padding: 4px 6px;
    font-size: 0.75rem;
  }
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #065f46;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.35rem;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
  flex-shrink: 0;
}

.brand-name {
  line-height: 1.1;
  color: #065f46;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.3px;
}

.brand-tagline {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  display: block;
}

/* Search Box & Live Autocomplete */
.search-wrapper {
  flex: 1;
  max-width: 620px;
  position: relative;
}

.search-form {
  display: flex;
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 11px 48px 11px 18px;
  background-color: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  transition: var(--transition);
}

.search-input::placeholder {
  color: #64748b;
  font-weight: 500;
}

.search-input:focus {
  background-color: #ffffff;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
  color: #0f172a;
}

.search-submit-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background-color: #059669;
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-submit-btn:hover {
  background-color: #047857;
  transform: translateY(-50%) scale(1.05);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  max-height: 420px;
  overflow-y: auto;
  z-index: 100;
  padding: 8px 0;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

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

.autocomplete-item:hover {
  background-color: #f0fdf4;
}

.autocomplete-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Nav Actions (Cart, Account, Notifications) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: #1e293b !important;
  font-weight: 700;
  font-size: 0.92rem;
  position: relative;
  border: 1px solid transparent;
  transition: var(--transition);
}

.action-btn:hover {
  background-color: #f1f5f9;
  color: #059669 !important;
  border-color: #e2e8f0;
}

.badge-counter {
  position: absolute;
  top: -4px;
  right: -6px;
  background-color: #dc2626;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.35);
  border: 2px solid #ffffff;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background-color: #e2e8f0;
  color: #059669;
}

.login-btn-pill {
  background-color: #ecfdf5 !important;
  border: 1.5px solid #10b981 !important;
  color: #065f46 !important;
  padding: 7px 16px !important;
  border-radius: 9999px !important;
  font-weight: 800 !important;
}

.login-btn-pill:hover {
  background-color: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
}

/* Categories Sub-nav */
.categories-nav {
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  z-index: 40;
}

@media (min-width: 768px) {
  .categories-nav {
    overflow: visible !important;
  }
}

@media (max-width: 767px) {
  .categories-nav {
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 3px 0;
  }
}

.categories-nav::-webkit-scrollbar {
  display: none;
}

.categories-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 8px 0;
  margin: 0;
}

.cat-link {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b !important;
  padding: 7px 14px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.cat-link i {
  color: #059669;
  font-size: 0.95rem;
  transition: var(--transition);
}

.cat-link:hover {
  background-color: #e2e8f0;
  color: #059669 !important;
  border-color: #cbd5e1;
}

.cat-link.active {
  background-color: #059669 !important;
  color: #ffffff !important;
  font-weight: 800;
  border-color: #059669 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.cat-link.active i {
  color: #ffffff !important;
}

.cat-link-contact {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0 !important;
  color: #065f46 !important;
  font-weight: 800;
}

.cat-link-contact:hover {
  background-color: #059669;
  color: #ffffff !important;
  border-color: #059669 !important;
}

.cat-link-contact:hover i {
  color: #ffffff !important;
}

/* ==========================================================================
   MORE CATEGORIES DROPDOWN (قائمة المزيد من الأقسام)
   ========================================================================== */
.more-categories-wrapper {
  position: relative;
}

.more-cat-btn {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.more-cat-btn:hover,
.more-cat-btn.active {
  background-color: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #047857 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.18);
}

.more-cat-count-badge {
  background-color: #059669;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 9999px;
  line-height: 1;
}

.more-cat-arrow {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.more-cat-btn.active .more-cat-arrow {
  transform: rotate(180deg);
}

/* Backdrop */
.more-cat-backdrop {
  display: none;
}

@media (max-width: 767px) {
  .more-cat-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 999;
  }
}

/* Dropdown Panel */
.more-cat-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.22), 0 0 1px 1px rgba(0, 0, 0, 0.05);
  z-index: 1000 !important;
  overflow: hidden;
  animation: dropdownPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 767px) {
  .more-cat-dropdown-panel {
    position: fixed !important;
    bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-height: 72vh !important;
    background: #ffffff;
    border: 1.5px solid #10b981;
    border-radius: 26px;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
    z-index: 1000 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

.more-cat-header {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.more-cat-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
}

.more-cat-close-btn:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.more-cat-body {
  padding: 8px 10px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.more-cat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 16px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}

.more-cat-card:hover {
  background-color: #f0fdf4;
  border-color: #a7f3d0;
  transform: translateX(-4px);
}

.more-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
  border: 1px solid #a7f3d0;
}

.more-cat-card:hover .more-cat-icon {
  background: #059669;
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
}

.more-cat-info {
  flex: 1;
  min-width: 0;
}

.more-cat-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  transition: color 0.2s;
}

.more-cat-card:hover .more-cat-name {
  color: #059669;
}

.more-cat-desc {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
  white-space: normal;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.more-cat-arrow-icon {
  color: #94a3b8;
  margin-right: auto;
  transition: all 0.2s;
  font-size: 0.82rem;
}

.more-cat-card:hover .more-cat-arrow-icon {
  color: #059669;
  transform: translateX(-3px);
}

.more-cat-footer {
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.more-cat-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #059669;
  width: 100%;
  padding: 9px 14px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  transition: all 0.2s ease;
  text-decoration: none;
}

.more-cat-all-btn:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

@keyframes dropdownPop {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideUpSheet {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   HOMEPAGE HERO SLIDER & VALUE PROPOSITIONS
   ========================================================================== */
.hero-slider-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 16px 0;
  box-shadow: var(--shadow-md);
  background: #0f172a;
}

.slider-wrapper {
  position: relative;
  min-height: 380px;
  display: flex;
}

.slide-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 48px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s;
  color: white;
}

.slide-item.active {
  opacity: 1;
  visibility: visible;
}

.slide-content {
  max-width: 550px;
  z-index: 2;
}

.slide-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.slide-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
}

.slide-subtitle {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 24px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--accent);
  color: #1e1b4b;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-cta:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.slide-media {
  max-width: 45%;
  z-index: 1;
}

.slide-img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.3));
}

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

.dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background-color: var(--accent);
  width: 26px;
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
}

.slider-nav-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

.slider-nav-prev { right: 16px; }
.slider-nav-next { left: 16px; }

/* Value Propositions */
.value-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0 32px 0;
}

.pillar-card {
  background: white;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pillar-icon {
  width: 46px;
  height: 46px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.pillar-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.pillar-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .value-pillars {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 16px 0 24px 0;
  }
  .pillar-card {
    padding: 10px 8px;
    gap: 8px;
    border-radius: 12px;
  }
  .pillar-icon {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
    border-radius: 10px;
  }
  .pillar-title {
    font-size: 0.78rem;
    font-weight: 800;
  }
  .pillar-desc {
    font-size: 0.68rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ==========================================================================
   PRODUCT CARDS & GRIDS
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 18px 0;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--primary);
}

.section-view-all {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-view-all:hover {
  text-decoration: underline;
}

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

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-info {
    padding: 10px !important;
  }
  .product-title {
    font-size: 0.84rem !important;
    margin-bottom: 6px !important;
    height: 2.7em !important;
  }
  .price-current {
    font-size: 1.05rem !important;
  }
  .price-currency {
    font-size: 0.72rem !important;
  }
  .btn-add-cart {
    padding: 7px 8px !important;
    font-size: 0.8rem !important;
    gap: 4px !important;
  }
}

.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.product-thumb-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  overflow: hidden;
  background-color: #f8fafc;
}

.product-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--danger);
  color: white;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.sale-unit-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(15, 23, 42, 0.85);
  color: white;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

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

.product-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
  height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 8px;
  color: var(--text-main);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.product-rating-count {
  color: var(--text-muted);
  font-size: 0.75rem;
}

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

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

.price-currency {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.price-original {
  font-size: 0.88rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.btn-add-cart {
  width: 100%;
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(5, 150, 105, 0.2);
  padding: 9px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-add-cart:hover {
  background-color: var(--primary);
  color: white;
}

/* Categories Circles / Cards */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.category-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.category-card-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary-light);
}

.category-card-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
}

.category-card-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
  }
  .category-card {
    padding: 10px 6px;
    gap: 8px;
    border-radius: 14px;
  }
  .category-card-img {
    width: 54px;
    height: 54px;
  }
  .category-card-name {
    font-size: 0.78rem;
    font-weight: 700;
  }
  .category-card-count {
    font-size: 0.65rem;
  }
}

@media (max-width: 380px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .category-card {
    padding: 8px 4px;
  }
  .category-card-img {
    width: 46px;
    height: 46px;
  }
  .category-card-name {
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   PRODUCT DETAILS PAGE
   ========================================================================== */
.product-details-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  background: white;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
  .product-details-container {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .product-details-container {
    padding: 12px;
    margin: 12px 0;
    border-radius: 16px;
    gap: 18px;
  }
}

.gallery-main-img-box {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.thumb-btn {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  overflow: hidden;
  flex-shrink: 0;
}

.thumb-btn.active {
  border-color: var(--primary);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
}

.detail-unit-badge {
  display: inline-block;
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.detail-price-box {
  background-color: #f8fafc;
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

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

.variation-label {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
  display: block;
}

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

.variation-pill {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  background: white;
  cursor: pointer;
  transition: var(--transition);
}

.variation-pill.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.quantity-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: fit-content;
}

.stepper-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  font-size: 1.1rem;
  font-weight: bold;
}

.stepper-btn:hover {
  background-color: #e2e8f0;
}

.stepper-input {
  width: 50px;
  text-align: center;
  border: none;
  font-weight: bold;
  font-size: 1rem;
  outline: none;
}

.action-buttons-group {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.btn-primary-action {
  flex: 1;
  background-color: var(--primary);
  color: white;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary-action:hover {
  background-color: var(--primary-hover);
}

.btn-secondary-action {
  flex: 1;
  background-color: var(--accent);
  color: #1e1b4b;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-secondary-action:hover {
  background-color: var(--accent-hover);
}

@media (max-width: 640px) {
  .action-buttons-group {
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
  }
  .btn-primary-action,
  .btn-secondary-action {
    width: 100%;
    padding: 13px;
    font-size: 0.95rem;
    min-height: 48px;
  }
}

/* ==========================================================================
   CART DRAWER & CART PAGE
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.cart-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 440px;
  background: white;
  z-index: 1001;
  box-shadow: -10px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.open {
  transform: translateX(0);
}

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

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

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

.cart-item-card {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.cart-item-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

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

.cart-item-title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  margin-bottom: 4px;
}

.cart-item-options {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cart-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

/* ==========================================================================
   CHECKOUT & FORMS
   ========================================================================== */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  margin: 32px 0;
}

@media (max-width: 860px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .checkout-grid {
    gap: 16px;
    margin: 16px 0;
  }
  .form-card {
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 16px;
  }
}

.form-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.form-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.payment-method-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.payment-method-card.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

/* Summary Card */
.summary-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.summary-row.total {
  border-top: 2px dashed var(--border);
  padding-top: 16px;
  margin-top: 16px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

/* ==========================================================================
   ORDER DETAILS & TRACKING STEPPER
   ========================================================================== */
.tracking-stepper {
  display: flex;
  justify-content: space-between;
  margin: 32px 0;
  position: relative;
}

.tracking-stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  right: 40px;
  left: 40px;
  height: 4px;
  background-color: var(--border);
  z-index: 1;
}

.tracking-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  position: relative;
  flex: 1;
}

.step-bubble {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: white;
  border: 3px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 10px;
  transition: var(--transition);
}

.tracking-step.completed .step-bubble {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.tracking-step.active .step-bubble {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 5px rgba(5, 150, 105, 0.2);
}

.step-label {
  font-weight: 700;
  font-size: 0.88rem;
}

.step-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FLOATING WHATSAPP & TOASTS
   ========================================================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  z-index: 999;
  cursor: pointer;
  transition: var(--transition);
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-pulse {
  position: absolute;
  inset: -6px;
  border-radius: var(--radius-full);
  border: 2px solid #25D366;
  opacity: 0.7;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.whatsapp-tooltip {
  position: absolute;
  right: 68px;
  background: #0f172a;
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.floating-whatsapp:hover .whatsapp-tooltip {
  opacity: 1;
}

/* Toast Container */
.toast-container {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 300px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  border-right: 5px solid var(--primary);
  animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.error { border-right-color: var(--danger); }
.toast.success { border-right-color: var(--success); }
.toast.warning { border-right-color: var(--accent); }

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

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
}

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

.modal-close {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 24px;
}

@media (max-width: 640px) {
  .modal-overlay {
    padding: 8px;
    align-items: flex-end;
  }
  .modal-dialog {
    max-height: 92vh;
    border-radius: 24px 24px 16px 16px;
    width: 100%;
  }
  .modal-header {
    padding: 14px 18px;
  }
  .modal-body {
    padding: 16px;
  }
}

/* Mobile Bottom Navigation (App Experience) */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: white;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
    z-index: 90;
    justify-content: space-around;
    align-items: center;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    gap: 2px;
    position: relative;
    padding: 6px 4px;
    min-width: 48px;
    min-height: 44px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-item i {
    font-size: 1.18rem;
  }

  .mobile-nav-item.active {
    color: var(--primary);
  }

  .mobile-nav-install-btn {
    color: #059669 !important;
  }

  .mobile-nav-install-btn i {
    color: #059669 !important;
  }

  /* Prevent overlapping between bottom nav, chatbot, and floating whatsapp */
  #suki-chatbot-wrapper {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    z-index: 85 !important;
  }

  #chatbot-window {
    bottom: calc(130px + env(safe-area-inset-bottom, 0px)) !important;
    left: 8px !important;
    right: 8px !important;
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 160px - env(safe-area-inset-bottom, 0px)) !important;
    z-index: 95 !important;
  }

  .floating-whatsapp {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    right: 12px !important;
    left: auto !important;
    width: 46px !important;
    height: 46px !important;
    font-size: 1.5rem !important;
    z-index: 85 !important;
  }
}

/* Footer */
.site-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 48px 0 24px 0;
  margin-top: 48px;
  border-top: 1px solid #1e293b;
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.footer-col-title {
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--accent);
  padding-right: 4px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* ==========================================================================
   الوضع الليلي (Dark Mode) - سوقي ستور
   ========================================================================== */
html.dark {
  --bg-page: #0b1120;
  --bg-card: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #334155;
  --border-light: #1e293b;
  --primary-light: #064e3b;
  --secondary: #0f172a;
  color-scheme: dark;
}

html.dark body {
  background-color: var(--bg-page);
  color: var(--text-main);
}

html.dark .site-navbar {
  background-color: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

html.dark .brand-name {
  color: #34d399 !important;
}

html.dark .brand-tagline {
  color: #94a3b8 !important;
}

html.dark .top-bar {
  background-color: #022c22 !important;
  border-bottom-color: #064e3b !important;
}

html.dark .categories-nav {
  background-color: #090e17 !important;
  border-top-color: #1e293b !important;
  border-bottom-color: #1e293b !important;
}

html.dark .cat-link {
  color: #cbd5e1 !important;
}

html.dark .cat-link i {
  color: #34d399 !important;
}

html.dark .cat-link:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

html.dark .cat-link.active {
  background-color: #059669 !important;
  color: #ffffff !important;
}

html.dark .cat-link.active i {
  color: #ffffff !important;
}

html.dark .cat-link-contact {
  background-color: #064e3b !important;
  border-color: #059669 !important;
  color: #a7f3d0 !important;
}

html.dark .cat-link-contact:hover {
  background-color: #059669 !important;
  color: #ffffff !important;
}

html.dark .more-cat-btn {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

html.dark .more-cat-btn:hover,
html.dark .more-cat-btn.active {
  background-color: #064e3b !important;
  border-color: #059669 !important;
  color: #a7f3d0 !important;
}

html.dark .more-cat-dropdown-panel {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
}

html.dark .more-cat-header {
  background-color: #0f172a !important;
  border-bottom-color: #334155 !important;
}

html.dark .more-cat-close-btn {
  background-color: #334155 !important;
  color: #94a3b8 !important;
}

html.dark .more-cat-close-btn:hover {
  background-color: #475569 !important;
  color: #ffffff !important;
}

html.dark .more-cat-card:hover {
  background-color: #0f172a !important;
  border-color: #059669 !important;
}

html.dark .more-cat-icon {
  background-color: #064e3b !important;
  color: #34d399 !important;
  border-color: #047857 !important;
}

html.dark .more-cat-name {
  color: #f8fafc !important;
}

html.dark .more-cat-desc {
  color: #94a3b8 !important;
}

html.dark .more-cat-arrow-icon {
  color: #64748b !important;
}

html.dark .more-cat-footer {
  background-color: #0f172a !important;
  border-top-color: #334155 !important;
}

html.dark .more-cat-all-btn {
  background-color: #064e3b !important;
  border-color: #059669 !important;
  color: #a7f3d0 !important;
}

html.dark .more-cat-all-btn:hover {
  background-color: #059669 !important;
  color: #ffffff !important;
}

html.dark .action-btn {
  color: #f1f5f9 !important;
}

html.dark .action-btn:hover {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

html.dark .theme-toggle-btn {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f59e0b !important;
}

html.dark .theme-toggle-btn:hover {
  background-color: #334155 !important;
}

html.dark .login-btn-pill {
  background-color: #064e3b !important;
  border-color: #059669 !important;
  color: #a7f3d0 !important;
}

html.dark .login-btn-pill:hover {
  background-color: #059669 !important;
  color: #ffffff !important;
}

html.dark .badge-counter {
  border-color: #0f172a !important;
}

html.dark .autocomplete-dropdown {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

html.dark .autocomplete-item {
  border-bottom-color: #334155 !important;
}

html.dark .autocomplete-item:hover {
  background-color: #0f172a !important;
}

html.dark #user-dropdown-menu {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

html.dark #user-dropdown-menu a {
  color: #cbd5e1 !important;
}

html.dark #user-dropdown-menu a:hover {
  background-color: #334155 !important;
  color: #34d399 !important;
}

html.dark .bg-white {
  background-color: #1e293b !important;
}

html.dark .bg-slate-50,
html.dark .bg-slate-100 {
  background-color: #0f172a !important;
}

html.dark .bg-slate-50\/50 {
  background-color: rgba(15, 23, 42, 0.5) !important;
}

html.dark .text-slate-800,
html.dark .text-slate-900 {
  color: #f1f5f9 !important;
}

html.dark .text-slate-700,
html.dark .text-slate-600 {
  color: #cbd5e1 !important;
}

html.dark .text-slate-500,
html.dark .text-slate-400 {
  color: #94a3b8 !important;
}

html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-300 {
  border-color: #334155 !important;
}

html.dark .admin-card,
html.dark .product-card,
html.dark .modal-content,
html.dark .cart-drawer,
html.dark .dropdown-menu {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

html.dark .admin-sidebar {
  background-color: #090e17 !important;
  border-color: #1e293b !important;
}

html.dark .admin-topbar {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

html.dark .admin-table thead th {
  background-color: #0f172a !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

html.dark .admin-table tbody td {
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html.dark .admin-table tbody tr:hover {
  background-color: #172554 !important;
}

html.dark .form-control,
html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="tel"],
html.dark input[type="number"],
html.dark input[type="password"],
html.dark input[type="url"],
html.dark select,
html.dark textarea {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

html.dark .mobile-bottom-nav {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

html.dark #chatbot-window {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

html.dark #chatbot-messages-body {
  background-color: #0f172a !important;
}

/* Wishlist Heart Button Style */
.btn-wishlist {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  border: none;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #94a3b8;
}

.btn-wishlist:hover {
  transform: scale(1.15);
  color: #ef4444;
}

.btn-wishlist.active {
  color: #ef4444 !important;
  background-color: #ffffff;
}

.btn-wishlist.active i {
  font-weight: 900;
  animation: heart-pop 0.3s ease;
}

@keyframes heart-pop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Low Stock Pulse Badge */
.low-stock-badge {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

/* ==========================================================================
   Brand Logo Image Style
   ========================================================================== */
.brand-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  background: #ffffff;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.brand-logo:hover .brand-logo-img {
  transform: scale(1.06);
}

/* ==========================================================================
   PWA & Splash Screen (شاشة الافتتاح لتطبيق سوقي ستور)
   ========================================================================== */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at center, #0f2b24 0%, #061814 60%, #020907 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  user-select: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-screen.splash-fade-out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  visibility: hidden;
}

.splash-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  max-width: 380px;
  position: relative;
}

.splash-logo-box {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.splash-logo {
  width: 130px;
  height: 130px;
  border-radius: 30px;
  object-fit: contain;
  box-shadow: 0 20px 45px rgba(5, 150, 105, 0.4), 0 0 35px rgba(245, 158, 11, 0.3);
  border: 2px solid rgba(245, 158, 11, 0.4);
  background: #0f172a;
  position: relative;
  z-index: 2;
  animation: splashPulse 2.4s ease-in-out infinite;
}

.splash-logo-pulse {
  position: absolute;
  inset: -10px;
  border-radius: 38px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.45) 0%, rgba(245, 158, 11, 0) 70%);
  animation: splashRing 2.2s infinite ease-out;
  z-index: 1;
}

.splash-brand-title {
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 6px 0;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
  animation: splashFadeIn 0.8s ease-out;
}

.splash-brand-subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 24px;
  animation: splashFadeIn 1s ease-out;
}

.splash-loading-indicator {
  width: 170px;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.splash-loading-bar {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
  animation: splashProgress 2.4s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

.splash-skip-btn {
  margin-top: 24px;
  padding: 6px 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.splash-skip-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

@keyframes splashPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes splashRing {
  0% { transform: scale(0.9); opacity: 0.85; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes splashProgress {
  0% { width: 0%; }
  60% { width: 75%; }
  100% { width: 100%; }
}

/* ==========================================================================
   PWA Install Buttons & Banner
   ========================================================================== */
.pwa-install-pill {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
  font-weight: 800;
  border-radius: 9999px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.12);
  transition: all 0.2s ease;
}
.dark .pwa-install-pill {
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  color: #6ee7b7 !important;
  border-color: #047857 !important;
}
.pwa-install-pill:hover {
  background: #059669;
  color: #ffffff !important;
  border-color: #059669 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}
.pwa-install-pill:hover i {
  color: #ffffff !important;
}

/* PWA Smart Top Banner (Clean, In-Flow, Never covers content) */
.pwa-smart-top-banner {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 50%, #d1fae5 100%);
  border-bottom: 1.5px solid #a7f3d0;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.08);
  position: relative;
  z-index: 60;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

html.dark .pwa-smart-top-banner,
.dark .pwa-smart-top-banner {
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 60%, #064e3b 100%);
  border-bottom-color: #047857;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pwa-banner-close-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: #64748b;
  font-size: 0.75rem;
  transition: all 0.2s;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}

html.dark .pwa-banner-close-btn,
.dark .pwa-banner-close-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.pwa-banner-close-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

@media (min-width: 768px) {
  .pwa-smart-top-banner,
  .pwa-mobile-banner {
    display: none !important;
  }
}

/* Fallback for pwa-mobile-banner */
.pwa-mobile-banner {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 50%, #d1fae5 100%);
  border-bottom: 1.5px solid #a7f3d0;
  padding: 8px 12px;
  position: relative;
  z-index: 60;
}

