/* أساسيات */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Times New Roman', Times, serif, sans-serif;
  background-image: url("images/background2.jpg");
  background-size: cover;
  background-attachment: fixed;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 20px;
  background-color: #021023;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  z-index: 1000;
}
.logo img {
  height: 50px;
  width: auto;
}
/* Navigation */
nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

nav a {
  color: #736f7e;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
}

nav a:hover {
  color: #e4da2b;
}
.mode-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: linear-gradient(45deg, #021023, #0c1b61); /* خلفية غامقة */
  border: none;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* Menu Toggle Button */
.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}
/* العنوان الرئيسي */
.main-title {
  text-align: center;
  font-size: 40px;
  color: white;
  margin-top: 120px;
}

/* الهيكل العام */
.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 30px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  align-items: start;
}

/* كارت المنتج */
.product {
  width: 100%;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 15px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.3s ease;
}
.product:hover {
  transform: translateY(-5px);
}
.product img {
  width: auto;
  max-width: 100%;
  height: 150px;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}
.product h2 {
  font-size: 18px;
  margin: 10px;
}
.product p {
  font-weight: bold;
}
.product button {
  margin-top: 10px;
  padding: 8px 15px;
  background-color: rgb(255, 255, 90);
  color: black;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.product button:hover {
  background-color: rgb(255, 255, 138);
}

.quantity-control {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.quantity-control button {
  padding: 5px 10px;
  background-color: #736f7e;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.quantity-control button:hover {
  background-color: #b8b8b8;
}
.quantity-control .quantity {
  text-align: center;
  font-weight: bold;
  width: 30px;
}

.message {
  display: none;
  margin-top: 10px;
  padding: 10px;
  background-color: rgb(255, 255, 90);
  color: white;
  text-align: center;
  font-size: 14px;
  transition: opacity 0.5s ease;
}
.message.show {
  display: block;
  opacity: 1;
}

.cart-icon {
  position: fixed;
  bottom: 30px;
  right: 30px;
  font-size: 36px;
  text-decoration: none;
  color: #fff;
  z-index: 1000;
}
/* الفوتر */
footer {
  position: sticky;
  left: 0;
  top: 100%;
  width: 100%;
  background-color: #021023;
  font-family: sans-serif;
  z-index: 100;
}
.footer_top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  padding: 6px 0;
}
footer a {
  color: #736f7e;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
}
footer a:hover {
  color: #e4da2b;
}
footer p {
  color: #736f7e;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 10px;
}
body[data-theme="light"] nav.active {
  background-color: #f1f1f1; 
}

body[data-theme="light"] .mode-btn {
  background: linear-gradient(45deg, #ddd, #fff); 
  color: #000; /* كتابة غامقة */
  border: 1px solid #999;
}

body[data-theme="light"] {
  background-image: url("images/background light.png");
  color: #000;
}
body[data-theme="light"] header {
  background-color: #f1f1f1;
}
body[data-theme="light"] h1 {
  color: black;
}
body[data-theme="light"] footer {
  background-color: #f1f1f1;
}


@media (max-width: 768px) {
    nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #021023;
    margin-top: 10px;
    padding: 10px 0;
  }

  nav.active {
    display: flex;
  }

  nav a {
    padding: 10px 20px;
    border-top: 1px solid #444;
  }

  header {
    align-items: flex-start;
  }

 
   .mode-btn {
    width: 100%;
    text-align: center;
  }
    .menu-toggle {
    display: block;
  }

}

