/* Base Variables & Styles */
:root {
  --primary-color: #0b9e38;
  --secondary-color: #f8f9fa;
  --text-color: #333;
  --border-color: #e9ecef;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: #f9f9f9;
  color: var(--text-color);
  direction: rtl;
  text-align: right;
}

/* Header & Navbar */
.navbar-brand img {
  max-height: 50px;
}
.navbar {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}
.navbar-nav .nav-link {
  color: #333;
  font-weight: 600;
  padding: 0.5rem 1rem;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
  color: var(--primary-color);
}
.cart-icon {
  position: relative;
  font-size: 1.2rem;
  color: #333;
}
.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  padding: 0.2rem 0.4rem;
  font-size: 0.7rem;
}

/* Category Pills */
.category-pills {
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 10px;
}
.category-pill {
  display: inline-block;
  text-align: center;
  margin-left: 15px;
  text-decoration: none;
  color: #333;
}
.category-pill img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ddd;
  padding: 2px;
  background: #fff;
}
.category-pill h6 {
  margin-top: 8px;
  font-size: 14px;
}

/* Product Cards */
.product-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.product-image-container {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.product-image-container img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.product-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
  text-decoration: none;
}
.product-price {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
  margin-top: auto;
}
.btn-add-cart {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s;
}
.btn-add-cart:hover {
  background-color: #087d2c;
  color: #fff;
}

/* Cart Page */
.cart-item {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}
.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-left: 15px;
}
.cart-item-info {
  flex-grow: 1;
}
.quantity-control {
  display: flex;
  align-items: center;
}
.quantity-control button {
  width: 30px;
  height: 30px;
  background: #eee;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}
.quantity-control input {
  width: 40px;
  text-align: center;
  border: 1px solid #ddd;
  margin: 0 5px;
  border-radius: 4px;
  height: 30px;
}
.cart-summary {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #eee;
}

/* Checkout Page */
.checkout-section {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-bottom: 20px;
}
.payment-method-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.payment-method-card.selected {
  border-color: var(--primary-color);
  background-color: #f0fdf4;
}
.payment-method-card input {
  margin-left: 10px;
}
.visa-form {
  display: none;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

/* Footer */
footer {
  background-color: #fff;
  padding: 30px 0;
  margin-top: 50px;
  border-top: 1px solid #eee;
}

/* Toast Notification */
.custom-toast {
  position: fixed;
  top: -100px; /* Hidden initially */
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  color: #fff;
  padding: 15px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: center;
  gap: 10px;
}
.custom-toast.show {
  top: 80px; /* Slide down into view just below navbar */
}
