/* الأساسيات */
body {
  font-family: 'cursive', cursive;
  background-color: #f8ead9;
  margin: 0;
  padding: 0;
  direction: rtl;
  text-align: center;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  margin-bottom: 0px;
  flex: 1;
}

/* Header Top مع القائمة والسلة */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #e6d7c0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(139, 96, 139, 0.2);
}

.menu-toggle,
.cart-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a89177, #801f89);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(128, 31, 137, 0.3);
  transition: all 0.3s ease;
}

.menu-toggle:hover,
.cart-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 12px rgba(128, 31, 137, 0.4);
}

.cart-icon {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -5px;
  left: -5px;
  background-color: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Header الرئيسي */
header {
  background-color: #fff;
  ;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 0;
  margin-top: 55px;
  position: relative;
}

header img {
  width: 100%;
  height: auto;
  display: block;
}

.main-header {
  margin-bottom: 0;
  padding: 0;
}

.overlay-img {
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
}

/* القائمة الجانبية */
.side-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background: linear-gradient(135deg, #f8ead9, #e6d7c0);
  z-index: 1001;
  box-shadow: -5px 0 15px rgba(128, 31, 137, 0.2);
  transition: right 0.3s ease;
  padding-top: 80px;
}

.side-menu.active {
  right: 0;
}

.menu-close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #801f89;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-menu li {
  margin: 15px 0;
}

.side-menu a {
  display: flex;
  align-items: center;
  padding: 15px 25px;
  color: #333;
  text-decoration: none;
  font-size: 18px;
  transition: all 0.3s;
  border-right: 4px solid transparent;
}

.side-menu a:hover {
  background-color: rgba(168, 145, 119, 0.1);
  border-right-color: #801f89;
  color: #801f89;
}

.side-menu i {
  margin-left: 15px;
  width: 20px;
  text-align: center;
}

/* سلة الشراء الجانبية */
.cart-sidebar {
  position: fixed;
  top: 0;
  left: -350px;
  width: 300px;
  height: 100%;
  background-color: white;
  z-index: 1001;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  left: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #801f89, #a89177);
  color: white;
}

.cart-close {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 3px;
  margin-bottom: 15px;
  background-color: #f8f8f8;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  margin-left: 10px;
}

.cart-item-info {
  flex: 1;
  text-align: right;
}

.cart-item-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.cart-item-price {
  color: #801f89;
  font-weight: bold;
}

.remove-item {
  color: #ff4757;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 5px;
}

.cart-total {
  padding: 0px;
  background-color: #f8f8f8;
  border-top: 2px solid #e0e0e0;
  font-size: 15px;
  font-weight: bold;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background-color: #fff;
}

.checkout-btn {
  background: linear-gradient(135deg, #801f89, #a89177);
  color: white;
  border: none;
  padding: 14px 25px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 50px;
  box-shadow: 0 6px 20px rgba(128, 31, 137, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.checkout-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(128, 31, 137, 0.4);
  background: linear-gradient(135deg, #9b2baa, #c2a68a);
}

.clear-cart-btn {
  background: linear-gradient(135deg, #ff7675, #d63031);
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(214, 48, 49, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.clear-cart-btn:hover {
  background: linear-gradient(135deg, #fab1a0, #ff7675);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(214, 48, 49, 0.3);
}

.clear-cart-btn i,
.checkout-btn i {
  font-size: 1.1em;
}


/* Gallery محسن */
.suggested-product {
  background-color: #fcebc6;
  border-radius: 20px;
  margin-bottom: 0px;
  margin-top: 5px;
  margin-left: 5px;
  margin-right: 5px;
  padding-left: 20px;
  padding-right: 20px;
  font-size: small;
  text-align: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 20px 5%;
  position: relative;
  z-index: 10;
}

.item {
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 15px;
}

.item:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(168, 145, 119, 0.3);
}

.item:has(.more-btn:hover) {
  border: 2px solid #df07f3;
  box-shadow: 0 8px 25px #df07f3;
}

.item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}

.desc {
  color: #303030;
  font-size: 18px;
  font-weight: bold;
  padding: 5px 10px;
}

.item-size,
.item-price {
  color: #666;
  font-size: 16px;
  padding: 2px 10px;
}

.more-btn {
  display: inline-block;
  background: linear-gradient(135deg, #801f89, #a89177);
  color: white;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 20px;
  margin-top: 10px;
  font-size: 14px;
  transition: all 0.3s;
}

.more-btn:hover {
  background: linear-gradient(135deg, #a89177, #801f89);
  transform: scale(1.05);
}


.back-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 12px rgba(128, 31, 137, 0.3);
}

/* صفحة تفاصيل المنتج */
.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 10px;
  padding: 15px;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.detail-item img {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.detail-text {
  text-align: center;
  color: #333;
  font-size: 16px;
  padding: 0 10px;
}

/* المنتجات المقترحة */
.suggested-products {
  padding: 5px 5px;
  background-color: #efe2c7;
  margin-top: 5px;
  border-radius: 20px;
  margin-bottom: 5px;
  margin-left: 3px;
  margin-right: 3px;
}

.suggested-products h2 {
  color: #801f89;
  margin-bottom: 25px;
  font-size: 24px;
}

/* صفحة feedback */
/* صفحة feedback - تحسينات */
.feedback-page {
  background: linear-gradient(135deg, #f8ead9, #e6d7c0);
  min-height: 100vh;
}

.feedback-container {
  max-width: 800px;
  width: 90%;
  margin: 40px auto;
  padding: 40px;
  background-color: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(168, 145, 119, 0.25);
  transition: transform 0.3s ease;
}

.feedback-container h2 {
  color: #801f89;
  margin-bottom: 10px;
  font-size: 28px;
}

.form-group {
  margin-bottom: 25px;
  text-align: right;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: #801f89;
  font-weight: bold;
  font-size: 18px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  box-sizing: border-box;
  /* لمنع الخروج عن الحاوية */
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
  background-color: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #801f89;
  background-color: #fff;
  box-shadow: 0 0 8px rgba(128, 31, 137, 0.2);
  outline: none;
}

.rating {
  direction: ltr;
  /* النجوم من اليسار لليمين */
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  /* محاذاة لليمين لأن الصفحة RTL */
}

.star {
  font-size: 35px;
  color: #e0e0e0;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  margin: 0 2px;
}

.star:hover,
.star.active {
  color: #ffc107;
  transform: scale(1.1);
}

.submit-btn {
  background: linear-gradient(135deg, #801f89, #a89177);
  color: white;
  border: none;
  padding: 15px 50px;
  font-size: 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(128, 31, 137, 0.3);
  display: block;
  width: 100%;
  /* زر كامل العرض في الموبايل */
  max-width: 300px;
  margin: 0 auto;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(128, 31, 137, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.feedback-success {
  display: none;
  background-color: #d4edda;
  color: #155724;
  padding: 30px;
  border-radius: 15px;
  margin-top: 30px;
  border: 1px solid #c3e6cb;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feedback-success i {
  font-size: 50px;
  margin-bottom: 15px;
  color: #28a745;
}

/* صفحة contact */
/* صفحة contact - تحسينات */
.contact-container {
  max-width: 1100px;
  margin: 0 auto;
  /* توسيط الحاوية */
  padding: 20px;
  width: 90%;
}

.contact-container h2 {
  color: #801f89;
  font-size: 32px;
  margin-bottom: 40px;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  /* استجابة تلقائية */
  gap: 30px;
  margin-bottom: 40px;
}

.contact-card {
  background-color: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.contact-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(128, 31, 137, 0.15);
  border-color: rgba(128, 31, 137, 0.1);
}

.contact-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 35px;
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-icon.gmail {
  background: linear-gradient(135deg, #D44638, #EA4335);
}

.contact-icon.whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
}

.contact-icon.instagram {
  background: linear-gradient(135deg, #cf6c7e, #833AB4);
}

.contact-card h3 {
  color: #333;
  margin: 10px 0;
  font-size: 22px;
}

.contact-card p {
  color: #666;
  font-size: 16px;
  margin-bottom: 20px;
  direction: ltr;
  /* للأرقام والإيميلات */
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 30px;
  background-color: #f8f8f8;
  color: #555;
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  border: 1px solid #e0e0e0;
}

.contact-link:hover {
  background-color: #801f89;
  color: white;
  border-color: #801f89;
  transform: scale(1.05);
}

.contact-info {
  background-color: white;
  border-radius: 20px;
  padding: 30px;
  margin-top: 40px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
}

.contact-info h3 {
  width: 100%;
  color: #801f89;
  font-size: 24px;
  margin-bottom: 20px;
}

.contact-info p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 18px;
  margin: 10px;
  color: #444;
  padding: 10px 20px;
  background-color: #fafafa;
  border-radius: 15px;
  transition: background 0.3s;
}

.contact-info p:hover {
  background-color: #f0e6d1;
}

.contact-info i {
  color: #801f89;
  font-size: 20px;
}

/* الفوتر */
footer {
  margin-top: 10px;
  margin-bottom: 0px;
  position: -webkit-sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #e6d7c0;
  padding-bottom: 5px;
  border-top: 2px solid #cbb196;
}

footer p {
  color: #801f89;
  font-weight: bold;
  margin: 0;
  font-size: 12px;
}

/* عناصر الاتصال */
.contact {
  margin-top: 5px;
}

.contact button {
  background: linear-gradient(90deg, #ea65c9, #e46233);
  color: white;
  font-weight: bold;
  font-size: 16px;
  border: none;
  border-radius: 30px;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.contact button:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

.instagram {
  margin-top: 5px;
  font-size: 18px;
  font-weight: bold;
  color: #de3939;
}

/* Responsive */
@media (min-width: 768px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    padding: 30px 7%;
  }

  .item img {
    height: 200px;
  }

  .contact-methods {
    /* الشبكة محددة بالفعل بـ auto-fit، لكن هنا نتأكد من التباعد الجيد */
    gap: 40px;
  }

  /* Tablet Typography */
  .desc {
    font-size: 20px;
  }

  .item-price {
    font-size: 18px;
  }
}

@media (min-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    padding: 40px 10%;
    gap: 30px;
    /* Increased gap for desktop */
  }

  .item img {
    height: 220px;
  }

  /* Desktop Typography */
  .desc {
    font-size: 22px;
  }

  .item-price {
    font-size: 20px;
  }

  .header-top {
    padding: 15px 50px;
  }

  header {
    margin-top: 78px;
  }

  .menu-toggle,
  .cart-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .suggested-product {
    background-color: #fcebc6;
    border-radius: 20px;
    margin-bottom: 0px;
    margin-top: 5px;
    margin-left: 6px;
    margin-right: 6px;
    font-size: 24px;
    padding-left: 3px;
    padding-right: 3px;
  }
}

@media (max-width: 767px) {

  html,
  body {
    overflow-x: hidden;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px 10px;
  }

  .item img {
    height: 160px;
  }

  .header-top {
    padding: 8px 15px;
  }


  .menu-toggle,
  .cart-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .side-menu {
    width: 250px;
  }

  .cart-sidebar {
    width: 280px;
  }

  .contact-methods {
    grid-template-columns: 1fr;
    /* في الموبايل عمود واحد */
  }

  .feedback-container {
    padding: 25px 20px;
    margin: 20px auto;
    width: 85%;
    /* عرض مناسب للموبايل */
  }

  .contact-info {
    flex-direction: column;
  }

  .feedback-container {
    padding: 20px 15px;
    margin: 20px 15px;
  }

  .back-btn {
    margin: 15px;
    padding: 8px 20px;
    font-size: 14px;
  }

}

@media (min-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(5, 1fr);
    padding: 50px 12%;
  }

  header {
    margin-top: 75px;
  }
}