
:root {
  --green: #A7C796;
  --green-dark: #6F8F62;
  --gold: #D4AF37;
  --white: #FFFFFF;
  --text: #2d3a2b;
  --bg: #f7f4eb;
  --shadow: 0 20px 45px rgba(22, 35, 24, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #fcfbf7 0%, var(--bg) 100%);
  color: var(--text);
  overflow-x: hidden;
}
img { max-width: 100%; border-radius: 18px; }

.top-banner {
  background: var(--gold);
  color: var(--white);
  text-align: center;
  padding: 8px 12px;
  font-weight: 600;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1031; /* Above navbar */
}
a { text-decoration: none; }
section { padding: 90px 0; }

.glass {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: var(--shadow);
}

.navbar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(167,199,150,0.3);
}
.navbar-brand {
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--green-dark) !important;
}
.navbar-nav .nav-link { color: var(--text); font-weight: 600; margin: 0 6px; }
.navbar-nav .nav-link:hover { color: var(--green-dark); }
.nav-item .cart-link {
  position: relative;
  display: inline-block;
}
.cart-badge {
  position: absolute; top: -5px; right: -10px; background: var(--gold); color: var(--white);
  border-radius: 50%; width: 20px; height: 20px; font-size: 12px;
  display: flex; align-items: center; justify-content: center; font-weight: bold;
}

/* Mobile floating cart button */
.floating-cart {
  display: none;
  position: fixed;
  z-index: 9999;
  bottom: 18px;
  right: 14px;


  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  box-shadow: var(--shadow);
  align-items: center;
  justify-content: center;
}

.floating-cart i { color: #fff; font-size: 20px; }

.floating-cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--gold);
  color: var(--white);
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

/* Floating cart visible on all screen sizes */
.floating-cart { display: flex; }



.hero {
  min-height: 100vh;
  padding-top: 110px;
  background: radial-gradient(circle at top left, rgba(167,199,150,0.25), transparent 38%), linear-gradient(135deg, rgba(167,199,150,0.12), rgba(212,175,55,0.12));
}
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.7); color: var(--green-dark); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(2rem, 4.8vw, 4.4rem); font-weight: 800; line-height: 1.2; color: var(--green-dark); }
.hero p { font-size: 1.1rem; color: #4e5d48; }
.btn-primary-custom {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white); border: 0; border-radius: 999px; padding: 12px 26px; font-weight: 700; box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
  margin-top: 0;
}

.btn-outline-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
  margin-top: 0;
  border: 2px solid var(--green-dark);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 700;
  background: rgba(255,255,255,0.7);
}

.btn-primary-custom:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(111,143,98,0.18); color: var(--white); }

/* توحيد محاذاة الزرين في هيرو الصفحة */
.hero .d-flex{ align-items: center; }


.hero-card { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.hero-card img { width: 100%; height: 100%; object-fit: cover; min-height: 420px; }

.section-title { font-size: 2rem; font-weight: 800; color: var(--green-dark); margin-bottom: 12px; }
.section-subtitle { color: #647161; max-width: 720px; margin: 0 auto 30px; }

.product-card, .offer-card, .review-card, .gallery-card, .faq-card, .contact-card, .cart-item, .admin-card {
  border-radius: 24px; overflow: hidden; border: 1px solid rgba(167,199,150,0.28); box-shadow: var(--shadow); background: rgba(255,255,255,0.88);
}
.skeleton-card .product-card {
  background: #fff;
}
.skeleton {
  background-color: #e0e0e0;
  border-radius: 4px;
  animation: pulse 1.5s infinite ease-in-out;
}
.skeleton-img { height: 220px; border-radius: 24px 24px 0 0; }
.skeleton-text { height: 1em; margin-bottom: .5rem; }
@keyframes pulse {
  0% { background-color: #e0e0e0; }
  50% { background-color: #f0f0f0; }
  100% { background-color: #e0e0e0; }
}

.product-card:hover, .offer-card:hover, .review-card:hover, .gallery-card:hover { transform: translateY(-6px); transition: .3s ease; }
.product-card img { height: 220px; object-fit: cover; }
.badge-gold { background: var(--gold); color: var(--white); }
.badge-green { background: var(--green-dark); color: var(--white); }
.price-old { text-decoration: line-through; color: #9aa48f; }
.price-current { font-size: 1.25rem; font-weight: 800; color: var(--green-dark); }

.stats-grid .stat-box { text-align: center; padding: 28px; border-radius: 22px; background: linear-gradient(135deg, rgba(167,199,150,0.3), rgba(255,255,255,0.75)); }
.stat-box .count { font-size: 2rem; font-weight: 800; color: var(--green-dark); }

.swiper { width: 100%; height: 100%; }
.swiper-slide img { height: 320px; object-fit: cover; }

.about-hero { min-height: 60vh; background: linear-gradient(135deg, rgba(111,143,98,0.9), rgba(167,199,150,0.75)); color: var(--white); display: flex; align-items: center; }
.page-hero { min-height: 50vh; display: flex; align-items: center; background: linear-gradient(135deg, rgba(111,143,98,0.94), rgba(167,199,150,0.74)); color: var(--white); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 24px; }
.filter-bar button, .filter-bar select { border: 1px solid rgba(111,143,98,0.2); background: rgba(255,255,255,0.8); color: var(--text); padding: 10px 16px; border-radius: 999px; }
.filter-bar button.active { background: var(--green-dark); color: var(--white); }

.pagination .page-link { color: var(--green-dark); border-radius: 999px; margin: 0 4px; }
.pagination .page-item.active .page-link { background: var(--green-dark); border-color: var(--green-dark); }

.cart-summary { position: sticky; top: 100px; }
.quantity-control { display: flex; align-items: center; gap: 10px; }
.quantity-control button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--green); color: var(--white); }

.footer { background: #223124; color: #e8efe2; padding: 60px 0 30px; }
.footer a { color: #d8e6cf; }

.footer-dev { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(216, 230, 207, 0.18); text-align: center; }
.footer-dev .dev-name { display: inline-block; background: rgba(212,175,55,0.15); border: 1px solid rgba(212,175,55,0.35); color: #ffe8a6; padding: 8px 18px; border-radius: 999px; font-weight: 800; letter-spacing: 0.2px; box-shadow: 0 10px 25px rgba(0,0,0,0.12); }
.footer-dev .dev-name a {
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease;
  display: inline-block;
}
.footer-dev .dev-name a:hover { transform: scale(1.2); }

/* لضمان ظهور الاسم باللون الغامق في لوحة الإدارة */
.footer-dev .dev-name .dev-name-text,
.footer-dev .dev-name span.dev-name-text {
  color: #ffe8a6;
  font-weight: 800;
}


.table td, .table th { vertical-align: middle; }
.summary-box { border-radius: 24px; background: linear-gradient(135deg, rgba(111,143,98,0.95), rgba(167,199,150,0.85)); color: var(--white); padding: 22px; }

.admin-shell { min-height: 100vh; padding: 40px 0; background: linear-gradient(135deg, #f6f2e8, #eef5e8); }
.admin-card { padding: 24px; margin-bottom: 24px; }
.admin-nav .nav-link.active { background: var(--green-dark); color: var(--white); }

@media (max-width: 768px) {
  .hero { padding-top: 90px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-card img { min-height: 300px; }
}

/* --- Welcome Popup --- */
@keyframes fadeInZoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOutScaleDown {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(34, 49, 36, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeInZoomIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.welcome-overlay.closing {
  animation: fadeOutScaleDown 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.welcome-card {
  position: relative;
  background: var(--bg);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.welcome-image {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 18px;
  margin-bottom: 1.5rem;
}

.welcome-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-close-btn:hover:not(:disabled) {
  background: var(--green-dark);
  color: var(--white);
  transform: rotate(90deg);
}

.welcome-close-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.welcome-enter-btn {
  width: 100%;
  padding: 14px 28px;
  font-size: 1.1rem;
}

.welcome-enter-btn:disabled {
  background: #ccc;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.welcome-countdown {
  margin-right: 8px;
}

@media (max-width: 576px) {
  .welcome-card {
    padding: 1rem;
  }
  .welcome-image {
    margin-bottom: 1rem;
  }
}
