/* ========== المتغيرات ========== */
:root {
  --primary: #1a1a1a;
  --secondary: #c9a96e;
  --light: #f5f5f5;
  --white: #ffffff;
  --gray: #666666;
  --light-gray: #e5e5e5;
  --transition: all 0.3s ease;
}

/* ========== إعادة الضبط ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Tajawal", sans-serif;
  background: var(--white);
  color: var(--primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ========== شريط التنبيه ========== */
.top-bar {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 8px;
  font-size: 13px;
}

/* ========== الهيدر ========== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.header.scrolled {
  padding: 10px 5%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.logo h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 35px;
}

.nav-links a {
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding: 5px 0;
  transition: var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--secondary);
}

.header-icons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.icon-btn {
  font-size: 18px;
  color: var(--primary);
  position: relative;
  transition: var(--transition);
}

.icon-btn:hover {
  color: var(--secondary);
  transform: scale(1.1);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--secondary);
  color: var(--white);
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#menuBtn {
  display: none;
}

/* ========== مودال البحث ========== */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.search-modal.active {
  opacity: 1;
  visibility: visible;
}

.search-box {
  width: 80%;
  max-width: 600px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 20px 30px;
  font-size: 20px;
  border: none;
  border-bottom: 2px solid var(--secondary);
  background: transparent;
  color: var(--white);
  font-family: inherit;
  outline: none;
}

.search-box input::placeholder {
  color: var(--gray);
}

.search-box button {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  font-size: 24px;
}

/* ========== سلة التسوق ========== */
.cart-sidebar {
  position: fixed;
  top: 0;
  left: -400px;
  width: 400px;
  max-width: 90%;
  height: 100%;
  background: var(--white);
  z-index: 2000;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  left: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--light-gray);
}

.cart-header h3 {
  font-size: 20px;
}

.cart-header button {
  font-size: 20px;
  color: var(--gray);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.empty-cart {
  text-align: center;
  color: var(--gray);
  margin-top: 50px;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--light-gray);
}

.cart-item img {
  width: 80px;
  height: 100px;
  object-fit: cover;
  border-radius: 5px;
}

.cart-item-info h4 {
  font-size: 14px;
  margin-bottom: 5px;
}

.cart-item-info p {
  color: var(--secondary);
  font-weight: 700;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.qty-btn {
  width: 25px;
  height: 25px;
  border: 1px solid var(--light-gray);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-item {
  color: #e74c3c;
  font-size: 14px;
  margin-right: auto;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--light-gray);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}

.checkout-btn {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  border-radius: 5px;
  transition: var(--transition);
}

.checkout-btn:hover {
  background: var(--secondary);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========== القسم الرئيسي ========== */
.hero {
  position: relative;
  min-height: 100vh; /* تملى الشاشة كاملة */
  display: flex;
  align-items: center;
  justify-content: flex-start; /* عشان RTL */
  padding: 0 5%;

  /* الخلفية */
  background-image: url("../images/prand.1.jpg");
  background-size: cover; /* تملى المساحة كلها */
  background-position: center; /* تتوسط */
  background-repeat: no-repeat;
}

/* طبقة داكنة فوق الصورة عشان النص يبان */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* غمق خفيف */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2; /* فوق الطبقة الداكنة */
  max-width: 600px;
  color: #fff; /* لون النص أبيض عشان يبان على الصورة */
}

.hero-content p {
  font-size: 18px;
  color: var(--gray);
  margin-bottom: 30px;
}

.hero-btn {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  border-radius: 5px;
  transition: var(--transition);
}

.hero-btn:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(201, 169, 110, 0.3);
}

.hero-image {
  height: 100%;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== المميزات ========== */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 60px 5%;
  background: var(--white);
}

.feature {
  text-align: center;
  padding: 30px;
}

.feature i {
  font-size: 36px;
  color: var(--secondary);
  margin-bottom: 15px;
}

.feature h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature p {
  color: var(--gray);
  font-size: 14px;
}

/* ========== المجموعة ========== */
.collection {
  padding: 80px 5%;
  background: var(--light);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--gray);
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 30px;
  border: 1px solid var(--light-gray);
  background: var(--white);
  border-radius: 25px;
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.product-image {
  position: relative;
  overflow: hidden;
  height: 350px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--secondary);
  color: var(--white);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.product-actions {
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
  transition: var(--transition);
}

.product-card:hover .product-actions {
  bottom: 0;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.action-btn:hover {
  background: var(--secondary);
  transform: scale(1.1);
}

.product-info {
  padding: 20px;
  text-align: center;
}

.product-info h3 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 700;
}

.product-info .price {
  color: var(--secondary);
  font-size: 18px;
  font-weight: 900;
}

.product-info .old-price {
  color: var(--gray);
  text-decoration: line-through;
  font-size: 14px;
  margin-right: 10px;
}

/* ========== قسم جديد ========== */
.new-arrivals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 80px 5%;
  background: var(--primary);
  color: var(--white);
  gap: 50px;
}

.new-content {
  padding: 40px;
}

.new-badge {
  display: inline-block;
  background: var(--secondary);
  padding: 5px 20px;
  border-radius: 20px;
  font-size: 14px;
  margin-bottom: 20px;
}

.new-content h2 {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 20px;
}

.new-content p {
  color: var(--gray);
  font-size: 18px;
  margin-bottom: 30px;
}

.new-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.new-images img {
  border-radius: 10px;
  height: 400px;
  object-fit: cover;
}

/* ========== عنّا ========== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 50px;
  padding: 80px 5%;
  background: var(--white);
}

.about-image img {
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.about-content h2 {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--gray);
  margin-bottom: 15px;
  font-size: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 36px;
  font-weight: 900;
  color: var(--secondary);
}

.stat span:last-child {
  color: var(--gray);
  font-size: 14px;
}

/* ========== نشرة بريدية ========== */
.newsletter {
  padding: 80px 5%;
  background: var(--secondary);
  text-align: center;
  color: var(--white);
}

.newsletter h2 {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 10px;
}

.newsletter p {
  margin-bottom: 30px;
  font-size: 18px;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0;
}

.newsletter-form input {
  flex: 1;
  padding: 15px 25px;
  border: none;
  border-radius: 0 5px 5px 0;
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.newsletter-form button {
  padding: 15px 30px;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  border-radius: 5px 0 0 5px;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background: #333;
}

/* ========== الفوتر ========== */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 60px 5% 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 3px;
  margin-bottom: 15px;
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--secondary);
}

.footer-col p {
  color: var(--gray);
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-col a {
  display: block;
  color: var(--gray);
  margin-bottom: 10px;
  font-size: 14px;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--secondary);
  padding-right: 5px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--secondary);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray);
  font-size: 14px;
}

/* ========== زر العودة للأعلى ========== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: var(--secondary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 5px 20px rgba(201, 169, 110, 0.4);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* ========== التوست ========== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary);
  color: var(--white);
  padding: 15px 25px;
  border-radius: 5px;
  z-index: 3000;
  transform: translateX(150%);
  transition: var(--transition);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.toast.show {
  transform: translateX(0);
}

/* ========== ريسبونسيف ========== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image {
    display: none;
  }

  .hero-content h2 {
    font-size: 40px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .new-arrivals,
  .about {
    grid-template-columns: 1fr;
  }

  .new-images {
    order: -1;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 80px 30px;
    z-index: 2000;
    transition: var(--transition);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    right: 0;
  }

  #menuBtn {
    display: block;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input,
  .newsletter-form button {
    border-radius: 5px;
    width: 100%;
  }
}
