/* Persian Navigation Widget Styles */

.hep-persian-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

/* Logo Styles */
.hep-logo {
    display: flex;
    align-items: center;
}

.hep-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.hep-logo img {
    max-height: 50px;
    width: auto;
}

.hep-logo-desktop {
    display: block;
}

.hep-logo-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hep-logo-desktop {
        display: none;
    }
    
    .hep-logo-mobile {
        display: block;
    }
}

.hep-logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

/* Mega Menu Styles */
.hep-mega-menu {
    position: relative;
    z-index: 10000;
}

.hep-mega-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    color: #495057;
}

.hep-mega-menu-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.hep-mega-menu-btn i {
    font-size: 0.875rem;
}

.hep-mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 600px;
    z-index: 9999;
    display: none;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Desktop mega menu hover - only show on desktop */
@media (min-width: 769px) {
    .hep-mega-menu:hover .hep-mega-menu-dropdown {
        display: block;
    }
    
    /* Also show when active class is added (for click functionality) */
    .hep-mega-menu-dropdown.active {
        display: block;
    }
}

/* Ensure mega menu is visible when enabled */
.hep-mega-menu-dropdown {
    display: none;
    background: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hep-mega-menu-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.hep-mega-menu-column {
    min-width: 200px;
}

.hep-mega-menu-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.hep-mega-menu-header a {
    font-weight: 600;
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.hep-mega-menu-header a:hover {
    color: #6f42c1;
}

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

.hep-mega-menu-list li {
    margin: 0;
}

.hep-mega-menu-list a {
    display: block;
    padding: 0.375rem 0;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.3s ease;
}

.hep-mega-menu-list a:hover {
    color: #495057;
}

/* Mega Menu Footer */
.hep-mega-menu-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.hep-mega-menu-footer-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #6f42c1;
    color: #fff;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hep-mega-menu-footer-link:hover {
    background: #5a32a3;
    color: #fff;
    transform: translateY(-1px);
}

/* Mobile Menu Button (Hidden on Desktop) */
.hep-mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #495057;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
}

.hep-mobile-menu-btn:hover {
    color: #6f42c1;
}

/* Prevent body scroll when mobile menu is open */
body.hep-mobile-menu-open {
    overflow: hidden;
}

/* Mobile Drawer Overlay */
.hep-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.hep-mobile-overlay.active {
    display: block;
}

/* Mobile Drawer */
.hep-mobile-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
}

.hep-mobile-drawer.active {
    left: 0;
}

.hep-mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.hep-mobile-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0.5rem;
}

.hep-mobile-drawer-close:hover {
    color: #495057;
}

/* Responsive Mega Menu */
@media (max-width: 768px) {
    .hep-mega-menu-dropdown {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        min-width: 100vw;
        width: 100vw;
        height: 100vh;
        z-index: 9999;
        background: #fff;
        padding: 1rem;
        overflow-y: auto;
    }
    
    .hep-mega-menu-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100%;
    }
    
    .hep-mega-menu-column {
        min-width: auto;
    }
    
    /* Desktop mega menu is hidden on mobile by default */
    
    /* Show mobile menu button */
    .hep-mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        color: #495057;
        font-size: 1.25rem;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .hep-mobile-menu-btn:hover {
        color: #6f42c1;
    }
    
    /* Mobile Drawer Content Styles */
    .hep-mobile-mega-menu,
    .hep-mobile-quick-links,
    .hep-mobile-nav-menu {
        margin-bottom: 2rem;
    }
    
    .hep-mobile-mega-menu h4,
    .hep-mobile-quick-links h4,
    .hep-mobile-nav-menu h4 {
        font-size: 1.125rem;
        font-weight: 600;
        color: #495057;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #e9ecef;
    }
    
    .hep-mobile-mega-menu-content {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hep-mobile-mega-menu-column {
        border-bottom: 1px solid #f1f3f4;
        padding-bottom: 1rem;
    }
    
    .hep-mobile-mega-menu-column:last-child {
        border-bottom: none;
    }
    
    .hep-mobile-mega-menu-header a {
        font-weight: 600;
        color: #495057;
        text-decoration: none;
        font-size: 1rem;
        display: block;
        padding: 0.5rem 0;
    }
    
    .hep-mobile-mega-menu-header a:hover {
        color: #6f42c1;
    }
    
    .hep-mobile-mega-menu-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .hep-mobile-mega-menu-list li {
        margin: 0;
    }
    
    .hep-mobile-mega-menu-list a {
        display: block;
        padding: 0.5rem 0;
        color: #6c757d;
        text-decoration: none;
        font-size: 0.875rem;
        transition: color 0.3s ease;
    }
    
    .hep-mobile-mega-menu-list a:hover {
        color: #495057;
    }
    
    .hep-mobile-quick-links {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hep-mobile-quick-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: 0.375rem;
        text-decoration: none;
        color: #495057;
        transition: all 0.3s ease;
    }
    
    .hep-mobile-quick-link:hover {
        background: #e9ecef;
        color: #6f42c1;
    }
    
    .hep-mobile-quick-link i {
        font-size: 1rem;
        width: 20px;
        text-align: center;
    }
    
    .hep-mobile-main-menu {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .hep-mobile-main-menu li {
        margin: 0;
    }
    
    .hep-mobile-main-menu a {
        display: block;
        padding: 0.75rem 0;
        color: #495057;
        text-decoration: none;
        font-size: 1rem;
        border-bottom: 1px solid #f1f3f4;
        transition: color 0.3s ease;
    }
    
    .hep-mobile-main-menu a:hover {
        color: #6f42c1;
    }
    
    .hep-mobile-main-menu a:last-child {
        border-bottom: none;
    }
}

/* Quick Links Styles */
.hep-quick-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 1rem;
}

.hep-quick-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hep-quick-link:hover {
    color: #6f42c1;
    background: #f8f9fa;
}

.hep-quick-link i {
    font-size: 0.875rem;
}

/* Navigation Menu Styles */
.hep-nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hep-main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.hep-main-menu li {
    margin: 0;
}

.hep-main-menu a {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.hep-main-menu a:hover {
    color: #6f42c1;
}

.hep-main-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #6f42c1;
    transition: width 0.3s ease;
}

.hep-main-menu a:hover::after {
    width: 100%;
}

/* Search Styles */
.hep-search {
    position: relative;
    margin: 0 1rem;
}

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

.hep-search-input {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 2rem;
    width: 300px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.hep-search-input:focus {
    outline: none;
    border-color: #6f42c1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1);
}

.hep-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6f42c1;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.hep-search-btn:hover {
    background: rgba(111, 66, 193, 0.1);
}

.hep-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1001;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.hep-search-suggestions.active {
    display: block;
}

.hep-search-suggestion-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background 0.3s ease;
}

.hep-search-suggestion-item:hover {
    background: #f8f9fa;
}

.hep-search-suggestion-item:last-child {
    border-bottom: none;
}

/* Cart Styles */
.hep-cart {
    position: relative;
    margin-left: 1rem;
}

.hep-cart-icon {
    position: relative;
    background: #6f42c1;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    text-decoration: none;
}

.hep-cart-icon:hover {
    background: #5a32a3;
    transform: scale(1.05);
}

.hep-cart-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.hep-cart-icon i {
    font-size: 1.125rem;
    line-height: 1;
}

.hep-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 20px;
}

/* Cart Popup Styles */
.hep-cart-popup {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 256px;
    max-height: 500px;
    z-index: 1002;
    display: none;
    overflow: hidden;
    margin-top: 0.5rem;
}

@media (min-width: 640px) {
    .hep-cart-popup {
        width: 288px;
    }
}

.hep-cart-popup.active {
    display: block !important;
}

.hep-cart-popup-content {
    padding: 1rem;
}

.hep-cart-popup-content h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
}

.hep-cart-items {
    margin-bottom: 0.75rem;
}

.hep-cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.hep-cart-item:last-child {
    border-bottom: none;
}

.hep-cart-item-image {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 0.375rem;
    overflow: hidden;
}

.hep-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hep-cart-item-placeholder {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.hep-cart-item-details {
    flex: 1;
    min-width: 0;
}

.hep-cart-item-name {
    font-size: 0.75rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.hep-cart-item-name a {
    color: inherit;
    text-decoration: none;
}

.hep-cart-item-name a:hover {
    color: #5A31F4;
}

.hep-cart-item-price {
    font-size: 0.75rem;
    color: #6b7280;
}

.hep-cart-item-quantity {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

.hep-cart-total {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.hep-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.hep-cart-total-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

.hep-cart-total-amount {
    font-size: 0.875rem;
    font-weight: 700;
    color: #5A31F4;
}

.hep-cart-view-btn {
    display: block;
    width: 100%;
    padding: 0.5rem;
    background: #5A31F4;
    color: #fff;
    text-decoration: none;
    text-align: center;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.hep-cart-view-btn:hover {
    background: #4A28E0;
    color: #fff;
}

.hep-cart-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #6c757d;
}

.hep-cart-empty svg {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
    color: #dee2e6;
    stroke: currentColor;
    fill: none;
}

.hep-cart-empty p {
    margin: 0;
    font-size: 0.875rem;
}

/* Profile Styles */
.hep-profile {
    margin-left: 1rem;
}

.hep-profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #f8f9fa;
    color: #495057;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.125rem;
}

.hep-profile-icon:hover {
    background: #e9ecef;
    color: #6f42c1;
    transform: scale(1.05);
}

.hep-mega-menu-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
    position: absolute;
    z-index: 9999;
}

.hep-mega-menu-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.hep-mega-menu {
    position: relative;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hep-persian-navigation {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0.75rem 0;
    }
    
    .hep-quick-links {
        order: 2;
        margin: 0.5rem 0;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .hep-quick-link {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
    
    .hep-search-input {
        width: 200px;
    }
    
    .hep-cart-popup {
        width: 300px;
        right: -50px;
    }
    
    .hep-main-menu {
        gap: 1rem;
    }
    

}

@media (max-width: 576px) {
    .hep-persian-navigation {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hep-search {
        margin: 0.5rem 0;
    }
    
    .hep-search-input {
        width: 100%;
    }
    
    .hep-cart-popup {
        width: 280px;
        right: -100px;
    }
    
    .hep-mega-menu,
    .hep-nav-menu {
        order: 3;
    }
    
    .hep-search {
        order: 2;
    }
    
    .hep-cart,
    .hep-profile {
        order: 1;
        margin-left: 0;
    }
    
    .hep-quick-links {
        order: 2;
        justify-content: center;
    }
    

}

/* RTL Support */
[dir="rtl"] .hep-persian-navigation {
    direction: rtl;
}

[dir="rtl"] .hep-search-btn {
    right: auto;
    left: 0.5rem;
}

[dir="rtl"] .hep-cart-badge {
    right: auto;
    left: -5px;
}

[dir="rtl"] .hep-cart-popup {
    right: auto;
    left: 0;
}

[dir="rtl"] .hep-cart-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .hep-cart-popup-header {
    flex-direction: row-reverse;
}

/* RTL Support for Mobile Drawer */
[dir="rtl"] .hep-mobile-drawer {
    left: auto;
    right: -100%;
}

[dir="rtl"] .hep-mobile-drawer.active {
    left: auto;
    right: 0;
}

[dir="rtl"] .hep-mobile-drawer-header {
    flex-direction: row-reverse;
}

/* Icon Styling */
.hep-search-btn i,
.hep-profile-icon i {
    font-size: inherit;
    line-height: 1;
}

.hep-search-icon {
    font-size: 1.125rem;
    line-height: 1;
}

/**
 * Persian Navigation Widget Styles
 * RTL (Right-to-Left) layout for Persian/Farsi websites
 */

.hep-persian-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #ffffff;
    direction: rtl;
    text-align: right;
    position: relative;
    z-index: 1000;
}

/* Logo Styles */
.hep-logo {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.hep-logo img {
    max-height: 40px;
    width: auto;
}

.hep-logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.hep-logo-text::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #6f42c1;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* Categories Menu Styles */
.hep-categories {
    position: relative;
    margin-left: 20px;
}

.hep-categories-btn {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.hep-categories-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.hep-hamburger {
    display: flex;
    flex-direction: column;
    margin-left: 8px;
    width: 16px;
    height: 12px;
    justify-content: space-between;
}

.hep-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #495057;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hep-categories-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 5px;
}

.hep-categories:hover .hep-categories-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hep-categories-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.hep-categories-menu li {
    margin: 0;
}

.hep-categories-menu a {
    display: block;
    padding: 8px 15px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.hep-categories-menu a:hover {
    background: #f8f9fa;
    color: #6f42c1;
}

/* Main Navigation Styles */
.hep-nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 20px;
}

.hep-main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.hep-main-menu li {
    margin: 0;
    position: relative;
}

.hep-main-menu a {
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    transition: all 0.3s ease;
    position: relative;
}

.hep-main-menu a:hover {
    color: #6f42c1;
}

.hep-main-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: #6f42c1;
    transition: width 0.3s ease;
}

.hep-main-menu a:hover::after {
    width: 100%;
}

/* Search Styles */
.hep-search {
    position: relative;
    margin-left: 20px;
    flex: 1;
    max-width: 300px;
}

.hep-search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    font-family: inherit;
}

.hep-search-input:focus {
    outline: none;
    border-color: #6f42c1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1);
}

.hep-search-input::placeholder {
    color: #6c757d;
    font-family: inherit;
}

.hep-search-btn {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hep-search-btn:hover {
    background: #e9ecef;
    color: #6f42c1;
}

/* Cart Styles */
.hep-cart {
    margin-left: 15px;
}

.hep-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #6f42c1;
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.hep-cart-icon:hover {
    background: #5a32a3;
    transform: scale(1.05);
}

.hep-cart-icon i {
    font-size: 18px;
}

.hep-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Profile Styles */
.hep-profile {
    margin-left: 15px;
}

.hep-profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hep-profile-icon:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #6f42c1;
}

.hep-profile-icon i {
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hep-persian-navigation {
        padding: 12px 15px;
    }
    
    .hep-main-menu {
        gap: 20px;
    }
    
    .hep-search {
        max-width: 250px;
    }
}

@media (max-width: 992px) {
    .hep-persian-navigation {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .hep-logo {
        order: 1;
        margin-left: 0;
    }
    
    .hep-categories {
        order: 2;
        margin-left: 0;
    }
    
    .hep-search {
        order: 3;
        flex: 1;
        min-width: 200px;
        margin-left: 0;
    }
    
    .hep-nav-menu {
        order: 4;
        width: 100%;
        margin: 0;
        justify-content: flex-start;
        overflow-x: auto;
    }
    
    .hep-main-menu {
        gap: 15px;
        white-space: nowrap;
    }
    
    .hep-cart,
    .hep-profile {
        order: 5;
        margin-left: 10px;
    }
}

@media (max-width: 768px) {
    .hep-persian-navigation {
        padding: 10px;
    }
    
    .hep-logo-text {
        font-size: 20px;
    }
    
    .hep-categories-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .hep-search {
        max-width: none;
        min-width: 150px;
    }
    
    .hep-search-input {
        padding: 8px 35px 8px 12px;
        font-size: 13px;
    }
    
    .hep-cart-icon,
    .hep-profile-icon {
        width: 40px;
        height: 40px;
    }
    
    .hep-cart-icon i,
    .hep-profile-icon i {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .hep-persian-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .hep-logo,
    .hep-categories,
    .hep-search,
    .hep-nav-menu,
    .hep-cart,
    .hep-profile {
        order: unset;
        margin: 0;
        width: 100%;
    }
    
    .hep-search {
        max-width: none;
    }
    
    .hep-nav-menu {
        justify-content: center;
    }
    
    .hep-main-menu {
        justify-content: center;
        gap: 20px;
    }
    
    .hep-cart,
    .hep-profile {
        display: inline-block;
        width: auto;
        margin: 0 5px;
    }
}


.hep-categories:hover .hep-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hep-mega-menu h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.hep-mega-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hep-mega-menu li {
    margin: 8px 0;
}

.hep-mega-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: block;
    padding: 5px 0;
}

.hep-mega-menu a:hover {
    color: #f8f9fa;
    transform: translateX(-5px);
}

/* Animation for cart badge */
@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hep-cart-badge {
    animation: cartPulse 2s infinite;
}



/* Focus styles for accessibility */
.hep-search-input:focus,
.hep-categories-btn:focus,
.hep-cart-icon:focus,
.hep-profile-icon:focus {
    outline: 2px solid #6f42c1;
    outline-offset: 2px;
} 

/* Dropdown Submenu for Main Menu */
.hep-main-menu li.menu-item-has-children > .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .2s ease;
    z-index: 1002;
    padding: 6px 0;
}
.hep-main-menu li.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.hep-main-menu .sub-menu li { position: relative; }
.hep-main-menu .sub-menu a {
    display: block;
    padding: 8px 14px;
    color: #495057;
    text-decoration: none;
    font-size: 13px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.hep-main-menu .sub-menu a:hover {
    background: #f8f9fa;
    color: #6f42c1;
}
/* Third level flyout (RTL) */
.hep-main-menu .sub-menu li.menu-item-has-children > .sub-menu {
    top: 0;
    right: 100%;
    margin-right: 6px;
}

/* Generic Mega Menu Support (class name may vary by plugin) */
.hep-main-menu li.mega-menu > .sub-menu,
.hep-main-menu li.menu-item-has-mega-menu > .sub-menu,
.hep-main-menu li.megamenu > .sub-menu {
    position: absolute;
    right: 0;
    left: 0;
    margin: 0 auto;
    width: min(1000px, 92vw);
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.12);
    padding: 18px 20px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 16px 24px;
}
.hep-main-menu li.mega-menu:hover > .sub-menu,
.hep-main-menu li.menu-item-has-mega-menu:hover > .sub-menu,
.hep-main-menu li.megamenu:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* Ensure Font Awesome icons render with proper weight */
.hep-search-btn i,
.hep-cart-icon i,
.hep-profile-icon i {
    font-family: "Font Awesome 5 Free";
    font-weight: 900; /* solid */
    line-height: 1;
} 

/* Ensure dropdowns/megamenu become visible when opened by various mechanisms */
.hep-main-menu li.menu-item-has-children.open > .sub-menu,
.hep-main-menu li.menu-item-has-children.focus > .sub-menu,
.hep-main-menu li.menu-item-has-children:focus-within > .sub-menu,
.hep-main-menu li.menu-item-has-children:hover > .sub-menu,
.hep-main-menu li.current-menu-ancestor > .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto;
}

/* Mega menu variants commonly used by plugins */
.hep-main-menu li.mega-menu > .sub-menu,
.hep-main-menu li.menu-item-has-mega-menu > .sub-menu,
.hep-main-menu li.megamenu > .sub-menu {
  pointer-events: auto;
}
.hep-main-menu li.mega-menu.open > .sub-menu,
.hep-main-menu li.menu-item-has-mega-menu.open > .sub-menu,
.hep-main-menu li.megamenu.open > .sub-menu,
.hep-main-menu li.mega-menu:focus-within > .sub-menu,
.hep-main-menu li.menu-item-has-mega-menu:focus-within > .sub-menu,
.hep-main-menu li.megamenu:focus-within > .sub-menu,
.hep-main-menu li.mega-menu:hover > .sub-menu,
.hep-main-menu li.menu-item-has-mega-menu:hover > .sub-menu,
.hep-main-menu li.megamenu:hover > .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
} 


/* Support common WP markup patterns inside mega menu */
.hep-mega-menu > ul { /* if plugin outputs a UL wrapper */
  list-style: none;
  margin: 0;
  padding: 0;
  display: contents; /* let li become grid items */
}
.hep-mega-menu li { margin: 0; }
.hep-mega-menu h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; color: #1f2937; }
.hep-mega-menu a { color: #374151; text-decoration: none; font-size: 14px; display: block; padding: 6px 0; border-radius: 6px; }
.hep-mega-menu a:hover { color: #111827; background: rgba(0,0,0,.04); }

/* Show mega menu on open/hover/focus states */
.hep-categories.open .hep-mega-menu,
.hep-categories:focus-within .hep-mega-menu,
.hep-categories:hover .hep-mega-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

/* Generic mega menu sub-menu (from WP walkers) → apply frosted glass + 4 cols */
.hep-main-menu li.mega-menu > .sub-menu,
.hep-main-menu li.menu-item-has-mega-menu > .sub-menu,
.hep-main-menu li.megamenu > .sub-menu {
  background: rgba(255, 255, 255, 0.55) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  padding: 24px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 28px !important;
  width: min(1100px, 92vw) !important;
  left: 0; right: 0; margin: 0 auto;
}

/* Responsive columns */
@media (max-width: 992px) {
  .hep-mega-menu,
  .hep-main-menu li.mega-menu > .sub-menu,
  .hep-main-menu li.menu-item-has-mega-menu > .sub-menu,
  .hep-main-menu li.megamenu > .sub-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 576px) {
  .hep-mega-menu,
  .hep-main-menu li.mega-menu > .sub-menu,
  .hep-main-menu li.menu-item-has-mega-menu > .sub-menu,
  .hep-main-menu li.megamenu > .sub-menu {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    width: 92vw !important;
  }
} 

/* Persian Navigation: Mega Menu (widget) - 4 columns + blurred background */
.hep-mega-menu { position: relative; }
.hep-mega-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0; left: 0;
  margin: 8px auto 0;
  width: min(1100px, 92vw);
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  pointer-events: none;
  z-index: 1002;
  padding: 24px;
}
.hep-mega-menu-content {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 28px;
}
.hep-mega-menu-column { min-width: 0; }
.hep-mega-menu-header a {
  display: block;
  font-weight: 600;
  font-size: 16px;
  color: #1f2937;
  text-decoration: none;
  margin-bottom: 10px;
}
.hep-mega-menu-items .hep-mega-menu-list { list-style: none; margin: 0; padding: 0; }
.hep-mega-menu-items .hep-mega-menu-list li a {
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 6px 0;
  border-radius: 6px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.hep-mega-menu-items .hep-mega-menu-list li a:hover {
  color: #111827;
  background: rgba(0,0,0,.04);
  transform: translateX(-4px);
}
/* Open/visible states */
.hep-mega-menu.open .hep-mega-menu-dropdown,
.hep-mega-menu:focus-within .hep-mega-menu-dropdown,
.hep-mega-menu:hover .hep-mega-menu-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto;
}
/* Responsive columns for widget mega menu */
@media (max-width: 992px) { .hep-mega-menu-content { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 576px) { .hep-mega-menu-content { grid-template-columns: repeat(1, minmax(0, 1fr)); } } 