/* RTL Support */
html[lang="ar"] {
    /* Removed direction and text-align properties */
}

html[lang="ar"] body {
    font-family: 'Cairo', sans-serif;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .header-middle {
        padding: 15px 0;
    }
    
    .main-menu {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    .header-top {
        display: none;
    }
    
    .header-middle {
        padding: 10px 0;
    }
    
    .search-style-2 {
        width: 100%;
        margin: 10px 0;
    }
    
    .header-action-right {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .header-action-icon-2 {
        margin: 0 5px;
    }
    
    .cart-dropdown-wrap {
        width: 300px;
    }
}

/* RTL Specific Styles */
html[lang="ar"] .header-action-icon-2 .lable {
    margin-left: 0;
    margin-right: 5px;
}

html[lang="ar"] .search-style-2 select,
html[lang="ar"] .search-style-2 input {
    padding-right: 15px;
    padding-left: 30px;
}

html[lang="ar"] .categories-dropdown-wrap {
    right: 0;
    left: auto;
}

html[lang="ar"] .sub-menu {
    right: 0;
    left: auto;
}

html[lang="ar"] .cart-dropdown-wrap {
    right: 0;
    left: auto;
}

html[lang="ar"] .account-dropdown {
    right: 0;
    left: auto;
}

/* Mobile Menu RTL */
html[lang="ar"] .mobile-menu-wrap nav ul li a {
    padding: 10px 15px 10px 10px;
}

html[lang="ar"] .mobile-menu-wrap nav ul li a i {
    margin-left: 10px;
    margin-right: 0;
}

/* Product Grid Responsive */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Cart Responsive */
@media (max-width: 768px) {
    .cart-table {
        display: block;
        overflow-x: auto;
    }
    
    .cart-total {
        margin-top: 20px;
    }
}

/* Checkout Responsive */
@media (max-width: 768px) {
    .checkout-form {
        margin-bottom: 30px;
    }
    
    .order-summary {
        margin-top: 30px;
    }
}

/* User Dashboard Responsive */
@media (max-width: 992px) {
    .dashboard-sidebar {
        margin-bottom: 30px;
    }
    
    .dashboard-content {
        margin-left: 0;
    }
}

/* Blog Responsive */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        margin-top: 30px;
    }
}

/* Wishlist Responsive */
@media (max-width: 768px) {
    .wishlist-table {
        display: block;
        overflow-x: auto;
    }
}

/* Compare Responsive */
@media (max-width: 768px) {
    .compare-table {
        display: block;
        overflow-x: auto;
    }
}

/* Order Tracking Responsive */
@media (max-width: 768px) {
    .tracking-form {
        margin-bottom: 30px;
    }
}

/* Vendor Dashboard Responsive */
@media (max-width: 992px) {
    .vendor-sidebar {
        margin-bottom: 30px;
    }
    
    .vendor-content {
        margin-left: 0;
    }
}

/* General Responsive Fixes */
@media (max-width: 576px) {
    .section-padding {
        padding: 40px 0;
    }
    
    .section-title {
        margin-bottom: 20px;
    }
    
    .btn {
        padding: 8px 15px;
    }
    
    .form-control {
        padding: 8px 12px;
    }
}

/* Loading Animation */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast Notifications RTL */
html[lang="ar"] .toast {
    text-align: right;
}

/* Modal RTL */
html[lang="ar"] .modal-header .close {
    margin: -1rem auto -1rem -1rem;
}

/* Form Elements RTL */
html[lang="ar"] .form-group label {
    text-align: right;
}

html[lang="ar"] .input-group > .form-control {
    border-radius: 0 4px 4px 0;
}

html[lang="ar"] .input-group > .input-group-append > .btn {
    border-radius: 4px 0 0 4px;
}

/* Pagination RTL */
html[lang="ar"] .pagination {
    padding-right: 0;
}

/* Breadcrumb RTL */
html[lang="ar"] .breadcrumb-item + .breadcrumb-item::before {
    padding-left: 0.5rem;
    padding-right: 0;
}

/* Alert RTL */
html[lang="ar"] .alert {
    text-align: right;
}

/* Table RTL */
html[lang="ar"] .table th,
html[lang="ar"] .table td {
    text-align: right;
}

/* Card RTL */
html[lang="ar"] .card-header {
    text-align: right;
}

/* List Group RTL */
html[lang="ar"] .list-group-item {
    text-align: right;
}

/* Dropdown RTL */
html[lang="ar"] .dropdown-menu {
    text-align: right;
}

/* Badge RTL */
html[lang="ar"] .badge {
    margin-left: 0;
    margin-right: 5px;
}

/* Button Group RTL */
html[lang="ar"] .btn-group > .btn:not(:last-child):not(.dropdown-toggle),
html[lang="ar"] .btn-group > .btn:not(:first-child) {
    border-radius: 0 4px 4px 0;
}

/* Input Group RTL */
html[lang="ar"] .input-group > .input-group-prepend > .btn {
    border-radius: 0 4px 4px 0;
}

/* Custom Scrollbar RTL */
html[lang="ar"] ::-webkit-scrollbar-thumb {
    border-radius: 10px;
}

/* Animation RTL */
html[lang="ar"] .fade-right {
    animation: fadeLeft 0.5s ease-in-out;
}

html[lang="ar"] .fade-left {
    animation: fadeRight 0.5s ease-in-out;
}

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
} 