@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap");

:root {
  --primary-color: #7b1fa2; 
  --secondary-color: #e91e63; 
  --dark-text: #333;
  --light-bg: #f5f5f5;
  --white: #fff;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.06); 
  --soft-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); 
  --section-padding: 40px 0;
  --success-color: #4caf50;
  --error-color: #f44336;
  --star-color: #ffc107;
  --light-grey: #eee;
  --heading-color: #333;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Cairo", sans-serif;
  max-width: 100vw; 
}

body {
  font-family: "Cairo", sans-serif;
  color: var(--dark-text);
  background-color: var(--white);
  line-height: 1.6;
  direction: rtl;
  overflow-x: hidden; 
  padding-top: 0; 
}

a {
  text-decoration: none;
  color: var(--dark-text);
  transition: color 0.3s;
}

a:hover {
  color: var(--secondary-color);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.flex {
  display: flex;
  align-items: center;
}

.top-announcement-bar {
  background-color: var(--primary-color);
  color: white;
  padding: 5px 0;
  font-size: 14px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  position: static;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1002;
  height: 30px;
}

.scrolling-text {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-ltr 25s linear infinite;
}

.header {
  background-color: var(--white);
  border-bottom: 1px solid var(--light-bg);
  padding: -30px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
  position: static; 
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001; 
  overflow-x: hidden;
}

.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo img {
  max-height: 80px; /* هنا صغرنا الحجم من 150px إلى 80px */
  width: auto;
  display: block;
  margin: 0 auto; /* هذا يضمن بقاءه في المنتصف تماماً */
  transition: transform 0.3s ease;
  padding: 5px 0; /* أضفنا مساحة بسيطة جداً */
}

.logo img:hover {
  transform: scale(1); /* حركة خفيفة عند لمس اللوجو */
}

@media (max-width: 480px) {
  .logo img {
    max-height: 80px; /* حجم أصغر للموبايل (60px) لضمان عدم تغطية الهيرو */
    margin: 0 auto;
    padding: 2px 0;
  }
}

.nav-main-group {
  grid-column: 1;
  justify-content: flex-start;
  display: flex;
  min-width: 50px; 
}

.nav-actions.action-icons-end {
  grid-column: 3;
  justify-content: flex-end;
  gap: 15px;
  display: flex;
}

.nav-actions .icon, .nav-main-group .icon {
  position: relative;
  font-size: 20px;
  color: var(--dark-text);
  cursor: pointer; 
}

.cart-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  background-color: var(--secondary-color);
  color: var(--white);
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  z-index: 10;
}

.nav-links-container { 
  position: fixed;
  top: 0;
  right: -100%; 
  width: 250px;
  height: 100vh;
  background-color: var(--white);
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  transition: right 0.4s ease;
  padding: 60px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  visibility: hidden; 
}

.nav-links-container.active {
    right: 0;
    visibility: visible; 
}

.nav-link-item {
    padding: 15px 0;
    width: 100%;
    border-bottom: 1px solid var(--light-bg);
    font-size: 1.1rem;
    font-weight: 700;
}

.close-sidebar-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-text);
    z-index: 2001; 
}

.cta-button {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  text-align: center;
  display: inline-block;
}

.cta-button:hover {
  background-color: #c2185b;
  transform: translateY(-2px);
}

/* --- الكود الجديد للـ Hero مع الفيديو --- */
.hero-section {
  position: relative;
  height: 450px; /* طول مناسب جداً للموبايل */
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000; /* خلفية سوداء تظهر قبل تحميل الفيديو */
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

/* طبقة تظليل احترافية لجعل النص بارزاً */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.45); /* تظليل 45% */
  z-index: 2;
}

.hero-section h1, .hero-section p, .hero-section .cta-button {
  position: relative;
  z-index: 3; /* فوق الفيديو والتظليل */
  color: #fff;
}

.hero-section h1 {
  font-weight: 900;
  font-size: 2.2rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-section p {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.service-icons-bar {
  padding: 20px 0;
  background-color: #fff;
  border-bottom: 1px solid #f5f5f5;
  margin-bottom: 20px;
}

.icons-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 5px;
  width: 100%;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.icon-item i {
  font-size: 22px;
  color: #7b1fa2;
  margin-bottom: 5px;
}

.icon-item span {
  font-size: 11px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 480px) {
  .icon-item i {
    font-size: 18px;
  }
  .icon-item span {
    font-size: 10px;
  }
  .service-icons-bar {
    padding: 15px 5px;
  }
}

.products-section, .about, .policy-section, .contact, .product-detail-main, .cart-container {
  padding: var(--section-padding);
  text-align: center;
}

.section-title {
  font-size: 32px;
  margin-bottom: 30px;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 80px;
  height: 4px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

#product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* هذا السطر يضمن ظهور منتجين متجاورين */
    gap: 12px;
    padding: 10px;
    background-color: #fff;
}
.wishlist-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.wishlist-btn.active {
    color: #ff4d4d !important; /* لون أحمر للقلب المفعّل */
}
.product-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid #f2f2f2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:active {
    transform: scale(0.97); /* تأثير ضغطة بسيطة للجوال */
}

.product-image {
    width: 100%;
    height: 180px; /* طول مناسب جداً للهاتف */
    position: relative;
    overflow: hidden;
    background-color: #f9f9f9;
}

#main-product-image {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important; /* يلغي أي حركة متبقية من المكتبة */
}

.product-card-details {
    padding: 10px;
    text-align: center;
    flex-grow: 1;
}
/* إخفاء حاوية المنتج تماماً عند بداية التحميل لمنع السرقة البصرية */
#product-detail-container {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* لودر يغطي كامل الشاشة وبخلفية بيضاء مصمتة */
#page-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff !important; /* خلفية بيضاء تماماً لحجب ما خلفها */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999; /* أعلى رقم ممكن لضمان التغطية */
}

.product-card h3 {
  padding: 0;
  font-size: 20px; 
  color: var(--dark-text);
  margin-bottom: 5px; 
}

.product-card .stars-rating {
  color: var(--star-color);
  font-size: 16px; 
  margin-bottom: 10px; 
  display: block;
  text-align: right;
  direction: ltr; 
}

.product-card .price-group-container {
  display: flex;
  align-items: baseline; 
  justify-content: flex-end; 
  padding: 0 15px 15px;
  gap: 10px; 
}

.product-grid .product-card .price-group-container .current-price {
    color: #7b1fa2; /* لون هوية AIN Store */
    font-weight: 900;
    font-size: 1rem;
}
.product-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card.original-price {
    color: #bbb;
    text-decoration: line-through;
    font-size: 0.75rem;
}

.product-card .cta-button {
  width: calc(100% - 30px);
  padding: 10px 20px;
  margin: 0 15px 15px;
}

.related-products-section {
  padding: 60px 0;
  text-align: right;
}

.related-products-section h2 {
  font-size: 28px;
  color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 5px;
  margin-bottom: 25px;
  display: inline-block;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; 
  margin-top: 20px;
}

.related-grid .product-card {
  text-align: right;
}

.related-grid .product-image-simple {
  width: 100%;
  height: 200px; 
  overflow: hidden;
  background-color: #ddd;
  border-radius: 8px 8px 0 0;
}

.related-grid .product-image-simple img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about {
  background-color: var(--light-bg);
}

.about p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.contact-form {
  max-width: 600px;
  margin: 20px auto;
  display: grid;
  gap: 15px;
  text-align: right;
}

.contact-form .form-group input[type="text"],
.contact-form .form-group input[type="email"],
.contact-form .form-group input[type="tel"],
.contact-form .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: "Cairo", sans-serif;
  font-size: 16px;
  resize: vertical;
  box-sizing: border-box;
}
.faq-question {
    padding: 15px 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    color: var(--primary-color); /* لون الهوية البنفسجي */
    border-right: 4px solid var(--primary-color); /* خط جانبي أنيق */
    transition: 0.3s;
}

.faq-item.active .faq-question {
    background: var(--primary-color);
    color: white;
}

.faq-item.active .fa-chevron-down {
    transform: rotate(180deg);
    color: white;
}
.policy-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  padding: 30px 0;
  max-width: 100%;
}

.policy-card {
  background-color: var(--white);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); 
  flex: 1;
  min-width: 280px;
  max-width: 380px;
  text-align: right;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 10px 0;
}

.policy-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.policy-card h3 {
  color: var(--primary-color);
  font-size: 1.6rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary-color);
  display: inline-block;
}

.policy-card p {
  color: var(--dark-text);
  font-size: 1rem;
  line-height: 1.8;
}

.product-detail-main {
  padding: var(--section-padding);
  text-align: center;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: right;
  background-color: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--soft-shadow);
}
.delivery-timeline {
    display: flex !important;
    justify-content: center !important; 
    align-items: flex-start !important;
    margin: 20px auto !important; /* التوسط التلقائي */
    padding: 10px 0 !important;
    width: 95% !important;
    max-width: 400px !important;
    background: #fff !important;
    direction: ltr !important; 
    float: none !important; /* منع الانجراف لليسار */
    clear: both !important;
}

.timeline-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex: 1 !important;
    position: relative !important;
}

.icon-circle {
    width: 45px !important;
    height: 45px !important;
    background: #000 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    z-index: 5 !important;
}

/* الخط الواصل بين الدوائر */
.timeline-item:not(:last-child)::after {
    content: '' !important;
    position: absolute !important;
    top: 22.5px !important;
    left: 50% !important;
    width: 100% !important;
    height: 3px !important;
    background: #000 !important;
    z-index: 1 !important;
}

.status-title {
    font-weight: bold !important;
    font-size: 11px !important;
    margin-top: 8px !important;
    display: block !important;
    text-align: center !important;
}

.product-images {
  height: 400px;
  background-color: #ddd;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.product-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.product-info h1 {
  font-size: 38px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.product-info .price {
  font-size: 30px;
  color: var(--secondary-color);
  font-weight: 700;
  margin-bottom: 25px;
  border-bottom: 1px dashed var(--light-bg);
  padding-bottom: 15px;
}

.product-options-group {
  display: flex;
  gap: 20px;
  margin: 25px 0;
  align-items: flex-end;
  flex-wrap: wrap;
}

.option-control {
  min-width: 120px;
  max-width: 200px; 
  flex-grow: 1;
}

.option-control select, .option-control input[type="number"], .quantity-box {
  height: 48px; 
}

.quantity-control-wrapper {
  min-width: 120px; 
  max-width: 150px;
  flex-grow: 0;
}

.quantity-box {
  display: flex;
  height: 48px;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

.quantity-box .qty-btn {
  flex-shrink: 0;
  width: 48px;
  background-color: #f7f7f7;
  border: none;
  color: var(--dark-text);
  font-size: 1.2em;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  outline: none;
}

.quantity-box input[type="number"] {
  flex-grow: 1;
  text-align: center;
  border: none;
  margin: 0;
  padding: 0;
  height: 100%;
  appearance: none;
  -moz-appearance: textfield;
}

.quantity-box input::-webkit-outer-spin-button, .quantity-box input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.add-to-cart-btn {
  width: 100%;
  padding: 18px;
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: 5px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin-top: 30px;
}

.current-price-professional {
    font-size: 3em !important; 
    font-weight: 900 !important; 
    color: var(--secondary-color) !important; 
}

.original-price-striked {
    font-size: 1.3em !important;
    color: #999 !important;
    text-decoration: line-through !important; 
    display: inline-block !important; 
    margin-right: 15px !important;
}

.payment-icons-container {
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* ===================================================================== */
/* 🔔 نظام إشعارات متجر العين - النسخة الاحترافية للموبايل */
/* ===================================================================== */

/* 1. الحاوية الرئيسية: تم نقلها لأسفل المنتصف تماماً */
.toast-container {
  position: fixed !important;
  bottom: 40px !important; /* مسافة من الأسفل */
  left: 50% !important;
  top: auto !important; /* إلغاء التموضع العلوي */
  right: auto !important; /* إلغاء التموضع اليميني */
  transform: translateX(-50%) !important; /* التوسيط المثالي */
  z-index: 1000000 !important; /* أعلى من كل العناصر */
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
  width: 90%;
  max-width: 340px;
  align-items: center;
  pointer-events: none;
}

/* 2. تصميم فقاعة الإشعار */
.toast {
  pointer-events: auto;
  background-color: #ffffff !important;
  color: #333 !important;
  padding: 15px 20px;
  border-radius: 20px; /* تصميم دائري احترافي */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center; /* توسيط النص داخلياً */
  text-align: center;
  font-weight: 700;
  border-right: 6px solid var(--primary-color); /* شريط الهوية */
  
  /* حركة الظهور (أنيميشن) */
  opacity: 0;
  transform: translateY(20px); 
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 3. حالة الظهور */
.toast.show {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* 4. الحالات الخاصة (نجاح / خطأ) */
.toast.success { border-right-color: #2ecc71 !important; }
.toast.error { border-right-color: #e74c3c !important; }

/* 5. إلغاء أي كلاسات إضافية قد تسبب تعارض */
.toast-container.centered-toast-container,
.toast.is-centered {
    top: auto !important;
    left: 50% !important;
    bottom: 40px !important;
    transform: translateX(-50%) !important;
}

/* تحسينات إضافية لشاشات الموبايل الصغيرة */
@media (max-width: 480px) {
  .toast-container {
    bottom: 30px !important;
    width: 85%;
  }
  .toast {
    font-size: 14px;
    padding: 12px 15px;
  }
}

.product-images-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: center;
}

.main-image-wrapper {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background-color: #ddd;
}
/* --- 1. كود الزوم: التنسيق --- */
.main-image-wrapper {
    overflow: hidden !important; /* يمنع الصورة من الخروج عن الإطار عند التكبير */
    position: relative !important;
    border-radius: 12px;
}

#main-product-image {
    transition: transform 0.3s ease-out !important; /* سرعة رجوع الصورة لوضعها الطبيعي */
    will-change: transform;
    cursor: zoom-in;
}

/* الكلاس الذي سيضيفه الجافا سكريبت عند اللمس */
.main-image-wrapper.zoomed img {
    transform: scale(2.2) !important; /* درجة التكبير (2.2 يعني ضعفين ونصف) */
}

.product-slideshow {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

.slideshow-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b1fa2; /* لون الهوية */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.slideshow-nav-btn.prev { right: 5px; }
.slideshow-nav-btn.next { left: 5px; }


.reviews-section {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.reviews-section h2 {
    font-size: 1.8em;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
    display: inline-block;
}

.add-review-form {
    max-width: 650px; 
    margin-top: 30px;
    padding: 25px;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.add-review-form h3 {
    font-size: 1.5em;
    color: var(--dark-text);
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px; 
    margin-bottom: 15px;
}

.form-group-review {
    flex: 1; 
    display: flex;
    flex-direction: column;
}

.form-group-review label {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark-text);
}

.form-group-review input[type="text"],
.form-group-review input[type="email"],
.form-group-review textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: "Cairo", sans-serif;
    font-size: 16px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group-review input:focus, .form-group-review textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group-review.full-width {
    flex: 100%;
}

.rating-group-control {
    margin-bottom: 20px;
}

.stars-rating {
    font-size: 0.7rem;
    color: #ffc107;
    margin-bottom: 8px;
}

.review-submit-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
}

.review-submit-btn:hover {
    background-color: #c2185b;
    transform: translateY(-2px);
}

@media (max-width: 650px) {
    .form-row { flex-direction: column; gap: 0; }
    .form-group-review { margin-bottom: 15px; }
    .form-group-review input[type="text"], .form-group-review input[type="email"] { width: 100%; }
    .rating-group-control { margin-top: 15px; }
    .reviews-section h2 { text-align: right; }
    .add-review-form { max-width: 100%; padding: 15px; }
}

@media (max-width: 480px) {
  .navbar { display: flex; justify-content: space-between; align-items: center; padding: 0 10px; width: 100%; }
  .container { width: 100%; padding: 0 15px; }
  .hero-section, .service-badges-section, .products-section, .related-products-section, .policy-section, .contact, footer { width: 100%; max-width: 100%; overflow-x: hidden !important; }
  .product-grid, .related-grid, .policy-cards-container { max-width: 100%; overflow-x: hidden !important; }
  body { padding-top: 0; }
  .header { top: 0; padding: 8px 0; width: 100%; overflow-x: hidden !important; }
  .logo { font-size: 20px; order: 2; flex-grow: 1; text-align: center; margin: 0 10px; }
  .nav-main-group { order: 1; display: flex; align-items: center; justify-content: flex-start; flex-shrink: 0; min-width: 40px; }
  .menu-icon, .menu-icon i, .nav-main-group .icon { font-size: 24px; color: var(--dark-text); display: block; line-height: 1; padding: 5px; }
  .nav-actions.action-icons-end { order: 3; gap: 12px; flex-shrink: 0; }
  .nav-links-container { position: fixed; top: 0; right: -100%; width: 250px; height: 100vh; background-color: var(--white); box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3); z-index: 2000; transition: right 0.4s ease; padding: 60px 20px 20px; display: flex; flex-direction: column; align-items: flex-start; visibility: hidden; }
  .nav-links-container.active { right: 0; visibility: visible; }
  .toast-container { top: 60px; right: 15px; left: 15px; max-width: calc(100% - 30px); }
  .toast { max-width: 100%; }
  .product-detail-layout { grid-template-columns: 1fr; gap: 15px; padding: 10px; }
  .main-image-wrapper { height: 250px; z-index: 10; }
  .product-images img { object-fit: contain !important; }
  .policy-cards-container { gap: 8px; padding: 20px 0; }
  .policy-card { flex-basis: calc(50% - 4px); padding: 15px 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); margin: 0; }
  .policy-card h3 { font-size: 1.1rem; }
  .policy-card p { font-size: 0.9rem; }
  .product-info h1 { font-size: 20px; margin-bottom: 10px; }
  .price-group-container {
    display: flex;
    flex-direction: center;
    align-items: center;
    gap: 2px;
}
  .product-options-group { flex-direction: column; gap: 12px; }
  .option-control, .quantity-control-wrapper { min-width: 100%; max-width: 100%; }
  .option-control select, .option-control input[type="number"], .quantity-box { height: 40px; font-size: 16px; }
  .quantity-box .qty-btn { width: 40px; height: 40px; font-size: 1em; }
  .add-to-cart-btn { padding: 12px; font-size: 16px; margin-top: 15px; }
  .products-section, .about, .policy-section, .contact, .product-detail-main, .cart-container { padding: 30px 0; }
  .section-title { font-size: 22px; margin-bottom: 20px; }
  .product-grid, .related-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 0; }
  .product-image { height: 160px; }
  .related-grid .product-image-simple { height: 140px; }
  .product-card-details { padding: 8px 8px 5px; min-height: 80px; }
  .product-card h3 { font-size: 15px; margin-bottom: 3px; }
  .product-card .price-group-container { padding: 0 8px 8px; }
  .product-card .price-group-container .current-price {
    color: #7b1fa2; /* لون هوية AIN Store */
    font-weight: 900;
    font-size: 1rem;
}
  .product-card .cta-button { padding: 7px 15px; font-size: 13px; margin: 0 8px 8px; width: calc(100% - 16px); }
}

@keyframes scroll-ltr { 0% { transform: translate(-100%, 0); } 100% { transform: translate(100%, 0); } }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

.search-overlay-container {
    background-color: var(--white); padding: 10px 0; border-bottom: 1px solid var(--light-bg);
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1005; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); display: none !important; 
}

.search-overlay-container.active { display: block !important; }

.search-box-wrapper { max-width: 1200px; margin: auto; padding: 0 15px; display: flex; align-items: center; height: 40px; }

#search-input {
    flex-grow: 1; padding: 10px 15px; border: 2px solid var(--primary-color);
    border-radius: 8px; font-size: 16px; direction: rtl; 
    transition: border-color 0.3s; text-align: right; 
}

@keyframes whatsapp-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.whatsapp-float {
  position: fixed; width: 60px; height: 60px; bottom: 40px; right: 40px; 
  background-color: #25d366; color: #fff; border-radius: 50px;
  text-align: center; font-size: 30px; box-shadow: 2px 2px 3px #999;
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s ease; animation: whatsapp-bounce 2s infinite ease-in-out; 
}
.accordion-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.accordion-item {
  background: var(--white);
  border: 1px solid var(--light-bg);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.accordion-header {
  width: 100%;
  padding: 20px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: right;
  font-family: "Cairo", sans-serif;
}

/* تأثير عند تمرير الماوس في اللابتوب */
@media (min-width: 1024px) {
  .accordion-item:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
  }
}

.accordion-content {
  max-height: 0; /* مخفي افتراضياً */
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.3s ease;
  background-color: #fcfaff;
  padding: 0 20px;
}

.accordion-item.active .accordion-content {
  max-height: 200px; /* يظهر عند التنشيط */
  padding: 20px;
  border-top: 1px solid var(--light-bg);
}

.accordion-item.active .accordion-header i {
  transform: rotate(180deg); /* تدوير السهم */
  color: var(--secondary-color);
}
.about-cta-box {
    cursor: pointer; /* يخلي السهم يصير يد عند المرور */
    transition: 0.3s; /* نعومة في الحركة */
}

.about-cta-box:hover {
    background-color: #f8f0fc; /* تغيير خفيف في اللون عند اللمس */
    transform: translateY(-5px); /* يرتفع القسم للأعلى قليلاً */
}
/* واجهة البحث الاحترافية */
.search-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #f8f9fa; /* خلفية رمادية فاتحة جداً */
    z-index: 10000;
    display: none;
    flex-direction: column;
}

.search-overlay.active { display: flex; }

.search-header {
    background: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

#search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    background: #f1f1f1;
    font-size: 15px;
    outline: none;
    transition: 0.3s;
}

#search-input:focus { border-color: #7b1fa2; background: white; }

.close-search-btn {
    background: #7b1fa2;
    color: white;
    border: none;
    width: 35px; height: 35px;
    border-radius: 10px;
    cursor: pointer;
}

/* تصميم بطاقة المنتج في البحث */
.search-card {
    display: flex;
    align-items: center;
    background: white;
    margin: 10px 15px;
    padding: 12px;
    border-radius: 15px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: 0.2s;
}

.search-card-img img {
    width: 70px; height: 70px;
    border-radius: 12px;
    object-fit: cover;
    margin-left: 15px;
}

.search-card-info h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.new-price { color: #7b1fa2; font-weight: 800; font-size: 15px; }
.original-price {
    color: #bbb;
    text-decoration: line-through;
    font-size: 0.75rem;
}

.arrow-icon { color: #ddd; margin-right: auto; font-size: 14px; }

/* تصميم البوب اب الاحترافي لمتجر العين */
.ain-popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none; /* سيتم تفعيله بالـ JS */
  justify-content: center; align-items: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
}
.ain-popup-content {
  background: #fff;
  width: 88%; max-width: 240px;
  padding: 35px 20px;
  border-radius: 25px;
  text-align: center;
  position: relative;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  animation: ainFadeIn 0.5s ease;
}
@keyframes ainFadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
.ain-close-btn {
  position: absolute; top: 15px; left: 20px;
  background: none; border: none;
  font-size: 30px; color: #7d28a2; cursor: pointer;
}
.ain-popup-header i { font-size: 55px; color: #7d28a2; margin-bottom: 15px; }
.ain-popup-body h2 { color: #7d28a2; margin-bottom: 10px; font-size: 1.6em; }
.ain-popup-body p { color: #444; font-size: 1em; line-height: 1.5; margin-bottom: 20px; }
.ain-coupon-container {
  display: flex; justify-content: space-between; align-items: center;
  background: #f8f0fc; border: 2px dashed #7d28a2;
  padding: 12px 15px; border-radius: 12px;
}
#couponText { font-weight: 800; font-size: 1.1em; color: #333; }
.ain-copy-btn {
  background: #7d28a2; color: #fff; border: none;
  padding: 8px 18px; border-radius: 8px; font-weight: bold;
  cursor: pointer; transition: 0.3s;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}
/* ===================================================================== */
/* 🛒 نظام السلة الاحترافي للهاتف - AIN STORE */
/* ===================================================================== */

/* 1. تنسيق الجدول ليكون مرن */
.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px; /* مسافة بين البطاقات */
    margin-top: 10px;
}

.cart-table thead {
    display: none; /* إخفاء رأس الجدول في الموبايل لزيادة المساحة */
}

/* 2. تحويل الصفوف إلى بطاقات (Cards) */
.cart-row-item {
    display: block;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    margin-bottom: 15px;
    padding: 15px;
    position: relative;
    transition: transform 0.2s ease;
}

.cart-row-item td {
    display: block;
    width: 100%;
    padding: 5px 0;
    border: none;
    text-align: right;
}

/* 3. جعل السعر والكمية في سطر واحد تحت تفاصيل المنتج */
.cart-row-item td:nth-child(2), 
.cart-row-item td:nth-child(3), 
.cart-row-item td:nth-child(4) {
    display: inline-block;
    width: auto;
    margin-left: 15px;
}

/* 4. زر الحذف (Trash) - وضعه في زاوية البطاقة */
.delete-item-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #fff0f0 !important;
    color: #ff5252 !important;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

/* 5. تحسين روابط المنتجات داخل السلة */
.product-name-link {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 8px;
    max-width: 80%; /* لكي لا يغطي زر الحذف */
}

/* 6. تنسيق صندوق الكمية في السلة */
.cart-item-quantity .quantity-box {
    border: 1.5px solid #eee;
    border-radius: 12px;
    background: #fbfbfb;
    padding: 2px;
}

/* 7. ملخص السلة النهائي */
.cart-summary {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
}

.cart-summary p {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.cart-summary strong {
    color: var(--primary-color);
    font-size: 1.4rem;
}

/* تحسينات إضافية للهاتف */
@media (max-width: 480px) {
    .cart-container {
        padding: 20px 10px;
        background-color: #fcfaff; /* لون خلفية ناعم للسلة */
    }
    
    .cart-row-item td img {
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
}
/* ===================================================================== */
/* 👑 تصميم اللوجو المتوّج - النسخة النهائية للموبايل */
/* ===================================================================== */

#welcome-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle, #2d0a3d 0%, #000000 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000000; /* أعلى من كل العناصر */
  transition: all 1.2s cubic-bezier(0.95, 0.05, 0.795, 0.035);
}

.logo-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.crown-icon {
  color: #d4af37;
  font-size: 2.2rem;
  margin-bottom: -15px; /* لجعل التاج يرتكز على اللوجو */
  z-index: 11;
  transform: rotate(-10deg); /* ميلة ملكية */
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
  animation: crownShimmer 2s infinite ease-in-out;
}

.welcome-logo {
  max-width: 170px; /* حجم مثالي للموبايل */
  position: relative;
  z-index: 10;
  filter: drop-shadow(0 0 15px rgba(123, 31, 162, 0.4));
}

.gold-line {
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  margin: 20px auto;
  animation: expandLine 2s forwards 0.5s;
}

.welcome-motto {
  color: #d4af37;
  font-size: 1rem;
  letter-spacing: 2px;
  font-weight: 300;
  opacity: 0;
  animation: fadeInUp 1s forwards 1.5s;
}

/* --- الحركات (Animations) --- */
@keyframes crownShimmer {
  0%, 100% { transform: rotate(-10deg) scale(1); filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6)); }
  50% { transform: rotate(-5deg) scale(1.1); filter: drop-shadow(0 0 20px rgba(212, 175, 55, 1)); }
}

@keyframes expandLine {
  to { width: 200px; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* الخروج مثل الستارة للأعلى */
.welcome-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}