/* ------------------------------
   RESET + GLOBAL STYLE
------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}
.mobile-logo {
  display: none; /* اخفاء على الكمبيوتر */
}

.mobile-logo img {
  height: 45px;
  border-radius: 8px;
}

.mobile-logo-text {
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

body {
  padding-top: var(--nav-height);
  background: linear-gradient(135deg, #1c4966 0%, #1c4966 100%);
  color: #333;
  line-height: 1.6;
}

:root {
  --nav-height: 70px;
}

/* ------------------------------
   NAVIGATION BAR
------------------------------ */
nav {
  background: rgba(0, 0, 0, 0.8);
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ffd700;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1001;
}

@media (max-width: 768px) {
  :root {
    --nav-height: 90px; /* ارتفاع مناسب للموبايل */
  }

  nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(0, 0, 0, 0.8);
    padding: 0 20px;
    display: flex;
    align-items: center; /* لمحاذاة العناصر عمودياً */
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }

  /* أيقونة menu toggle على اليسار */
  .menu-toggle {
    display: block;
    font-size: 1.8rem;
    color: #c5edf3; /* لون المنسدلة */
    cursor: pointer;
  }

  /* اللوغو + H7 Store يظهر فقط على الهاتف */
  .mobile-logo {
    display: flex; /* يظهر على الهاتف */
    align-items: center; /* لمحاذاة الصورة والنص عمودياً */
    gap: 8px; /* المسافة بين الصورة والنص */
  }

  .mobile-logo img {
    height: 45px;
    border-radius: 8px;
  }

  .mobile-logo-text {
    color: #c5edf3;
    font-weight: bold;
    font-size: 1.2rem;
  }

  /* القائمة المنسدلة */
  #nav-links {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 20px;
    gap: 20px;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  #nav-links.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    gap: 15px;
  }
}

/* ------------------------------
   PROMO CAROUSEL
------------------------------ */
.promo {
  margin-top: 20px;
  height: 500px;
  overflow: hidden;
  position: relative;
}

.carousel {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 500px;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  color: white;
  font-weight: 700;
  text-shadow: 2px 2px 4px black;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
}

.dot.active {
  background: white;
}

@media (max-width: 600px) {
  .promo {
    height: 100vw; /* يجعل الارتفاع متناسب مع عرض الشاشة */
  }

  .slide {
    height: 100vw;
    background-size: cover;
    background-position: top center; /* أفضل للموبايل */
  }
}

/* ------------------------------
   MAIN CONTENT + SECTIONS
------------------------------ */
main {
  max-width: 1400px;
  margin: auto;
  padding: 40px 20px;
}

.section {
  margin-bottom: 60px;
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.5rem;
  color: #1c4966;
  position: relative;
}

h2::after {
  content: "";
  width: 100px;
  height: 4px;
  background: #ffd700;
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
}

/* ------------------------------
   PRODUCT GRID
------------------------------ */
.products-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ------------------------------
   PRODUCT CARD
------------------------------ */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* صورة ثابتة الارتفاع */
.product-image-container {
  width: 100%;
  height: 320px;
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; /* يضع مركز الصورة في منتصف الحاوية */
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

.product-card .content {
  padding: 10px;
  text-align: center;
}

.product-card h3 {
  margin: 10px 0;
  font-size: 1.3rem;
  color: black;
}

.product-card p {
  margin-bottom: 15px;
  color: #666;
}

/* ------------------------------
   CART ICON
------------------------------ */
.cart-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.cart-count {
  position: absolute;
  background: #ef4444;
  color: white;
  top: -6px;
  right: -10px;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

/* ------------------------------
   MOBILE CARD IMPROVEMENTS
------------------------------ */
@media (max-width: 576px) {
  .product-image-container {
    height: 180px; /* نفس ارتفاع الصورة */
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .product-card img {
    height: 180px;
    object-fit: cover;
  }

  .product-card h3 {
    font-size: 1rem;
  }
  .product-card p {
    font-size: 0.9rem;
  }
}

/* ------------------------------
   UNIFIED BUTTON STYLE
------------------------------ */
.choose-btn,
.btn-detail,
.product-card a button {
  width: auto;
  min-width: 60px;
  padding: 8px 16px;
  border: 2px solid #1f2937;
  background: transparent;
  color: #1f2937;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  display: inline-block;
  margin-top: 12px;
  text-decoration: none;
  transition: 0.3s ease;
}
.choose-btn {
  background-color: #1c4966; /* لون الخلفية قبل الضغط */
  color: white; /* لون النص قبل الضغط */
  border: 2px solid #1c4966; /* نفس لون الخلفية للحد */
}

/* زر متاح */
.product-card .choose-btn {
  background-color: #1c4966;
  color: white;
  border: 2px solid #1c4966;
  cursor: pointer;
  transition: 0.3s ease;
}

/* زر عند hover */
.product-card .choose-btn:hover {
  background-color: #14415a;
  color: white;
}

/* زر نفذت الكمية */
.product-card .choose-btn.out-of-stock {
  background-color: #888; /* رمادي */
  color: #fff; /* نص أبيض */
  border: 2px solid #888;
  cursor: not-allowed;
}

.choose-btn:hover,
.btn-detail:hover,
.product-card a button:hover {
  background: #1f2937;
  color: white;
}

.btn-detail i {
  display: none !important;
}

/* ------------------------------
   FOOTER
------------------------------ */
footer {
  background: #1c4966;
  color: white;
  padding: 40px 20px;
  text-align: center;
}
