/* Category Menu - CSS */

/* Alapértelmezett betűtípus */
* {
    font-family: 'Poppins', sans-serif;
}

/* ===== FŐ MENÜ WRAPPER ===== */
.category-menu-wrapper {
    position: relative;
    margin: 20px 0;
    z-index: 1000;
}

/* ===== DESKTOP MENÜ ===== */
.category-menu-desktop {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.category-menu-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.category-menu-item:hover {
    background: #3498db;
    border-color: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Menü elem szöveg */
.menu-item-text {
    font-weight: 600;
}

/* Statikus desktop elem */
.static-desktop-item {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
    order: -1; /* Első helyre teszi */
}

.static-desktop-item:hover {
    background: #e9ecef !important;
    border-color: #ced4da !important;
    color: #495057 !important;
}

/* ===== HAMBURGER GOMB ===== */
.category-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #3498db;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.category-menu-toggle:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.category-menu-toggle.active {
    background: #e74c3c;
}

.category-menu-toggle.active:hover {
    background: #c0392b;
}

/* Hamburger vonalak */
.hamburger-line {
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-line:not(:last-child) {
    margin-bottom: 4px;
}

/* Hamburger animáció aktív állapotban */
.category-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.category-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.category-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ===== OFF-CANVAS MENÜ ===== */
.category-menu-offcanvas {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 10002;
    overflow-y: auto;
}

.category-menu-offcanvas.active {
    right: 0;
}

span.offcanvas-item-count {
    font-size: 14px;
}

/* Off-canvas fejléc */
.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.offcanvas-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
            visibility: hidden;
}

.offcanvas-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #6c757d;
    transition: color 0.3s ease;
    border-radius: 4px;
}

.offcanvas-close:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

/* Off-canvas tartalom */
.offcanvas-body {
    padding: 15px 0;
}

.offcanvas-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
}

.offcanvas-menu-item:hover {
    background: #f8f9fa;
    color: #3498db;
    padding-left: 30px;
}

.offcanvas-menu-item:last-child {
    border-bottom: none;
}

/* Off-canvas elem kép */
.offcanvas-item-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

/* Off-canvas elem tartalom */
.offcanvas-item-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.offcanvas-item-name {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
}

/* ===== VISSZA A FŐOLDALRA GOMB ===== */
.offcanvas-home-button {
    margin-top: 20px;
    padding: 0 25px 20px;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.home-button-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.home-button-link:hover {
    background: #2980b9;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.home-button-link svg {
    flex-shrink: 0;
}

/* ===== STATIKUS LINK ===== */
.offcanvas-static-link {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.static-menu-item {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 0 25px 10px;
}

.static-menu-item:hover {
    background: #e9ecef !important;
    border-color: #dee2e6;
    padding-left: 25px !important;
}

.static-menu-item .offcanvas-item-image {
    background: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.static-menu-item .offcanvas-item-image svg {
    color: white;
    width: 24px;
    height: 24px;
}

/* ===== OVERLAY ===== */
.category-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10001;
}

.category-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== RESZPONZÍV DESIGN ===== */

/* Tablet nézet */
@media (max-width: 1024px) {
    .category-menu-desktop {
        gap: 12px;
    }
    
    .category-menu-item {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .menu-item-image {
        width: 22px;
        height: 22px;
    }
}

/* Mobil nézet - hamburger menü aktiválása */
@media (max-width: 768px) {
    .category-menu-desktop {
        display: none;
    }
    
    .category-menu-toggle {
        display: flex;
    }
    
    .category-menu-offcanvas {
        width: 320px;
        right: -320px;
    }
}

/* Kis mobil nézet */
@media (max-width: 480px) {
    .category-menu-offcanvas {
        width: 100%;
        right: -100%;
    }
    
    .offcanvas-header {
        padding: 15px 20px;
    }
    
    .offcanvas-title {
        font-size: 16px;
    }
    
    .offcanvas-menu-item {
        padding: 12px 20px;
        gap: 12px;
    }
    
    .offcanvas-menu-item:hover {
        padding-left: 25px;
    }
    
    .offcanvas-item-image {
        width: 35px;
        height: 35px;
    }
    
    .offcanvas-item-name {
        font-size: 14px;
    }
    
    .offcanvas-home-button {
        padding: 0 20px 15px;
        margin-top: 15px;
        padding-top: 15px;
    }
    
    .static-menu-item {
        margin: 0 20px 8px;
    }
    
    .home-button-link {
        padding: 12px 16px;
        font-size: 14px;
        gap: 10px;
    }
}

/* ===== SPECIÁLIS STÍLUSOK ===== */

/* Sötét mód támogatás */
@media (prefers-color-scheme: dark) {
    .category-menu-item {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .category-menu-item:hover {
        background: #5dade2;
        border-color: #5dade2;
    }
    
    .category-menu-offcanvas {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .offcanvas-header {
        background: #34495e;
        border-color: #566573;
    }
    
    .offcanvas-title {
        color: #ecf0f1;
    }
    
    .offcanvas-menu-item {
        color: #ecf0f1;
        border-color: #34495e;
    }
    
    .offcanvas-menu-item:hover {
        background: #34495e;
        color: #5dade2;
    }
    
    .offcanvas-menu-item:hover {
        background: #34495e;
        color: #5dade2;
    }
    
    .static-desktop-item {
        background: #2c3e50 !important;
        border-color: #34495e !important;
        color: #bdc3c7 !important;
    }
    
    .static-menu-item {
        background: #34495e !important;
        border-color: #566573;
    }
    
    .static-menu-item:hover {
        background: #566573 !important;
        border-color: #7f8c8d;
    }
    
    .static-menu-item .offcanvas-item-image {
        background: #7f8c8d;
    }
    
    .home-button-link {
        background: #5dade2;
    }
    
    .home-button-link:hover {
        background: #3498db;
    }
}

/* Mozgás csökkentése preferencia */
@media (prefers-reduced-motion: reduce) {
    .category-menu-item,
    .category-menu-toggle,
    .category-menu-offcanvas,
    .category-menu-overlay,
    .hamburger-line,
    .offcanvas-menu-item {
        transition: none;
    }
    
    .category-menu-item:hover {
        transform: none;
    }
    
    .category-menu-toggle:hover {
        transform: none;
    }
}

/* Magas kontraszt mód */
@media (prefers-contrast: high) {
    .category-menu-item {
        border: 2px solid #000;
        background: #fff;
    }
    
    .category-menu-item:hover {
        background: #000;
        color: #fff;
    }
    
    .category-menu-toggle {
        background: #000;
        border: 2px solid #000;
    }
    
    .offcanvas-menu-item {
        border-color: #ccc;
    }
}

/* Focus állapotok akadálymentességhez */
.category-menu-item:focus,
.category-menu-toggle:focus,
.offcanvas-close:focus,
.offcanvas-menu-item:focus,
.home-button-link:focus,
.static-menu-item:focus,
.static-desktop-item:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Animációk */
@keyframes slideInRight {
    from {
        right: -350px;
    }
    to {
        right: 0;
    }
}

@keyframes slideOutRight {
    from {
        right: 0;
    }
    to {
        right: -350px;
    }
}