body {
  font-family: Arial, sans-serif;
  direction: ltr;
  background: #fff;
  margin: 20px;
  box-sizing: border-box;
}

/* حاوية الصفحة */
.page-wrapper {
  display: flex;
  gap: 30px;
  max-width: 1400px;
  margin: auto;
  flex-wrap: nowrap;
}

/* الشريط الجانبي */
.sidebar {
  flex: 0 0 280px;
  border: 1px solid #eee;
  padding: 20px;
  background-color: #fff;
  box-sizing: border-box;
  min-width: 250px;
}

/* المحتوى الرئيسي */
.container {
  flex: 1;
  box-sizing: border-box;
}

/* تحسين عرض الشبكة للمنتجات */
.products-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* استمراراتك على المنتجات */
.product45 {
  position: relative;
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.6s ease;
}

.product45:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.product45 img.main-img,
.product45 img.hover-img {
  width: 100%;
  border-radius: 6px;
  transition: 0.3s ease;
}

.product45 img.hover-img {
  position: absolute;
  top: 10px;
  left: 10px;
  width: calc(100% - 20px);
  opacity: 0;
  z-index: 1;
}

.product45:hover img.hover-img {
  opacity: 1;
}

.product45:hover img.main-img {
  opacity: 0;
}

/* تسميات الألوان */
.color-labels {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.color-label {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  color: black;
  background: #fff;
  font-weight: bold;
  box-shadow: 0 0 3px rgba(0,0,0,0.2);
}

/* معلومات المنتج */
.product45-info {
  text-align: center;
  padding: 10px 4px 0;
}

.product45-name {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin-bottom: 2px;
}

.product45-description {
  font-size: 12px;
  color: #777;
  margin-bottom: 4px;
}

.product45-price {
  font-size: 14px;
  font-weight: bold;
  color: #e94e1b;
}

/* باقي التنسيقات كما هي */
.filter-section {
  margin-bottom: 20px;
}

.filter-section h4 {
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: bold;
}

input[type="range"] {
  width: 100%;
  accent-color: #e94e1b; 
}

button {
  margin-top: 10px;
  padding: 5px 10px;
  background-color: #f08b69;
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #e94e1b;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}
li:hover {
  cursor: pointer;
}
.badge {
  background-color: #eee;
  border-radius: 50%;
  padding: 2px 8px;
  font-size: 12px;
}

.product {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.product:hover{
    cursor: pointer;
}
.product img {
  width: 80px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

.product-info {
  font-size: 13px;
}

.product-info p {
  margin: 0 0 5px;
  font-weight: bold;
}
.product-info p:hover {
  color: #777777;
  transition: .5s;
}

.price {
  color: #e74c3c;
  font-weight: bold;
}

.checkbox-container {
  display: block;
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  color: #333;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 16px;
  width: 16px;
  background-color: #eaeaea;
  border-radius: 3px;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #e94e1b;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* فلتر بار */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 2px solid #e94e1b;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.view-options {
  display: flex;
  gap: 10px;
}

.view-btn {
  background: none;
  border: none;
  font-size: 20px;
  opacity: 0.5;
  cursor: pointer;
}

.view-btn.active {
  opacity: 1;
  color: #e94e1b;
}

.sort-dropdown {
  position: relative;
  font-weight: bold;
}

.sort-dropdown select {
  border: none;
  background: transparent;
  font-size: 14px;
  appearance: none;
  cursor: pointer;
}

.sort-dropdown .underline {
  height: 2px;
  background-color: #e94e1b;
  width: 100%;
  position: absolute;
  bottom: -5px;
  left: 0;
}

/* === MEDIA QUERIES للتجاوب === */

/* للهواتف الصغيرة */
@media (max-width: 767px) {
  body {
    margin: 10px;
  }

  .page-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .sidebar {
    flex: none;
    width: 100%;
    min-width: auto;
    border: none;
    padding: 15px;
  }

  .container {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* للأجهزة المتوسطة (تابلت) */
@media (min-width: 768px) and (max-width: 1023px) {
  .page-wrapper {
    flex-wrap: wrap;
  }

  .sidebar {
    flex: 0 0 100%;
    max-width: 280px;
    margin-bottom: 20px;
  }

  .container {
    flex: 1 1 100%;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* للأجهزة الأكبر (شاشات سطح المكتب العادية) */
@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* للشاشات الكبيرة جداً */
@media (min-width: 1400px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.navbar-container {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  width: 100%;
}

.navbar {
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  width: 90%;
  max-width: 1200px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  position: relative;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #1e1e50;
  position: relative;
}

.logo::after {
  content: 'خيال';
  position: absolute;
  left: 10px;
  top: 5px;
  color: #c8513c;
  font-size: 26px;
  transform: rotate(-10deg);
  opacity: 0.6;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #1e1e50;
}

.nav-links {
  display: flex;
  gap: 30px;
  font-size: 16px;
  align-items: center;
  transition: max-height 0.4s ease-in-out;
}

.nav-links a {
  color: #2c2c2c;
  text-decoration: none;
  font-weight: 500;
}

.contact {
  display: flex;
  align-items: center;
  gap: 20px;
}

.phone {
  font-weight: bold;
  color: #000;
  display: flex;
  align-items: center;
}

.phone i {
  color: #f2785f;
  margin-right: 5px;
}

.whatsapp-btn {
  background-color: #f2785f;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

/* ✅ القائمة على الهاتف */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    right: 30px;
    top: 20px;
  }

  .nav-links {
    flex-direction: column;
    overflow: hidden;
    max-height: 0;
    width: 100%;
    gap: 15px;
    margin-top: 10px;
    transition: max-height 0.4s ease-in-out;
  }

  .nav-links.show {
    max-height: 500px;
  }

  .nav-links a {
    padding: 8px 0;
  }

  .contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
  }

  .whatsapp-btn {
    padding: 8px 14px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 15px 10px;
  }

  .logo {
    font-size: 24px;
  }

  .logo::after {
    font-size: 20px;
  }

  .nav-links {
    font-size: 14px;
  }

  .phone {
    font-size: 14px;
  }
}
