/* ==========================================================================
   Aswak.bio - Master Stylesheet
   Theme: Algerian Organic Store (Clean White & Emerald Green)
   ========================================================================== */

:root {
  --primary-color: #2e7d32;
  --primary-dark: #1b5e20;
  --primary-light: #4caf50;
  --primary-subtle: #e8f5e9;
  --primary-surface: #f1f8e9;
  
  --secondary-color: #795548;
  --secondary-dark: #4e342e;
  --secondary-light: #a1887f;
  
  --accent-gold: #f59e0b;
  --accent-red: #ef4444;
  
  --bg-body: #f8faf8;
  --bg-card: #ffffff;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 50px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 28px rgba(46, 125, 50, 0.12);
  --transition: all 0.25s ease-in-out;
}

body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-dark);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.top-bar {
  background: linear-gradient(90deg, #1b5e20 0%, #2e7d32 100%);
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-navbar {
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
  background-color: #ffffff !important;
}

.brand-logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

.brand-logo-img:hover {
  transform: scale(1.03);
}

.header-search-form {
  max-width: 380px;
  width: 100%;
}

.header-search-form .form-control {
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0 !important;
  padding-right: 18px;
  font-size: 0.92rem;
  border: 1.5px solid #c8e6c9;
}

.header-search-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.header-search-form .btn {
  border-radius: var(--radius-pill) 0 0 var(--radius-pill) !important;
}

.nav-link {
  color: #334155 !important;
  transition: var(--transition);
  font-size: 0.98rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color) !important;
}

.dropdown-menu {
  border-radius: var(--radius-md) !important;
}

.dropdown-item:hover {
  background-color: var(--primary-subtle);
  color: var(--primary-dark);
}

.header-cart-btn {
  border: 1.5px solid var(--primary-light);
  transition: var(--transition);
}

.header-cart-btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-wrapper {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
  position: relative;
  overflow: hidden;
  color: #ffffff;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
}

.hero-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-wrapper::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.25;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
  }
}

.hero-card-showcase {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  color: var(--text-dark);
}

/* ==========================================================================
   Trust / Features Bar
   ========================================================================== */

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

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

.trust-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Category Cards
   ========================================================================== */

.category-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px 16px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: var(--transition);
}

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

.category-card:hover::after {
  transform: scaleX(1);
}

.category-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin-bottom: 14px;
  transition: var(--transition);
}

.category-card:hover .category-icon-wrapper {
  background: var(--primary-color);
  color: #ffffff;
  transform: scale(1.1);
}

/* ==========================================================================
   Product Cards
   ========================================================================== */

.product-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

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

.product-image-box {
  position: relative;
  background: #fdfdfd;
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  overflow: hidden;
}

.product-image-box img {
  height: 220px;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: transform 0.35s ease;
}

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

.discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-red);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  z-index: 2;
}

.organic-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-subtle);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  z-index: 2;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category-name {
  font-size: 0.8rem;
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 4px;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

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

.product-title a:hover {
  color: var(--primary-color);
}

.price-container {
  margin-top: auto;
  padding-top: 12px;
  margin-bottom: 12px;
}

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

.old-price {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-right: 6px;
}

.btn-add-cart {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  padding: 8px 14px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-add-cart:hover {
  background: var(--primary-dark);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

/* ==========================================================================
   Promotional Banner
   ========================================================================== */

.promo-banner {
  background: linear-gradient(135deg, #33691e 0%, #558b2f 100%);
  border-radius: var(--radius-lg);
  color: #ffffff;
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Customer Testimonials
   ========================================================================== */

.review-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.review-stars {
  color: #f59e0b;
  margin-bottom: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #1b5e20;
  color: #e2e8f0;
  border-top: 5px solid var(--primary-light);
}

.site-footer a {
  color: #cbd5e1;
  text-decoration: none;
  transition: var(--transition);
}

.site-footer a:hover {
  color: #ffffff;
  padding-right: 4px;
}

.footer-bottom {
  background: #144618;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Floating WhatsApp Button
   ========================================================================== */

/* ==========================================================================
   Mobile Bottom Navigation & Sticky Action Bar
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  z-index: 9990;
  padding: 8px 12px;
}

.mobile-bottom-nav .nav-item-mobile {
  flex: 1;
  text-align: center;
  color: #64748b;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  transition: var(--transition);
}

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

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

/* Product Page Sticky Bottom Bar on Mobile */
.mobile-product-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  z-index: 9995;
  padding: 10px 16px;
}

.mobile-product-sticky-bar .btn-sticky-order {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  border: none;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.4);
  animation: pulseButton 2.5s infinite;
}

@keyframes pulseButton {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); box-shadow: 0 6px 18px rgba(46, 125, 50, 0.55); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Responsive & Mobile Breakpoints
   ========================================================================== */

@media (max-width: 991.98px) {
  body {
    padding-bottom: 72px; /* Space for bottom nav */
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .mobile-product-sticky-bar {
    display: flex;
  }

  .whatsapp-float {
    bottom: 80px; /* Shift above bottom nav */
    left: 15px;
    width: 50px;
    height: 50px;
    font-size: 26px;
  }

  .hero-wrapper {
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    padding: 30px 15px !important;
  }

  .hero-title {
    font-size: 1.85rem !important;
  }

  .brand-logo-img {
    height: 48px;
  }

  .header-search-form {
    max-width: 100%;
    margin-top: 10px;
  }

  .category-pills-bar {
    padding-bottom: 8px;
  }

  .category-card {
    padding: 16px 10px;
  }

  .category-icon-wrapper {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .product-image-box img {
    height: 180px;
  }

  .fast-order-box {
    padding: 18px !important;
  }

  .table-responsive {
    font-size: 0.9rem;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 1.6rem !important;
    line-height: 1.35;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .product-card .current-price {
    font-size: 1.05rem;
  }

  .product-card .product-title {
    font-size: 0.95rem;
  }

  .btn-add-cart {
    font-size: 0.85rem;
    padding: 8px 10px;
  }
}

/* ==========================================================================
   Language Switcher & Direction Styles
   ========================================================================== */
.lang-pill-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50px;
  padding: 2px 4px;
  gap: 2px;
}

.lang-pill-link {
  color: #ffffff !important;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.lang-pill-link:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lang-pill-link.active {
  background: #ffffff;
  color: #1b5e20 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Weight Variant Buttons */
.weight-pill-btn {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1.5px solid #c8e6c9 !important;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 50px !important;
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.weight-pill-btn .weight-opt-label {
  color: #1e293b !important;
  font-weight: 700;
}

.weight-pill-btn .weight-opt-price {
  color: #2e7d32 !important;
  font-weight: 600;
}

.weight-pill-btn:hover {
  border-color: #2e7d32 !important;
  background: #f1f8e9 !important;
}

.weight-pill-btn.active {
  background: #2e7d32 !important;
  color: #ffffff !important;
  border-color: #2e7d32 !important;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.35);
}

.weight-pill-btn.active .weight-opt-label {
  color: #ffffff !important;
}

.weight-pill-btn.active .weight-opt-price {
  color: #fff9c4 !important;
  font-weight: 700;
}

/* LTR Layout Tweaks */
.ltr-layout {
  direction: ltr !important;
  text-align: left !important;
}

.ltr-layout .site-footer a:hover {
  padding-right: 0;
  padding-left: 4px;
}

.ltr-layout .breadcrumb-item + .breadcrumb-item::before {
  float: left;
  padding-right: var(--bs-breadcrumb-item-padding-x);
}

