.fa, .far, .fas, .fab, [class^="fa-"], [class*=" fa-"] {
    font-family: 'FontAwesome' !important;
    font-weight: normal !important;
    font-style: normal !important;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.ti, [class^="ti-"], [class*=" ti-"] {
    font-family: 'themify' !important;
    font-weight: normal !important;
    font-style: normal !important;
}
body, p, h1, h2, h3, h4, h5, h6, span, a, div {
    font-family: 'Muli', sans-serif;
}
i.fa, i.ti, i[class^="fa-"], i[class*=" fa-"], i[class^="ti-"], i[class*=" ti-"] {
    font-family: 'FontAwesome', 'themify' !important;
    font-style: normal !important;
}

/* ===== CATEGORY MAP ===== */
.category-tree-container { position: relative; display: inline-block; }

.category-tree-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Muli', sans-serif;
}
.category-tree-btn::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.1);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s ease;
}
.quick-access-letter {
    font-family: 'Muli', sans-serif;
    font-size: 26px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    letter-spacing: -1px;
}
@keyframes quickAccessPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
    50% { transform: scale(1.15); box-shadow: 0 6px 25px rgba(0,0,0,0.6); }
}
@keyframes quickAccessGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 0 0 rgba(255,255,255,0.2); }
    50% { box-shadow: 0 6px 25px rgba(0,0,0,0.6), 0 0 0 10px rgba(255,255,255,0); }
}
.category-tree-btn.pulse-animation {
    animation: quickAccessPulse 1.5s ease-in-out infinite, quickAccessGlow 1.5s ease-in-out infinite;
}
.category-tree-btn::after {
    content: 'Quick Access';
    position: absolute;
    bottom: -35px; left: 50%;
    transform: translateX(-50%) scale(0);
    background: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: 'Muli', sans-serif;
}
.category-tree-btn:hover::after { transform: translateX(-50%) scale(1); opacity: 1; }

.category-tree-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.category-tree-overlay.active { opacity: 1; visibility: visible; }

.category-tree-dropdown {
    position: fixed;
    top: 0; right: -100%;
    width: 100%; height: 100vh;
    background: #fafafa;
    z-index: 99999;
    overflow-y: auto;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.category-tree-dropdown.active { right: 0; }
.category-tree-dropdown::-webkit-scrollbar { width: 8px; }
.category-tree-dropdown::-webkit-scrollbar-track { background: #f0f0f0; }
.category-tree-dropdown::-webkit-scrollbar-thumb { background: #1abc50; border-radius: 4px; }
.category-tree-dropdown::-webkit-scrollbar-thumb:hover { background: #159a40; }

.category-tree-header {
    padding: 25px 40px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; top: 0; z-index: 10;
}
.category-tree-header h3 { margin: 0; font-size: 22px; font-weight: 600; color: #333; }
.category-tree-close {
    background: none; border: none;
    font-size: 28px; color: #999; cursor: pointer;
    padding: 0; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.2s ease;
}
.category-tree-close:hover { color: #333; }

.category-tree-body { padding: 40px; flex: 1; max-width: 1400px; margin: 0 auto; width: 100%; }

.category-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tree-category-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
}
.tree-category-card:hover { border-color: #c0c0c0; }

.nav-item .nav-depart .depart-btn .depart-hover li a {
    padding-top: 10px !important;
}
.nav-item .nav-depart .depart-btn .depart-hover > li {
    padding: 4px 0;
}

.tree-category-main {
    padding: 18px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    user-select: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background 0.15s ease;
}
.tree-category-main:hover { background: #f9f9f9; }
.tree-category-main.active { background: #f9f9f9; }

.tree-category-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.tree-category-name { font-size: 15px; font-weight: 700; color: #333; }

.tree-toggle-icon {
    font-size: 14px; color: #999;
    transition: transform 0.2s ease;
    font-family: 'FontAwesome' !important;
    flex-shrink: 0;
}
.tree-toggle-icon.expanded { transform: rotate(90deg); }

.tree-subcategories { display: none; background: #ffffff; }
.tree-subcategories.active { display: block; }

.tree-subcategory { border-bottom: 1px solid #f0f0f0; }
.tree-subcategory:last-child { border-bottom: none; }
.tree-subcategory a {
    display: block; padding: 14px 20px;
    color: #666; text-decoration: none;
    transition: all 0.15s ease;
    font-size: 14px; font-weight: 500;
}
.tree-subcategory a:hover { background: #f9f9f9; color: #1abc50; padding-left: 25px; }

/* ===== SEO INFO BUTTON ===== */
.seo-info-btn {
    background: #e53935;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    min-width: 22px;
    font-size: 13px;
    font-weight: 700;
    font-style: italic;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.15s ease;
    font-family: Georgia, serif;
    line-height: 1;
    position: relative;
    z-index: 5;
}
.seo-info-btn:hover { background: #c62828; transform: scale(1.12); }

/* Row wrapper pentru nav-depart */
.cat-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 10px;
}
.cat-row a { flex: 1; }
.cat-row .seo-info-btn { margin-left: auto; flex-shrink: 0; align-self: center; position: relative; top: 5px; }

/* Row wrapper pentru homepage dropdown */
.hp-item-row {
    display: flex;
    align-items: center;
    padding-right: 10px;
}
.hp-item-row > a {
    flex: 1;
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    background: white;
    font-family: 'Muli', sans-serif;
}
.hp-item-row > a:hover { background: white; color: #333; text-decoration: none; }
.hp-item-row .seo-info-btn { margin-right: 4px; }

/* ===== SEO POPUP ===== */
.seo-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.seo-popup-overlay.active { opacity: 1; visibility: visible; }

.seo-popup-box {
    background: #fff;
    border-radius: 6px;
    max-width: 720px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    transform: translateY(-20px) scale(0.98);
    transition: transform 0.3s ease;
}
.seo-popup-overlay.active .seo-popup-box { transform: translateY(0) scale(1); }
.seo-popup-box::-webkit-scrollbar { width: 6px; }
.seo-popup-box::-webkit-scrollbar-track { background: #f8f9fa; }
.seo-popup-box::-webkit-scrollbar-thumb { background: #1abc50; border-radius: 3px; }

.seo-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky; top: 0;
    background: #fff; z-index: 1;
}
.seo-popup-header .seo-popup-title { margin: 0; font-size: 18px; font-weight: 700; color: #222; font-family: 'Muli', sans-serif; }
.seo-popup-close {
    background: none; border: none;
    font-size: 28px; color: #999; cursor: pointer;
    line-height: 1; padding: 0;
    transition: color 0.2s;
}
.seo-popup-close:hover { color: #333; }

.seo-popup-body { padding: 24px 28px 32px; color: #555; line-height: 1.8; font-size: 15px; font-family: 'Muli', sans-serif; }
.seo-popup-body h1, .seo-popup-body h2, .seo-popup-body h3 { color: #333; margin-top: 20px; margin-bottom: 10px; }
.seo-popup-body p { margin-bottom: 14px; }
.seo-popup-body a { color: #1abc50; text-decoration: none; }
.seo-popup-body a:hover { text-decoration: underline; }
.seo-popup-body ul, .seo-popup-body ol { margin: 14px 0; padding-left: 28px; }

/* Desktop Quick Access */
.desktop-quick-access { display: block; }
.mobile-quick-access-wrapper {
    display: none !important;
    position: absolute;
    left: 200px; top: 0px;
    z-index: 10;
}

@media (max-width: 1200px) {
    .category-map-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
    .category-tree-body { padding: 30px; }
}
@media (max-width: 768px) {
    .desktop-quick-access { display: none !important; }
    .mobile-quick-access-wrapper { display: block !important; }
    .nav-item { position: relative; }
    .category-map-grid { grid-template-columns: 1fr; gap: 12px; }
    .category-tree-header { padding: 20px 24px; }
    .category-tree-header h3 { font-size: 18px; }
    .category-tree-body { padding: 24px 20px; }
    .category-tree-btn { height: 52px; width: 52px; }
    .quick-access-letter { font-size: 24px; }
    .tree-category-main { padding: 16px 18px; }
    .tree-category-name { font-size: 14px; }
    .tree-subcategory a { padding: 12px 18px; font-size: 13px; }
    .tree-subcategory a:hover { padding-left: 23px; }
    .inner-header .row { display: flex; align-items: center; flex-wrap: nowrap; }
    .inner-header .col-lg-2.col-md-2 { flex: 0 0 auto; width: auto; max-width: none; padding-right: 0; }
    .inner-header .logo img { height: 35px !important; width: auto; max-width: 100% !important; }
    .inner-header .col-lg-7.col-md-7 { display: block !important; order: 3; flex: 0 0 100%; width: 100%; padding-top: 8px; padding-bottom: 8px; }
    .inner-header .row { flex-wrap: wrap !important; }
    .inner-header .col-lg-2.col-md-2.col-4 { order: 1; }
    .inner-header .col-lg-3.col-md-3.col-8 { order: 2; }
    .inner-header .col-lg-3.col-md-3 { flex: 1; max-width: none; display: flex; justify-content: flex-end; align-items: center; }
    .inner-header .nav-right { display: flex; align-items: center; gap: 15px; flex-wrap: nowrap; }
    .inner-header .nav-right .cart-price { display: none; }
    .inner-header .nav-right a .cart-price { display: none; }
    .inner-header .nav-right li.cart-icon a i { font-size: 22px; }
    .seo-popup-box { width: 95%; max-height: 88vh; }
    .seo-popup-header { padding: 16px 20px; }
    .seo-popup-body { padding: 18px 20px 24px; font-size: 14px; }
}
@media (max-width: 480px) {
    .mobile-quick-access-wrapper { left: 200px; }
    .category-tree-body { padding: 20px 16px; }
    .tree-category-name { font-size: 14px; }
    .category-tree-btn { height: 52px; width: 52px; }
    .quick-access-letter { font-size: 22px; }
}

/* Depart dropdown toggles (no jQuery needed) */
.depart-hover ul[id^="ul-drop-"] { display: none; }
.depart-hover li[id^="li-drop-"].open > ul[id^="ul-drop-"] { display: block; }
