/*
 * Karmone Marketplace header stylesheet.
 * Moved from header.php in v5.4.3 so the HTML stays lightweight and the file can be cached.
 */

:root {
            --k-header-primary: #2c3e50;
            --k-header-primary-light: #4a6572;
            --k-header-secondary: #e74c3c;
            --k-header-secondary-dark: #c0392b;
            --k-header-accent: #27ae60;
            --k-header-accent-light: #2ecc71;
            --k-header-light: #f8f9fa;
            --k-header-white: #ffffff;
            --k-header-border: #e0e0e0;
            --k-header-border-light: #f1f1f1;

            --k-header-shadow:
                0 2px 15px rgba(0,0,0,.08);

            --k-header-shadow-heavy:
                0 8px 30px rgba(0,0,0,.16);

            --k-header-radius: 8px;

            --header-z-index: 10000;
            --header-height: 182px;
        }

        html {
            width: 100%;
            min-height: 100%;
            scroll-behavior: smooth;
        }

        body {
            width: 100%;
            min-height: 100vh;
            margin: 0 !important;
            padding: 0 !important;
            overflow-x: hidden;
            background: #f9f9f9;
            color: #333;
            font-family:
                Tahoma,
                Arial,
                'Segoe UI',
                sans-serif;
            direction: rtl;
            text-align: right;
        }

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

        .site-header-karmone-pro {
            position: fixed;
            inset: 0 0 auto 0;
            z-index: var(--header-z-index);
            width: 100%;
            background: #fff;
            box-shadow: var(--k-header-shadow);
            transform: translateY(0);
            transition:
                transform .35s ease,
                box-shadow .25s ease;
        }

        body.header-hidden .site-header-karmone-pro {
            transform: translateY(-100%);
        }

        body.header-shrink
        .site-header-karmone-pro {
            box-shadow:
                0 3px 18px rgba(0,0,0,.12);
        }

        .admin-bar
        .site-header-karmone-pro {
            top: 32px;
        }

        /* =====================================================
         * MAIN CONTENT OFFSET
         * ================================================== */

        .main-content-wrapper {
            position: relative;
            width: 100%;
            min-height: 100vh;
        }

        #main-content {
            scroll-margin-top: var(--header-height);
        }

        /* JS will update this value precisely. */
        .main-content-wrapper {
            padding-top: var(--header-height);
        }

        /* =====================================================
         * CONTAINER
         * ================================================== */

        .container-pro {
            width: min(
                calc(100% - 30px),
                1400px
            );
            margin-inline: auto;
        }

        /* =====================================================
         * ACCESSIBILITY
         * ================================================== */

        .skip-to-content-pro {
            position: fixed;
            top: 0;
            inset-inline-start: 12px;
            z-index: 100000;
            padding: 10px 15px;
            color: #fff;
            background: var(--k-header-primary);
            border-radius:
                0 0
                7px
                7px;
            text-decoration: none;
            transform: translateY(-120%);
            transition: transform .2s ease;
        }

        .skip-to-content-pro:focus {
            transform: translateY(0);
        }

        .sr-only {
            position: absolute !important;
            width: 1px !important;
            height: 1px !important;
            padding: 0 !important;
            margin: -1px !important;
            overflow: hidden !important;
            clip: rect(0,0,0,0) !important;
            white-space: nowrap !important;
            border: 0 !important;
        }

        /* =====================================================
         * TOP BAR
         * ================================================== */

        .top-bar-pro {
            height: 45px;
            padding: 8px 0;
            overflow: hidden;
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-primary),
                    var(--k-header-primary-light)
                );
            color: #fff;
        }

        .top-bar-content-pro,
        .top-info-pro,
        .quick-links-pro {
            display: flex;
            align-items: center;
        }

        .top-bar-content-pro {
            justify-content: space-between;
            gap: 20px;
        }

        .top-info-pro {
            min-width: 0;
            gap: 18px;
        }

        .welcome-text-pro {
            display: flex;
            align-items: center;
            gap: 7px;
            white-space: nowrap;
        }

        .user-name-pro {
            color: #ffd700;
            font-weight: 700;
        }

        .quick-links-pro {
            gap: 8px;
            min-width: 0;
        }

        .top-link-pro {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 10px;
            color: #fff;
            text-decoration: none;
            border-radius: 5px;
            white-space: nowrap;
            transition:
                background-color .2s ease,
                transform .2s ease;
        }

        .top-link-pro:hover {
            color: #fff;
            background: rgba(255,255,255,.14);
            transform: translateY(-1px);
        }

        .special-offer-pro {
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-secondary),
                    var(--k-header-secondary-dark)
                );
            border-radius: 20px;
            font-weight: 700;
        }

        /* =====================================================
         * MAIN HEADER
         * ================================================== */

        .main-header-pro {
            height: 85px;
            padding: 15px 0;
            background: #fff;
            display: flex;
            align-items: center;
        }

        .main-header-content-pro {
            display: flex;
            align-items: center;
            width: 100%;
            gap: 25px;
        }

        .branding-pro {
            display: flex;
            align-items: center;
            gap: 15px;
            min-width: 235px;
            flex: 0 0 auto;
        }

        .logo-pro img {
            display: block;
            max-height: 50px;
            width: auto;
            border-radius: 8px;
        }

        .brand-logo-link-pro {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            min-width: 92px;
            min-height: 54px;
            padding: 4px 10px;
            border-radius: 12px;
            color: #2c3e50;
            text-decoration: none;
            background: #fff;
        }

        .brand-logo-image-pro {
            display: block;
            width: 170px;
            max-width: 100%;
            height: auto;
            max-height: 52px;
        }

        .brand-logo-wordmark-pro {
            display: inline-block;
            color: #2c3e50;
            font-size: 30px;
            font-weight: 900;
            line-height: 1;
            letter-spacing: -0.5px;
            white-space: nowrap;
        }

        .brand-logo-link-pro:hover .brand-logo-wordmark-pro {
            color: var(--k-header-secondary);
        }

        .brand-text-pro {
            min-width: 0;
            display: flex;
            flex-direction: column;
            line-height: 1.3;
        }

        .brand-name-pro {
            display: inline-block;
            color: var(--k-header-primary);
            font-size: 25px;
            font-weight: 900;
            white-space: nowrap;
        }

        .brand-name-pro:hover {
            color: var(--k-header-secondary);
        }

        .brand-tagline-pro {
            margin-top: 3px;
            color: #666;
            font-size: 12px;
        }

        /* =====================================================
         * SEARCH
         * ================================================== */

        .search-pro {
            flex: 1 1 auto;
            min-width: 180px;
            max-width: 650px;
            margin-inline: auto;
        }

        .search-container-pro {
            position: relative;
            width: 100%;
            transition: transform .2s ease;
        }

        .search-container-pro.is-focused {
            transform: scale(1.01);
        }

        .search-input-pro {
            width: 100%;
            height: 50px;
            padding: 12px 54px 12px 18px;
            border: 2px solid var(--k-header-border);
            border-radius: 999px;
            background: #fff;
            color: #333;
            font: inherit;
            box-shadow: 0 2px 10px rgba(0,0,0,.04);
        }

        .search-input-pro:focus {
            outline: none;
            border-color: var(--k-header-primary);
            box-shadow:
                0 0 0 3px rgba(44,62,80,.1);
        }

        .search-button-pro {
            position: absolute;
            inset-inline-start: 5px;
            top: 4px;
            width: 42px;
            height: 42px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-secondary),
                    var(--k-header-secondary-dark)
                );
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        /* =====================================================
         * ACTIONS
         * ================================================== */

        .actions-pro {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 0 0 auto;
        }

        .action-item-pro {
            position: relative;
            min-width: 76px;
            padding: 8px 10px;
            border: 1px solid transparent;
            border-radius: var(--k-header-radius);
            background: #fff;
            color: var(--k-header-primary);
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            cursor: pointer;
        }

        .action-item-pro:hover {
            color: var(--k-header-primary);
            border-color: var(--k-header-border);
            box-shadow:
                0 5px 15px rgba(0,0,0,.08);
        }

        .action-icon-pro {
            margin-bottom: 5px;
            font-size: 21px;
            line-height: 1;
        }

        .action-label-pro {
            font-size: 12px;
            font-weight: 600;
        }

        .cart-badge-pro {
            position: absolute;
            top: 3px;
            inset-inline-end: 4px;
            min-width: 21px;
            height: 21px;
            padding: 2px 6px;
            border-radius: 999px;
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-secondary),
                    var(--k-header-secondary-dark)
                );
            color: #fff;
            font-size: 11px;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .cart-badge-pro[hidden] {
            display: none !important;
        }

        .wishlist-badge-pro {
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-accent),
                    var(--k-header-accent-light)
                );
        }

        /* =====================================================
         * ACCOUNT TOGGLE
         * IMPORTANT: BUTTON IS NOW ONLY THE TOGGLE.
         * Dropdown lives outside the button.
         * ================================================== */

        .account-dropdown-pro {
            position: relative;
        }

        .account-toggle-pro {
            appearance: none;
            -webkit-appearance: none;
            font: inherit;
        }

        .user-avatar-pro {
            width: 42px;
            height: 42px;
            margin-bottom: 5px;
            overflow: hidden;
            border: 2px solid var(--k-header-border);
            border-radius: 50%;
            display: block;
        }

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

        .user-name-display-pro {
            display: block;
            max-width: 90px;
            overflow: hidden;
            font-size: 11px;
            font-weight: 600;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .account-menu-wrap {
            position: absolute;
            top: calc(100% + 8px);
            inset-inline-end: 0;
            width: 320px;
            max-width: calc(100vw - 20px);
            z-index: 10001;
            visibility: hidden;
            opacity: 0;
            transform: translateY(-7px);
            pointer-events: none;
            transition:
                opacity .2s ease,
                transform .2s ease;
        }

        .account-dropdown-pro:hover
        .account-menu-wrap,
        .account-dropdown-pro:focus-within
        .account-menu-wrap {
            visibility: visible;
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .account-menu {
            width: 100%;
            max-height: 80vh;
            overflow: auto;
            border: 1px solid var(--k-header-border);
            border-radius: var(--k-header-radius);
            background: #fff;
            box-shadow: var(--k-header-shadow-heavy);
        }

        .dropdown-header-pro {
            display: flex;
            gap: 14px;
            padding: 18px;
            border-bottom: 1px solid var(--k-header-border-light);
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-light),
                    #fff
                );
        }

        .dropdown-avatar-pro {
            width: 58px;
            height: 58px;
            flex: 0 0 58px;
            overflow: hidden;
            border: 2px solid var(--k-header-border);
            border-radius: 50%;
        }

        .dropdown-avatar-pro img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
        }

        .dropdown-user-info {
            min-width: 0;
            flex: 1 1 auto;
        }

        .dropdown-user-name {
            display: block;
            overflow: hidden;
            font-weight: 700;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .dropdown-user-email {
            display: block;
            overflow: hidden;
            color: #555;
            font-size: 12px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .user-stats-pro {
            display: flex;
            gap: 8px;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px dashed
                var(--k-header-border-light);
        }

        .user-stat-item {
            flex: 1;
            text-align: center;
        }

        .stat-value {
            display: block;
            color: var(--k-header-primary);
            font-weight: 700;
        }

        .stat-label {
            display: block;
            color: #555;
            font-size: 10px;
        }

        .dropdown-menu-section {
            padding: 12px 0;
        }

        .section-title {
            display: block;
            padding: 0 18px 8px;
            margin-bottom: 4px;
            border-bottom: 1px solid
                var(--k-header-border-light);
            color: #555;
            font-size: 11px;
            font-weight: 700;
        }

        .dropdown-item-pro {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 18px;
            border-inline-start: 3px solid transparent;
            color: var(--k-header-primary);
            text-decoration: none;
        }

        .dropdown-item-pro:hover {
            border-inline-start-color:
                var(--k-header-primary);
            background: var(--k-header-light);
            color: var(--k-header-primary);
        }

        .item-badge {
            margin-inline-start: auto;
            padding: 2px 7px;
            border-radius: 999px;
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-secondary),
                    var(--k-header-secondary-dark)
                );
            color: #fff;
            font-size: 10px;
            font-weight: 700;
        }

        .item-badge.green {
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-accent),
                    var(--k-header-accent-light)
                );
        }

        .item-badge.blue {
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-primary),
                    var(--k-header-primary-light)
                );
        }

        .dropdown-footer-pro {
            padding: 12px 18px;
            background: var(--k-header-light);
            border-top: 1px solid
                var(--k-header-border-light);
            text-align: center;
        }

        .logout-item-pro {
            color: var(--k-header-secondary) !important;
            font-weight: 700;
        }

        /* =====================================================
         * CATEGORIES
         * ================================================== */

        .categories-bar-pro {
            height: 56px;
            border-top: 1px solid var(--k-header-border);
            border-bottom: 2px solid
                var(--k-header-primary);
            background:
                linear-gradient(
                    to right,
                    var(--k-header-light),
                    #fff
                );
            display: flex;
            align-items: center;
        }

        .categories-container-pro {
            display: flex;
            align-items: center;
            width: 100%;
            min-width: 0;
        }

        .all-categories-btn-pro {
            width: 60px;
            height: 56px;
            flex: 0 0 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-primary),
                    var(--k-header-primary-light)
                );
            color: #fff;
            font-size: 22px;
        }

        .scroll-buttons-pro {
            display: flex;
            align-items: center;
            gap: 5px;
            padding-inline: 10px;
            flex: 0 0 auto;
            background: #fff;
            border-inline:
                1px solid
                var(--k-header-border);
        }

        .scroll-btn-pro {
            width: 44px;
            height: 44px;
            padding: 0;
            border: 1px solid
                var(--k-header-border);
            border-radius: 50%;
            background: #fff;
            color: var(--k-header-primary);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .scroll-btn-pro:disabled {
            cursor: not-allowed;
            opacity: .45;
        }

        .categories-line-pro {
            display: flex;
            align-items: center;
            flex: 1 1 auto;
            min-width: 0;
            height: 56px;
            margin: 0;
            padding: 0;
            overflow-x: auto;
            overflow-y: hidden;
            list-style: none;
            scrollbar-width: thin;
            overscroll-behavior-x: contain;
        }

        .category-item-pro {
            position: relative;
            height: 56px;
            flex: 0 0 auto;
        }

        .category-link-pro {
            display: flex;
            align-items: center;
            gap: 8px;
            height: 56px;
            padding-inline: 18px;
            border-inline-start:
                1px solid
                var(--k-header-border-light);
            color: var(--k-header-primary);
            font-size: 14px;
            font-weight: 600;
            white-space: nowrap;
        }

        .category-link-pro:hover {
            background: var(--k-header-light);
            color: var(--k-header-secondary);
        }

        .category-icon-pro {
            font-size: 17px;
        }

        .category-count-pro {
            padding: 2px 6px;
            border-radius: 999px;
            background: var(--k-header-light);
            font-size: 10px;
        }

        .hot-badge-pro {
            padding: 2px 7px;
            border-radius: 999px;
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-secondary),
                    var(--k-header-secondary-dark)
                );
            color: #fff;
            font-size: 9px;
            font-weight: 700;
        }

        .new-badge-pro {
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-accent),
                    var(--k-header-accent-light)
                );
        }

        .side-actions-pro {
            flex: 0 0 auto;
            display: flex;
            align-items: center;
            padding-inline-start: 12px;
            border-inline-start:
                1px solid
                var(--k-header-border);
        }

        .support-info-pro {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 7px 10px;
            border-radius: var(--k-header-radius);
            color: var(--k-header-primary);
            font-weight: 600;
        }

        .support-info-pro:hover {
            background: var(--k-header-light);
        }

        .phone-icon-pro {
            width: 31px;
            height: 31px;
            border-radius: 50%;
            background:
                linear-gradient(
                    135deg,
                    var(--k-header-primary),
                    var(--k-header-primary-light)
                );
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* =====================================================
         * MOBILE TOGGLE
         * ================================================== */

        .mobile-toggle-pro {
            display: none;
            width: 46px;
            height: 46px;
            padding: 0;
            border: 0;
            border-radius: var(--k-header-radius);
            background: transparent;
            color: var(--k-header-primary);
            font-size: 25px;
            align-items: center;
            justify-content: center;
        }

        /* =====================================================
         * SHRINK STATE
         * ================================================== */

        body.header-shrink
        .top-bar-pro,
        body.header-shrink
        .categories-bar-pro {
            height: 0;
            min-height: 0;
            padding: 0;
            overflow: hidden;
            opacity: 0;
            border-width: 0;
        }

        body.header-shrink
        .main-header-pro {
            height: 70px;
            padding: 10px 0;
        }

        body.header-shrink
        .logo-pro img {
            max-height: 40px;
        }

        body.header-shrink
        .brand-name-pro {
            font-size: 21px;
        }

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

        @media (max-width:1200px) {

            .container-pro {
                width: min(
                    calc(100% - 30px),
                    1200px
                );
            }

            .branding-pro {
                min-width: 205px;
            }

            .brand-name-pro {
                font-size: 22px;
            }

            .brand-tagline-pro,
            .side-actions-pro {
                display: none;
            }

            .category-link-pro {
                padding-inline: 14px;
                font-size: 13px;
            }
        }

        @media (max-width:992px) {

            :root {
                --header-height: 140px;
            }

            .top-bar-pro {
                display: none;
            }

            .main-header-pro {
                height: 140px;
                min-height: 140px;
            }

            .categories-bar-pro[hidden] {
                display: none !important;
            }

            .main-header-content-pro {
                flex-wrap: wrap;
                gap: 12px;
            }

            .mobile-toggle-pro {
                display: flex;
            }

            .branding-pro {
                flex: 1 1 auto;
                min-width: 0;
            }

            .search-pro {
                order: 10;
                flex-basis: 100%;
                max-width: none;
            }

            .categories-bar-pro {
                height: 52px;
            }

            .categories-line-pro,
            .category-item-pro,
            .category-link-pro {
                height: 52px;
            }

            .all-categories-btn-pro,
            .scroll-buttons-pro {
                display: none;
            }

            .action-label-pro,
            .user-name-display-pro {
                display: none;
            }

            .action-item-pro {
                min-width: 45px;
                padding: 6px;
            }

            .account-menu-wrap {
                position: fixed;
                top: 0 !important;
                inset-inline: 0 !important;
                width: 100%;
                max-width: none;
                height: 100vh;
                max-height: none;
                padding: 0;
                visibility: hidden;
                opacity: 0;
                transform: none;
                pointer-events: none;
            }

            .account-dropdown-pro.mobile-open
            .account-menu-wrap {
                visibility: visible;
                opacity: 1;
                pointer-events: auto;
            }

            .account-menu {
                height: 100vh;
                max-height: none;
                overflow-y: auto;
                border-radius: 0;
            }
        }

        @media (max-width:782px) {

            .admin-bar
            .site-header-karmone-pro {
                top: 46px;
            }
        }

        @media (max-width:576px) {
            .brand-logo-image-pro { width: 140px; max-height: 42px; }
            .brand-logo-wordmark-pro { font-size: 24px; }
            .brand-logo-link-pro { min-width: 78px; min-height: 46px; padding-inline: 6px; }

            .container-pro {
                width: calc(100% - 20px);
            }

            .logo-pro img {
                max-height: 40px;
            }

            .brand-name-pro {
                font-size: 19px;
            }

            .actions-pro {
                gap: 4px;
            }

            .search-input-pro {
                height: 46px;
                font-size: 13px;
            }

            .search-button-pro {
                width: 38px;
                height: 38px;
                top: 4px;
            }

            .category-link-pro {
                padding-inline: 11px;
                font-size: 11px;
            }

            .category-icon-pro {
                font-size: 14px;
            }
        }

        @media (prefers-reduced-motion:reduce) {

            *,
            *::before,
            *::after {
                scroll-behavior:auto!important;
                animation-duration:.01ms!important;
                animation-iteration-count:1!important;
                transition-duration:.01ms!important;
            }
        }

        @media print {

            .site-header-karmone-pro {
                display:none!important;
            }

            .main-content-wrapper {
                padding-top:0!important;
            }
        }
