/* 
 * Wasla Main Theme Styles
 * Pixel-perfect header & footer based on design references
 */

/* ===== Design Tokens ===== */
:root {
    --navy-900: #0f1b2d;
    --navy-800: #162036;
    --navy-700: #1c2a42;
    --blue-600: #3a6ea5;
    --blue-500: #4a7fb5;
    --blue-400: #5bc0be;
    --blue-social: #3b5998;
    --accent-blue: #1a73e8;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --text-dark: #333;
    --text-light: rgba(255, 255, 255, 0.7);
    --cart-blue: #1a56a8;
    --notif-red: #e53935;
    --font-ar: 'Cairo', 'Inter', sans-serif;
    --font-en: 'Inter', 'Cairo', sans-serif;
    --border-radius-lg: 12px;
    --border-radius-md: 8px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ===== Base Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

body {
    font-family: var(--font-ar);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    max-width: 100vw;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

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

/* ===== Layout ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
}

/* Global 1280px max-width enforcement for page CONTENT areas */
.site-main,
.content-area>.container,
.page-content-wrapper {
    max-width: 1280px;
    margin: 60px auto;
    padding: 0 24px;
}

#wasla-category-content {
    max-width: 1280px;
    margin: 60px auto;
    padding: 0; /* Removed extra padding to align with toolbar */
}

/* Header & Footer always full-width */
.site-header,
.site-footer,
.woocommerce-account .site-footer {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0;
    padding-right: 0;
}

/* ============================================
   SITE PRELOADER
   ============================================ */
.wasla-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.wasla-preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.preloader-logo {
    animation: preloaderPulse 2s infinite ease-in-out;
}

.preloader-logo img {
    max-height: 80px;
    width: auto;
}

.preloader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-100);
    border-top: 3px solid var(--blue-400);
    border-radius: 50%;
    animation: preloaderSpin 1s linear infinite;
}

@keyframes preloaderPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes preloaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   HEADER STYLES
   ============================================ */

.site-header {
    position: relative;
    z-index: 100;
}

/* --- Top Bar --- */
.top-bar {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 6px 0;
    font-size: 13px;
    color: var(--gray-600);
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Social icon boxes in top bar */
.top-bar-social {
    display: flex;
    align-items: center;
    gap: 6px;
}

.social-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    color: var(--gray-600);
    font-size: 13px;
    transition: all 0.25s ease;
}

.social-icon-box:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    background-color: rgba(26, 115, 232, 0.05);
}

/* User menu in top bar */
.top-bar-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-switcher {
    position: relative;
    padding: 4px 0;
    cursor: pointer;
}

.language-switcher .lang-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 8px 0;
    min-width: 140px;
    display: none;
    z-index: 1000;
    border: 1px solid var(--gray-100);
}

.language-switcher:hover .lang-dropdown,
.language-switcher.active .lang-dropdown {
    display: block;
}

.lang-toggle-link {
    display: block;
    padding: 8px 16px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s;
}

.lang-toggle-link:hover {
    background-color: var(--gray-50);
    color: var(--cart-blue);
}

.user-account a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
    font-weight: 500;
    text-decoration: none;
}

.user-account a:hover {
    color: var(--cart-blue);
}

.user-account .user-arrow {
    font-size: 10px;
    opacity: 0.6;
}

/* Polylang dropdown styling */
.language-switcher select {
    border: none;
    background: transparent;
    font-family: var(--font-ar);
    font-size: 13px;
    color: var(--gray-700);
    cursor: pointer;
    outline: none;
    appearance: auto;
}

.user-account a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.user-account a:hover {
    color: var(--text-dark);
}

.user-account .fa-user {
    font-size: 14px;
}

.user-account .user-arrow {
    font-size: 9px;
    color: var(--gray-500);
}

/* User Profile Trigger & Dropdown */
.user-profile-trigger {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 40px;
    transition: all 0.3s ease;
}

.user-profile-trigger:hover {
    background-color: var(--gray-50);
}

.user-avatar-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy-900);
}

/* Dropdown Container */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    width: 240px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--gray-100);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1100;
}

.user-profile-trigger:hover .user-dropdown,
.user-account.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-100);
    background-color: var(--gray-50);
    border-radius: 12px 12px 0 0;
}

.dropdown-user-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 2px;
}

.dropdown-user-email {
    font-size: 12px;
    color: var(--gray-600);
}

.dropdown-menu-list {
    padding: 8px;
}

.dropdown-menu-list li {
    list-style: none;
}

.dropdown-menu-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: 8px;
    transition: all 0.2s;
}

.dropdown-menu-list li a:hover {
    background-color: var(--gray-50);
    color: var(--cart-blue);
    padding-inline-start: 20px;
}

.dropdown-menu-list li a i {
    width: 16px;
    font-size: 14px;
    opacity: 0.7;
}

.menu-divider {
    height: 1px;
    background-color: var(--gray-100);
    margin: 8px 0;
}

.logout-link:hover {
    background-color: #fff1f1 !important;
    color: #d32f2f !important;
}

/* --- Main Header --- */
.header-main {
    background: var(--white);
    padding: 12px 0;
    border-bottom: 2px solid var(--gray-200);
}

.header-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Cart & Notification buttons */
.header-actions-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--cart-blue);
    color: var(--white);
    border-radius: 8px;
    font-size: 18px;
    transition: all 0.25s ease;
}

.cart-btn:hover {
    background-color: #154b94;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 86, 168, 0.3);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    background-color: var(--notif-red);
    color: var(--white);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

.notif-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--gray-600);
    font-size: 20px;
    transition: color 0.25s;
}

.notif-btn:hover {
    color: var(--text-dark);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background-color: var(--notif-red);
    color: var(--white);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

/* Search bar */
.header-search {
    flex: 1;
    max-width: 550px;
    min-width: 200px;
}

.search-form {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 20px 12px 48px;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 25px;
    font-size: 14px;
    font-family: var(--font-ar);
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--gray-500);
}

.search-input:focus {
    background-color: var(--white);
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(91, 192, 190, 0.12);
}

.search-submit {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 15px;
    padding: 4px;
    transition: color 0.2s;
}

.search-submit:hover {
    color: var(--accent-blue);
}

/* Navigation + Logo */
.header-nav-logo {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    border-radius: 8px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-link i {
    font-size: 15px;
}

.nav-link:hover {
    color: var(--text-dark);
    background-color: var(--gray-50);
}

.nav-link.active {
    color: var(--navy-900);
    background-color: var(--gray-100);
    font-weight: 700;
}

.site-logo {
    flex-shrink: 0;
}

.site-logo img,
.site-logo .custom-logo {
    max-height: 48px;
    width: auto;
}

/* --- Mega Menu --- */
.mega-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--gray-100);
    color: var(--navy-900);
    border-radius: 8px;
    font-size: 18px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mega-menu-toggle:hover {
    background-color: var(--gray-200);
    transform: translateY(-1px);
}

.wasla-mega-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 27, 45, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.wasla-mega-menu-overlay.is-open {
    visibility: visible;
    opacity: 1;
}

.mega-menu-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: var(--white);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wasla-mega-menu-overlay.is-open .mega-menu-container {
    transform: translateX(0);
}

.mega-menu-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mega-menu-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy-900);
    margin: 0;
}

.mega-menu-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.mega-menu-close:hover {
    color: var(--notif-red);
}

.mega-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.mega-menu-list {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.category-item {
    border-bottom: 1px solid var(--gray-50);
}

.category-item-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    transition: background-color 0.2s;
}

.category-item-inner:hover {
    background-color: var(--gray-50);
}

.category-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy-900);
    flex: 1;
    text-decoration: none;
}

.subcategory-toggle {
    background: none;
    border: none;
    font-size: 12px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 8px;
    transition: transform 0.3s ease;
}

.category-item.is-expanded > .category-item-inner .subcategory-toggle {
    transform: rotate(180deg);
}

.subcategories-list {
    display: none;
    background-color: var(--gray-50);
    padding: 0;
    margin: 0;
    list-style: none !important;
    padding-inline-start: 20px;
}

.category-item.is-expanded > .subcategories-list {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 991px) {
    .mobile-only {
        display: flex;
    }
    
    .header-nav {
        display: none;
    }
    
    .mega-menu-container {
        max-width: 85%;
    }
    
    .menu-toggle {
        background: none;
        border: none;
        font-size: 20px;
        color: var(--navy-900);
        cursor: pointer;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.site-footer {
    background-color: var(--navy-900);
    color: var(--white);
    padding-top: 56px;
    padding-bottom: 0;
    font-size: 14px;
    line-height: 1.8;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
}

/* Footer columns */
.footer-col {
    /* base */
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand-logo img,
.footer-brand-logo .custom-logo {
    max-height: 60px;
    width: auto;
}

.footer-brand-desc {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.9;
    max-width: 320px;
}

/* Footer social icons */
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: rgba(58, 110, 165, 0.5);
    border-radius: 50%;
    color: var(--white);
    font-size: 16px;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    background-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
}

/* Footer headings */
.footer-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    padding-bottom: 12px;
    position: relative;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 2px;
    background-color: var(--blue-400);
    border-radius: 1px;
}

/* Footer link lists */
.footer-link-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link-list li a {
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.25s ease;
    display: inline-block;
}

.footer-link-list li a:hover {
    color: var(--white);
    padding-inline-start: 4px;
}

/* Footer contact list */
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 14px;
}

.footer-contact-list li i {
    color: var(--blue-400);
    font-size: 15px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* Footer Bottom Bar */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 48px;
    padding: 18px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.25s;
}

.footer-bottom-links a:hover {
    color: var(--white);
}

.footer-copyright {
    /* already inherits color */
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-main-inner {
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-search {
        order: 3;
        max-width: 100%;
        flex-basis: 100%;
    }

    .header-nav-logo {
        gap: 12px;
    }

    .nav-link span {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .top-bar-social {
        gap: 4px;
    }

    .social-icon-box {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .header-nav {
        gap: 4px;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* ============================================
   HOME PAGE STYLES (preserved)
   ============================================ */

.home-slider-section.full-width {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    line-height: 0;
}

.home-page-content {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

/* ============================================
   CATEGORY PAGE STYLES
   ============================================ */

.category-hero {
    position: relative;
    height: 600px;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    overflow: hidden;
    margin-bottom: 0;
}

.category-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 27, 45, 0.65);
    /* More solid blueish overlay like design */
    z-index: 2;
}

.container-hero {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-hero-content {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    animation: fadeInUp 0.8s ease-out;
}

.category-title {
    font-family: var(--font-ar);
    font-size: 64px;
    /* Larger as in design */
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.category-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.breadcrumb-link {
    color: var(--white);
    transition: opacity 0.2s;
}

.breadcrumb-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--blue-400);
    font-size: 14px;
}

.breadcrumb-current {
    color: var(--white);
}

.category-hero-brand {
    margin-top: 24px;
}

.category-hero-logo-mark {
    max-height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    /* Make it white to match design icon feel or keep natural */
    opacity: 0.8;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Archive Content Area */
.content-area {
    background-color: var(--white);
}

#wasla-category-content {
    padding-top: 40px;
    padding-bottom: 80px;
}

/* Custom styles for product lists to look like design */
.wasla-elementor-ready {
    min-height: 400px;
}

@media (max-width: 768px) {
    .category-hero {
        height: 420px;
        /* Increased from 320px to match new 620px desktop height proportions */
    }

    .category-title {
        font-size: 38px;
    }

    .category-hero-logo-mark {
        max-height: 30px;
    }
}

/* Redundant definition removed */

.category-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   BLOG / HOME ARCHIVE STYLES
   ============================================ */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 40px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-hero {
    position: relative;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--navy-900);
    overflow: hidden;
    color: var(--white);
    margin-bottom: 0;
}

.blog-hero .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.blog-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 27, 45, 0.4), rgba(15, 27, 45, 0.8));
    z-index: 1;
}

.blog-hero .hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.blog-hero h1 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.blog-hero .breadcrumb {
    font-size: 15px;
    font-weight: 500;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.blog-hero .breadcrumb a {
    color: var(--white);
    transition: opacity 0.2s;
}

.blog-hero .breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.blog-hero .breadcrumb span {
    color: var(--blue-400);
    font-weight: 700;
}

.blog-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    border: none;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-card-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.blog-card:hover .blog-card-img {
    transform: scale(1.1);
}

.blog-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 1;
}

.overlay-title {
    color: var(--white);
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    max-width: 85%;
    line-height: 1.3;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    margin: 0;
}

.blog-card-info {
    padding: 32px 32px 35px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: right;
    /* Default for the theme as it's targeted at Arabic */
}

.blog-card-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--navy-900);
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card-title a:hover {
    color: #0e4282;
}

.blog-card-excerpt {
    font-size: 16px;
    color: #777;
    line-height: 1.7;
    margin-bottom: 24px;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
}

.blog-card-date {
    font-size: 15px;
    color: #aaa;
    font-weight: 500;
}

.blog-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 36px;
    background-color: #0e4282;
    /* Navy blue from design */
    color: var(--white);
    border-radius: 40px;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(14, 66, 130, 0.2);
}

.blog-card-btn:hover {
    background-color: var(--navy-900);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 66, 130, 0.3);
    color: var(--white);
}

/* RTL Adjustments */
[dir="rtl"] .blog-card-meta {
    flex-direction: row-reverse;
    /* Swaps position: Date on left, Button on right */
}

[dir="rtl"] .blog-card-title,
[dir="rtl"] .blog-card-excerpt {
    text-align: right;
}

/* ============================================
   INNER PAGE COMMON STYLES
   ============================================ */

.inner-page-hero {
    position: relative;
    padding: 80px 0;
    background-color: var(--navy-900);
    background-image: linear-gradient(rgba(15, 27, 45, 0.7), rgba(15, 27, 45, 0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    margin-bottom: 40px;
}

.inner-page-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a {
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb-sep {
    font-size: 10px;
    opacity: 0.5;
}

.page-content-wrapper {
    padding-bottom: 80px;
}

.card-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 32px;
    margin-bottom: 24px;
}

/* ============================================
   FORMS & BUTTONS
   ============================================ */

.wasla-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: var(--cart-blue);
    color: var(--white);
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.wasla-btn:hover {
    background-color: var(--navy-700);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 86, 168, 0.25);
    color: var(--white);
}

.wasla-btn-outline {
    background: transparent;
    border: 1px solid var(--cart-blue);
    color: var(--cart-blue);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--navy-900);
}

.wasla-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-family: var(--font-ar);
    transition: all 0.3s ease;
}

.wasla-input:focus {
    background-color: var(--white);
    border-color: var(--cart-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 86, 168, 0.1);
}

/* ============================================
   WOOCOMMERCE SPECIFIC CUSTOMIZATIONS
   ============================================ */

.woocommerce-account .woocommerce-MyAccount-navigation {
    width: 100%;
    margin-bottom: 30px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
    padding: 10px 20px;
    background: var(--gray-100);
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    transition: all 0.2s;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
    background: var(--cart-blue);
    color: var(--white);
}

.woocommerce-account .woocommerce-MyAccount-content {
    width: 100%;
}

/* Auth Pages (Login/Register) */
.u-columns.col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .u-columns.col2-set {
        grid-template-columns: 1fr;
    }
}

/* WooCommerce Tables */
.shop_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.shop_table th {
    background-color: var(--gray-50);
    padding: 16px;
    font-weight: 600;
    text-align: inherit;
    border-bottom: 1px solid var(--gray-200);
}

.shop_table td {
    padding: 16px;
    border-top: 1px solid var(--gray-200);
}

/* Error / 404 Styling */
.error-404-content {
    text-align: center;
    padding: 100px 0;
}

.error-404-content h2 {
    font-size: 120px;
    font-weight: 900;
    color: var(--cart-blue);
    line-height: 1;
    margin-bottom: 20px;
    opacity: 0.1;
}

/* WooCommerce Notices (Info, Success, Error) */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 16px 24px;
    border-radius: var(--border-radius-md);
    margin-bottom: 30px;
    background-color: var(--gray-50);
    border: none;
    border-inline-start: 4px solid var(--cart-blue);
    position: relative;
    list-style: none;
    font-size: 14px;
    font-weight: 500;
}

.woocommerce-message {
    border-color: #4caf50;
    background-color: #f1f8f1;
    color: #1b5e20;
}

.woocommerce-error {
    border-color: #f44336;
    background-color: #fdf2f2;
    color: #b71c1c;
}

.woocommerce-info {
    border-color: var(--cart-blue);
    background-color: #e3f2fd;
    color: #0d47a1;
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
    float: inline-end;
    padding: 4px 12px;
    background: var(--cart-blue);
    color: var(--white);
    border-radius: 4px;
    font-size: 13px;
}

/* My Account Navigation Refinement */
.woocommerce-account-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    flex: 0 0 240px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    flex-direction: column;
    background: var(--gray-50);
    padding: 12px;
    border-radius: var(--border-radius-lg);
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
    display: block;
    background: transparent;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    color: var(--navy-900);
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
    background: var(--cart-blue);
    color: var(--white);
}

.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1;
    min-width: 300px;
}

/* Checkout Layout Refinement */
.woocommerce-checkout-page .checkout-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
}

@media (max-width: 992px) {
    .woocommerce-checkout-page .checkout-layout {
        grid-template-columns: 1fr;
    }
}

/* Form refinement */
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
    width: 100%;
    float: none;
    margin-bottom: 24px;
}

.woocommerce-checkout .form-row {
    padding: 0;
    margin-bottom: 20px;
}

.woocommerce-checkout .form-row label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.woocommerce-checkout .form-row .input-text,
.woocommerce-checkout .select2-container .select2-selection {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    font-size: 14px;
}

/* Checkout Review Order Table */
.woocommerce-checkout-review-order-table {
    border: none;
    background: var(--gray-50);
    border-radius: var(--border-radius-md);
    margin-bottom: 24px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.woocommerce-checkout-review-order-table .cart_item td:last-child {
    font-weight: 700;
    color: var(--navy-900);
}

/* Place Order Button */
#place_order {
    width: 100%;
    background-color: var(--cart-blue);
    color: var(--white);
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

#place_order:hover {
    background-color: var(--navy-800);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive Badges */
.status-badge {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-processing,
.badge-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-on-hold,
.badge-pending {
    background: #fff3e0;
    color: #ef6c00;
}

.badge-cancelled,
.badge-failed {
    background: #ffebee;
    color: #c62828;
}

/* === My Account Dashboard === */
.wasla-dashboard {
    padding: 10px 0;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.quick-action-card:hover {
    border-color: var(--cart-blue);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.quick-action-card.logout:hover {
    border-color: #d32f2f;
    box-shadow: 0 4px 16px rgba(211, 47, 47, 0.1);
}

.quick-action-card .card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--gray-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--cart-blue);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.quick-action-card:hover .card-icon {
    background-color: var(--cart-blue);
    color: var(--white);
}

.quick-action-card.logout .card-icon {
    color: #d32f2f;
}

.quick-action-card.logout:hover .card-icon {
    background-color: #d32f2f;
    color: var(--white);
}

.quick-action-card .card-info h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 6px;
}

.quick-action-card .card-info span {
    font-size: 13px;
    color: var(--gray-600);
}

/* My Account Navigation Enhancement Override */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a i {
    opacity: 1;
}

/* === Login / Register Form Styles === */
.woocommerce-form-login,
.woocommerce-form-register {
    padding: 20px 0;
}

.u-columns.col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

@media (max-width: 768px) {
    .u-columns.col2-set {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .u-column1 {
        padding-bottom: 40px;
        border-bottom: 1px solid var(--gray-200);
    }
}

.u-column1,
.u-column2 {
    width: 100% !important;
}

.woocommerce-form__label-for-checkbox {
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
}

.woocommerce-form__input-checkbox {
    margin-inline-end: 8px;
}

.required {
    color: var(--notif-red);
    text-decoration: none;
}

/* WooCommerce Form Row Layouts */
.woocommerce-form-row,
.form-row {
    margin-bottom: 20px;
    width: 100%;
}

.form-row-first,
.form-row-last {
    width: 48%;
    float: inline-start;
}

.form-row-last {
    float: inline-end;
}

.form-row-wide {
    width: 100%;
    clear: both;
}

.woocommerce-address-fields__field-wrapper::after,
.woocommerce-billing-fields__field-wrapper::after,
.woocommerce-shipping-fields__field-wrapper::after,
.woocommerce-EditAccountForm::after {
    content: "";
    display: table;
    clear: both;
}

/* My Account Table Styles */
.woocommerce-orders-table,
.woocommerce-MyAccount-downloads {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 30px;
}

.woocommerce-orders-table th,
.woocommerce-MyAccount-downloads th {
    padding: 16px;
    background: var(--gray-50);
    font-weight: 700;
    color: var(--navy-900);
    border-bottom: 2px solid var(--gray-200);
    text-align: start;
}

.woocommerce-orders-table td,
.woocommerce-MyAccount-downloads td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.woocommerce-orders-table__cell-order-actions .button {
    padding: 8px 16px;
    background: var(--gray-100);
    color: var(--navy-900);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.woocommerce-orders-table__cell-order-actions .button:hover {
    background: var(--cart-blue);
    color: var(--white);
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    height: 48px !important;
    background-color: var(--gray-50) !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--border-radius-md) !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-dark) !important;
    padding-inline-start: 16px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    inset-inline-end: 10px !important;
}


/* WhatsApp Floating Icon */
.wasla-whatsapp-float {
    position: fixed !important;
    width: 60px !important;
    height: 60px !important;
    bottom: 40px !important;
    background-color: #25d366 !important;
    color: #FFF !important;
    border-radius: 50% !important;
    text-align: center !important;
    font-size: 32px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.wasla-whatsapp-float:hover {
    background-color: #128c7e !important;
    transform: scale(1.1) !important;
    color: #FFF !important;
}

.wasla-whatsapp-float.wasla-pos-right {
    inset-inline-end: 40px !important;
    inset-inline-start: auto !important;
}

.wasla-whatsapp-float.wasla-pos-left {
    inset-inline-start: 40px !important;
    inset-inline-end: auto !important;
}

@media (max-width: 768px) {
    .wasla-whatsapp-float {
        width: 50px !important;
        height: 50px !important;
        bottom: 20px !important;
        font-size: 26px !important;
    }

    .wasla-whatsapp-float.wasla-pos-right {
        right: 20px !important;
    }

    .wasla-whatsapp-float.wasla-pos-left {
        left: 20px !important;
    }
}

/* ============================================
   SINGLE PRODUCT PAGE (REPLACED BY product-page.css)
   ============================================ */


/* ===== Mobile Navigation ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 200;
}

.menu-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--navy-900);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 45, 0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.is-open {
    display: block;
    opacity: 1;
}

.mobile-nav-drawer {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    width: min(320px, 85vw);
    height: 100%;
    background: var(--white);
    padding: 24px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .mobile-nav-drawer {
    transform: translateX(-100%);
}

.mobile-nav-overlay.is-open .mobile-nav-drawer {
    transform: translateX(0);
}

.mobile-nav-close {
    display: flex;
    margin-inline-start: auto;
    margin-bottom: 24px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--gray-700);
    cursor: pointer;
    padding: 4px;
}

.mobile-nav-menu a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy-900);
    border-bottom: 1px solid var(--gray-100);
}



/* ===== Mini Cart Dropdown ===== */
.cart-wrapper {
    position: relative;
}

.mini-cart-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    inset-inline-end: 0;
    width: 380px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(15, 27, 45, 0.15);
    border: 1px solid rgba(15, 27, 45, 0.05);
    padding: 24px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
}

.mini-cart-dropdown.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mini-cart-dropdown .widget_shopping_cart_content {
    display: flex;
    flex-direction: column;
}

.mini-cart-dropdown .cart_list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: none;
}

.mini-cart-dropdown .cart_list::-webkit-scrollbar {
    display: none;
}

.mini-cart-dropdown .cart_list li {
    position: relative;
    padding: 12px;
    margin: 0 0 12px 0;
    border-bottom: 1px solid var(--gray-50);
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.mini-cart-dropdown .cart_list li:hover {
    background: var(--gray-50);
}

.mini-cart-dropdown .cart_list li a:not(.remove) {
    display: contents; /* Allows children to participate in li's flex */
}

.mini-cart-dropdown .cart_list li img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 12px;
    object-fit: cover;
    margin: 0 !important;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Content wrapper for text */
.mini-cart-dropdown .cart_list li .item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

/* We need to handle the fact that WooCommerce puts text inside the <a> */
.mini-cart-dropdown .cart_list li a:not(.remove) {
    color: var(--navy-900);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

.mini-cart-dropdown .cart_list li .quantity {
    display: block;
    font-size: 13px;
    color: var(--cart-blue);
    font-weight: 800;
    margin-top: 2px;
}

.mini-cart-dropdown .cart_list li a.remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    border-radius: 8px;
    background: var(--white);
    color: #ff4d4d !important;
    font-size: 16px;
    border: 1px solid #fee;
    opacity: 0;
    transition: all 0.2s;
}

[dir="rtl"] .mini-cart-dropdown .cart_list li a.remove {
    right: auto;
    left: 8px;
}

.mini-cart-dropdown .cart_list li:hover a.remove {
    opacity: 1;
}

.mini-cart-dropdown .cart_list li a.remove:hover {
    background: #ff4d4d;
    color: var(--white) !important;
}

.mini-cart-dropdown .total {
    padding: 16px 8px;
    margin: 12px 0;
    background: var(--gray-50);
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-600);
}

.mini-cart-dropdown .total strong {
    color: var(--navy-900);
}

.mini-cart-dropdown .total .amount {
    color: var(--cart-blue);
    font-size: 20px;
    font-weight: 800;
}

.mini-cart-dropdown .buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.mini-cart-dropdown .buttons a {
    flex: 1;
    padding: 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mini-cart-dropdown .buttons a.view-cart {
    background: var(--white);
    color: var(--navy-900);
    border: 1px solid var(--gray-200);
}

.mini-cart-dropdown .buttons a.checkout {
    background: var(--navy-900);
    color: var(--white);
}

.mini-cart-dropdown .buttons a:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.mini-cart-dropdown .buttons a.checkout:hover {
    background: var(--cart-blue);
}

/* Remove hover trigger from wrapper */
.cart-wrapper:hover .mini-cart-dropdown,
.cart-wrapper:focus-within .mini-cart-dropdown {
    display: none;
}

.cart-wrapper .mini-cart-dropdown.active {
    display: block;
}

/* ===== Checkout Mobile Optimization ===== */
@media (max-width: 768px) {

    .woocommerce-checkout #customer_details,
    .woocommerce-checkout .col2-set {
        grid-template-columns: 1fr;
    }

    .woocommerce-checkout .col-1,
    .woocommerce-checkout .col-2 {
        width: 100%;
    }
}

/* ============================================
   User Ad Submission UI
   ============================================ */

/* Floating Add Button */
.wasla-floating-add-btn {
    position: fixed;
    bottom: 200px;
    /* Above whatsapp */
    background: var(--navy-900);
    color: var(--white);
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-ar);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 999998;
    transition: all 0.3s ease;
}

.wasla-floating-add-btn:hover {
    background: var(--cart-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.wasla-floating-add-btn .btn-icon {
    font-size: 18px;
}

.wasla-floating-add-btn.wasla-pos-right {
    inset-inline-end: 30px;
}

.wasla-floating-add-btn.wasla-pos-left {
    inset-inline-start: 30px;
}

/* Floating Ad Card */
.wasla-floating-ad-container {
    position: fixed;
    bottom: 200px;
    z-index: 999998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.wasla-floating-ad-container.wasla-pos-left {
    align-items: flex-start;
}

.wasla-floating-ad-container.wasla-pos-right {
    inset-inline-end: 20px;
}

.wasla-floating-ad-container.wasla-pos-left {
    inset-inline-start: 20px;
}

.wasla-floating-ad-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--cart-blue);
    color: var(--white);
    border: none;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wasla-floating-ad-toggle:hover {
    transform: scale(1.1);
    background: var(--navy-900);
}

.wasla-ad-card {
    position: absolute;
    bottom: 70px;
    width: 300px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
}

/* RTL positioning now handled via inset-inline in base classes */

.wasla-floating-ad-container.wasla-pos-left .wasla-ad-card {
    transform-origin: bottom left;
}

.wasla-ad-card.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.wasla-ad-image {
    position: relative;
    width: 100%;
    height: 180px;
}

.wasla-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wasla-ad-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.wasla-ad-image a:hover .wasla-ad-play-icon {
    transform: translate(-50%, -50%) scale(1.1);
}

.wasla-ad-content {
    padding: 20px;
}

.wasla-ad-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--navy-900);
    margin-bottom: 8px;
}

.wasla-ad-desc {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 12px;
}

.wasla-ad-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--cart-blue);
}

.wasla-ad-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

[dir="rtl"] .wasla-ad-close {
    right: auto;
    left: 10px;
}

.wasla-ad-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Ad Modal */
.wasla-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 45, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wasla-modal.active {
    opacity: 1;
    visibility: visible;
}

.wasla-modal-content {
    background: var(--white);
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.wasla-modal.active .wasla-modal-content {
    transform: translateY(0);
}

.wasla-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 28px;
    color: var(--gray-500);
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

[dir="rtl"] .wasla-modal-close {
    right: auto;
    left: 24px;
}

.wasla-modal-close:hover {
    color: var(--navy-900);
}

.wasla-modal-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--navy-900);
    margin-bottom: 30px;
    text-align: center;
}

.wasla-form-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.wasla-form-section {
    background: var(--gray-50);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--gray-100);
}

.wasla-form-section h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy-900);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.wasla-form-group {
    margin-bottom: 16px;
}

.wasla-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 8px;
}

.wasla-form-group input[type="text"],
.wasla-form-group input[type="tel"],
.wasla-form-group input[type="email"],
.wasla-form-group input[type="url"],
.wasla-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: var(--white);
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s ease;
}

.wasla-form-group input:focus,
.wasla-form-group textarea:focus {
    border-color: var(--cart-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 86, 168, 0.1);
}

.wasla-file-input {
    width: 100%;
    padding: 10px;
    background: var(--white);
    border: 1px dashed var(--gray-400);
    border-radius: 8px;
    cursor: pointer;
}

.wasla-form-terms {
    margin: 30px 0;
}

.wasla-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--gray-600);
    cursor: pointer;
}

.wasla-checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wasla-ad-submit-btn {
    width: 100%;
    background: var(--cart-blue);
    color: var(--white);
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wasla-ad-submit-btn:hover {
    background: var(--navy-900);
    transform: translateY(-2px);
}

.wasla-ad-message {
    display: none;
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.wasla-ad-message.success {
    background: #e6f8f0;
    color: #128c7e;
}

.wasla-ad-message.error {
    background: #fee;
    color: #c00;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .wasla-floating-add-btn {
        bottom: 140px;
        right: 20px !important;
        left: auto !important;
    }

    /* RTL positioning now handled via inset-inline */

    .wasla-floating-ad-container {
        bottom: 140px;
        right: 20px !important;
        left: auto !important;
    }

    /* RTL positioning now handled via inset-inline */

    .wasla-modal-content {
        padding: 24px;
    }
}

/* ===== Flash Sale Floating Ticker ===== */
.wasla-flash-sale-float {
    position: fixed;
    bottom: 120px;
    z-index: 9999;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: #fff;
    padding: 8px 16px 8px 8px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(255, 65, 108, 0.4);
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    overflow: hidden;
}

/* RTL padding handled by inset-inline/padding-inline */
.wasla-flash-sale-float {
    padding-inline: 8px 16px;
}

.wasla-flash-sale-float:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 65, 108, 0.5);
    color: #fff;
    outline: none;
}

.wasla-flash-sale-float.wasla-pos-left {
    inset-inline-start: 24px;
}

.wasla-flash-sale-float.wasla-pos-right {
    inset-inline-end: 24px;
}

.wasla-flash-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    color: #ff4b2b;
    border-radius: 50%;
    margin-inline-end: 12px;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    animation: flashPulseIcon 2s infinite;
}

@keyframes flashPulseIcon {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.wasla-flash-content {
    display: flex;
    flex-direction: column;
}

.wasla-flash-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    line-height: 1;
}

.wasla-flash-timer {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    direction: ltr; /* Timers often read better LTR even in RTL */
}

.wasla-flash-timer .fs-time {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
    min-width: 24px;
    text-align: center;
    display: inline-block;
}

.wasla-flash-timer span:not(.fs-time) {
    margin: 0 2px;
}

@media (max-width: 768px) {
    .wasla-flash-sale-float {
        bottom: 80px; /* Stack above whatsapp */
    }
}

/* ===== Accessibility: Focus Indicators ===== */
:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Suppress only for mouse users, not keyboard */
:focus:not(:focus-visible) {
    outline: none;
}
/* ===== Custom Auth Layout ===== */
.wasla-auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 40px auto;
}
.wasla-auth-wrapper.single-auth {
    grid-template-columns: 1fr;
    max-width: 500px;
}
.wasla-auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-100);
}
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}
.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 8px;
}
.auth-header p {
    color: var(--gray-500);
    font-size: 15px;
}
.auth-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.auth-remember span {
    font-size: 14px;
    color: var(--gray-600);
}
.auth-lost-pass {
    font-size: 14px;
    color: var(--cart-blue);
    font-weight: 600;
}
.auth-info-box {
    background: var(--gray-50);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--gray-600);
}
@media (max-width: 768px) {
    .wasla-auth-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
        margin: 20px auto;
    }
    .wasla-auth-card {
        padding: 24px;
    }
}

/* Registration Extra Fields */
.wasla-registration-extra-fields .row {
    display: flex;
    gap: 15px;
}
.wasla-registration-extra-fields .col-md-6 {
    flex: 1;
}
@media (max-width: 480px) {
    .wasla-registration-extra-fields .row {
        flex-direction: column;
        gap: 0;
    }
}

/* Verification Notice */
.wasla-verification-notice {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #0d47a1;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.05);
}
.wasla-verification-notice::before {
    content: '\f0e0';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 20px;
    opacity: 0.8;
}

[dir="rtl"] .wasla-verification-notice::before {
    margin-left: 4px;
}

/* ===== Product Grid Card Sizes ===== */
.card-size-small .wasla-product-card {
    padding: 10px;
}
.card-size-small .wasla-card-image-wrap {
    height: auto;
    aspect-ratio: 1/1;
    width: 100%;
    max-height: 140px;
}
.card-size-small .wasla-product-title {
    font-size: 13px;
    height: 2.6em;
}

.card-size-large .wasla-product-card {
    padding: 24px;
}
.card-size-large .wasla-card-image-wrap {
    height: auto;
    aspect-ratio: 1/1;
    width: 100%;
    max-height: 240px;
}
.card-size-large .wasla-product-title {
    font-size: 18px;
}

.card-size-xlarge .wasla-product-card {
    padding: 30px;
}
.card-size-xlarge .wasla-card-image-wrap {
    height: auto;
    aspect-ratio: 1/1;
    width: 100%;
    max-height: 300px;
}
.card-size-xlarge .wasla-product-title {
    font-size: 22px;
}

/* ===== Wishlist Icon Enhancement ===== */
.wasla-card-wishlist .yith-wcwl-add-to-wishlist {
    margin: 0 !important;
}

/* Base state - Outline heart */
.wasla-card-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-add-button a i::before {
    content: "\f004" !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 400 !important; /* Regular/Outline */
}

/* Added/Exists state - Solid Red heart */
.wasla-card-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a i::before,
.wasla-card-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a i::before {
    content: "\f004" !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important; /* Solid */
    color: #e53935 !important;
}

/* Hide text labels in wishlist to maintain icon-only look */
.wasla-card-wishlist .yith-wcwl-add-to-wishlist span,
.wasla-card-wishlist .yith-wcwl-add-to-wishlist a span,
.wasla-card-wishlist .yith-wcwl-add-to-wishlist .feedback,
.wasla-card-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse > a:not(.i),
.wasla-card-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse > a:not(.i),
.wasla-card-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-add-button > a:not(.i) {
    display: none !important;
    font-size: 0 !important;
    visibility: hidden !important;
}

.wasla-card-wishlist .yith-wcwl-add-to-wishlist a {
    font-size: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-indent: -9999px; /* Absolute fallback for text hiding */
}

.wasla-card-wishlist .yith-wcwl-add-to-wishlist i {
    font-size: 18px !important;
    margin: 0 !important;
    text-indent: 0 !important;
    visibility: visible !important;
    display: inline-block !important;
}

/* Hide wishlist text on mobile by default */
@media (max-width: 768px) {
    .wasla-card-wishlist .yith-wcwl-add-to-wishlist span,
    .wasla-card-wishlist .yith-wcwl-add-to-wishlist a span,
    .wasla-card-wishlist .yith-wcwl-add-to-wishlist .feedback {
        display: none !important;
        font-size: 0 !important;
        visibility: hidden !important;
    }
    
    .wasla-card-wishlist .yith-wcwl-add-to-wishlist a {
        padding: 0 !important;
        width: 30px !important;
        height: 30px !important;
        justify-content: center !important;
    }
}

/* ============================================
   SHOP & CATEGORY REDESIGN
   ============================================ */

/* --- Category Hero --- */
.wasla-hero-section {
    position: relative;
    padding: 80px 0;
    color: var(--white);
    overflow: hidden;
    background-color: var(--navy-900);
}

.wasla-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.wasla-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 27, 45, 0.95), rgba(15, 27, 45, 0.4));
    z-index: 2;
}

[dir="rtl"] .wasla-hero-overlay {
    background: linear-gradient(to left, rgba(15, 27, 45, 0.95), rgba(15, 27, 45, 0.4));
}

.wasla-hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.wasla-hero-subtitle {
    display: block;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--blue-400);
    margin-bottom: 12px;
}

.wasla-hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--white);
    margin-top: 0;
}

.wasla-hero-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.wasla-hero-breadcrumbs a {
    color: var(--white);
    font-weight: 600;
}

.wasla-hero-breadcrumbs i {
    font-size: 10px;
    opacity: 0.5;
}

[dir="rtl"] .wasla-hero-breadcrumbs i {
    transform: rotate(180deg);
}

.wasla-hero-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wasla-hero-badge .badge-icon {
    width: 44px;
    height: 44px;
    background: var(--blue-400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--navy-900);
}

.wasla-hero-badge .badge-text {
    display: flex;
    flex-direction: column;
}

.wasla-hero-badge .badge-text strong {
    font-size: 20px;
    line-height: 1.2;
}

.wasla-hero-badge .badge-text span {
    font-size: 12px;
    opacity: 0.8;
}

/* --- Shop Layout --- */
.shop-layout-wrapper {
    display: grid;
    gap: 40px;
}

.shop-layout-wrapper.has-sidebar {
    grid-template-columns: 280px 1fr;
}

[dir="rtl"] .shop-layout-wrapper.has-sidebar {
    grid-template-columns: 1fr 280px;
}

.shop-sidebar {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.shop-sidebar .widget {
    margin-bottom: 35px;
}

.shop-sidebar .widget:last-child {
    margin-bottom: 0;
}

.shop-sidebar .widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
    position: relative;
}

.shop-sidebar .widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--blue-400);
}

[dir="ltr"] .shop-sidebar .widget-title::after {
    right: auto;
    left: 0;
}

/* Shop Toolbar */
.wasla-shop-content-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.shop-toolbar {
    background: var(--white);
    padding: 15px 20px; /* Reduced padding to ensure visual alignment */
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 600px) {
    .shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    .toolbar-right {
        width: 100%;
    }
    .shop-toolbar .woocommerce-ordering {
        width: 100%;
    }
    .shop-toolbar select {
        width: 100%;
    }
}

.shop-toolbar .results-count,
.shop-toolbar .woocommerce-result-count,
.woocommerce-result-count,
.count,
.product-count {
    display: none !important;
}

.shop-toolbar .fh-title {
    padding-inline-start: 15px;
}

.shop-toolbar .woocommerce-ordering {
    margin: 0;
    margin-inline-start: auto;
}

.shop-toolbar .woocommerce-ordering select {
    background-color: var(--gray-50) !important;
    border: 1px solid var(--gray-200) !important;
    padding: 0 40px 0 15px !important;
    border-radius: 12px !important;
    font-family: var(--font-ar) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--navy-900) !important;
    outline: none !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%230f1b2d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 220px !important;
    height: 45px !important;
    line-height: 45px !important;
    margin: 0 !important;
}

[dir="rtl"] .shop-toolbar .woocommerce-ordering select {
    padding: 0 15px 0 40px !important;
    background-position: left 15px center !important;
}

.shop-toolbar .woocommerce-ordering select:hover {
    border-color: var(--blue-400) !important;
    background-color: var(--white) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px) !important;
}

/* Select2 Override for Shop Toolbar */
.shop-toolbar .select2-container--default .select2-selection--single {
    background-color: var(--gray-50) !important;
    border: 1px solid var(--gray-200) !important;
    height: 45px !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

.shop-toolbar .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 43px !important;
    padding-left: 15px !important;
    padding-right: 40px !important;
    font-weight: 600 !important;
    color: var(--navy-900) !important;
}

[dir="rtl"] .shop-toolbar .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 40px !important;
    padding-right: 15px !important;
}

.shop-toolbar .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 43px !important;
    right: 12px !important;
    width: 20px !important;
}

[dir="rtl"] .shop-toolbar .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: auto !important;
    left: 12px !important;
}

/* Pagination */
.wasla-pagination-wrap {
    margin-top: 50px;
}

.wasla-pagination-wrap .woocommerce-pagination ul {
    display: flex;
    justify-content: center;
    gap: 10px;
    border: none;
    padding: 0;
}

.wasla-pagination-wrap .woocommerce-pagination ul li {
    border: none;
}

.wasla-pagination-wrap .woocommerce-pagination ul li a,
.wasla-pagination-wrap .woocommerce-pagination ul li span {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-weight: 700;
    color: var(--navy-900);
    transition: all 0.3s ease;
}

.wasla-pagination-wrap .woocommerce-pagination ul li span.current {
    background: var(--navy-900);
    color: var(--white);
    border-color: var(--navy-900);
}

.wasla-pagination-wrap .woocommerce-pagination ul li a:hover {
    background: var(--blue-400);
    color: var(--white);
    border-color: var(--blue-400);
}

/* High specificity override to ensure grid and width alignment */
.wasla-shop-archive ul.products:not(.wasla-list-view),
.wasla-shop-archive .products {
    display: grid !important;
    gap: 20px !important;
    grid-template-columns: repeat(var(--columns, 5), 1fr) !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
}

.wasla-shop-archive .products::before,
.wasla-shop-archive .products::after {
    display: none;
}

.wasla-shop-archive .products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

@media (max-width: 1200px) {
    .wasla-shop-archive .products { --columns: 3; }
}
@media (max-width: 768px) {
    .wasla-shop-archive .products { --columns: 2; }
}
@media (max-width: 480px) {
    .wasla-shop-archive .products { --columns: 2; }
}

/* Responsive Archive */
@media (max-width: 1024px) {
    .shop-layout-wrapper.has-sidebar {
        grid-template-columns: 1fr;
    }
    .shop-sidebar {
        display: none; 
    }
    .wasla-hero-title {
        font-size: 32px;
    }
    .wasla-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}


/* ==========================================================================
   Shop List View Styles
   ========================================================================== */
.wasla-view-toggles {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.wasla-view-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.wasla-view-btn:hover {
    background: #f5f5f5;
}
.wasla-view-btn.active {
    background: var(--primary-color, #000);
    color: #fff;
    border-color: var(--primary-color, #000);
}

ul.products.wasla-list-view {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
}
ul.products.wasla-list-view li.product {
    display: flex;
    align-items: center;
    width: 100% !important;
    text-align: left;
    margin: 0 !important;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
}
ul.products.wasla-list-view li.product a.woocommerce-LoopProduct-link {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}
ul.products.wasla-list-view li.product img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 0;
}
ul.products.wasla-list-view li.product .fh-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
}
ul.products.wasla-list-view li.product .price {
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    ul.products.wasla-list-view li.product {
        flex-direction: column;
        text-align: center;
    }
    ul.products.wasla-list-view li.product a.woocommerce-LoopProduct-link {
        flex-direction: column;
        text-align: center;
    }
    ul.products.wasla-list-view li.product img {
        width: 100%;
        height: auto;
    }
}

/* ==========================================================================
   Shop & Category WooCommerce Grid Styles
   ========================================================================== */
ul.products::before, ul.products::after {
    display: none !important;
}

ul.products:not(.wasla-list-view) {
    display: flex !important;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

ul.products:not(.wasla-list-view) li.product {
    width: calc(25% - 15px) !important; /* 4 per row by default on desktop */
    margin: 0 !important;
    float: none !important;
}

/* Ensure no floats interfere */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    float: none !important;
}

@media (max-width: 1024px) {
    ul.products:not(.wasla-list-view) li.product {
        width: calc(33.333% - 13.333px) !important; /* 3 per row on tablet */
    }
}

@media (max-width: 768px) {
    ul.products:not(.wasla-list-view) li.product {
        width: 100% !important; 
    }
    
    /* Ensure cards don't have min-width on mobile and reduce padding */
    .wasla-product-card {
        min-width: 0 !important;
        width: 100% !important;
        padding: 12px !important; /* Smaller padding for mobile to prevent overflow */
    }
    
    /* Adjust internal elements for small space */
    .wasla-product-title {
        font-size: 14px !important;
    }
    
    .wasla-card-price {
        font-size: 15px !important;
    }
}

/* ============================================
   WooCommerce Global Button Styles
   ============================================ */

/* Global WooCommerce Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce .cart-collaterals .checkout-button,
.woocommerce-page a.button,
.woocommerce-page button.button,
.woocommerce-page input.button,
.woocommerce-page #respond input#submit,
.woocommerce-page .cart-collaterals .checkout-button {
    background-color: var(--cart-blue) !important;
    color: var(--white) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px 28px !important;
    font-weight: 800 !important;
    text-transform: none !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 15px rgba(26, 86, 168, 0.2) !important;
}

/* Hover States */
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce .cart-collaterals .checkout-button:hover {
    background-color: var(--navy-900) !important;
    color: var(--white) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(15, 27, 45, 0.25) !important;
}

/* Single Product Add to Cart Specific */
.woocommerce div.product form.cart .button {
    background-color: var(--cart-blue) !important;
    padding: 16px 40px !important;
    font-size: 16px !important;
}

/* Checkout Button (Cart Page) */
.woocommerce .cart-collaterals .checkout-button {
    background-color: var(--cart-blue) !important;
    display: block !important;
    text-align: center !important;
    font-size: 18px !important;
    margin-top: 20px !important;
}

/* View Cart/Checkout in Mini Cart (Force Blue) */
.mini-cart-dropdown .buttons a.checkout {
    background: var(--cart-blue) !important;
}

.mini-cart-dropdown .buttons a.view-cart:hover {
    background: var(--cart-blue) !important;
    color: var(--white) !important;
    border-color: var(--cart-blue) !important;
}

/* ============================================
   INFINITE SCROLL STYLES
   ============================================ */
#wasla-infinite-scroll-trigger {
    width: 100%;
    padding: 30px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    color: var(--navy-900);
    clear: both;
}

#wasla-infinite-scroll-trigger.is-loading {
    opacity: 0.8;
}

.wasla-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(26, 115, 232, 0.1);
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    animation: wasla-spin 0.8s linear infinite;
}

@keyframes wasla-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wasla-fade-in {
    animation: waslaFadeIn 0.6s ease forwards;
    opacity: 0;
}

@keyframes waslaFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-more-results {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 20px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--border-radius-md);
    width: 100%;
}
