.top-bar {
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background-color: #f8f9fa;
    top: 0;
    left: 0;
    z-index: 9;
    box-sizing: border-box;
}

.menu {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.button.blinking {
    animation: blink 0.5s linear infinite;
}

.link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.button-link {
    padding: 5px 16px 3px 16px;
    background: #0fbbf8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 0 6px -2px rgba(0,0,0,0.5);
    white-space: nowrap;
    display: inline-block;
}

.button-link:hover {
    background: #00a9F3;
}

.button-link-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.button-link-container > .button-link {
    width: 100%;
    max-width: 100%;
}


.right-container {
    display: flex;
    align-items: center;
}

#overlay, #overlay-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-wrap: wrap;
    gap: 2vw;
    visibility: hidden;
    z-index: 1000;
    -webkit-overflow-scrolling: touch;
}

#overlay-background-1, #overlay-background-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.6);
    visibility: hidden;
    z-index: 998;
}

#image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1vw;
    justify-content: center;
    align-items: center;
    margin-top: 2vh;
    padding-bottom: 2vh;
}

.image-wrapper {
    width: 18vw;
    height: 18vw;
    position: relative;
    border-radius: 10px;
    border: 1px solid #cccccc;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.item-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    cursor: pointer;
}

.item-price {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/*блок добавить в корзину*/
.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#addToCartBtn {
    display: block;
    width: auto;
    margin-top: 10px;
}

/* Стили для полосы прокрутки */
#overlay::-webkit-scrollbar, #overlay-2::-webkit-scrollbar {
    width: 12px;
}

#overlay::-webkit-scrollbar-track, #overlay-2::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#overlay::-webkit-scrollbar-thumb, #overlay-2::-webkit-scrollbar-thumb {
    background: #888;
}

#overlay::-webkit-scrollbar-thumb:hover, #overlay-2::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/*контакты*/
#contacts {
    display: flex;
    align-items: center;
}
#contacts a {
    display: flex;
    align-items: center;
    justify-content: center;
}
#contacts img {
    width: 30px;
    margin-right: 30px;
}

/* иконка корзина */
.right-block {
    display: flex;
    align-items: center;
    padding: 2px;
    padding-left: 10px;
    margin: 5px 20px 5px 0;
    text-align: center;
    border: 1px solid #f95962;
    border-radius: 3px;
    background-color: white;
}

.cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

#cart {
    padding: 5px 12px;
    background-color: #FF5100;
    border-radius: 3px;
    cursor: pointer;
}

#cart .heading {
    margin-left: 10px;
}

#cart .heading a.current-link {
    text-decoration: none;
}

#cart .heading a.current-link span#cart-total {
    color: #FFFFFF;
}

.fa-shopping-cart {
    font-size: 20px;
    color: #FF5100;
    margin-right: 10px;
}

.clearfix {
    clear: both;
}

.cart-button {
    text-decoration: none;
}

@media (max-width: 1024px) {
    #image-container {
        padding-bottom: 15vh;
    }

    .image-wrapper {
        width: 30vw;
        height: 30vw;
    }

    .item-price {
        top: 5px;
        font-size: 10px;
    }

    .top-bar {
        padding: 0 5px;
    }

    .top-bar .button {
        margin: 2px;
        padding: 6px 10px;
    }

    .link {
        display: none;
    }

    .right-block {
        margin: 2px 10px 2px 0;
    }

    #contacts img {
        width: 25px;
        margin-right: 15px;
    }

    #buttonContainer {
        padding: 2px 0 !important;
    }

    .box-1 .button {
        margin: 2px;
        padding: 6px 0;
    }

    .input-group {
        padding: 5px 0;
    }

    #addToCartBtn {
        margin: 0;
    }
}
