/* ===== VARIABLES & BASE STYLES ===== */
:root {
  --primary-gradient: linear-gradient(135deg, #ffa000, #ffd54f);
  --success-color: #28a745;
  --danger-color: #dc3545;
  --text-dark: #333;
  --text-muted: #777;
  --border-color: #dee2e6;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
  /* Info row layout variables */
  --info-row-gap: 1rem;
  --info-row-margin-bottom: 0.75rem;
  --info-label-min-width: 140px;
  --mobile-breakpoint: 576px;
  --mobile-gap: 0.5rem;
  --card-radius: 10px;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #dbebec;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
}

/* ===== LAYOUT & CONTAINERS ===== */
.main-container {
  display: flex;
  gap: 20px;
}

.sidebar {
  flex: 0 0 260px;
  background: #fff;
  border-right: 1px solid #eee;
  padding: 20px;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.content-area {
  flex: 1;
  padding: 0px;
}

/* Sticky bottom nav container */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, #305170, #6dfc6b) !important;
  color: #fff !important; /* optional: ensures text remains visible */
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1050;
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.bottom-nav a {
  color: white;
  text-decoration: none;
  font-size: 12px;
  flex-grow: 1;
  text-align: center;
  padding: 5px 0;
  position: relative;
}

.bottom-nav a i {
  font-size: 20px;
  display: block;
  margin-bottom: 2px;
  margin-top: 5px;
}

.bottom-nav a .badge {
  position: absolute;
  top: 2px;
  right: 30%;
  background: #dc3545;
  /* bootstrap danger red */
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1;
}

/* Adjust text and icons for smaller screens */
@media (min-width: 768px) {
  .bottom-nav {
    height: 70px;
  }

  .bottom-nav a {
    font-size: 14px;
  }

  .bottom-nav a i {
    font-size: 24px;
    margin-top: 5px;
  }
}
/* Sticky bottom nav container */

.bg-primary {
  background: linear-gradient(135deg, #6dfc6b, #305170) !important;
  color: #fff !important;
}

.text-bg-success {
  background-color: #5473ec !important;
}

.back-to-top {
  position: fixed;
  bottom: 70px;
  right: 20px;
  display: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  text-align: center;
  line-height: 35px;
  z-index: 1051;
}

/* Mobile: push back-to-top button above bottom nav */
@media (max-width: 767px) {
  .back-to-top {
    bottom: 75px;
  }
  
  /* Add bottom margin to carousel on mobile to clear bottom nav */
  #bottomPromoCarousel {
    margin-bottom: 80px !important;
  }
}

/* ===== CARDS & PRODUCTS ===== */
.card,
.product-card {
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-light);
  margin-bottom: 20px;
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: scale(1.02);
}

.card-header {
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
}

.card-body {
  background-image: linear-gradient(45deg, #e9f0a1, transparent);
  padding: 10px;
}

.card-footer {
  background-color: white;
  border: none;
  padding: 10px;
}

.product-image {
  height: 100%;
  width: 100%;
  object-fit: contain;
  border-top-left-radius: var(--card-radius);
  border-top-right-radius: var(--card-radius);
  transition: transform 0.3s ease;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.product-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.clean-image img {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: cover;
  border-radius: var(--card-radius);
  filter: contrast(1.1) brightness(1.05) saturate(1.2) blur(0.3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== BUTTONS & INTERACTIVE ELEMENTS ===== */
.btn {
  background-color: var(--success-color);
  color: white;
  padding: 10px 17px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  min-height: 44px; /* Minimum touch target size */
}

.btn:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
  --bs-btn-hover-bg: #198754;
}

.btn-link {
  --bs-btn-hover-color: white;
}

.add-to-cart {
  min-height: 44px; /* Minimum touch target size */
  padding: 10px 16px;
}

/* Quantity controls */
.quantity-controls .quantity-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.quantity-input {
  flex-shrink: 0;
  width: 60px;
  -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.add-to-cart-btn {
  width: 148px;
  flex-shrink: 0;
}

.card-footer .form-control {
  padding: 0.25rem 0.5rem;
}

.form-control {
  font-size: 16px; /* Prevents zoom on iOS */
}

/* ===== CATEGORIES ===== */
.categories-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0 0px;
  margin: 0 0px;
}

.categories-scroller {
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 10px 5px;
}

.categories-scroller::-webkit-scrollbar {
  display: none;
}

.categories-wrapper {
  display: inline-flex;
  gap: 10px;
  padding: 8px 0;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 64px;
  width: 72px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--text-dark);
  border-radius: 8px;
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.category-item:hover,
.category-item.active,
.category-item:focus {
  background: #0d6efd;
  color: white;
  border-color: #0d6efd;
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.category-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.category-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
 }

.category-icon i {
  font-size: 20px;
}

.category-name {
  font-size: 11px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.2s ease;
  opacity: 0;
}

.scroll-btn:hover {
  transform: translateY(-50%) scale(1.05);
  background: #f8f9fa;
}

.scroll-left {
  left: 0px;
}

.scroll-right {
  right: 0px;
}

/* ===== FEATURE CARDS ===== */
.alo-features {
  display: none;
}

.feature-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #eee;
  text-align: center;
  padding: 1.5rem;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.feature-icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.feature-icon img {
  max-width: 80%;
  max-height: 80%;
}

.feature-title {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-desc {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ===== CAROUSELS ===== */
.carousel-item img {
  height: 400px;
  object-fit: cover;
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.35);
  padding: 20px;
  border-radius: 8px;
}

#bottomPromoCarousel img {
  height: 280px;
  object-fit: cover;
}

#bottomPromoCarousel .carousel-caption {
  padding: 15px;
}

/* ===== ORDER TRACKER ===== */
.order-tracker {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  text-align: center;
}
.step {
  flex: 0 0 60px; /* Each step has a fixed width */
  position: relative;
  color: #adb5bd;
}
.step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e9ecef;
  border: 2px solid #adb5bd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}
.step-label {
  font-size: 0.75rem;
  font-weight: 500;
}
.step-line {
  flex-grow: 1;
  height: 3px;
  background-color: #aeb5bd;
  margin: 1.25rem 0.5rem 0;
}

/* Active and Completed States for Tracker */
.step.completed .step-icon,
.step.active .step-icon {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: #fff;
}
.step.completed .step-label,
.step.active .step-label {
  color: var(--success-color);
}
.step.completed + .step-line {
  background-color: var(--success-color);
}

/* ===== ORDER DETAILS CARDS ===== */
.order-details-card {
  background-color: #fff;
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}
.card-title-section {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

/* Row for displaying info (label + value) */
.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--info-row-gap);
  margin-bottom: var(--info-row-margin-bottom);
  align-items: flex-start;
}
.info-row:last-child {
  margin-bottom: 0;
}
.info-label {
  color: #6c757d;
  font-weight: 500;
}
.info-value {
  font-weight: 600;
  text-align: left;
}
.total-row .info-label,
.total-row .info-value {
  font-size: 1.1rem;
  color: #343a40;
}
.total-row .info-label {
  list-style: none;
  padding: 0;
  margin: 0;
}

.item-entry {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.item-entry:last-child {
  margin-bottom: 0;
}
.item-entry img {
  width: 60px;
  height: 60px;
  border-radius: 0.75rem;
  object-fit: cover;
}
.item-info {
  flex-grow: 1;
}
.item-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.item-price {
  color: #6c757d;
  margin-bottom: 0;
}

/* ===== PROMOTIONS & BADGES ===== */
.promotion-badge {
  position: absolute;
  top: 10px;
  left: 0;
  background-color: var(--danger-color);
  color: white;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 0 4px 4px 0;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.price-strike {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 0.9em;
}

.text-bg-success {
  background-color: #5473ec !important;
}

/* ===== LOADER ===== */
#page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* ✅ fully transparent */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.loader-logo img {
  height: 120px;
  width: auto;
  border-radius: 90px;
  animation: logo-bounce 2s infinite ease-in-out; /* 🔥 add effect */
}

@keyframes logo-bounce {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2); /* zoom */
    opacity: 0.7; /* fade a bit */
  }
}

.loader-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  animation: bounce 1.2s infinite ease-in-out;
}

.circle.one {
  animation-delay: 0s;
}
.circle.two {
  animation-delay: 0.2s;
}
.circle.three {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.3;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.loader-text {
  font-family: "Arial Black", sans-serif;
  font-size: 2rem;
  color: white;
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.loader-logo img {
  height: 120px;
  width: auto;
  border-radius: 90px;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid rgba(25, 135, 84, 0.1);
  border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.footer a {
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--bs-success) !important;
}

.payment-methods img {
  transition: transform 0.3s ease;
}

.payment-methods img:hover {
  transform: translateY(-3px);
}

/* ===== UTILITY CLASSES ===== */
.text-truncate {
  white-space: normal;
}

.horizontal-divider {
  border-top: 1px dashed #999;
  margin: 20px 0;
  opacity: 0.5;
}

.himg img {
  height: 86px;
  width: auto;
  background-color: currentcolor;
  border-radius: 90px;
}

.btn .badge {
  font-size: 23px;
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .timeline {
  padding-left: 0;
  padding-right: 50px;
}

[dir="rtl"] .timeline-badge {
  left: auto;
  right: -25px;
}

/* ===== RESPONSIVE STYLES ===== */
@media (min-width: 576px) {
  .quantity-input {
    width: 80px;
  }
}

@media (min-width: 768px) {
  .alo-features {
    display: block !important;
  }

  .category-item {
    width: 120px;
    min-width: 100px;
    padding: 10px 6px;
  }

  .category-icon {
    width: 80px;
    height: 80px;
  }

  .category-name {
    font-size: 13px;
    max-width: 90px;
  }

  .product-image {
    height: 100%;
    width: 100%;
    object-fit: contain;
  }
}

@media (max-width: 768px) {
  .hide-features {
    display: none !important;
  }
}

@media (max-width: 1050px) {
  .sidebar {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }

  .sidebar {
    order: 2;
    width: 100%;
    min-height: auto;
    position: relative;
  }

  .content-area {
    order: 1;
    width: 100%;
  }

  .carousel-item img {
    height: 300px;
  }

  .carousel-caption {
    position: relative;
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
  }



  .timeline {
    padding-left: 30px;
  }

  .timeline-badge {
    left: -15px;
  }

  [dir="rtl"] .timeline {
    padding-right: 30px;
  }

  [dir="rtl"] .timeline-badge {
    right: -15px;
  }

  .feature-card {
    padding: 1.5rem !important;
    max-width: 320px;
    margin: 0 auto;
  }

  .feature-icon {
    width: 80px;
    height: 80px;
  }

  .feature-title {
    font-size: 1rem;
  }

  .feature-desc {
    font-size: 0.85rem;
  }

  .categories-container {
    margin: 0 0px;
  }

  .scroll-btn {
    width: 32px;
    height: 32px;
    opacity: 0.95;
  }

  .scroll-left {
    left: -15px;
  }

  .scroll-right {
    right: -15px;
  }

  .row-cols-2 {
    row-cols: 2 !important;
  }
}

@media (max-width: 576px) {
  .categories-container {
    margin: 0 0px;
  }

  .scroll-btn {
    width: 28px;
    height: 28px;
  }

  .scroll-left {
    left: -12px;
  }

  .scroll-right {
    right: -12px;
  }

  .categories-scroller {
    padding: 8px 3px;
  }

  .card {
    margin-bottom: 15px;
  }

  .product-image {
    height: 100%;
    width: 100%;
    object-fit: contain;
  }

  .col-md-4 {
    margin-bottom: 1rem;
  }

  .d-flex.flex-column {
    flex-direction: column !important;
  }

  .d-flex.gap-2 {
    gap: 8px !important;
  }

  .position-fixed.top-0.end-0.p-3 {
    top: 10px !important;
    right: 10px !important;
    left: 10px !important;
    padding: 0 !important;
  }

  #toast {
    max-width: 100%;
  }

  /* Ensure bottom nav sticks properly on mobile */
  .bottom-nav {
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    margin: 0 !important;
  }

  /* Quantity controls responsive */
  .quantity-controls .quantity-btn {
    width: 32px;
    height: 32px;
  }

  .quantity-input {
    width: 50px;
  }

  .quantity-controls {
    gap: 6px !important;
  }

  .add-to-cart-btn {
    width: 100%;
  }
}

/* ===== recheck dups ===== */
/* ===== LAYOUT STYLES ===== */
.main-container {
  display: flex;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.content-area {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 320px;
  flex-shrink: 0;
}

/* ===== ACCESSIBILITY & PERFORMANCE ===== */
/* Loading optimization */
img[loading="lazy"] {
  /* opacity: 0; */
  background: #eff4bd;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast support */
@media (prefers-contrast: high) {
  .product-card {
    border: 2px solid #000;
  }
}

/* ===== PROMOTION STYLES ===== */
.ad-box {
  background: linear-gradient(135deg, #4ca06e 0%, #60d86c 100%);
  color: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ad-box.mini {
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #4ca06e 0%, #60d86c 100%);
}

/* Promotion card animations */
.promotion-card {
  position: relative;
  overflow: hidden;
}

/* Flashing badge styles */
.promotion-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  color: #8b4513;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
  animation: flash 2s infinite;
  transform-origin: center;
  position: relative;
  z-index: 10;
}

/* Pulsing animation */
@keyframes flash {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.8);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
  }
}

/* Subtle background pulse for the entire card */
.promotion-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #4ca06e 0%, #305170 100%);
  z-index: 1;
  animation: bgPulse 8s infinite;
}

@keyframes bgPulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.95;
  }
}

/* Ensure content stays above the animated background */
.card-body {
  position: relative;
  z-index: 2;
}

/* Animated button */
.btn-warning {
  animation: buttonPulse 3s infinite;
  transition: all 0.3s ease;
}

@keyframes buttonPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  50% {
    transform: scale(1.03);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  }
}

/* Hover effects */
.btn-warning:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Subtle animation for the product image */
.promotion-image {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* ===== FEATURES SECTION STYLES ===== */
.alo-features {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.feature-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1) !important;
  background: rgba(255, 255, 255, 0.9);
}

.feature-icon .icon-wrapper {
  transition: all 0.3s ease;
  width: 90px;
  height: 90px;
}

.feature-card:hover .feature-icon .icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.icon-badge {
  width: 30px;
  height: 30px;
  font-size: 0.8rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.background-shape {
  background: linear-gradient(135deg, var(--bs-primary) 0%, transparent 70%);
  opacity: 0.03;
  z-index: -1;
}

.feature-card:nth-child(2) .background-shape {
  background: linear-gradient(135deg, var(--bs-success) 0%, transparent 70%);
}

.feature-card:nth-child(3) .background-shape {
  background: linear-gradient(135deg, var(--bs-info) 0%, transparent 70%);
}

.transition-all {
  transition: all 0.3s ease;
}

.stat-item {
  padding: 1rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-5px);
}

/* Animation for stats */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-item {
  animation: countUp 0.8s ease forwards;
}

.stat-item:nth-child(2) {
  animation-delay: 0.2s;
}

.stat-item:nth-child(3) {
  animation-delay: 0.4s;
}

/* ===== STORE CARDS ===== */
.stores-scroller {
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 0.5rem 0;
}

.stores-scroller::-webkit-scrollbar {
    height: 6px;
}

.stores-scroller::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.stores-scroller::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.stores-wrapper {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    flex-wrap: nowrap;
}

.store-card {
    min-width: 280px; /* larger cards */
    max-width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.28s ease;
    border: 1px solid #e9ecef;
    position: relative;
    display: flex;
    flex-direction: column;
}

.store-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
}

.store-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem;
    color: inherit;
}

/* Footer added to store cards for direct 'View store' button */
.store-card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
    background: #fff;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.store-card .view-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    padding: 0.35rem 0.9rem;
}

.store-card .view-store-btn .bx {
    font-size: 1.1rem;
}

/* Skeleton styles for stores loading */
.store-skeleton {
    min-width: 280px;
    max-width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.store-skeleton .store-image-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.2s linear infinite;
    margin: 0 auto 0.9rem;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.2s linear infinite;
    border-radius: 6px;
}

.skeleton-line.title { width: 70%; height: 18px; margin: 6px 0; }
.skeleton-line.small { width: 50%; height: 12px; margin: 4px 0; }
.skeleton-line.detail { width: 90%; height: 10px; margin: 4px 0; }

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.store-image-container {
    width: 120px; /* bigger logo */
    height: 120px;
    margin: 0 auto 0.9rem;
    border-radius: 50%;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #e9ecef;
}

.store-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.store-card:hover .store-logo { transform: scale(1.03); }

.store-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dee2e6;
    color: #6c757d;
    font-size: 2rem;
}

.delivery-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #28a745;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.delivery-fee {
    white-space: nowrap;
}

.promotion-badge-footer {
    margin-top: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center; /* center icon + text horizontally */
    text-align: center; /* ensure text inside is centered */
    gap: 6px;
    animation: pulsePromo 2s ease-in-out infinite;
}

.promotion-badge-footer i {
    font-size: 0.9rem;
}

@keyframes pulsePromo {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 2px 10px rgba(255, 107, 107, 0.6);
    }
}

.not-delivering-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.not-delivering-overlay i {
    font-size: 1.2rem;
}

.store-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.store-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #333;
    line-height: 1.2;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-category {
    font-size: 0.75rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    min-height: 1.8em;
}

.delivery-info {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f1f1;
}

.delivery-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.delivery-text {
    font-size: 0.75rem;
    color: #28a745;
    font-weight: 500;
}

.min-order {
    font-size: 0.65rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .store-card {
        min-width: 220px;
        max-width: 220px;
    }
    
    .store-image-container {
        width: 100px;
        height: 100px;
    }
    
    .store-name {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .store-card {
        min-width: 180px;
        max-width: 180px;
    }

    .store-image-container {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 480px) {
    .store-card {
        min-width: 140px;
        max-width: 140px;
    }
    
    .store-image-container {
        width: 60px;
        height: 60px;
    }
}

.delivery-unavailable {
    font-size: 0.7rem;
}

/* Empty state styling for stores */
.stores-wrapper .text-center {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Unavailable stores styling */
.store-unavailable .store-link {
    opacity: 0.7;
}

/* Selected store styling */
.selected-store {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25) !important;
    background: rgba(13, 110, 253, 0.05) !important;
}

/* Responsive adjustments for store cards */
@media (max-width: 768px) {
    /* Increase card and logo sizes for tablet and large mobile screens */
    .store-card {
        min-width: 220px;
        max-width: 220px;
    }

    .store-image-container {
        width: 100px;
        height: 100px;
    }

    .store-name {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    /* Make mobile slightly larger than before for better tap targets */
    .store-card {
        min-width: 180px;
        max-width: 180px;
    }

    .store-image-container {
        width: 90px;
        height: 90px;
    }

    .store-name {
        font-size: 1rem;
    }

    .stores-wrapper {
        gap: 1rem;
    }
}

/* ===== STORE AREA TOGGLE BUTTON ===== */
#toggle-area-stores {
    transition: all 0.3s ease;
    border-radius: 25px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid #0d6efd;
    background: transparent;
    color: #0d6efd;
}

#toggle-area-stores:hover {
    background: #0d6efd;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

#toggle-area-stores.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.4);
}

#toggle-area-stores .toggle-icon {
    transition: transform 0.3s ease;
}

#toggle-area-stores.active .toggle-icon {
    transform: rotate(180deg);
}

/* Responsive adjustments for toggle button */
@media (max-width: 768px) {
    #toggle-area-stores {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }

    #toggle-area-stores .toggle-text {
        display: inline;
    }
}

/* ===== STICKY HEADER STYLES ===== */
.sticky-top {
  transition: all 0.3s ease;
  padding: 15px 0;
  margin-bottom: 1rem !important;
  margin-top: 1rem !important;
}

.sticky-top.sticky-active {
  background: linear-gradient(135deg, #6dfc6b, #305170) !important;
  border-radius: 25px;
  padding: 15px 20px;
  margin: 10px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* ===== DESIGN SYSTEM ===== */
:root {
  --primary-gradient: linear-gradient(135deg, #4ca06e 0%, #305170 100%);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.promotion-grid {
  display: grid;
  gap: 1rem;
}

.promotion-mini-card {
  padding: 1rem;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.promotion-mini-card:hover {
  transform: translateX(5px);
}

/* ===== PRODUCT CARD STYLES ===== */
.product-card {
  transition: var(--transition);
  border-radius: var(--border-radius);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-image-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== CATEGORIES NAVIGATION STYLES ===== */
.categories-navigation {
  position: relative;
}

.categories-scroller {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories-scroller::-webkit-scrollbar {
  display: none;
}

.categories-wrapper {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition);
  min-width: 100px;
}

.category-item.active,
.category-item:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-2px);
}

.category-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  background: #f8f9fa;
  transition: var(--transition);
}

.category-item.active .category-icon,
.category-item:hover .category-icon {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== PRODUCT INTERACTION STYLES ===== */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.image-overlay {
  background: rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .image-overlay {
  opacity: 1;
}

.product-card:hover .quick-view-btn {
  opacity: 1 !important;
}

/* Skeleton styles */
.skeleton-shimmer, .skeleton-image, .skeleton-circle, .skeleton-line {
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 37%, rgba(255,255,255,0.06) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s linear infinite;
}

.skeleton-image { height: 180px; }
.skeleton-circle { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; }
.skeleton-line { height: 10px; border-radius: 6px; }
.skeleton-line.small { height: 8px; width: 60%; }
.skeleton-line.title { height: 14px; width: 80%; }
.skeleton-line.detail { height: 10px; width: 40%; }

@keyframes shimmer {
  0% { background-position: -400% 0; }
  100% { background-position: 400% 0; }
}

.wishlist-btn {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

.wishlist-btn:hover {
  background: #fff;
  transform: scale(1.1);
}

.add-to-cart {
  transition: all 0.3s ease;
}

.add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

.product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    gap: 1rem;
  }

  .sidebar {
    width: 100%;
    order: -1;
  }

  .products-grid .col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .feature-card {
    margin-bottom: 1.5rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .sticky-top.sticky-active {
    border-radius: 20px;
    padding: 12px 15px;
    margin: 5px 0;
  }

  .sticky-top.sticky-active h2 {
    font-size: 1.3rem;
    margin-bottom: 10px !important;
  }

  .sticky-top.sticky-active .col-md-6:last-child {
    margin-top: 5px;
  }
}

@media (max-width: 576px) {
  .products-grid .col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Ensure proper alignment */
.sticky-top.sticky-active .row {
  align-items: center;
  height: 100%;
}

.sticky-top.sticky-active h2 {
  color: white !important;
  margin: 0;
  text-align: center;
}

.sticky-top.sticky-active .form-control,
.sticky-top.sticky-active .btn {
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Enhanced Pagination Styles */
.pagination {
  gap: 0.25rem;
}

.page-link {
  border-radius: 8px !important;
  border: 1px solid #dee2e6;
  padding: 0.5rem 0.75rem;
  min-width: 44px;
  text-align: center;
  transition: all 0.3s ease;
}

.page-link:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  transform: translateY(-1px);
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #4ca06e 0%, #305170 100%);
  border-color: #4ca06e;
  box-shadow: 0 2px 8px rgba(76, 160, 110, 0.3);
}

.page-item.disabled .page-link {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Ellipsis styling */
.page-item.disabled .page-link {
  background: transparent;
  border-color: transparent;
  color: #6c757d;
}

/* Form select styling for page jump */
.form-select-sm {
  border-radius: 6px;
  border: 1px solid #ced4da;
  padding: 0.25rem 1.5rem 0.25rem 0.5rem;
}

/* Responsive pagination */
@media (max-width: 768px) {
  .pagination {
    gap: 0.125rem;
  }

  .page-link {
    padding: 0.375rem 0.5rem;
    min-width: 38px;
    font-size: 0.875rem;
  }

  .page-link i {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-item:not(.active) .page-link span:not([class]) {
        display: none;
    }

    .page-item:not(.active) .page-link i {
        margin: 0;
    }
}

/* ===== INDEX PAGE SPECIFIC STYLES ===== */
.homepage-hero {
    background: linear-gradient(135deg, #4ca06e 0%, #305170 100%);
    color: #fff;
    padding: 12px 0rem;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.navbar {
    margin-bottom: 0 !important;
    /* remove space after navbar */
}

.homepage-hero {
    margin-top: 0 !important;
    /* remove any default margin */
    padding-top: 0.5rem;
    /* adjust padding so it looks balanced */
}

/* Make homepage-hero full width on mobile */
@media (max-width: 767.98px) {
    .homepage-hero {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: -15px;
        margin-right: -15px;
         
    }
}

.location-display {
    flex-grow: 1;
    overflow: hidden;
}

.sticky-top {
    z-index: 500;
}

.modal-header .modal-title {
    margin: 0;
    font-size: 1.1rem;
}

/* Promotion badge animation */
.promotion-pulse {
    animation: promotionPulse 2s ease-in-out infinite;
}

@keyframes promotionPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--bs-danger-rgb, 220, 53, 69), 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(var(--bs-danger-rgb, 220, 53, 69), 0);
    }
}

/* No categories message styling */
.no-categories-message {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    margin: 10px 0;
}

.no-categories-message .display-4 {
    opacity: 0.6;
}

.no-categories-message h4 {
    color: #6c757d;
}

/* Fix for select dropdown arrow covering text */
#sortSelect {
    padding-right: 2.5rem !important;
    min-width: 140px;
}

/* Ensure dropdown menus are visible */
.dropdown-menu {
    z-index: 1050 !important;
    position: absolute !important;
}

.navbar .dropdown-menu {
    margin-top: 0.5rem;
}

/* ===== CATEGORY LINKS ===== */
.category-link {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 8px 12px;
    margin: -8px -12px;
}

.category-link:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: #0056b3 !important;
    text-decoration: none;
    transform: translateX(2px);
}

.category-link i {
    transition: transform 0.3s ease;
}

.category-link:hover i {
    transform: translateX(2px);
}

/* ===== RTL support ===== */
/* Add `rtl` class to <body> or rely on html[dir="rtl"] */
.rtl, html[dir="rtl"] {
  direction: rtl;
}

/* Scrollers should render in RTL naturally */
.rtl .categories-scroller,
.rtl .stores-scroller,
html[dir="rtl"] .categories-scroller,
html[dir="rtl"] .stores-scroller {
  direction: rtl;
}

/* Flip scroll controls for RTL */
.rtl .scroll-btn.scroll-left {
  right: 8px;
  left: auto;
}
.rtl .scroll-btn.scroll-right {
  left: 8px;
  right: auto;
}

/* Rotate chevrons for RTL visuals */
.rtl .scroll-btn i,
html[dir="rtl"] .scroll-btn i {
  transform: rotate(180deg);
}

/* Small text alignment adjustments */
.rtl .text-md-end { text-align: start !important; }
.rtl .text-md-start { text-align: end !important; }
