/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

body, html {
    -webkit-text-size-adjust: 100%; /* Виправляє розмір тексту */
    -webkit-overflow-scrolling: touch; /* Плавний скрол */
}
 

#font-selector {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding: 10px;
    font-size: 16px;
}

#font-selector select {
    margin-left: 10px;
    padding: 5px;
    font-size: 14px;
}


a {
    text-decoration: none;
    color: inherit;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

#logo {
    display: flex;
    align-items: center;
}

.logo_image {
    width: 30px; /* Зменшено розмір логотипу */
    height: auto;
    object-fit: contain;
}

.logo_text-link h1 {
    margin-left: 10px;
    font-size: 24px;
    color: #00bcff;
}

nav .nav-button {
    margin-left: 20px;
    font-size: 16px;
    color: #555;
    transition: color 0.3s;
}

nav .nav-button:hover {
    color: #007BFF;
}

.main-content {
    padding: 40px 5%;
}

/* Hero Section Styles */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 60px;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.hero-text {
    flex: 1 1 40%;
    max-width: 600px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-video {
    flex: 1 1 40%;
    max-width: 600px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    
        margin-bottom: -100px;
}

/* Hero Text Styles */
.hero-text h2 {
    font-size: 4vw;
    margin-bottom: 10px;
}

.hero-text p {
    font-size: 2vw;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #00bcff;
    color: #fff;
    border-radius: 4px;
    transition: background-color 0.3s;
    width: calc(100% - 60px);
    text-align: center;
    margin-top: 20px;
}

.cta-button:hover {
    background-color: #0056b3;
}

.catalog-button {
    display: block;
    margin: 20px auto;
    padding: 12px 24px;
    background-color: #00bcff;
    color: #fff;
    width: 200px;
    border-radius: 4px;
    font-size: 18px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

.catalog-button:hover {
    background-color: #0056b3;
}

/* Products Section */
#products-section {
    text-align: center;
    padding: 80px 5%;
    position: relative;
}

#products-section h2:first-of-type {
    text-align: center;
    font-size: 34px;
    margin-bottom: 60px;
}

#products-section h2:last-of-type,
#products-section h3:last-of-type {
    text-align: center;
    font-size: 38px;
    margin-top: 60px;
}

.product-block {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 100px;
}

.left-image,
.right-image {
    width: 400px;
    height: 400px;
    flex-shrink: 0;
}

.left-image {
    margin-right: 100px;
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.8s ease;
}

.right-image {
    margin-left: 100px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.8s ease;
}

.product-text {
    text-align: center;
}

.product-text h2 {
    font-size: 28px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.8s ease;
}

.left-image .product-image {
    transform: rotate(-30deg);
}

.right-image .product-image {
    transform: rotate(30deg);
}

/* Анімація при скролінгу вниз */
.product-block.active .left-image {
    transform: translateX(0);
    opacity: 1;
}

.product-block.active .right-image {
    transform: translateX(0);
    opacity: 1;
}

.product-block.active .left-image .product-image {
    transform: rotate(0deg);
}

.product-block.active .right-image .product-image {
    transform: rotate(0deg);
}

/* Реверс анімації при скролінгу вгору */
.product-block.inactive .left-image {
    transform: translateX(-100%);
    opacity: 0;
}

.product-block.inactive .right-image {
    transform: translateX(100%);
    opacity: 0;
}

.product-block.inactive .left-image .product-image {
    transform: rotate(-30deg);
}

.product-block.inactive .right-image .product-image {
    transform: rotate(30deg);
}

/* Info Sections */
.info-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
    padding: 0 5%;
}

.info-section .section-content,
.info-section .section-image {
    flex: 1 1 500px;
    max-width: 600px;
    margin: 20px;
}

.info-section .section-content {
    opacity: 0;
    transition: opacity 0.8s ease-out;
    padding: 20px;
}

.info-section .section-image {
    
    opacity: 0;
    border-radius: 20px;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

/* Якщо зображення повинно виїжджати справа */
.info-section .section-image.right {
    transform: translateX(50px);
}

/* Активний стан при скролінгу */
.info-section.active .section-content {
    opacity: 1;
}

.info-section.active .section-image {
    opacity: 1;
    transform: translateX(0);
}

.info-section h2 {
    text-align: center;
    font-size: 2.5vw;
    margin-bottom: 30px;
    color: #007BFF;
}

.info-section p {
    text-align: center;
    font-size: 1.5vw;
    margin-bottom: 30px;
    color: rgb(39, 39, 39);
}

/* Contacts Section */
.contacts-section {
    background-color: #fff;
    padding: 40px 5%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
}

.contacts-section h2 {
    text-align: center;
    font-size: 2.5vw;
    margin-bottom: 30px;
    color: #007BFF;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-bottom: 30px;
}

.contact-location {
    flex: 1 1 300px;
    text-align: center;
    margin: 20px;
}

.contact-location img {
    width: 200px;
    height: auto;
    border-radius: 25px;
    object-fit: contain;
    margin-bottom: 15px;
}

.contact-location h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #333;
}

.contact-location p {
    font-size: 16px;
    color: #555;
    line-height: 1.5;
}
 

/* Footer sticks to the bottom */
.footer {
    background-color: #ffffff;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #ddd;
    width: calc(100% + 120px); 
    margin-left: -60px;  
    margin-bottom: -35px;
}

/* Set the body and html to occupy full height */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Main content should flex to take up available space */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}



/* Container for categories and product grid */
.content-container {
    display: flex;
    justify-content: space-between;
    margin-top: -30px;
    gap: 10px;
    padding: 10px;
}

/* Left block with category buttons */
.left_block {
    flex-basis: 20%;
    padding: 20px;
    border-right: 1px solid #ddd;
}

#categoriesContainer {
    margin-bottom: 25px;
}

#categoriesContainer h2 {
    margin-bottom: 10px;
}

#categoryButtons button {
    display: block;
    width: 100%;
    margin-bottom: 11px;
    padding: 10px;
    background-color: #00bcff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
}

#categoryButtons button:hover {
    background-color: #0056b3;
}

/* Right block with products grid */
.right_block {
    flex-basis: 75%;
    padding: 10px;
}

/* Grid layout for products */
#productGrid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 елементів у рядку */
    gap: 20px;
    margin-top: 20px;
}

.product-item {
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 4px;
}

.product-item p {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.product-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Стилі для форми зворотного зв'язку */
.block_form {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

#cartModal {
    width: 100%;
    max-width: 600px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

#modalContent form {
    display: flex;
    flex-direction: column;
}

#modalContent label {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

#modalContent input[type="text"],
#modalContent input[type="email"],
#modalContent input[type="tel"],
#modalContent textarea {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

#modalContent textarea {
    resize: vertical;
    min-height: 100px;
}

#doneButton {
    padding: 12px 20px;
    background-color: #00bcff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#doneButton:hover {
    background-color: #0056b3;
}


/* Mobile adjustments */
@media (max-width: 768px) {
    
    #cartModal {
        padding: 15px;
    }

    #modalContent label {
        font-size: 14px;
    }

    #modalContent input[type="text"],
    #modalContent input[type="email"],
    #modalContent input[type="tel"],
    #modalContent textarea {
        font-size: 14px;
    }

    #doneButton {
        font-size: 16px;
        padding: 10px 16px;
    }
    
    header {
        flex-direction: column;
        align-items: center;
        padding: 10px 20px;
    }

    nav {
        margin-top: 10px;
        display: flex;
        justify-content: space-around;
        width: 100%;
    }
    
    .hero-video {
    margin-top: -15px;
}

    .nav-button {
        margin: 0 5px;
        font-size: 14px;
    }

    .hero-content {
        flex-direction: column;
    }

 
    .hero-text h2 {
        font-size: 32px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .cta-button {
        width: 100%;
    }

    .product-block {
        flex-direction: column;
        align-items: center;
    }

    /* Прибираємо ліве зображення */
    .left-image {
        display: none;
    }

    .right-image,
    .product-text {
      
        margin: 10px 0;
    }

    /* Відображаємо праве зображення під текстом */
    .product-text {
        order: 1;
          margin-top: -100px;
    }

    .right-image {
        margin-top: -100px;
         width: 300px;
        order: 2;
        transform: translateX(0);
        opacity: 1;
        margin-left: 0;
    }

    .product-image {
        transform: rotate(0deg);
    }

    /* Вимикаємо анімацію на мобільних */
    .product-block.active .right-image,
    .product-block.active .product-image  {
        transform: none;
        opacity: 1;
    }

    .product-block.inactive .right-image,
    .product-block.inactive .product-image {
        transform: none;
        opacity: 0;
    }
    
    .product-text h2 {
        font-size: 32px;
    }

    

    .info-section .section-content  {
        flex: 1 1 1%;
        max-width: 100%; 
        height: auto;
        object-fit: cover;
        margin: 0 auto;
    }
    
    
    .info-section {
    margin-top: -15px;
    display: flex;
    flex-wrap: wrap; /* Щоб елементи автоматично переносились */
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Усуває можливі артефакти виходу за межі контейнера */
}

   
.info-section .section-image {
    max-width: 100%; /* Обмежує ширину зображення розміром контейнера */
    height: auto; /* Пропорційна висота зображення */
    display: block; /* Забезпечує коректне вирівнювання */
    object-fit: cover; /* Якщо потрібно обрізання зображення */
    margin: 0 auto; /* Центрування */
}



    /* Відображаємо спочатку зображення, потім текст в секції About us */
    .info-section .section-image {
        order: 1;
    }

    .info-section .section-content {
        order: 2;
    }

    .info-section h2 {
        font-size: 40px;
    }

    .info-section p {
        font-size: 32px;
    }

    .contacts-section h2 {
        font-size: 24px;
    }
    
      /* Контейнер відображає елементи вертикально */
    .content-container {
        flex-direction: column;
        margin-top: 0;
        padding: 10px;
    }

    /* Лівий блок займає всю ширину */
    .left_block {
        flex-basis: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 10px 0;
    }

    /* Правий блок також займає всю ширину */
    .right_block {
        flex-basis: 100%;
        padding: 10px 0;
    }

    /* Налаштування сітки продуктів */
    #productGrid {
        grid-template-columns: repeat(2, 1fr); /* 2 елементи в рядку */
        gap: 15px;
    }

    /* Зменшення розмірів шрифтів та відступів */
    #categoryButtons button {
        font-size: 14px;
        padding: 10px;
    }

    .product-item p {
        font-size: 14px;
    }
    
}

/* 21:9 Monitors */
@media (min-aspect-ratio: 21/9) {
    .hero-content,
    .product-block {
        max-width: 1800px;
        margin: 0 auto;
    }

    .left-image,
    .right-image {
        flex: 1 1 20%;
    }

    .product-text {
        flex: 1 1 60%;
    }
}

/* 4K Monitors */
@media (min-width: 2560px) {
    .hero-text h2 {
        font-size: 64px;
    }

    .hero-text p {
        font-size: 32px;
    }

    .product-text h2 {
        font-size: 72px;
    }

    .cta-button,
    .catalog-button {
        font-size: 24px;
        padding: 20px 40px;
    }

    .info-section h2 {
        font-size: 48px;
    }

    .info-section p {
        font-size: 24px;
    }

    .contacts-section h2 {
        font-size: 48px;
    }
}

/* Further mobile refinement for smaller screens */
@media (max-width: 480px) {
    .nav-button {
        font-size: 12px;
    }

    .hero-text h2 {
        font-size: 28px;
    }

    .hero-text p {
        font-size: 14px;
    }

    .product-text h2 {
        font-size: 28px;
    }

    .cta-button,
    .catalog-button {
        font-size: 16px;
        padding: 10px 20px;
    }

    .info-section h2 {
        font-size: 20px;
    }

    .info-section p {
        font-size: 12px;
    }

    .contacts-section h2 {
        font-size: 20px;
    }

    .contact-location h3 {
        font-size: 18px;
    }

    .contact-location p {
        font-size: 14px;
    }
    
    
}

