.modern-megamenu {
    opacity: 0;
    -webkit-transform: translateX(-50%) translateY(-8px) scale(0.98);
    transform: translateX(-50%) translateY(-8px) scale(0.98);
    -webkit-transition: opacity 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.3s;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.3s;
    pointer-events: none;
    visibility: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.modern-megamenu.show {
    opacity: 1;
    -webkit-transform: translateX(-50%) translateY(0) scale(1);
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
    -webkit-transition: opacity 0.25s ease, -webkit-transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
}

@media (max-width: 991.98px) {

    .modern-megamenu,
    .modern-megamenu.show {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

.megamenu-content {
    background: #ffffff;
    border-radius: 20px;
    box-shadow:
        0 25px 80px rgba(0, 41, 82, 0.18),
        0 10px 30px rgba(0, 63, 125, 0.10),
        0 0 0 1px rgba(0, 63, 125, 0.05);
    overflow: hidden;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.megamenu-header {
    background: linear-gradient(135deg, #003f7d 0%, #0058b0 50%, #0068cc 100%);
    color: white;
    padding: 14px 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.megamenu-header::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -15%;
    width: 350px;
    height: 250%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.megamenu-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.megamenu-header h3 i {
    font-size: 0.95rem;
    opacity: 0.85;
}

.megamenu-view-all {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.25s ease;
    position: relative;
    z-index: 1;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.megamenu-view-all:hover {
    background: rgba(255, 255, 255, 0.28);
    color: white;
    transform: translateX(3px);
    text-decoration: none;
}

.categories-grid-wide {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 20px 20px 14px;
}

.megamenu-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 20px 16px;
    border-top: 1px solid #eef2f8;
    margin-top: 0;
}

.top-bar-nav .nav-list li a.megamenu-advanced-search,
.megamenu-footer .megamenu-advanced-search {
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    padding: 11px 22px !important;
    background: linear-gradient(135deg, #003f7d 0%, #0058b0 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.92rem !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 12px rgba(0, 63, 125, 0.28) !important;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1.2 !important;
    border: none !important;
}

.top-bar-nav .nav-list li a.megamenu-advanced-search i,
.megamenu-footer .megamenu-advanced-search i {
    font-size: 0.9rem;
    opacity: 1;
    color: #ffffff;
}

.top-bar-nav .nav-list li a.megamenu-advanced-search:hover,
.megamenu-footer .megamenu-advanced-search:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 24px rgba(0, 63, 125, 0.38) !important;
    background: linear-gradient(135deg, #002d5a 0%, #003f7d 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.modern-category-item {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #edf1f7;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.modern-category-item:hover {
    border-color: #cdd8e6;
    box-shadow: 0 4px 16px rgba(0, 40, 80, 0.08);
    transform: translateY(-2px);
}

.modern-category-item::after {
    display: none;
}

.category-header-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 10px 14px;
    gap: 0;
    text-align: center;
}

.category-image-wrapper {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    flex-shrink: 0;
    overflow: visible;
    position: relative;
    padding: 0;
    margin-bottom: 10px;
}

.category-image-wrapper img {
    max-width: 56px;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    mix-blend-mode: darken;
    border-radius: 10px;
}

.category-image-wrapper i {
    font-size: 1.6rem;
    color: #7a9abb;
    transition: all 0.25s ease;
}

.modern-category-item:hover .category-image-wrapper img {
    transform: scale(1.1);
}

.modern-category-item:hover .category-image-wrapper i {
    color: #003f7d;
    transform: scale(1.1);
}

.category-content {
    flex: 1;
    min-width: 0;
}

.megamenu .category-title {
    display: block;
    color: #2d3748 !important;
    font-weight: 600;
    font-size: 0.78rem;
    text-decoration: none !important;
    transition: color 0.2s ease;
    line-height: 1.35;
    word-break: break-word;
    letter-spacing: -0.01em;
}

.modern-category-item:hover .category-title {
    color: #003f7d !important;
}

.category-arrow {
    display: none;
}

@media (max-width: 1200px) {
    .categories-grid-wide {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 18px 20px 22px;
    }
}

@media (max-width: 991px) {
    .categories-grid-wide {
        grid-template-columns: repeat(3, 1fr);
    }

    .modern-megamenu,
    .megamenu {
        display: none !important;
    }
}

/* === Nav Dropdown (Ke stažení) === */
.nav-dropdown-parent {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 290px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 41, 82, 0.18),
        0 8px 24px rgba(0, 63, 125, 0.10),
        0 0 0 1px rgba(0, 63, 125, 0.06);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.25s;
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.nav-dropdown.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
}

/* Arrow */
.nav-dropdown-arrow {
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #003f7d 0%, #0058b0 100%);
    border-radius: 2px;
    transform: translateX(-50%) rotate(45deg);
    z-index: 1;
}

/* Header */
.nav-dropdown-header {
    background: linear-gradient(135deg, #003f7d 0%, #0058b0 100%);
    color: white;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    position: relative;
}

.nav-dropdown-header::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 120px;
    height: 160%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.nav-dropdown-header i {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* Body */
.nav-dropdown-body {
    padding: 8px;
}

/* Items */
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    color: #334155;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.22s ease;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    background: #f8fafc;
    color: #003f7d;
    text-decoration: none;
    transform: translateX(4px);
}

/* Icon */
.nav-dd-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.nav-dd-icon.icon-blue {
    background: #dbeafe;
    color: #2563eb;
}

.nav-dd-icon.icon-green {
    background: #d1fae5;
    color: #059669;
}

.nav-dd-icon.icon-red {
    background: #fee2e2;
    color: #dc2626;
}

.nav-dropdown-item:hover .nav-dd-icon.icon-blue {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-dropdown-item:hover .nav-dd-icon.icon-green {
    background: #059669;
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.nav-dropdown-item:hover .nav-dd-icon.icon-red {
    background: #dc2626;
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Text */
.nav-dd-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nav-dd-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.3;
    transition: color 0.2s;
}

.nav-dropdown-item:hover .nav-dd-title {
    color: #003f7d;
}

.nav-dd-desc {
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 400;
    line-height: 1.3;
    white-space: normal;
}

@media (max-width: 991.98px) {
    .nav-dropdown,
    .nav-dropdown.show {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}