.dropdown > .dropdown-menu {
    display: none;
}

.dropdown.open > .dropdown-menu {
    display: block;
}

.dropdown-menu {
    position: absolute;
    bottom: 0;
    top: 30px;
    background: black;
    border-radius: 4px;
    height: fit-content;
    width: 180px;
}

.header {
    background: linear-gradient(180deg, black, transparent);
    display: flex;
    width: 100vw;
    justify-content: space-between;
    position: fixed;
    top:0;
    z-index: 4;
}

.header .logo img {
    min-width: 150px;
    max-width: 350px;
    margin: 16px;
    height: 108px;
}

.header-backdrop {
    position: fixed;
    top:0;
    z-index: 2;
    width: 100%;
    height: 137px;
    background-color: rgba(0,0,0,0.9);
}
.header-backdrop-offset {
    height: 137px;
    width: 100%;
}
.main-nav>ul {
    padding-right: 30px;
    list-style: none;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding-left: 0;
}

.main-nav>ul>li {
    position: relative;
    height: 48px;
    min-width: 48px;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    //transition: background-color 0.13s;
    transition: background-color 0.13s, transform 0.13s;
    font-size: 1.4rem;
}
.main-nav>ul>li>a, .main-nav>ul>li>i {
    width: 100%;
    height: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    align-content: center;
    line-height: 1;
}
.main-nav>ul>li.active>a.hover-link {
    color: var(--color-hover);
}
.main-nav>ul>li:hover, .main-nav>ul>li.active {
    color: var(--color-hover);
    background-color: rgba(255,255,255,0.5);
    transform: scale(1.1);
}
.main-nav>ul>li .header-item-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: pink;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    line-height: 1;
    font-size: 12px;
    align-content: center;
    text-align: center;
    color: black;
}

.main-nav {
    align-content: center;
}

@media (max-width: 800px) {
    .header .logo img {
        height: 45px;
    }
    .header-backdrop {
        height: 80px;
    }
    .header-backdrop-offset {
        height: 80px;
    }
    .main-nav>ul {
        gap: 8px;
        padding-right: 8px;
    }
    .main-nav>ul>li {
        height: 36px;
        min-width: 36px;
    }
    .main-nav>ul>li a, .main-nav>ul>li i  {
        font-size: 14px;
    }
}

@media(max-width: 420px) {
    .header .logo img {
        margin-left: 0;
        margin-right: 0;
    }
}
@media(max-width: 380px) {

    .header .logo img {
        min-width: 50px;
        height: 35px;
    }
    .header-backdrop {
        height: 70px;
    }
    .header-backdrop-offset {
        height: 70px;
    }
}

/* Modern dropdown menu styles for dark theme */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 45px;
    right: 0;
    min-width: 180px;
    background: var(--background-color-2, #181818);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 0;
}
.dropdown-user-menu {
    min-width: 220px;
}
.dropdown-admin-menu {
    min-width: 255px;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%;
    padding: 0;
    margin: 0;
    height: auto;
    min-height: 40px;
    list-style: none;
    position: relative;
}

.dropdown-menu li .material-symbols-outlined {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
}

.dropdown-menu li a {
    display: inline-block;
    text-align: right;
    padding: 12px 16px;
    color: #e0e0e0;
    transition: background-color 0.2s;
    font-size: 14px;
    text-decoration: none;
    height: 100%;
    width: 100%;
}

.dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-hover, white);
}

.dropdown-menu .material-symbols-outlined {
    margin-right: 8px;
    font-size: 18px;
}

.dropdown-divider {
    height: 1px !important;
    min-height: 1px !important;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* Modern Footer Styles */
.modern-footer {
    background-color: white;
    color: black;
    padding: 50px 30px 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 3fr 3fr 3fr 5fr 5fr;
    gap: 16px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-hover);
}

.footer-links {
    display: flex;
    flex-direction: column;
}

.footer-links a {
    color: #333;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: gray;
}

.footer-feed {
    overflow: hidden;
}

.facebook-feed {
    border: none;
    overflow: hidden;
    width: 100%;
    max-width: 340px;
    min-height: 475px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    background-color: #f5f5f5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-left: 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-copyright {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-social-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-icon img {
    height: 24px;
    transition: transform 0.2s;
    filter: contrast(0.5);
}

.footer-icon:hover img {
    transform: scale(1.2);
}

.footer-credit {
    color: #666;
    font-size: 14px;
}

.footer-credit p {
    cursor: pointer;
    transition: color 0.2s;
    margin: 0;
}

.footer-credit p:hover {
    color: #830000;
}

/* Responsive adjustments */
@media (max-width: 760px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .footer-feed {
        grid-column: span 2;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 800px) {
    .footer-content {
        grid-template-columns: 50% 50%;
    }
    .footer-feed, .footer-contact {
        grid-column: span 2;
    }
}
@media (min-width: 801px) and (max-width: 1360px) {
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    }

    .footer-column {
        grid-column: span 2;
    }

    .footer-feed {
        grid-column: span 3;
    }

    .footer-copyright {
        flex-direction: column;
        align-items: flex-start;
    }
}

.wait-on-load {
    opacity: 0 !important;
    transition: opacity 0.3s !important;
}

.wait-on-load.loaded {
    opacity: 1 !important;
}

.blur-backdrop {
    display: none;
    transition: filter 0.3s;
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.5);
}
.blur-backdrop.active {
    display: flex;
    justify-content: center;
    align-items: center;
}
body:has(.blur-backdrop.active) > :not(.blur-backdrop) {
    filter: blur(5px);
    -webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    -o-filter: blur(5px);
    -ms-filter: blur(5px);
}
.blur-focus {
    display: none;
}
.blur-focus.active {
    display: block;
    position: relative;
    z-index: 11;
}

@media (max-width: 800px) {
    .blur-backdrop {
        padding-bottom: 25vh;
    }
}

/* Modern search block styles */
.search-block {
    width: 100%;
    max-width: 800px;
    background-color: var(--background-color-2, #181818);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(-20px);
    opacity: 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-block.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.search-container {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color, #e0e0e0);
    font-size: 18px;
    outline: none;
    padding: 8px 0;
}

.search-button {
    background: transparent;
    border: none;
    color: var(--text-color, #e0e0e0);
    cursor: pointer;
    margin-left: 10px;
    padding: 8px;
    transition: color 0.2s;
}

.search-button:hover {
    color: var(--color-hover, white);
}

.search-results {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.search-results-container {
    padding: 10px 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: var(--text-color, #e0e0e0);
}
.search-result-item.selected {
    background-color: #333;
}

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-result-image {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background-color: white;
    margin-right: 16px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.search-result-details {
    flex: 1;
}

.search-result-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.search-result-price {
    font-size: 14px;
    opacity: 0.8;
}

.search-result-discounted {
    display: flex;
    align-items: center;
}

.search-result-original {
    text-decoration: line-through;
    margin-left: 8px;
    opacity: 0.6;
    font-size: 12px;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-color, #e0e0e0);
    opacity: 0.7;
}

.messages-container {
    position: fixed;
    top: calc(137px + 15px);
    right: 15px;
    max-width: 350px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media(max-width: 800px) {
    .messages-container {
        top: calc(80px + 15px);
    }
}

.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert {
    position: relative;
    padding: 12px 40px 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    margin: 0;
    background-color: var(--color-hover);
    color: black;
}

.alert-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: white;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.alert-close:hover {
    background-color: black;
    color: white;
}

.alert-close .material-symbols-outlined {
    font-size: 18px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.alert.fade-out {
    animation: fadeOutRight 0.3s ease-in forwards;
}


/*Navigation:*/
.nav-container {
    width: 100%;
    padding: 0 16px;
    height: 50px;
    background-color: #333;
    align-content: center;
    text-transform: uppercase;
}
.nav-mobile {
    display: none;
}
.subcategories-dropdown-opener {
    color: var(--color-hover);
    background-color: #333;
    border: 1px solid var(--color-hover);
    height: 36px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
}
.nav-mobile-title {
    width: calc(100% - 56px - 56px - 32px);
    text-align: center;
    margin-top: 0;
    color: var(--color-hover);
}
.nav-desktop {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-content: center;
    text-align: center;
}
.categories-block {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
.categories-block.active {
    position: fixed;
    opacity: 1;
}
.categories-block-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background-color: rgba(255,255,255,0.65);
    border-radius: 12px;
    padding: 20px 0;
}
.categories-block-content a {
    color: #333;
    font-weight: 600;
    font-size: 18px;
    max-width: 75vw;
    text-decoration: none;
    text-transform: uppercase;
    padding: 0 40px;
}
.categories-block-content a:hover {
    background-color: var(--color-hover);
}
.mobile-title {
    display: none;
}
.desktop-title {
    display: inline;
    color: var(--color-hover);
}
.nav-desktop a.nav-desktop-link {
    text-decoration: none;
    font-weight: 700;
}


@media (max-width: 1150px) {
    .nav-mobile {
        display: flex;
        gap: 16px;
        align-items: center;
    }
    .nav-desktop {
        display: none;
    }
    .mobile-title {
        display: inline;
    }
    .desktop-title {
        display: none;
    }
}