/* --- БАЗОВІ НАЛАШТУВАННЯ ТА ШРИФТИ --- */
html {
    scroll-behavior: smooth;
    /* Відступ при переході по якорях (#about, #youtube тощо), щоб шапка не перекривала заголовок */
    scroll-padding-top: 165px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #fff8e1;
    color: #333333;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .card h3.sort {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.02em;
}

/* Фіксована шапка з банером */
.site-header, header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 14px 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.logo-block .logo {
    height: 70px;
    margin-bottom: 10px;
}

/* --- НАВІГАЦІЯ ТА КНОПКИ В ШАПЦІ --- */
.main-nav ul, nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a, 
nav a,
.btn-order, 
.btn-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: rgba(25, 20, 18, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s ease;
}

.main-nav a:hover, 
nav a:hover,
.btn-order:hover, 
.btn-cart:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), 0 0 12px rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.main-nav a:active, 
nav a:active,
.btn-order:active, 
.btn-cart:active {
    transform: translateY(0);
}

#cart-count {
    background: rgba(255, 255, 255, 0.22);
    padding: 1px 7px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* --- СЕКЦІЯ "ПРО МЕНЕ" (ОНОВЛЕНА КАРТКА) --- */
.about-section {
    padding: 45px 20px 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.about-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 40px;
    box-shadow: 0 8px 24px rgba(109, 76, 65, 0.08);
    border: 1px solid rgba(109, 76, 65, 0.14);
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.about-image {
    flex: 0 0 45%;
}

.about-image img {
    width: 100%;
    height: 310px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    display: block;
}

.about-text {
    flex: 1;
}

.about-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.about-text h2, .catalog-section h2, .contacts-section h2, .youtube-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #5d4037;
    margin: 0 0 10px 0;
}

.catalog-section h2, .contacts-section h2, .youtube-section h2 {
    text-align: center;
}

.about-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 14px 0;
    color: #795548;
}

.about-text p {
    font-size: 1.02rem;
    line-height: 1.65;
    color: #444444;
    margin: 0 0 20px 0;
}

.about-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.highlight-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fdfbf7;
    border: 1px solid rgba(109, 76, 65, 0.18);
    padding: 7px 13px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #5d4037;
}

.highlight-item i {
    color: #2e7d32;
}

/* --- ПАНЕЛЬ ФІЛЬТРАЦІЇ КАТАЛОГУ --- */
.filter-bar {
    background: #ffffff;
    border: 1px solid rgba(109, 76, 65, 0.16);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0 12px 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #5d4037;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    color: #2e7d32;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d7ccc8;
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
    background-color: #fdfbf7;
    color: #333333;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
    background-color: #ffffff;
}

.filter-actions {
    display: flex;
    align-items: flex-end;
}

.btn-reset-filter {
    width: 100%;
    padding: 10px 14px;
    background-color: #efebe9;
    color: #5d4037;
    border: 1px solid #d7ccc8;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-reset-filter:hover {
    background-color: #d7ccc8;
    color: #3e2723;
}

.catalog-stats {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6d4c41;
    margin-bottom: 8px;
    padding-left: 4px;
}

/* --- СЕКЦІЯ КАТАЛОГУ --- */
.catalog-section {
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.catalog-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.card {
    background: #ffffff;
    border: 1px solid rgba(109, 76, 65, 0.2);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card h3.sort {
    color: #6d4c41;
    font-size: 1.35em;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-align: center;
}

.card .swiper {
    width: 100%;
    height: 190px;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.card .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.card-info p {
    margin: 5px 0;
    font-size: 0.95em;
    color: #444;
    line-height: 1.4;
}

.card-info strong {
    color: #5d4037;
}

/* --- КНОПКИ ЗАМОВЛЕННЯ --- */
.buy-actions {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.btn-buy {
    width: 92%;
    max-width: 240px;
    background-color: #388E3C;
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-buy:hover {
    background-color: #2e7d32;
    transform: translateY(-1px);
}

.btn-buy i {
    margin-right: 6px;
}

.btn-buy .price-tag {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.card-clickable {
    cursor: pointer;
}

/* --- МОДАЛЬНЕ ВІКНО ДЕТАЛЬНОГО ОПИСУ --- */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
}

.product-modal.active {
    display: flex;
}

.product-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 850px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close-product-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.product-modal-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.modal-left-col {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-img-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.modal-img-wrapper:hover img {
    transform: scale(1.04);
}

.modal-img-wrapper .zoom-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.modal-thumbs-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.modal-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.modal-thumb:hover, .modal-thumb.active {
    opacity: 1;
    border-color: #2e7d32;
}

.product-modal-details {
    background: #fdfbf7;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(109, 76, 65, 0.15);
}

.product-modal-details p {
    margin: 6px 0;
    font-size: 0.95rem;
    color: #444;
}

.product-modal-details i {
    color: #2e7d32;
    width: 18px;
    text-align: center;
    margin-right: 4px;
}

.modal-right-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-modal-description {
    line-height: 1.6;
    white-space: pre-line;
    color: #444;
    font-size: 0.95rem;
}

.modal-right-col .buy-actions {
    align-items: flex-start;
}

.modal-right-col .btn-buy {
    width: 100%;
    max-width: 280px;
}

/* --- ПОВНОЕКРАННИЙ ПЕРЕГЛЯД ЗОБРАЖЕННЯ (FULLSCREEN LIGHTBOX) --- */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.fullscreen-modal.active {
    display: flex;
}

.fullscreen-modal img {
    max-width: 95%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.close-fullscreen {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.fullscreen-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 30px;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
    user-select: none;
    z-index: 20001;
}

.fullscreen-nav:hover {
    background: rgba(255, 255, 255, 0.5);
}

.fullscreen-nav.prev { left: 20px; }
.fullscreen-nav.next { right: 20px; }

/* --- МОДАЛЬНЕ ВІКНО КОШИКА --- */
.modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 9999 !important;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: #ffffff !important;
    padding: 25px 30px;
    border-radius: 16px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #6d4c41;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(109, 76, 65, 0.15);
    padding: 12px 0;
}

.cart-item button {
    background: #e0e0e0;
    border: none;
    border-radius: 4px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-weight: bold;
}

.cart-summary {
    text-align: right;
    font-size: 1.1rem;
    color: #2e7d32;
}

#checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

#checkout-form label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #5d4037;
    margin-bottom: 4px;
    display: block;
}

#checkout-form input,
#checkout-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
    background: #fafafa;
    font-family: inherit;
}

#checkout-form textarea {
    resize: vertical;
    min-height: 70px;
}

#checkout-form .btn-submit {
    width: 100%;
    background-color: #2e7d32;
    color: #ffffff;
    padding: 12px 0;
    border-radius: 8px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
    transition: background 0.2s ease;
}

#checkout-form .btn-submit:hover {
    background-color: #1b5e20;
}

/* --- СЕКЦІЯ КОНТАКТИ --- */
.contacts-section {
    padding: 50px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.contacts-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    gap: 30px;
}

.contacts-info, 
.contacts-map {
    flex: 1 1 0;
    min-width: 0;
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(109, 76, 65, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.contacts-info h3, 
.contacts-map h3 {
    color: #6d4c41;
    font-size: 1.35em;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: bold;
}

.contact-detail {
    margin-bottom: 12px;
    font-size: 1rem;
    color: #444;
}

.contact-detail i {
    color: #2e7d32;
    width: 18px;
    text-align: center;
    margin-right: 4px;
}

.contact-detail a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: bold;
}

/* СТИЛІ КНОПОК СОЦМЕРЕЖ */
.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    color: white !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.social-btn.fb { background-color: #1877f2; }
.social-btn.yt { background-color: #ff0000; }
.social-btn.tt { background-color: #000000; }

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #5d4037;
}

.form-field input, 
.form-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
    background: #fafafa;
}

.form-field textarea {
    resize: vertical;
    min-height: 90px;
}

.map-wrapper {
    width: 100%;
    height: 100%;
    min-height: 250px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.btn-route, 
.contacts-info .btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-align: center;
    background-color: #388E3C;
    color: #ffffff !important;
    padding: 12px 0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

/* --- TOAST СПОВІЩЕННЯ --- */
.toast-notification {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #2e7d32;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    font-size: 0.95rem;
    font-weight: bold;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification.error {
    background-color: #c62828;
}

/* --- МОБІЛЬНА АДАПТИВНІСТЬ --- */
@media (max-width: 850px) {
    html {
        scroll-padding-top: 200px;
    }
    .about-container {
        flex-direction: column;
        padding: 24px 20px;
        gap: 24px;
        text-align: center;
    }
    .about-image {
        width: 100%;
    }
    .about-image img {
        height: 240px;
    }
    .about-highlights {
        justify-content: center;
    }
    .contacts-container {
        flex-direction: column;
        text-align: center;
    }
    .contacts-info, 
    .contacts-map { 
        width: 100%; 
        box-sizing: border-box; 
    }
    .catalog-container { grid-template-columns: 1fr !important; }
    .product-modal-grid { flex-direction: column; }
    .modal-left-col { flex: 1; width: 100%; }
    .modal-right-col .buy-actions { align-items: center; }
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 50px;
}