* {
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font: 16px Arial, sans-serif;
}

img {
    border: 0;
}

h1, h2, p {
    margin: 0 0 20px;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 22px;
}

ol {
    padding: 0 18px;
    font-size: 12px;
}

ol li {
    margin: 0 0 15px;
    padding-right: 20px;
}

header {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: fixed;
    top: 0;
    z-index: 2;
}

header img {
    width: auto;
    height: 30vw;
    max-height: 200px;
    margin: 0 20px;
    transition: width .5s; /* Добавя плавен ефект при промяна на широчината  */
}

header.scrolled img {
    width: 100px;
    height: auto;
}

nav ul {
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    list-style-type: none;
    margin: 10px 0; /* Добавен маргин за разделение */
}

nav ul li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

nav ul li.cart img {
    width: 30px;
    height: 30px;
    margin: -5px 0 -10px 10px;
    vertical-align: middle;
}

nav ul li a.selected,
nav ul li a:hover {
    background-color: #111;
}

main {
    max-width: 980px;
    min-height: calc(100% - 468px);
    margin: 0 auto 100px;
    padding: 250px 20px 0;
}

@media only screen and (max-width: 814px) {
    main {
      padding-top: 300px;
    }
}

@media only screen and (max-width: 574px) {
    main {
      padding-top: 350px;
    }
}

footer {
    display: block;
    background: #666;
    color: #fff;
    padding: 50px 0;
    text-align: center;
}

/* Стилове за контактната информация */
main.contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px; /* Отстояние между елементите */
}

.contact-info {
    flex: 1 1 40%; /* Гъвкав размер на контактната информация */
    margin: 0 0 20px;
     /* margin-bottom: 20px;Добавен маргин за разделение */
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    min-height: 330px;
}

.contact-info p {
    margin: 5px 0;
}

.contact-info a {
    color: navy;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* .contact-info p:first-child {
    font-size: 18px;
    font-weight: bold;
} */

.contact-info p:nth-child(2) {
    font-style: italic;
}

/* Стилове за Google Maps контейнера */
.map-container {
    flex: 1 1 40%; /* Гъвкав размер на контейнера за Google Maps */
    max-width: 100%; /* Максимална ширина */
    height: 370px; /* Променете височината според вашите нужди */
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

@media only screen and (max-width: 574px) {

    .map-container,
    .contact-info {
        flex: 1 1 100%;
    }

}

/* Задаване на стил за вградения iframe на Google Maps */
.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Стилове за контактната форма */
.contact-form {
    flex: 1 1 100%; /* Гъвкав размер на контактната форма */
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="number"],
.contact-form textarea {
    width: calc(100% - 22px);
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.contact-form input[type="submit"] {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 15px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.contact-form input[type="submit"]:hover {
    background-color: #111;
}

/* Стилове за слайдшоуто */
.slideshow {
    max-width: 500px;
    margin: 0 auto 50px;
}

.slideshow-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    height: 100%;
    margin: 0 0 20px;
}

.mySlides {
    display: none;
    opacity: 1;
    max-width: 100%; /* Добавено за да ограничим максималната ширина на снимката */
    height: 40vw; /* Променена максимална височина на снимката */
    max-height: 400px;
}

.mySlides img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Добавено за запълване на целия контейнер */
    -webkit-animation: fadeInFromNone 0.5s ease-out;
    -moz-animation: fadeInFromNone 0.5s ease-out;
    -o-animation: fadeInFromNone 0.5s ease-out;
    animation: fadeInFromNone 0.5s ease-out;
}

@-webkit-keyframes fadeInFromNone {
    0% {
        display: none;
        opacity: 0;
    }

    1% {
        display: block;
        opacity: 0;
    }

    100% {
        display: block;
        opacity: 1;
    }
}

@-moz-keyframes fadeInFromNone {
    0% {
        display: none;
        opacity: 0;
    }

    1% {
        display: block;
        opacity: 0;
    }

    100% {
        display: block;
        opacity: 1;
    }
}

@-o-keyframes fadeInFromNone {
    0% {
        display: none;
        opacity: 0;
    }

    1% {
        display: block;
        opacity: 0;
    }

    100% {
        display: block;
        opacity: 1;
    }
}

@keyframes fadeInFromNone {
    0% {
        display: none;
        opacity: 0;
    }

    1% {
        display: block;
        opacity: 0;
    }

    100% {
        display: block;
        opacity: 1;
    }
}

/* Стилове за контролните бутони */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: .6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Стилове за точки за навигация */
.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dots {
    text-align: center;
}

.active {
    background-color: #717171;
}

/* Стилове за иконките */
.icons {
    display: flex;
    text-align: center;
    gap: 1%;
    max-width: 800px;
    margin: auto;
}

.icon {
    flex: 1 1 33%;
    display: inline-block;
    padding: 0 20px;
    text-align: center;
}

.icon img {
    width: 80px; /* Променете големината на иконките според вашите нужди */
    height: auto;
    margin-bottom: 10px;
}

.icon p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

@media only screen and (max-width: 574px) {

    .icons {
        display: block;
    }

    .icon {
        flex: none;
        display: block;
        padding: 20px;
    }

}

/* Продукти и количка */

.cartWrapper,
.products {
    width: 90%;
    max-width: 1080px;
}

.wrapper {
    margin: 0 0 30px;
}

.cartWrapper .contact-form {
    display: none;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media only screen and (max-width: 980px) {

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

}

@media only screen and (max-width: 574px) {

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

}

.product {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.product img {
    max-width: 100%;
    height: auto;
}

.product button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.product button:hover {
    background-color: #45a049;
}

.product button:active {
    padding: 11px 20px 9px;
}

/* Стилове за по-атрактивни букви на продуктите */
.product p {
    font-size: 16px;
    color: #333;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
    text-transform: uppercase;
}