body {
  margin: 0;
  font-family: 'Cairo', serif;
  direction: rtl;
  background: #FCF9F3;
  padding-top: 80px; 
}

html { scroll-behavior: smooth; }

/* --- Desktop Header Styles --- */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  height: 80px;
  background: #4B3B2B;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  clip-path: ellipse(80% 100% at 50% 0%);
}

.top-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  z-index: -1;
  clip-path: ellipse(80% 100% at 50% 0%);
}

.logo { height: 70px; width: auto; }

/* حاوية تجمع الروابط والسلة معاً */
.nav-and-cart {
    display: flex;
    align-items: center;
    gap: 40px; /* المسافة بين الروابط والسلة */
}

.links {
    display: flex;
    gap: 35px; /* المسافة بين الروابط نفسها */
}

.links a {
  text-decoration: none;
  color: #fcf4e9;
  font-weight: 600;
  font-size: 18px;
  padding: 10px 0;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.links a.active { color: #F0C778; border-bottom-color: #F0C778; }
.links a:not(.active):hover { color: #F0C778; transform: translateY(-2px); }

/* --- Desktop Hero and Slideshow --- */
.hero {
  position: relative;
  height: 80vh;
  padding: 50px;
  color: #3d1e02;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  margin-top: -25px;
}

.slideshow-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1); 
  z-index: 0;
}

.slide {
  position: relative;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.slide-logo {
  position: absolute;
  left: 50px;
  top: 50%;
  transform: translateY(-50%);
  width: 350px;
  height: auto;
  z-index: 1;
}

/* --- Desktop Products Grid --- */
.products-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    flex-wrap: unset !important;
    gap: 40px;
    justify-items: center;
    padding: 40px 50px 50px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.product-image-wrapper {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(145deg, #F0C778, #A67C41, #F0C778);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover .product-image-wrapper { transform: scale(1.05); box-shadow: 0 12px 30px rgba(0,0,0,0.2); }
.product-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 3px solid #fff; }
.product-card p { margin: 5px 0; font-weight: bold; font-size: 20px; color: #3d1e02; transition: color 0.3s ease; }
.product-card:hover p { color: #A67C41; }

/* --- General Styles --- */
.section-title-container { text-align: center; padding: 60px 20px 20px 20px; }
.section-title { font-size: 36px; font-weight: 600; color: #A67C41; margin: 0; }
.fade-in-element { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in-element.visible { opacity: 1; transform: translateY(0); }
.site-footer { background: #fcf4e9; color: #3D1E02; padding: 30px 20px; text-align: center; border-top: 1px solid #e0d5c1; }
.site-footer .footer-content { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.site-footer h3 { font-size: 18px; font-weight: bold; margin-bottom: 10px; }
.social-links { display: flex; gap: 20px; justify-content: center; }
.social-links .social-icon { width: 32px; height: 32px; transition: transform 0.2s ease; }
.social-links .social-icon:hover { transform: scale(1.1); }
.footer-rights { font-size: 13px; color: #3D1E02; line-height: 1.6; }
.footer-rights .icon { width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; }
.footer-rights a { color: #3D1E02; text-decoration: none; font-weight: 600; }
.footer-rights a:hover { text-decoration: underline; }

/* --- تنسيق أيقونة السلة في الهيدر --- */
.cart-container a {
    position: relative;
    display: flex;
    align-items: center;
    color: #fcf4e9;
    text-decoration: none;
    font-size: 24px;
    transition: color 0.3s ease;
}

.cart-container a:hover {
    color: #F0C778;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #d9534f;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #fff;
}

/* --- Mobile Navigation (Hidden on Desktop) --- */
#bottom-nav {
  display: none;
}

/* ===================================================== */
/* ========== RESPONSIVE DESIGN (MOBILE & TABLET) ========== */
/* ===================================================== */

@media (max-width: 991px) {
  /* --- Top Header on Mobile --- */
  .top-header {
    clip-path: ellipse(120% 100% at 50% 0%);
    height: 70px;
  }
  .top-header::after {
    clip-path: ellipse(120% 100% at 50% 0%);
  }
  body {
    padding-top: 70px;
  }
  .logo {
    height: 60px;
  }

  /* إخفاء بعض الروابط من فوق على الموبايل */
  .links a.all-products-link,
  .links a.contact-link {
    display: none;
  }

  /* --- Bottom Nav on Mobile --- */
  #bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: #4B3B2B;
    z-index: 1001;
    clip-path: ellipse(120% 100% at 50% 100%);
  }
  #bottom-nav::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.2);
    z-index: -1;
    clip-path: ellipse(120% 100% at 50% 100%);
  }
  .bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fcf4e9;
    font-size: 14px;
    font-weight: 600;
    gap: 4px;
    transition: color 0.2s ease;
    padding-top: 5px;
  }
  .bottom-nav-link:hover,
  .bottom-nav-link.active {
    color: #F0C778;
  }
  .bottom-nav-link img {
    height: 24px;
    width: 24px;
  }
  
  body {
    padding-bottom: 70px;
  }

  /* --- Other Mobile Adjustments --- */
  .hero {
    margin-top: -15px;
  }
  .slide-logo {
    width: 180px;
    right: 25px;
    left: auto;
    top: 55%;
    transform: translateY(-50%);
  }
  .products-container {
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 40px 20px;
    gap: 20px;
  }
  .product-image-wrapper {
    width: 150px;
    height: 150px;
  }
  .product-card p {
    font-size: 16px;
  }
  .section-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .hero { padding: 30px 15px; }
  .slide-logo {
    width: 150px;
    right: 15px;
  }
  .product-image-wrapper {
    width: 130px;
    height: 130px;
  }
  .product-card p {
    font-size: 14px;
  }
}

/* ======= Mobile Filter Button ======= */
#mobile-filter-btn {
  display: none;
  background: #4B3B2B;
  color: #fcf4e9;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  margin: 10px 0;
  cursor: pointer;
}
#mobile-filter-btn:hover {
  background: #F0C778;
  color: #4B3B2B;
}
#mobile-filter-panel {
  display: block;
}

/* Responsive Mobile */
@media (max-width: 991px) {
  #mobile-filter-btn {
    display: block;
  }
  #mobile-filter-panel {
    display: none; /* مخفي افتراضياً */
  }
}

/* باقي CSS الخاص بالمنتجات، الهيدر، footer كما كان سابقاً */

/* زر فلترة الهواتف */
#mobile-filter-btn {
    display: none;
    background: #4B3B2B;
    color: #fcf4e9;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    margin: 10px 0;
    cursor: pointer;
}
#mobile-filter-btn:hover {
    background: #F0C778;
    color: #4B3B2B;
}

/* مخفي افتراضياً */
#mobile-filter-panel {
    display: block;
}

/* Responsive */
@media (max-width: 991px) {
    #mobile-filter-btn {
        display: block;
    }
    #mobile-filter-panel {
        display: none; /* مخفي افتراضياً */
    }
}

/* الحاوية العامة */
.cart-container {
  display: flex;
  gap: 20px;
}

/* قسم المنتجات */
.cart-items {
  flex: 2;
}

/* ملخص الطلب */
.order-summary {
  flex: 1;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

/* الأزرار */
.order-summary .btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
}

/* موبايل */
@media (max-width: 768px) {
  .cart-container {
    flex-direction: column;
  }

  .cart-items {
    order: 1; /* المنتجات أولاً */
    margin-bottom: 20px;
  }

  .order-summary {
    order: 2; /* ملخص الطلب ثانياً (يجي تحت) */
    padding: 15px;
  }
}
