 /* === Theme & Base (keep current font) === */
:root{
  --color-primary: #fcc316;
  --color-secondary: #46b376;

  /* aliases لضمان التوافق */
  --primary-color: var(--color-primary);
  --secondary-color: var(--color-secondary);

  --color-primary-600: #fcc316;
  --color-secondary-600: #3aa66b;
  --color-text: #222;
  --color-muted: #6b7280;
  --radius: 14px;
  --shadow: 0 .5rem 1rem rgba(0,0,0,.10);
  --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
}

        html, body { max-width: 100%; overflow-x: hidden; height: 100%;}
        
        body { 
          color: var(--color-text); 
          background-color: color-mix(in srgb, var(--color-primary) 2%, transparent); 
          font-family: 'Almarai', sans-serif;
          line-height: 1.6;display: flex;
  flex-direction: column;
        }
.container.py-3 {
  flex: 1;
}


.btn:focus, 
.btn:active, 
button:focus, 
button:active {
  outline: none !important;
  box-shadow: 0 0 0 0.25rem rgba(70, 179, 118, 0.4) !important; /* أخضر ثانوي شفاف */
  background-color: var(--color-secondary) !important;
  border-color: var(--color-secondary) !important;
  color:#ffffff !important;
}
.qty-inline .btn-minus,
.qty-inline .btn-plus {
  background-color: #f5f5f5; /* فضي فاتح */
  border-color: #ddd;
}

        /* تحسينات الشريط العلوي */
        .app-navbar {
          background: #fff !important;
          box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
          padding: 0.5rem 0;
        }
        
        .navbar-brand {
          font-weight: 800;
          font-size: 1.5rem;
        }
        .site-logo img {
          height: 70px;
          width: auto;
          object-fit: contain;
        }
        
        @media (max-width: 768px) {
          .site-logo img {
            height: 35px;
          }
        }
        
        .navbar-toggler {
          border: 1px solid rgba(0, 0, 0, 0.1);
          padding: 0.35rem 0.65rem;
          color: #333; /* إضافة لون للأيقونة */
        }
        
        .navbar-toggler-icon {
          width: 1.2em;
          height: 1.2em;
          background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        }
        
        /* زر السلة المحسن */
        .btn-cart:hover {
          background: #f8f9fa;
          transform: translateY(-2px);
          box-shadow: var(--shadow-sm);
        }
        
        .btn-cart i {
    font-size: 1.2rem;
    color:var(--color-secondary);
        }
        
        #cart-count {
          font-size: 0.7rem;
          padding: 0.35em 0.5em;
          position: absolute;
          top: -5px;
          left: -5px; /* تعديل الموضع للعربية */
        }
        
        /* تحسينات القائمة مع إضافة فواصل */
.navbar-nav {
    border: 1px solid #adb5bd33;
    border-radius: 30px;
    padding-left:12px; padding-right:12px;
}        
        .navbar-nav .nav-item {
          border-top: 1px solid rgba(0, 0, 0, 0.05);
        }
        
        .navbar-nav .nav-item:first-child {
          border-top: none;
        }
        
        .navbar-nav .nav-link {
          font-weight: normal;
          color: #333;
          padding: 0.75rem 1rem;
          transition: all 0.2s ease;
          display: flex;
          align-items: center;
          font-size: 15px;
        }
        
        
        .navbar-nav .nav-link:hover {
          color: var(--color-secondary);
          background-color: rgba(70, 179, 118, 0.05);
        }
        
        .dropdown-menu {
          border-radius: var(--radius);
          box-shadow: var(--shadow);
          border: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        .dropdown-item {
          padding: 0.5rem 1rem;
          transition: all 0.2s ease;
        }
        
        .dropdown-item:hover {
          background-color: rgba(70, 179, 118, 0.1);
        }
        
        /* تحسينات الأزرار */
        .btn {
          border-radius: 22px;
          font-weight: normal;
          transition: all 0.2s ease;
          border: none;
          padding: 0.5rem 1rem;
        }
        
        .btn-primary {
          background: var(--color-primary);
          color: #3a2b00;
        }
        
        /* ==============================
   🎨 تحديث زر .btn-primary ليتبع ألوان الهوية العامة
   ============================== */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--color-primary);
  --bs-btn-border-color: var(--color-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--color-secondary);
  --bs-btn-hover-border-color: var(--color-secondary);
  --bs-btn-focus-shadow-rgb: 30, 136, 229;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--color-secondary);
  --bs-btn-active-border-color: var(--color-secondary);
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--color-primary);
  --bs-btn-disabled-border-color: var(--color-primary);
  transition: all 0.25s ease;
}

/* ✨ تأثيرات مرئية إضافية */
.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
  filter: brightness(0.95);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(30, 136, 229, 0.35);
}

        
        
        .btn-primary:hover, .btn-primary {
          background: var(--color-primary-600);
          color: #3a2b00;
          transform: translateY(-2px);
          box-shadow: var(--shadow-sm);
          font-weight: normal;
        }
        
        .btn-success {
          background: var(--color-secondary);
        }
        
        .btn-success:hover {
          background: var(--color-secondary-600);
          transform: translateY(-2px);
          box-shadow: var(--shadow-sm);
        }
        
        .btn-outline-primary {
          background: var(--color-primary);
          color: #3a2b00;
          font-weight: normal;
          border: 1px solid var(--color-primary);
        }
        
        .btn-outline-primary:hover {
          background: var(--color-primary-600);
          color: #3a2b00;
          border-color: var(--color-primary-600);
        }
        
        /* زر متابعة التسوق المحسن */
        .btn-continue {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          padding: 0.5rem 1rem;
          border: 1px dashed var(--color-secondary);
          color: var(--color-secondary);
          border-radius: var(--radius);
          font-weight: 700;
          text-decoration: none;
          transition: all 0.2s ease;
          background: rgba(70, 179, 118, 0.05);
        }
        
        .btn-continue:hover {
          background: rgba(70, 179, 118, 0.1);
          color: var(--color-secondary-600);
          transform: translateY(-2px);
        }
        
        /* تحسينات الحقول */
        .form-control,
        .form-select {
          border-radius: var(--radius);
          border: 1px solid rgba(0, 0, 0, 0.12);
          transition: all 0.2s ease;
          box-shadow: none;
          padding: 0.5rem 0.75rem;
        }
        
        .form-control:focus,
        .form-select:focus {
          border-color: var(--color-secondary);
          box-shadow: 0 0 0 0.2rem rgba(70, 179, 118, 0.15);
        }
        
        /* بطاقات المنتجات المحسنة */
        .product-card {
          overflow: hidden;
          border: 1px solid rgba(0, 0, 0, 0.06);
          border-radius: var(--radius);
          transition: all 0.3s ease;
          background: #fff;
          height: 100%;
          display: flex;
          flex-direction: column;
        }
        
        .product-card:hover {
          transform: translateY(-5px);
          box-shadow: var(--shadow);
        }
        
        .product-card .image-wrap {
          height: 220px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: #fafafa;
          border-bottom: 1px solid rgba(0, 0, 0, 0.05);
          padding: 1rem;
        }
        
        .product-card .card-title {
          font-size: 18px; /* تم التعديل */
          line-height: 1.3;
          margin-bottom: 0.5rem;
          color: #333;
          text-align: center; /* تم التعديل */
        font-weight: bold;
            
        }
        @media (max-width: 768px) {
          .product-card .image-wrap {
            height: 120px;
            padding: 0.75rem;
          }
        }
        
        .product-card .image-wrap img {
          max-height: 100%;
          max-width: 100%;
          object-fit: contain;
          transition: transform 0.3s ease;
        }
        
        .product-card:hover .image-wrap img {
          transform: scale(1.05);
        }
        
        .product-card .card-body {
          display: flex;
          flex-direction: column;
          padding: 7px; /* تم التعديل */
          flex-grow: 1;
          text-align: center;
        }
        
        .product-card .card-title {
          font-size: 16px; /* تم التعديل */
          font-weight: bold;
          line-height: 1.3;
          margin-bottom: 0.5rem;
          color: #333;
          text-align: center; /* تم التعديل */
        }
        
        .product-card .short-desc {
          display: -webkit-box;
          -webkit-line-clamp: 3; /* تم التعديل */
          -webkit-box-orient: vertical;
          overflow: hidden;
          font-size: 0.85rem;
          color: #666;
          margin-bottom: 0.75rem;
          line-height: 1.4;
          text-align: center; /* تم التعديل */
        }
        
        .product-card .price {
            font-size: 17px;
            font-weight: bold;
          margin-bottom: 1rem;
          color: #0da50d !important; /* تم التعديل */
          text-align: center; /* تم التعديل */
        }
        .fw-bold.mb-1.product-name {
             font-size: 18px;
             font-weight: bold !important;
color: var(--color-primary) !important;
  transition: color .2s ease;
               display: -webkit-box;
  -webkit-line-clamp: 3; /* سطرين فقط */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.8em; /* يضمن التوازن بين المنتجات */
  
        }
        /* 🔹 تحديد عدد الأسطر لاسم المنتج */

        .product-link:hover .product-name {
              display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.8em; /* يضمن التوازن بين المنتجات */

color: var(--color-secondary);
}
        .product-card .old-price {
          color: var(--color-muted);
          text-decoration: line-through;
          margin-inline-end: 0.35rem;
          font-size: 0.9rem;
        }
        
        .product-card .fw-bold {
          color: #3a2b00; /* تم التعديل */
          text-align: center; /* تم التعديل */
        font-weight: bold;
            
        }
        .product-card .actions {
          margin-top: auto;
          display: flex;
          flex-direction: column;
          gap: 0.5rem;
        }
        
        .product-card .qty-wrap {
          margin-bottom: 0px;
        }
        
        .product-card .qty-wrap input[type="number"] {
          width: 100%;
          text-align: center;
          padding: 0.4rem;
        }
        
        .product-card .btn-add {
          width: 100%;
          white-space: nowrap;
        }
        
        /* تحسينات للجوال */
        @media (max-width: 768px) {
          .product-card .card-title {
            font-size: 0.9rem;
            margin-bottom: 0.4rem;
            text-align: center; /* تم التعديل */
          }
          
          .product-card .short-desc {
            font-size: 11px; /* تم التعديل */
            margin-bottom: 0.5rem;
            text-align: center; /* تم التعديل */
          }
          
          .product-card .old-price {
            font-size: 0.8rem;
          }
          
          .product-card .fw-bold {
            font-size: 13px !important; /* تم التعديل */
            color: #0fb70f; /* تم التعديل */
            text-align: center; /* تم التعديل */
          }
          .product-card .card-body {
	font-size: 13px !important;
	--desc-lines: 2;
}
          .product-card .qty-wrap input[type="number"] {
            padding: 0.35rem;
            font-size: 0.9rem;
          }
          
          .product-card .btn-add {
            padding: 0.4rem 0.5rem;
            font-size: 0.85rem;
            font-weight: normal;
          }
          
          .btn {
            padding: 0.4rem 0.8rem;
            font-size: 0.9rem;
          }
          
          .card {
            max-width: 97%;
            margin: 0 auto;
          }
        }
        
        /* تحسينات العناوين */
        .h4, h4 {
          font-size: 1.5rem;
          text-align: center;
          color: var(--color-primary);
          font-weight: bold;
          margin-bottom: 1.5rem;
        }
        
        @media (min-width: 1200px) {
          .h4, h4 {
            font-size: 1.5rem;
            text-align: center;
          }
        }
        
        /* تحسينات الحاوية */
        @media (min-width: 1400px) {
          .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
            max-width: 60% !important;
          }
        }
        
        .card {
          margin: 0 auto;
          border-radius: var(--radius);
          border: 1px solid var(--color-primary);
          box-shadow: var(--color-secondary);
        }
        
        /* صفحة اتصل بنا - تحسين الأيقونات */
        .contact-icons {
          display: flex;
          flex-wrap: wrap;
          justify-content: center;
          gap: 1.5rem;
          margin: 2rem 0;
        }
        
        .contact-icon {
          display: flex;
          flex-direction: column;
          align-items: center;
          text-decoration: none;
          color: var(--color-text);
          transition: all 0.3s ease;
          padding: 1rem;
          border-radius: var(--radius);
          background: rgba(255, 255, 255, 0.8);
          box-shadow: var(--shadow-sm);
          width: 110px; /* تم التعديل */
        }
        
        .contact-icon:hover {
          transform: translateY(-5px);
          box-shadow: var(--shadow);
          color: var(--color-secondary);
          background: #fff;
        }
        
        .contact-icon i {
          font-size: 2rem;
          margin-bottom: 0.5rem;
          color: var(--color-primary);
        }
        
        .contact-icon:hover i {
          color: var(--color-secondary);
        }
        
        .contact-icon span {
          font-weight: 600;
          text-align: center;
          font-size: 0.9rem;
        }
        
        /* جدول عربة التسوق المحسن */
        .cart-table {
          width: 100%;
          border-collapse: collapse;
        }
        
        .cart-table th {
          background-color: #f8f9fa;
          padding: 0.75rem;
          font-weight: 600;
          text-align: right;
        }
        
        .cart-table td {
          padding: 0.75rem;
          vertical-align: middle;
          border-bottom: 1px solid #dee2e6;
        }
        
        .cart-table .form-control {
          max-width: 80px;
        }
        
         @media (max-width: 768px) {
             .modal-content {
    margin-top: 30%;
}
         }

        
        /* جدول عربة التسوق للجوال */
        @media (max-width: 768px) {
          .cart-table {
            font-size: 0.85rem;
          }
          
          .cart-table th,
          .cart-table td {
            padding: 0px; /* تم التعديل */
          }
          
          .cart-table th:nth-child(2),
          .cart-table td:nth-child(2) {
            display: none;
          }
          
          .cart-table .form-control {
            max-width: 60px;
            padding: 0.3rem;
          }
          
          .cart-table .btn {
            padding: 0.3rem 0.5rem;
            font-size: 0.8rem;
          }
        }
        
        /* تحسينات الأكورديون */
        .accordion-button {
            font-size: 14px;
          font-weight: 700;
          padding: 1rem 1.25rem;
        }
        
        .accordion-button:not(.collapsed) {
          color: #000;
          background: rgba(252, 195, 22, 0.12);
        }
        
        .accordion-button:focus {
          box-shadow: 0 0 0 0.2rem rgba(252, 195, 22, 0.25);
          border-color: var(--color-primary);
        }
        
        .accordion-body {
          padding: 1rem 1.25rem;
        }
        
/*=========footer=========*/
.site-footer {
  margin-top: auto; /* يجبر الفوتر يلتصق بالأسفل */
}
.site-footer {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: rgba(255,255,255,.85);
  text-align: center;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
 
}
.site-footer .text-muted{ color:#ffffff !important;}
.site-footer a {
  color: rgba(255,255,255,.85);
  transition: color .3s ease;
  text-decoration: none;
}
.site-footer a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 16px;
  transition: background .3s, transform .2s;
  text-decoration: none;
}
.footer-social a:hover {
  background: rgba(255,255,255,.25);
  transform: translateY(-3px);
}

.footer-divider {
  width: 70%;
  margin: 0 auto 1.5rem;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.15);
}

.footer-banner {
  max-width: 100%;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.footer-banner img {
  width: 59%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s ease;
max-width: 99%;
}
  @media (max-width: 768px) {.footer-banner img {max-width: 96% !important;}}
.footer-banner img:hover {
  transform: scale(1.02);
}

  
        
        /* تأثيرات التحميل لإضافة إلى السلة */
        .add-to-cart.loading {
          position: relative;
          color: transparent;
        }
        
        .add-to-cart.loading::after {
          content: "";
          position: absolute;
          width: 20px;
          height: 20px;
          top: 50%;
          left: 50%;
          margin: -10px 0 0 -10px;
          border: 2px solid rgba(255, 255, 255, 0.3);
          border-radius: 50%;
          border-top-color: #fff;
          animation: spin 0.8s ease infinite;
        }
        
        @keyframes spin {
          to {
            transform: rotate(360deg);
          }
        }
        
        /* تحسينات النموذج المنبثق للخيارات */
        .modal-content {
          border-radius: var(--radius);
          border: none;
          box-shadow: var(--shadow);
          margin-top: 5%;
        }
        
        .modal-header {
          border-bottom: 1px solid rgba(0, 0, 0, 0.1);
          padding: 1rem 1.5rem;
        }
        
        .modal-body {
          padding: 1.5rem;
        }
        
        .modal-title {
          font-weight: 700;
        }
        
        /* ترقيم الصفحات */
        .pagination {
          margin: 2rem 0;
        }
        
        .page-link {
          border-radius: var(--radius) !important;
          margin: 0 0.2rem;
          border: 1px solid rgba(0, 0, 0, 0.1);
          color: #333;
        }
        
        .page-item.active .page-link {
          background-color: var(--color-primary);
          border-color: var(--color-primary);
          color: #3a2b00;
        }
        
        .page-link:hover {
          background-color: #f8f9fa;
          border-color: rgba(0, 0, 0, 0.1);
          color: #333;
        }
        /* ------------------------------  */
        
        .checkout-container {
            padding-bottom: 1rem;
        }
        
        .section-title {
            font-weight: 600;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid #dee2e6;
            color: #2c3e50;
        }
        
        .required::after {
            content: " *";
            color: #dc3545;
        }
        
        .honeypot {
            position: absolute;
            left: -9999px;
            width: 1px;
            height: 1px;
            opacity: 0;
        }
        
        /* أنماط طرق الدفع */
        .payment-methods {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        
        .payment-option {
            border: 1px solid #dee2e6;
            border-radius: 8px;
            padding: 1rem;
            transition: all 0.2s;
            cursor: pointer;
        }
        
        .payment-option:hover {
            border-color: #0d6efd;
            background-color: #f8f9fa;
        }
        
        .payment-option .form-check-input {
            float: right;
            margin-left: 0.5rem;
            margin-top: 0.2rem;
        }
        
        .payment-header {
            display: flex;
            align-items: center;
            margin-bottom: 0.25rem;
        }
        
        .payment-icon {
            font-size: 1.25rem;
            margin-left: 0.5rem;
            color: #6c757d;
        }
        
        .payment-title {
            font-weight: 600;
            color: #2c3e50;
        }
        
        .payment-desc {
            font-size: 0.875rem;
            color: #6c757d;
            margin-top: 0.25rem;
        }
        
        /* أنماط التحويل البنكي */
        .bank-details .card {
            border: 1px solid #0d6efd;
        }
        
        .bank-info {
            white-space: pre-line;
            line-height: 1.6;
            font-size: 0.9rem;
        }
        
        .file-upload-container {
            position: relative;
        }
        
        .file-upload-label {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #fff;
            display: flex;
            align-items: center;
            padding: 0.375rem 0.75rem;
            pointer-events: none;
            border: 1px solid #ced4da;
            border-radius: 0.375rem;
            color: #6c757d;
        }
        
        #bankSlip {
            opacity: 0;
            position: relative;
            z-index: 1;
            height: 38px;
        }
        
        /* أنماط التحقق الأمني */
        .security-check {
            background-color: #f8f9fa;
            padding: 1rem;
            border-radius: 8px;
            border: 1px solid #e9ecef;
        }
        
        .captcha-container {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .captcha-question {
            font-weight: 500;
        }
        
        .captcha-image-container {
            display: flex;
            align-items: center;
        }
        
        .captcha-image {
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 3px;
            background: #fff;
            height: 40px;
        }
        
        .captcha-refresh {
            height: 40px;
            width: 40px;
        }
        
        .captcha-input {
            min-width: 120px;
        }
        
        /* أنماط ملخص الطلب */
        .order-summary {
            position: sticky;
            top: 1rem;
            border: 1px solid #dee2e6;
        }
        
        .order-items {
            margin-bottom: 1rem;
        }
        
        .order-item {
            border-bottom: 1px solid #f0f0f0;
        }
        
        .order-item:last-child {
            border-bottom: none;
        }
        
        .item-name {
            flex: 1;
        }
        
        .item-option {
            font-size: 0.8rem;
            color: #6c757d;
            margin-top: 0.1rem;
        }
        
        .item-quantity {
            color: #6c757d;
            font-size: 0.85rem;
        }
        
        .item-total {
            font-weight: 500;
            white-space: nowrap;
        }
        
        .order-totals {
            border-top: 2px solid #eee;
            padding-top: 0.75rem;
        }
        
        .total-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            font-size: 0.95rem;
        }
        
        .grand-total {
            font-weight: bold;
            font-size: 1.1rem;
            border-top: 1px solid #ddd;
            padding-top: 0.5rem;
            margin-top: 0.5rem;
        }
        
        .secure-checkout-note {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.75rem;
            background-color: #f8f9fa;
            border-radius: 8px;
            color: #28a745;
            font-weight: 500;
            font-size: 0.9rem;
            border: 1px solid #dee2e6;
        }
        
        /* تحسينات للجوال */
        @media (max-width: 767.98px) {
            .checkout-container {
                padding: 0 5px;
            }
            
            .order-summary {
                position: static;
                margin-bottom: 1rem;
            }
            
            .checkout-form .card-footer {
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                background: #fff;
                box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
                z-index: 100;
                border-top: 1px solid #dee2e6;
                padding: 0.75rem;
            }
            
            .payment-option {
                padding: 0.75rem;
            }
            
            .captcha-image-container {
                margin-bottom: 0.5rem;
            }
            
            .card-body {
                padding: 1rem;
            }
            
            .section-title {
                font-size: 1.1rem;
            }
        }
        
        @media (max-width: 575.98px) {
            .captcha-image-container {
                flex-direction: row;
                justify-content: flex-start;
                margin-bottom: 0.5rem;
            }
            
            .btn-lg {
                padding: 0.5rem 1rem;
                font-size: 1rem;
            }
            
            .order-item {
                padding: 0.5rem 0;
            }
            
            .card-header {
                padding: 0.75rem 1rem;
            }
            
            .card-footer {
                padding: 0.5rem;
            }
            
            .security-check {
                padding: 0.75rem;
            }
        }
        
        /* تحسينات عامة للتخطيط */
        .row.g-0.mx-0 {
            margin-left: 0 !important;
            margin-right: 0 !important;
        }
        
        .container-fluid.px-0 {
            padding-left: 0;
            padding-right: 0;
        }
        
        /* تحسينات للشاشات الصغيرة جدًا */
        @media (max-width: 360px) {
            .payment-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .payment-icon {
                margin-bottom: 0.25rem;
            }
            
            .captcha-image {
                height: 35px;
            }
            
            .btn {
                font-size: 0.9rem;
                padding: 0.4rem 0.8rem;
            }
        }
        .input-group .form-control[name="captcha"] {
          min-width: 160px;
          flex: 1 1 auto;
        }
        
        @media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav {
        margin: 0 auto;
        background-color: #00000003;
    }
}

/* لمعة دورية تمر فوق الهيدر */
.home-hero { --shine-interval: 4s; } /* غيّرها إلى 3s أو 3.5s حسب رغبتك */

.home-hero .shine {
  position: absolute;
  inset: 0;                 /* تملأ مساحة الهيدر */
  width: 45%;               /* عرض شعاع اللمعة */
  height: 100%;
  transform: translateX(-150%) skewX(-20deg); /* تبدأ من خارج اليسار */
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,.10) 40%,
    rgba(255,255,255,.45) 50%,
    rgba(255,255,255,.10) 60%,
    transparent 100%
  );
  filter: blur(.3px);
  pointer-events: none;     /* لا تعيق النقر على الرابط */
  z-index: 2;               /* فوق الـ overlay ليظهر بوضوح */
  will-change: transform;
  animation: shineSweep var(--shine-interval) ease-in-out infinite;
}

/* الـ overlay يبقى تحت اللمعة */
.home-hero .overlay { z-index: 1; }

@keyframes shineSweep {
  0%   { transform: translateX(-150%) skewX(-20deg); }
  20%  { transform: translateX(150%)  skewX(-20deg); } /* اللمعة تمر سريعًا (~0.5ث) */
  100% { transform: translateX(150%)  skewX(-20deg); } /* تبقى خارج الإطار حتى الدورة التالية */
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .home-hero .shine { animation: none; }
}
.site-menu-fixed {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1060;
}

.site-menu-spacer { /* سطر فارغ بنفس ارتفاع القائمة */
  height: var(--menu-h, 64px);
}

/* === Mobile header (55px) === */
.mobile-bar {
  position: sticky; top: 0; z-index: 1060;
  background: #fff; border-bottom: 1px solid rgba(0,0,0,.06);
  height: 55px; display: none;
}
@media (max-width: 991.98px){ .mobile-bar { display:block; } }

.mobile-bar .site-logo img { height: 32px; width: auto; object-fit: contain; }
.mobile-bar .logo-text     { font-weight: 800; font-size: 1.1rem; }

/* أيقونات دائرية أوت لاين موحّدة */
.icon-btn{
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0,0,0,.12); background: #fff; color: var(--color-text);
}
.icon-btn:hover{ background:#f8f9fa; }
.icon-btn svg { display:block; color: var(--color-text); }


/* === Search overlay === */
.search-overlay{
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(255,255,255,.96);
}
.search-overlay__inner{ padding-top: 14px; }
.search-head .form-control{ border-radius: 999px; padding-inline: 1rem 1.25rem; }
.search-results{ margin-top: .75rem; }
.search-row{
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .75rem; border-radius: 10px; text-decoration: none; color: inherit;
  direction: rtl; /* صورة يمين – نص يسار تلقائيًا */
}
.search-row:hover{ background: rgba(0,0,0,.04); }
.search-row img{
  width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border:1px solid rgba(0,0,0,.08);
}
.search-row .name{ flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty{ padding: .75rem; color: var(--color-muted); }

/* حذار من تضارب ارتفاع الشعار على الديسكتوب لديك؛ القيم الحالية لديك تبقى كما هي للـ lg+ */
/* إخفاء نافبار الدِسكتوب على الشاشات الصغيرة (احتياط لضمان عدم تغطية الهيدر) */
/* الهيدر ثابت فعليًا على الموبايل */

/* شريط الموبايل */
.mobile-bar{
  position: fixed !important;
  top: 0; left: 0; right: 0;
  height: 55px;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
  z-index: 1040;
}
.mobile-bar .container{ position: relative; height: 55px; }

/* تموضع العناصر الثلاثة بدقة */
@media (max-width: 991.98px) {
  /* يمين: زر القائمة + زر البحث (أول ديف داخل .container) */
  .mobile-bar .container > .d-flex:first-child{
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
  }
  /* الوسط: الشعار */
  .mobile-bar .site-logo{
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%,-50%);
    display: block;
  }
  .mobile-bar .site-logo img{ height: 32px; width: auto; object-fit: contain; }

  /* اليسار: زر الحقيبة (الـ <a> مباشرة داخل .container) */
  .mobile-bar .container > a.btn-cart{
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%);
  }
}

/* أزرار الأيقونات */
.icon-btn{
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0,0,0,.12); background: #fff; color: #222;
}
.icon-btn:hover{ background: #f8f9fa; }
.icon-btn svg{ display:block; }


/* badge السلة مضبوط في أعلى/يمين زر الحقيبة */
.btn-cart .badge{
  position: absolute;
  top: -6px; right: -6px;
  font-size: .7rem; padding: 0.5em;
}

/* اعمل padding أعلى الصفحة على الموبايل كي لا يغطي الهيدر المحتوى */
@media (max-width: 991.98px) {
  body { padding-top: 55px; }
}

/* أزرار الأيقونات (قائمة/بحث/حقيبة) */
.icon-btn{
  width:40px; height:40px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid rgba(0,0,0,.12); background:#fff; color:#222;
}
.icon-btn:hover{ background:#f8f9fa; }
.icon-btn svg{ display:block; color:inherit; }


/* طبقة البحث أعلى الكل */
.search-overlay{ z-index: 2000; }

/* === تحسين مظهر قائمة الجوال (Offcanvas) === */
#mobileMenu.offcanvas {
  width: min(86vw, 360px);
  border-radius: 0 16px 16px 0;            /* حافة ناعمة */
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  border-inline-end: none;
  z-index: 1065;                            /* أعلى من هيدر الجوال */
}
.offcanvas-backdrop.show {
  backdrop-filter: blur(3px);
  background-color: rgba(0,0,0,.25);
}

#mobileMenu .offcanvas-header {
  background: linear-gradient(135deg, #ffffff 0%, #f6f7f9 100%);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
#mobileMenu .offcanvas-title {
  font-weight: 800;
  letter-spacing: .5px;
}

/* عناصر القائمة */
#mobileMenu .offcanvas-body ul { padding: 0; margin: 0; }
#mobileMenu .offcanvas-body li { list-style: none; }

#mobileMenu .offcanvas-body a,
#mobileMenu .offcanvas-body summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .8rem;
  border-radius: 10px;
  color: #222;
  text-decoration: none;
  transition: background .15s ease, transform .05s ease;
  cursor: pointer;
}
#mobileMenu .offcanvas-body a:hover,
#mobileMenu .offcanvas-body summary:hover {
  background: rgba(0,0,0,.045);
}
#mobileMenu .offcanvas-body a:active,
#mobileMenu .offcanvas-body summary:active {
  transform: translateY(1px);
}

/* أيقونة بسيطة قبل العنصر باستخدام pseudo (اختياري وجمالي) */
#mobileMenu .offcanvas-body a::before,
#mobileMenu .offcanvas-body summary::before {
  content: none !important;
}
/* 🎨 تخصيص أيقونات القائمة */
#mobileMenu .offcanvas-body .menu-ico {
  color: var(--color-primary);    /* لون الهوية */
  font-size: 1rem;                /* أصغر قليلاً */
  margin-left: .5rem;             /* مسافة مناسبة يمين النص (RTL) */
  flex-shrink: 0;                 /* ثبات حجم الأيقونة */
}

/* تفاصيل التصنيفات (details) */
#mobileMenu details { margin-bottom: .4rem; }
#mobileMenu summary {
  list-style: none;           /* أخفي مثلث المتصفح */
}
#mobileMenu summary::-webkit-details-marker { display: none; }

/* سهم يوضح الفتح/الإغلاق */
#mobileMenu summary::after {
  content: "›";
  margin-inline-start: auto;
  transform: rotate(180deg);  /* RTL */
  opacity: .5;
  transition: transform .15s ease;
  font-weight: 700;
}
#mobileMenu details[open] > summary::after {
  transform: rotate(90deg);
}

/* قائمة التصنيفات الفرعية */
#mobileMenu .offcanvas-body ul ul {
  margin: .3rem .2rem .2rem .2rem;
  padding-inline-start: .75rem;
  border-inline-start: 2px solid rgba(0,0,0,.06);
}
#mobileMenu .offcanvas-body ul ul a {
  padding: .45rem .6rem;
  border-radius: 8px;
  font-size: .95rem;
}

/* مسافة عامة أسفل القائمة */
#mobileMenu .offcanvas-body { padding-bottom: 1rem; }

/* 🎨 تخصيص أيقونات القائمة (ديسكتوب + موبايل) */
.navbar-nav .menu-ico,
#mobileMenu .menu-ico {
  color: var(--color-primary);   /* لون الهوية الرئيسي */
  font-size: 0.95rem;            /* أصغر قليلاً */
  margin-left: .4rem;            /* فراغ مناسب يمين النص (RTL) */
  flex-shrink: 0;
}


/* أخفِ نافبار الديسكتوب على الشاشات الصغيرة لتجنّب تغطية الهيدر/الشريط السفلي */
@media (max-width: 991.98px) {
  #mainMenuBar { display: none !important; }
  body { padding-top: 55px; }  
}

/* === الشريط السفلي للموبايل === */
.mobile-bottom-bar{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 56px;                          /* تقريبًا مثل الهيدر */
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.08);
  z-index: 1038;                          /* أقل من offcanvas/backdrop حتى لا يغطيها */
  padding-bottom: env(safe-area-inset-bottom, 0); /* دعم iPhone */
}
.mobile-bottom-bar .bb-rail{
  height: 56px;
  display: flex;
}

.mobile-bottom-bar .bb-item{
  flex: 1 0 33.333%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  text-decoration: none; color: #222;
}
.mobile-bottom-bar .bb-item + .bb-item{
  border-inline-start: 1px solid rgba(0,0,0,.08); /* فاصل بين الأيقونات */
}

/* زر الأيقونة */
.mobile-bottom-bar .bb-ico{
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
}
.mobile-bottom-bar .bb-item:hover .bb-ico{ background: #f8f9fa; }

/* بادج عدّاد السلة داخل الدائرة */

.mobile-bottom-bar .bb-ico svg{
  color: var(--secondary-color) !important;
}

/* اجعل المحتوى لا يختبئ خلف الشريط السفلي على الموبايل */
@media (max-width: 991.98px) {
  body{
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
    /* لو عندك مسبقًا padding-bottom للصفحات، خليه أكبر قيمة عبر JS أدناه */
  }
}

/* Desktop navbar layering */
@media (min-width: 992px) {
  #mainMenuBar,
  .site-menu-fixed {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1032; /* أعلى من المحتوى وأقل من الـoffcanvas/backdrop إن وجدت */
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
    border-bottom: 1px solid rgba(0,0,0,.08);
  }
}

/* تأكد من ظهور أيقونات السلة */
[data-cart-icon-desktop],
[data-cart-icon-mobile] {
  display: inline-flex !important;
  visibility: visible !important;
}


/* تحسين مظهر أيقونات السلة في الشريط السفلي */
.mobile-bottom-bar .bb-ico {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* طيران الصورة إلى السلة */
.fly-clone{
  pointer-events: none;
  position: fixed;
  z-index: 1055;
  transition: transform .65s cubic-bezier(.22,.61,.36,1), opacity .65s;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* نبض عداد السلة */
[data-cart-count].pulse{ animation: cartPulse .5s ease; }
@keyframes cartPulse{
  0%{ transform: scale(1) }
  50%{ transform: scale(1.15) }
  100%{ transform: scale(1) }
}

@keyframes cartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}


/* === [FIX] موضع سلة الموبايل أعلى اليسار داخل الشريط === */
@media (max-width: 991.98px){
  .mobile-bar a.btn-cart{
    position: absolute !important;   /* يتغلب على .position-relative */
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1061;
  }
}

.fa-user:before {
    color: var(--color-secondary);
}
/* اجعل حامل الأيقونة مرجعًا للبادج */
.mobile-bottom-bar .bb-ico{ position: relative; }

/* لا تُخفي أيقونات السلة المعلّمة */
[data-cart-icon-desktop],
[data-cart-icon-mobile]{ display:inline-flex!important; visibility:visible!important; }

/* توحيد شكل بادج السلة وتوسيط الرقم تمامًا */
.btn-cart .badge[data-cart-count]{
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0 !important;             /* يمنع الاستطالة العمودية */
  border-radius: 50% !important;      /* دائرة حقيقية */
  display: grid !important;           /* توسيط أفقي وعمودي */
  place-items: center !important;     /* يضع الرقم في منتصف الدائرة */
  line-height: 1 !important;          /* لا يعتمد على line-height للتموضع */
  font-size: 12px;                    /* اجعلها 12-11 حسب ذوقك */
  font-weight: 700;
}

/* (اختياري) لو عندك بادج سفلية في شريط الموبايل */
.mobile-bottom-bar .btn-cart .badge[data-cart-count]{
  width: 22px; height: 22px; min-width: 22px;
  padding: 0 !important;
  border-radius: 50% !important;
  display: grid !important; place-items: center !important;
  line-height: 1 !important; font-size: 12px; font-weight: 700;
}

.icon-btn svg {
    display: block;
    color: var(--color-secondary);
}
/* شارة الشير الصغيرة أعلى البطاقة */
.product-card { position: relative; }
.product-share-badge{
  position:absolute; top:8px; left:8px; z-index:5;
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:999px;
  background:#ffffff; border:1px solid rgba(0,0,0,.08);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-share-badge:hover{ transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.product-share-badge i{ font-size:14px; color:#6c757d; }
.product-share-badge i:active{color:#fff; } .product-share-badge i:after{color:#fff; }
.share-icons .btn { width:42px; height:42px; display:inline-flex; align-items:center; justify-content:center; border-radius:10px; }
.share-link-box{ display:flex; gap:.5rem; align-items:center; }
.share-link-box input{ direction:ltr; font-size:.875rem; }

/*-------Loading ---------*/
.checkout-overlay {
  position: fixed;
  inset: 0;
background: color-mix(in srgb, var(--color-secondary) 80%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.checkout-overlay .overlay-content {
  text-align: center;
}

/*---------effects---------*/
/* === تأثير اهتزاز أو وميض لأيقونة السلة عند إضافة منتج === */
@keyframes cartShake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-2px, 0) rotate(-5deg); }
  40% { transform: translate(2px, 0) rotate(5deg); }
  60% { transform: translate(-2px, 0) rotate(-5deg); }
  80% { transform: translate(2px, 0) rotate(5deg); }
}
.btn-cart.shake { animation: cartShake 0.6s ease; }

@keyframes cartGlow {
  0% { box-shadow: 0 0 0px var(--color-primary); }
  50% { box-shadow: 0 0 15px var(--color-primary); }
  100% { box-shadow: 0 0 0px var(--color-primary); }
}
.btn-cart.glow { animation: cartGlow 1s ease; }

/* === تأثير ظهور المنتجات عند التمرير (Fade-Up) === */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s ease, transform .9s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === أزرار متدرجة الألوان عند الـ hover === */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  opacity: 0;
  transition: opacity .3s;
  z-index: -1;
}
.btn:hover::before { opacity: 1; }

/* زر "إتمام الطلب" بنبضة */
.btn-checkout:active {
  animation: pulseSuccess .6s ease;
}
@keyframes pulseSuccess {
  0% { box-shadow: 0 0 0 0 rgba(70,179,118,0.7); }
  70% { box-shadow: 0 0 0 12px rgba(70,179,118,0); }
  100% { box-shadow: 0 0 0 0 rgba(70,179,118,0); }
}
.cart-item.added {
  animation: slideInRight .5s ease;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.cart-item.removed {
  animation: fadeShrink .4s forwards;
}
@keyframes fadeShrink {
  to { opacity: 0; transform: scale(0.8); height: 0; margin: 0; padding: 0; }
}

.total-highlight {
  animation: highlightTotal 1s ease;
}
@keyframes highlightTotal {
  0% { background-color: var(--color-primary); color:#fff; }
  100% { background-color: transparent; color: inherit; }
}

/* === وميض أيقونة السلة عند الإضافة === */
.flash {
  animation: flashAnim 0.6s ease;
}

@keyframes flashAnim {
  0%, 100% { filter: none; }
  50% { filter: brightness(1.8); }
}



/* === عنوان بتأثير الكتابة === */
.typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--color-primary);
  animation: typing 3s steps(30, end), blink .75s step-end infinite;
}
@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink { 50% { border-color: transparent; } }

/* كلاس موحد للتحكم بلون/حجم أيقونات الشريط السفلي */
.bb-icon-color {
  font-size: 22px;                 /* حجم موحد لكل الأيقونات */
  color: var(--color-secondary);   /* اللون الثانوي من الثيم */
}
.cart-item.removed {
  animation: fadeShrink .4s forwards;
}
@keyframes fadeShrink {
  to { opacity: 0; transform: scale(0.8); height: 0; margin: 0; padding: 0; }
}
/*------------تاثير بخة عطر   ---*/
.perfume-particle {
  position: absolute;
  width: 8px; /* حجم أكبر */
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: perfumeParticle 1200ms ease-out forwards;
}

@keyframes perfumeParticle {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.6); opacity: 0; }
}

/* تنسيقات خاصة للعروض */
.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 5;
}

/*---------------from index --------*/
.home-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transition: box-shadow .25s ease, transform .25s ease;
}
.home-hero img {
  display: block;
  width: 100%;
  height: auto;
  transform: translateZ(0);
}
.home-hero .overlay {
  position: absolute; inset: 0;
  background: radial-gradient(60% 100% at 80% 0%, rgba(0,0,0,0.08), transparent 60%);
  pointer-events: none;
}
@media (hover: hover) {
  .home-hero:hover { 
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    transform: translateY(-2px);
  }
  .home-hero:hover img { transform: scale(1.02); }
}
@media (max-width: 576px) {
  .home-hero { border-radius: 14px; }
}
.product-card { position: relative; }
.product-share-badge{
  position:absolute; top:8px; left:8px; z-index:5;
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:999px;
  background:#ffffff; border:1px solid rgba(0,0,0,.08);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-share-badge:hover{ transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.product-share-badge i{ font-size:14px; color:#6c757d; }
.share-icons .btn { width:42px; height:42px; display:inline-flex; align-items:center; justify-content:center; border-radius:10px; }
.share-link-box{ display:flex; gap:.5rem; align-items:center; }
.share-link-box input{ direction:ltr; font-size:.875rem; }

/* زر العدسة */


/* إطار نافذة الصورة */
.zoom-modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* يحتوي الصورة بالكامل بدون فراغات */
.zoom-frame {
  position: relative;
  display: inline-block;
  background: #000;
  border-radius: 8px;
  padding: 0;
}
.zoom-img {
  max-width: 95vw;
  max-height: 85vh;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

/* زر الإغلاق */
.zoom-close {
  position: absolute;
  top: 8px; right: 8px;
  width: 36px; height: 36px;
  border: none;
  border-radius: 50%;
  background: #e9ecef;
  font-size: 30px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}
.zoom-close:hover { background: #f3d3d6; }


#imgZoomModal img {
  max-width: 85vw;   /* لا يتجاوز عرض الشاشة */
  max-height: 75vh;  /* لا يتجاوز ارتفاع الشاشة */
  object-fit: contain;
}

/* الحاوية */
.zoom-box {
  position: relative;   /* مهم عشان .zoom-icon يتمركز بالنسبة للصورة */
}
.ratio::before {
    display: contents;
}
.zoom-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* يضعه بالمنتصف تماماً */
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease;
  z-index: 5;
}
.zoom-box:hover .zoom-icon {
  opacity: 1;
}
.zoom-icon:hover {
  background: #fff;
}
.zoom-icon i {
  font-size: 20px;
  color: #333;
}

/* خلفية اللودينق */
#page-loader {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.95); /* أبيض شبه شفاف */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* أيقونة التحميل */
#page-loader .spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--color-secondary);  /* يستخدم اللون الثانوي */
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}


/* حركة دوران */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* عند الإخفاء */
#page-loader.hide {
  opacity: 0;
  visibility: hidden;
}

/* صفحة تسجيل الدخول فقط */
@media (max-width: 768px) {
.login-card {
    max-width: 290px !important;
    width: 90% !important;
}
}
.login-page {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cairo', sans-serif;
}

.login-card {
  max-width: 420px;
  width: 90%;
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow, 0 0 20px rgba(0,0,0,0.1));
  overflow: hidden;
}


.login-header {
  background: #fff3cd;
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.login-header h1 {
  font-size: 1.4rem;
  margin: 0;
  color: var(--color-text, #222);
}

.login-card .btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.login-card .btn-primary:hover {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

/* -----product images -------  */

 .product-gallery .gallery-main{ position:relative; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); }
.product-gallery .gallery-main img{ width:100%; height:auto; display:block; }
.product-gallery .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.6; /* شفاف */
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px; /* حجم السهم */
  cursor: pointer;
}

.product-gallery .nav.prev{ right:8px; }
.product-gallery .nav.next{ left:8px; }
.product-gallery .thumbs{ display:flex; gap:.5rem; flex-wrap:wrap; margin-top:8px; }
.product-gallery .thumb{
  width:72px; height:72px; object-fit:cover;
  border-radius:10px; border:2px solid transparent;
  cursor:pointer;
}
.product-gallery .thumb.active{ border-color:var(--color-primary); }
/*----------card links and titles----------*/
.product-link input,
.product-link button {
  pointer-events: auto;
}

.product-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.product-link * {
  pointer-events: none;
}

.product-link .btn,
.product-link input {
  pointer-events: auto; /* استثناء الأزرار وحقل الكمية */
}

/* الحاوية */
/* ================================
   ✅ تصميم الأقسام - مدمج ومحسّن
   ================================ */

/* الحاوية */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.75rem; /* مسافة بين المربعات */
  justify-content: center;
  text-align: center;
  padding: 5px;
}

/* المربعات */
.cat-btn {
  border: 1px solid #eee;                         /* إطار ناعم */
  color: var(--color-primary);
  background: #fff;                               /* ✅ خلفية بيضاء */
  border-radius: 12px;                            /* ✅ زوايا ناعمة */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);      /* ✅ ظل خفيف أنيق */
  padding: 1em 0.5em;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;        /* ✅ مربعات متساوية */
  display: flex;
  flex-direction: column;   /* الأيقونة فوق النص */
  align-items: center;
  justify-content: center;
  z-index: 0;
  text-decoration: none;
}

/* تأثير الحركة */
.cat-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* الأيقونة أو الصورة */
.cat-btn i,
.cat-btn .cat-img {
  font-size: 1.4rem;
  width: 34px;
  height: 34px;
  object-fit: contain;
  margin-bottom: .4rem;
  transition: all 0.25s ease;
}

/* اسم القسم */
.cat-name {
  font-size: 0.85rem;
  line-height: 1.3;
  font-weight: 600;
  white-space: normal;        /* ✅ إلغاء القص */
  word-break: break-word;
  overflow: visible;
  text-overflow: unset;
}

/* الصور */
.cat-img {
  display: inline-block;
  border-radius: 8px;
  background: #f9f9f9;          /* ✅ خلفية رمادية خفيفة */
  border: 1px solid #e0e0e0;
  padding: 4px;
}

/* أثناء الهوفر */
.cat-btn:hover .cat-img {
  border-color: var(--color-primary);
  background: rgba(255,255,255,.25);
}

/* تأثير Fill Up الأصلي */
.cat-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-primary);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: -1;
}
.cat-btn:hover::before,
.cat-btn:focus::before,
.cat-btn.active-cat::before {
  transform: translateY(0);
}

.cat-btn:hover,
.cat-btn:focus,
.cat-btn.active-cat {
  color: #fff !important;
  border-color: var(--color-primary);
}
.cat-btn:hover i,
.cat-btn:hover .cat-name,
.cat-btn.active-cat i,
.cat-btn.active-cat .cat-name {
  color: #fff !important;
}

/* الحالة النشطة */
.cat-btn.active-cat {
  box-shadow: 0 0 0 2px rgba(252,195,22,0.2);
}

/* دعم الموبايل العام */
@media (max-width: 768px) {
  .categories-grid {
    gap: 0.6rem;
  }
  .cat-btn {
    font-size: 0.8rem;
    padding: .6em .3em;
  }
  .cat-btn i,
  .cat-btn .cat-img {
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
    margin-bottom: .3rem;
  }
}

/* 🌐 تحسين توزيع الأقسام على الجوال */
@media (max-width: 768px) {
  .categories-grid {
    display: grid;
    gap: 0.6rem;
  }

  /* 🔹 توزيع ديناميكي حسب العدد */
  .categories-grid[data-count="1"]  { grid-template-columns: repeat(1, 1fr); }
  .categories-grid[data-count="2"]  { grid-template-columns: repeat(2, 1fr); }
  .categories-grid[data-count="3"]  { grid-template-columns: repeat(3, 1fr); }
  .categories-grid[data-count="4"]  { grid-template-columns: repeat(4, 1fr); }
  .categories-grid[data-count="5"]  { grid-template-columns: repeat(3, 1fr); }
  .categories-grid[data-count="6"]  { grid-template-columns: repeat(3, 1fr); }
  .categories-grid[data-count="7"]  { grid-template-columns: repeat(3, 1fr); }
  .categories-grid[data-count="8"]  { grid-template-columns: repeat(4, 1fr); }
  .categories-grid[data-count="9"]  { grid-template-columns: repeat(4, 1fr); }
  .categories-grid[data-count="10"],
  .categories-grid[data-count="11"],
  .categories-grid[data-count="12"],
  .categories-grid[data-count="13"],
  .categories-grid[data-count="14"],
  .categories-grid[data-count="15"] {
    grid-template-columns: repeat(5, 1fr);
  }

  /* 🔸 تثبيت الشكل المربع والنص */
  .categories-grid .cat-btn {
    aspect-ratio: 1/1;
    padding: 0.6em 0.3em;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    white-space: normal;
    opacity: 0;                 
    transform: translateY(15px);
    animation: fadeUp 0.6s ease forwards;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  /* ⏱️ تأخير بسيط تدريجي للحركة */
  .categories-grid .cat-btn:nth-child(1) { animation-delay: 0.05s; }
  .categories-grid .cat-btn:nth-child(2) { animation-delay: 0.1s; }
  .categories-grid .cat-btn:nth-child(3) { animation-delay: 0.15s; }
  .categories-grid .cat-btn:nth-child(4) { animation-delay: 0.2s; }
  .categories-grid .cat-btn:nth-child(5) { animation-delay: 0.25s; }
  .categories-grid .cat-btn:nth-child(6) { animation-delay: 0.3s; }
  .categories-grid .cat-btn:nth-child(7) { animation-delay: 0.35s; }
  .categories-grid .cat-btn:nth-child(8) { animation-delay: 0.4s; }
  .categories-grid .cat-btn:nth-child(9) { animation-delay: 0.45s; }
  .categories-grid .cat-btn:nth-child(10){ animation-delay: 0.5s; }

  /* النص داخل المربعات */
  .categories-grid .cat-name {
    font-size: 14px;
    line-height: 12px;
    word-break: break-word;
    text-wrap: balance;
  }

  .categories-grid .cat-img,
  .categories-grid .cat-btn i {
    width: 28px;
    height: 28px;
    font-size: 22px;
  }

  /* 🎯 محاذاة أنيقة للصف الثاني */
  .categories-grid[data-count="9"],
  .categories-grid[data-count="10"],
  .categories-grid[data-count="11"],
  .categories-grid[data-count="12"],
  .categories-grid[data-count="13"],
  .categories-grid[data-count="14"],
  .categories-grid[data-count="15"] {
    justify-items: center;
    align-items: start;
  }

  .categories-grid[data-count="9"] .cat-btn,
  .categories-grid[data-count="10"] .cat-btn {
    width: 80px;
    max-width: 22vw;
  }
}

/* 🪄 في الشاشات الضيقة جدًا (≤420px) */
@media (max-width: 420px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr); /* ✅ صفوف ثابتة 3 مربعات */
  }
}

/* ✨ حركة الظهور اللطيفة */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*------------cart page------------*/
.cart-container {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 20px;
}

.cart-header {
  display: flex;
  background: #f8f9fa;
  padding: 15px 20px;
  font-weight: 600;
  border-bottom: 1px solid #eee;
}

.cart-header > div {
  padding: 0 10px;
}

.cart-product { flex: 3; }
.cart-price { flex: 1; text-align: center; }
.cart-quantity { flex: 1; text-align: center; }
.cart-total { flex: 1; text-align: center; }
.cart-actions { flex: 0.5; text-align: center; }

.cart-items {
  padding: 0;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.cart-item:hover {
  background-color: #fafafa;
}

.cart-item > div {
  padding: 0 10px;
}

.product-info {
  text-align: right;
}

.product-name {
  font-weight: 500;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.product-option {
  font-size: 0.9em;
  color: #6c757d;
}

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 120px;
  margin: 0 auto;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: #f8f9fa;
  border-color: #ccc;
}

.qty-input {
  width: 50px;
  height: 36px;
  border: 1px solid #ddd;
  border-left: none;
  border-right: none;
  text-align: center;
  margin: 0 -1px;
  font-size: 16px;
}

.btn-remove {
  color: #dc3545;
  font-size: 16px;
  padding: 8px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove:hover {
  color: #c82333;
  text-decoration: none;
}

.mobile-label {
  display: none;
}

/* تصميم بطاقة الإجماليات المحسّن */
.cart-summary-container {
  margin: 20px 0;
}

.summary-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  backdrop-filter: blur(10px);
  animation: slideUp 0.5s ease-out;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f3f4;
  transition: all 0.3s ease;
}

.summary-row:last-of-type {
  border-bottom: none;
}

.summary-row:hover {
  background: rgba(0, 0, 0, 0.02);
  margin: 0 -12px;
  padding: 12px;
  border-radius: 8px;
}

.summary-label {
  font-size: 1rem;
  color: #5f6368;
  font-weight: 500;
  flex: 1;
  text-align: right;
  padding-left: 10px;
}

.summary-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color, #1a73e8);
  min-width: 120px;
  text-align: left;
}

/* تنسيق الصفوف المختلفة */
.subtotal-row .summary-value {
  color: #5f6368;
  text-decoration: line-through;
}

.discount-row .summary-value {
  color: var(--success-color, #34a853);
  font-weight: 700;
}


.total-row .summary-label {
  color: var(--primary-color, #1a73e8);
  font-weight: 700;
  font-size: 1.2rem;
}

.total-row .summary-value {
  font-weight: 800;
  font-size: 1.4rem;
}

.total-highlight {
  background: linear-gradient(45deg, var(--primary-color, #1a73e8), var(--secondary-color, #34a853));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* تنسيق الأزرار */
.summary-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 0px solid #e9ecef;
}
.summary-actions .btn:hover::before {
  left: 100%;
}

.summary-actions .btn:active {
  transform: translateY(0);
  transition: transform 0.1s;
}

/* تأثيرات إضافية */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تصميم الجوال - الأولوية القصوى */
@media (max-width: 767px) {
  .cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 15px;
    padding: 15px;
    position: relative;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  
  .cart-item:last-child {
    margin-bottom: 0;
  }
  
  .cart-product {
    grid-column: 1 / span 2;
    grid-row: 1;
    padding: 0;
    text-align: right;
  }
  
  .cart-price {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }
  
  .cart-quantity {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0;
  }
  
  .cart-total {
    grid-column: 1;
    grid-row: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }
  
  .cart-actions {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0;
  }
  
  .mobile-label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 0.9rem;
  }
  
  .quantity-controls {
    justify-content: flex-end;
    max-width: none;
  }
  
  .btn-remove {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  
  .product-name {
    font-size: 1.1rem;
    margin-bottom: 5px;
  }
  
  .qty-btn {
    width: 40px;
    height: 40px;
  }
  
  .qty-input {
    width: 50px;
    height: 40px;
    font-size: 16px;
  }
  
  .price-value,
  .total-value {
    font-weight: 500;
    font-size: 1.1rem;
  }
  
  .total-value {
    color: #28a745;
  }

  /* تصميم الجوال لبطاقة الإجماليات */
  .summary-card {
    padding: 20px 16px;
    border-radius: 12px;
    margin: 0 10px;
  }
  
  .summary-row {
    padding: 16px 0;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .summary-row:hover {
    margin: 0 -8px;
    padding: 16px 8px;
  }
  
  .summary-label {
    text-align: center;
    padding-left: 0;
    font-size: 0.95rem;
  }
  
  .summary-value {
    text-align: center;
    min-width: auto;
    font-size: 1.2rem;
  }
  
  .total-row {
    margin: 12px -8px 0;
    padding: 20px 8px;
  }
  
  .total-row .summary-label {
    font-size: 1.1rem;
  }
  
  .total-row .summary-value {
    font-size: 1.3rem;
  }
  
  .summary-actions {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }
  
  .summary-actions .btn {
    padding: 16px 20px;
    font-size: 1.05rem;
  }
}

@media (max-width: 576px) {
  .cart-item {
    padding: 12px;
  }
  
  .product-name {
    font-size: 1rem;
  }
  
  .quantity-controls {
    flex-direction: row;
  }

  /* تصميم الجوال الصغير لبطاقة الإجماليات */
  .summary-card {
    padding: 16px 12px;
    border-radius: 10px;
  }
  
  .summary-row {
    padding: 14px 0;
  }
  
  .summary-label {
    font-size: 0.9rem;
  }
  
  .summary-value {
    font-size: 1.1rem;
  }
  
  .total-row .summary-label {
    font-size: 1rem;
  }
  
  .total-row .summary-value {
    font-size: 1.2rem;
  }
  
  .summary-actions .btn {
    padding: 10px 16px;
    font-size: 1rem;
  }
}

/* تحسينات للشاشات المتوسطة */
@media (min-width: 768px) and (max-width: 992px) {
  .cart-header > div {
    padding: 0 5px;
    font-size: 0.9rem;
  }
  
  .cart-item > div {
    padding: 0 5px;
  }
  
  .product-name {
    font-size: 1rem;
  }
  
  .summary-actions .btn {
    font-size: 0.9rem;
    padding: 8px 12px;
  }
}

/* 🎯 عنوان بلوك رئيسي في المتجر */
.block-title {
  position: relative;
  text-align: center;
  font-size: clamp(1.2rem, 2vw, 1.8rem); /* متجاوب مع الشاشات */
  font-weight: 700;
  color: var(--color-primary); /* لون الهوية الرئيسي */
  margin: 2rem 0 1.5rem;
  padding: 0 1rem;
  font-family: 'Cairo', sans-serif;
}

.block-title::before,
.block-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 25%;
  height: 4px;
  border-radius: 3px;
  transform: translateY(-50%);
}

/* الخط الأيسر */
.block-title::before {
  left: 0;
  background: linear-gradient(
    to right,
    var(--color-primary) 0%,
    rgba(252, 195, 22, 0.2) 100%
  );
}

/* الخط الأيمن */
.block-title::after {
  right: 0;
  background: linear-gradient(
    to left,
    var(--color-primary) 0%,
    rgba(252, 195, 22, 0.2) 100%
  );
}

/* دعم الشاشات الصغيرة */
@media (max-width: 600px) {
  .block-title {
    font-size: 1.2rem;
  }
  .block-title::before,
  .block-title::after {
    width: 20%;
    height: 3px;
  }
}
.block-title {
  animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =======================================================
   🌍 نظام الخطوط المحلي (يدعم الديسكتوب والجوال)
   ======================================================= */

/* 🅰️ تحميل الخطوط من مجلد /assets/fonts */
@font-face {
  font-family: 'Almarai';
  src: url('../fonts/Almarai-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Almarai';
  src: url('../fonts/Almarai-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Almarai';
  src: url('../fonts/Almarai-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Almarai';
  src: url('../fonts/Almarai-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* 🎨 الفئات الجاهزة لاستخدام أوزان مختلفة يدويًا */
.almarai-light {
  font-family: 'Almarai', sans-serif;
  font-weight: 300;
  font-style: normal;
}

.almarai-regular {
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-style: normal;
}

.almarai-bold {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-style: normal;
}

.almarai-extrabold {
  font-family: 'Almarai', sans-serif;
  font-weight: 800;
  font-style: normal;
}

/* ===============================================
   ✅ تطبيق الخط بشكل عام على جميع عناصر الموقع
   =============================================== */
html, body, button, input, select, textarea {
  font-family: 'Almarai', 'Tahoma', 'Arial', sans-serif !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-ligatures: none;
  direction: rtl;
}


/* تحسين مظهر العناوين */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  font-family: 'Almarai', 'Tahoma', 'Arial', sans-serif !important;
}

/* 🔹 صفحة الخطأ  */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  background: linear-gradient(135deg, var(--color-primary)10%, var(--color-secondary) 90%);
  color: #fff;
  border-radius: 12px;
  padding: 2rem;
  animation: fadeIn 0.6s ease-in-out;
}

.error-page .error-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.error-page .error-text {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.error-page .btn-back {
  background: #fff;
  color: var(--color-primary);
  border: none;
  padding: 0.8em 1.5em;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.error-page .btn-back:hover {
  background: var(--color-secondary);
  color: #fff;
}

/* حركة دخول لطيفة */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(15px);}
  to {opacity: 1; transform: translateY(0);}
}

.product-description {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}

.product-description h3,
.product-description h4,
.product-description h5 {
  margin-top: 1rem;
  margin-bottom: .5rem;
  font-weight: bold;
  color: var(--color-primary, #222);
}

.product-description ul,
.product-description ol {
  padding-right: 1.5rem;
  margin-bottom: 1rem;
}

.product-description li {
  margin-bottom: .4rem;
}
.product-card .d-grid.mt-2 {
  margin-top: 0.5rem !important;
}

/* ==============================
   🔹 تثبيت زر السلة وحقل الكمية بأسفل البطاقة دائمًا
   ============================== */
.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

/* ✅ جسم البطاقة (المحتوى العلوي) يتمدد حسب النص */
.product-card .card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ✅ القسم السفلي (الكمية + الزر) يثبت في الأسفل */
.product-card .card-footer,
.product-card .qty-inline,
.product-card .d-grid.mt-auto {
  margin-top: auto !important;
}

/* ✅ إزالة الفراغات غير المرغوبة */
.product-card .qty-inline {
  margin-bottom: 0 !important;
}

.product-card .d-grid.mt-auto {
  margin-top: 0 !important;
}

/* ✅ توحيد مظهر الزر وحقل الكمية أسفل البطاقة */
.product-card .qty-inline,
.product-card .btn-add,
.product-card .btn-options,
.product-card .btn-secondary {
  width: 100%;
}

/* ✅ تحسين التفاعل عند الهوفر */
.product-card:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

/*-------------*/
/* ==============================
   🔹 إصلاح الفراغ بين حقل الكمية وزر السلة
   ============================== */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* جسم البطاقة */
.product-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* يوزع المحتوى الأعلى والأسفل بالتساوي */
  flex-grow: 1;
}

/* القسم السفلي (الكمية + الزر) */
.product-card .card-body .bottom-actions {
  margin-top: auto;              /* يلتصق بأسفل البطاقة */
  display: flex;
  flex-direction: column;
  gap: 0;                        /* يزيل أي فراغ بين العناصر */
}

/* إزالة أي مسافات داخل القسم */
.product-card .qty-inline {
  margin-bottom: 0 !important;
}
.product-card .d-grid.mt-auto {
  margin-top: 0 !important;
}

/* توحيد العرض */
.product-card .qty-inline,
.product-card .btn-add,
.product-card .btn-options,
.product-card .btn-secondary {
  width: 100%;
}

.block-title small.text-muted {
  font-weight: 500;
  color: var(--color-muted);
}


#bank-info-section .card {
  border-radius: 12px;
  background-color: #fafafa;
  transition: all 0.2s ease-in-out;
}
#bank-info-section .card:hover {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
/* تحسين العرض في الجوال وسطح المكتب */
#bank-section { font-size: 14px; }
.copy-btn {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  border-color: #ccc;
  color: #555;
  transition: all 0.2s ease;
}
.copy-btn:hover {
  background: #e9ecef;
  color: #000;
}

.copy-btn:active {
  background: #d1e7dd;
  color: #0a3622;
}

/* تنظيم الأعمدة في checkout */
.checkout-layout {
  display: flex;
  flex-wrap: wrap;
}
@media (min-width: 992px) {
  .checkout-layout {
    flex-direction: row;
  }
  .checkout-layout .col-lg-7 {
    order: 1;
  }
  .checkout-layout .col-lg-5 {
    order: 2;
  }
}
@media (max-width: 992px) {
  .checkout-layout {
    flex-direction: column-reverse;
  }
}

/* الراديو داخل البطاقة */
#bank-section .form-check-input {
  scale: 1.2;
}
  /* تنسيقات Toast محسنة */
  .toast-container {
    position: fixed;
    z-index: 99999;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90%;
  }
  .toast {
    background: rgba(40, 167, 69, 0.4) !important; /* أخضر شفاف 40% */
    backdrop-filter: blur(20px) saturate(180%); /* تأثير blur مع تشبع */
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    min-width: 300px;
    color: #fff;
    font-weight: 600;
  }
  .toast-success {
    border-right: 4px solid rgba(255, 255, 255, 0.6);
  }
  .toast-error {
    background: rgba(220, 53, 69, 0.4) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 4px solid rgba(255, 255, 255, 0.6);
  }
  .toast-body {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  .toast-body i {
    font-size: 1.25rem;
    flex-shrink: 0;
  }
  @media (max-width: 576px) {
    .toast-container {
      bottom: 100px;
      max-width: 95%;
    }
    .toast {
      min-width: 280px;
      border-radius: 12px;
    }
  }