/* تطبيق الخط الأساسي */
:root {
    --main-font: "Scheherazade New", serif;
}

/* تطبيق الخط على العناصر الأساسية */
body {
    font-family: var(--main-font);
}

/* تطبيق الخط على الروابط */
a, 
a.nav-link,
.nav-item a,
.dropdown-item,
.navbar a,
header a,
footer a,
.menu-item a {
    font-family: var(--main-font) !important;
    font-weight: 500;
}

/* تنسيق العناوين */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
}

/* تنسيق النصوص */
body {
    line-height: 1.6;
}

/* تنسيق السلة المنبثقة */
.cart-dropdown {
    position: relative;
}

.cart-popup {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.cart-dropdown.active .cart-popup {
    left: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.cart-count {
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

.close-cart {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.close-cart:hover {
    color: var(--accent-color);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-left: 15px;
    border-radius: 8px;
}

.item-details {
    flex: 1;
}

.item-details h6 {
    margin: 0 0 8px;
    font-size: 16px;
}

.price {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

.quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.qty-btn:hover {
    background: #f5f5f5;
}

.quantity input {
    width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px;
}

.remove-item:hover {
    color: #bd2130;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.cart-buttons {
    display: flex;
    gap: 15px;
    padding-top: 15px;
}

.cart-buttons .btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-view-cart {
    background-color: #fff;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-view-cart:hover {
    background-color: #f8f9fa;
    color: var(--accent-color);
}

.btn-checkout {
    background-color: var(--accent-color);
    color: #fff;
    border: 2px solid var(--accent-color);
}

.btn-checkout:hover {
    background-color: #000;
    border-color: #000;
    color: #fff;
}

/* تحسين شكل السعر */
.price {
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 700;
    direction: ltr;
    display: inline-block;
}

/* تنسيق عناصر التحكم في الكمية */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 4px;
    border-radius: 6px;
}

.quantity-controls .quantity-input {
    width: 70px;
    text-align: center;
    padding: 6px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.quantity-controls .quantity-input:focus {
    outline: none;
    border-color: #000;
    background: #fff;
}

.quantity-controls .control-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.quantity-controls .minus-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 2px solid #eee;
}

.quantity-controls .plus-btn {
    background-color: #000;
    color: white;
}

.quantity-controls .control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.quantity-controls .plus-btn:hover {
    background-color: #222;
}

.quantity-controls .minus-btn:hover {
    background-color: #eee;
}

.quantity-controls .control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* إخفاء أسهم الزيادة والنقصان الافتراضية */
.quantity-controls .quantity-input::-webkit-inner-spin-button,
.quantity-controls .quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-controls .quantity-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-controls button:hover {
    background-color: #000;
    transform: scale(1.05);
}

.quantity-controls button:active {
    transform: scale(0.95);
}

.total-price {
    font-size: 22px;
    color: var(--accent-color);
    font-weight: 700;
}

.subtotal {
    padding: 15px 0;
    border-top: 1px solid #eee;
}

/* تنسيق إجمالي سعر المنتج */
.cart-item .item-total {
    font-size: 13px;
    color: #666;
    margin: 4px 0;
    padding-top: 6px;
    border-top: 1px dashed #eee;
}

/* تنسيقات السلة المصغرة */
.cart-popup {
    width: 360px;
}

.cart-popup .cart-header {
    padding: 15px;
}

.cart-popup .cart-header h5 {
    font-size: 16px;
    margin: 0;
}

.cart-popup .cart-items {
    max-height: 450px;
}

.cart-item {
    padding: 12px 0;
    gap: 15px;
}

.cart-item img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
}

.cart-item h6 {
    font-size: 15px;
    margin-bottom: 6px;
}

.cart-item .price {
    font-size: 15px;
    margin: 6px 0;
    font-weight: 600;
}

.cart-item .remove-item {
    padding: 8px;
}

.cart-item .remove-item i {
    font-size: 18px;
}

/* تنسيق القائمة الجانبية للموبايل */
.header-action-btn.mobile-nav-toggle {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font-size: 24px;
    line-height: 1;
    color: var(--heading-color);
    cursor: pointer;
    margin-right: 15px;
    /* تثبيت الزر في مكانه عند الضغط */
    position: relative;
    transform: none !important;
    transition: none !important;
}

.header-action-btn.mobile-nav-toggle:hover {
    color: var(--accent-color);
}

/* منع أي تأثيرات حركة عند الضغط على الزر */
.header-action-btn.mobile-nav-toggle:active,
.header-action-btn.mobile-nav-toggle:focus {
    transform: none !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    outline: none !important;
    box-shadow: none !important;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.mobile-sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.sidebar-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.sidebar-content {
    padding: 15px 0;
}

.sidebar-user {
    padding: 0 15px 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info i {
    font-size: 40px;
    color: #ccc;
}

.user-info .text {
    flex: 1;
}

.user-info .welcome {
    margin: 0 0 5px;
    color: #666;
    font-size: 14px;
}

.user-info .actions {
    font-size: 15px;
}

.user-info .actions .separator {
    margin: 0 5px;
    color: #ccc;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 15px;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: #f8f9fa;
    color: var(--accent-color);
}

.sidebar-nav li a i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* تأثير الخلفية عند فتح القائمة */
.mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.mobile-sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* تنسيق عناصر التحكم في الكمية */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.quantity-selector .quantity-input {
    width: 100px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
}

.quantity-selector .quantity-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-selector .quantity-btn.decrease {
    background-color: var(--accent-color);
}

.quantity-selector .quantity-btn.increase {
    background-color: #000;
}

.quantity-selector .quantity-btn:hover {
    transform: scale(1.05);
}

.quantity-selector .quantity-btn:active {
    transform: scale(0.95);
}

/* إخفاء أسهم الزيادة والنقصان الافتراضية */
.quantity-selector .quantity-input::-webkit-inner-spin-button,
.quantity-selector .quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-selector .quantity-input[type=number] {
    -moz-appearance: textfield;
}

/* تأثير الخلفية عند فتح السلة */
.cart-dropdown::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.cart-dropdown.active::before {
    opacity: 1;
    visibility: visible;
}

/* تنسيق اسم الموقع */
.sitename {
    font-family: "Scheherazade New", serif !important;
    font-weight: 700;
    font-size: 1.8rem;
}

/* تنسيق أيقونات التواصل الاجتماعي */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.social-icons a {
    position: relative;
    overflow: hidden;
}

.social-icons a:hover {
    transform: translateY(-3px);
    background: #ffffff;
}

.social-icons a:hover i {
    color: #000000;
}

.social-icons i {
    font-size: 18px;
    margin: 0;
    transition: color 0.3s ease;
}

/* تخصيص ألوان مختلفة لكل أيقونة عند hover */
.social-icons a:hover i.bi-facebook {
    color: #1877f2;
}

.social-icons a:hover i.bi-instagram {
    color: #e4405f;
}

.social-icons a:hover i.bi-twitter-x {
    color: #000000;
}

.social-icons a:hover i.bi-tiktok {
    color: #000000;
}

.social-icons a:hover i.bi-pinterest {
    color: #bd081c;
}

.social-icons a:hover i.bi-youtube {
    color: #ff0000;
}

.social-links h5 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 18px;
    font-family: "Scheherazade New", serif;
}

/* تنسيق إضافي للروابط */
.navmenu a,
.header a,
.top-bar a,
.dropdown-menu a,
.main-header a,
.header-nav a {
    font-family: var(--main-font) !important;
}

/* تأكيد تطبيق الخط على روابط القائمة */
.nav-link,
.navbar-nav a,
.dropdown-toggle {
    font-family: var(--main-font) !important;
}

/* تأكيد تطبيق الخط على روابط المنتجات */
.product-info a,
.category-links a,
.featured-content a {
    font-family: var(--main-font) !important;
}tyle Enhancements */
body {
    font-family: "Scheherazade New", serif;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,p {
    font-family: "Scheherazade New", serif;
    font-weight: 600;
    line-height: 1.4;
}

/* Fix spacing between icons */
.header-action-btn {
    margin: 0 8px;
    padding: 8px;
}

/* Enhance dropdown menus */
.dropdown-menu {
    font-family: "Scheherazade New", serif;
    text-align: right;
    padding: 1rem;
}

/* Better spacing for navigation */
.navmenu ul li {
    margin: 0 12px;
}

/* Enhance buttons */
.btn {
    font-family: "Scheherazade New", serif;
    font-weight: 600;
    letter-spacing: 0;
    padding: 8px 20px;
    font-size: 1.1rem;
}

/* Enhance Arabic text rendering */
.sitename {
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-link {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Improve readability */
p, .dropdown-item {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Headers enhancement */
.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
}

/* Price styling */
.price {
    font-size: 1.3rem;
    font-weight: 600;
    direction: ltr;
    display: inline-block;
}

/* Category titles */
.category-headers h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Product titles */
.product-info h5 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 10px 0;
}

/* Search placeholder */
input::placeholder {
    font-family: "Scheherazade New", serif;
    font-size: 1.1rem;
}

/* Fix RTL specific spacing */
.bi {
    margin-left: 8px;
    margin-right: 8px;
}

/* Enhance search box */
.search-form input {
    font-family: 'Almarai', sans-serif;
    padding-right: 15px;
}

/* Better mobile menu */
.mobile-nav-toggle {
    margin-right: 15px;
}

/* Price styling */
.price {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

/* Category headers */
.category-headers h4 {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Enhance top bar */
.top-bar-item {
    margin: 0 10px;
}

/* Badge positioning */
.badge {
    margin-right: 5px;
}

/* Menu item spacing */
.nav-link {
    padding: 0.5rem 1rem;
}

/* Improve dropdown toggles */
.toggle-dropdown {
    margin-right: 8px;
}

/* Better mobile search */
#mobileSearch .search-form {
    padding: 15px;
}