/* Базові стилі */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4a6cf7;
    --primary-dark: #3a56d5;
    --secondary: #ff6b6b;
    --dark: #333333;
    --light: #f8f9fa;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    color: var(--dark);
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: var(--primary);
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--gray);
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 108, 247, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
}

.btn-whatsapp {
    background-color: #25D366;
}

.btn-whatsapp:hover {
    background-color: #1da851;
}

.btn-instagram {
    background: linear-gradient(45deg, #405DE6, #E1306C, #FD1D1D);
    color: white;
}

.btn-instagram:hover {
    opacity: 0.9;
}

/* Шапка */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #4a4e8e;
    text-decoration: none;
}

.logo span {
    color: #506ad3;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* Герой секція */
.hero {
    padding-top: 150px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    padding-right: 30px;
}

.hero-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Секція товарів */
.products {
    background-color: var(--light);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 300px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.product-info p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: var(--gray);
    flex-grow: 1;
}

.product-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
    flex-shrink: 0;
}

.product-info .order-btn {
    margin-top: auto; /* Штовхає кнопку в самий низ */
    width: 100%;
    text-align: center;
}

.product-card .btn-secondary {
    margin-top: auto !important;
}

.more-section {
    text-align: center;
    margin-top: 40px;
}

/* Секція про нас */
.about {
    background-color: white;
}

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

.about-content {
    flex: 1;
    min-width: 300px;
    padding-right: 30px;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.feature {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: 10px;
    text-align: center;
}

.feature i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Секція замовлення */
.order {
    background-color: var(--light);
    text-align: center;
}

.order-steps {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 50px;
    gap: 30px;
}

.step {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    padding: 30px 20px 16px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.step-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.order-btn {
    margin-top: 50px;
}

.order-btn .btn-instagram {
    margin-right: 15px;
}

/* Секція контактів */
.contact {
    background-color: white;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    margin-bottom: 20px;
}

.contact-details {
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: var(--light-gray);
    color: var(--primary);
    border-radius: 50%;
    margin-right: 15px;
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background-color: var(--light-gray);
    color: var(--dark);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-5px);
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: var(--light-gray);
    padding: 40px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Підвал */
footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
}

.footer-col h3:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* Стилі для індикатора зображень */
.image-indicator {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--primary);
}

.product-img {
    position: relative;
    cursor: pointer;
}

/* Модальне вікно галереї */
.product-gallery-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    border-radius: 10px;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.close-modal:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.main-gallery-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 8px;
}

#modalMainImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.gallery-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s, transform 0.3s;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--primary);
}

/* Адаптивність */
@media (max-width: 992px) {
    h1 {
        font-size: 2.4rem;
    }

    h2 {
        font-size: 2rem;
    }

    .product-img {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 0 0 15px 0;
    }

    .hero {
        padding-top: 120px;
    }

    .hero-content, .about-content {
        padding-right: 0;
        margin-bottom: 40px;
    }

    section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }

    .contact-form {
        padding: 30px 20px;
    }

    .order-btn .btn {
        margin: 3px auto 3px auto;
    }
}

/* Адаптивність модального вікна */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .main-gallery-image-container {
        height: 300px;
    }

    .gallery-nav {
        padding: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .main-gallery-image-container {
        height: 250px;
    }

    .thumbnail {
        width: 50px;
        height: 50px;
    }
}