/*
 Theme Name:   GeneratePress Child (Дзюбина Садиба)
 Theme URI:    https://generatepress.com
 Description:  Дочірня тема GeneratePress для сайту Дзюбина Садиба
 Author:       Дзюбина Садиба
 Template:     generatepress
 Version:      1.0.10
*/

/* 1. Базова типографіка, кольори та фон (1 в 1 як у вашому CSS) */
body,
button,
input,
select,
textarea {
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: #333333;
    line-height: 1.6;
}

body {
    background-color: #F5F0EC !important;
    background-image: url("https://dziubyna-sadyba.com.ua/wp-content/uploads/2025/04/line-from-flower-twigs.jpg") !important;
    background-position: left top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

/* Прозорий зовнішній контейнер, щоб фонові гілочки було видно по всій сторінці, та центрування контенту */
.site.grid-container {
    background-color: transparent !important;
    box-shadow: none !important;
    margin: 10px auto 20px auto !important;
    max-width: 1140px !important;
}

.content-area {
    width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
}

.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.one-container .site-content {
    background-color: rgba(255, 255, 255, 0.84) !important;
    border-radius: 8px;
}

/* Заголовки (точні шрифти та кольори) */
h1, h2, h3,
h1.entry-title,
.entry-content h1,
.entry-content h2,
.entry-content h3 {
    font-family: 'Raleway', sans-serif !important;
    font-weight: 700 !important;
    margin-bottom: 16px;
}

h1,
h1.entry-title,
.entry-content h1 {
    font-size: 36px !important;
    color: #4B4B4B !important;
}

h2,
.entry-content h2 {
    font-size: 28px !important;
    color: #6B8E23 !important;
    margin-top: 32px;
}

h3,
.entry-content h3 {
    font-size: 22px !important;
    color: #A0522D !important;
    margin-top: 24px;
}

a {
    color: #6B8E23;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #A0522D;
}

/* 2. Хедер та навігація (теракотовий #A0522D з контрастним білим текстом) */
.site-header {
    background-color: #A0522D !important;
    border-bottom: 2px solid #8B4523;
}

.site-header .inside-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
    max-width: 1140px;
    margin: 0 auto;
}

.site-logo {
    background-color: rgba(255, 255, 255, 0.92);
    padding: 4px 10px;
    border-radius: 8px;
}

.site-logo img,
.custom-logo {
    max-height: 62px !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

/* Прибираємо дубль текстової назви, якщо вже є графічний логотип */
.site-logo + .site-branding {
    display: none !important;
}

.main-navigation {
    background-color: transparent !important;
}

.main-navigation .main-nav ul ul {
    background-color: #8B4523 !important;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.main-navigation .main-nav > ul {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.main-navigation .main-nav ul li a,
.menu-toggle {
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 15px;
    padding-left: 12px;
    padding-right: 12px;
    white-space: nowrap;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a {
    color: #FFF3D6 !important;
    background-color: rgba(255, 255, 255, 0.16) !important;
    border-radius: 4px;
}

/* 3. Іконки в меню: Акаунт, Кошик, Telegram, Пошук */
.main-navigation .main-nav ul li.menu-item-icon > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}

.menu-item-cart-custom .cart-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.menu-item-icon svg {
    stroke: currentColor;
    display: block;
}

.menu-item-cart-custom .cart-count-badge {
    position: absolute;
    top: -7px;
    right: -9px;
    background-color: #6B8E23;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 50%;
    text-align: center;
    padding: 0 4px;
    box-sizing: border-box;
}

/* Випадаючий пошук у меню */
.menu-item-search-custom {
    position: relative;
}

.sadyba-search-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #FFFFFF;
    border: 1px solid #D7CFAB;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    z-index: 999;
    min-width: 260px;
}

.sadyba-search-dropdown.is-open {
    display: block;
}

.sadyba-search-dropdown form {
    display: flex;
    gap: 6px;
}

.sadyba-search-dropdown input[type="search"] {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #D7CFAB;
    border-radius: 4px;
    font-size: 14px;
}

.sadyba-search-dropdown button {
    background-color: #D61347;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 7px 12px;
    font-weight: 600;
    cursor: pointer;
}

/* 4. Товари WooCommerce: рівна сітка, квадратні фото, однакова висота карток */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
    content: none !important;
}

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin: 20px 0 !important;
    padding: 0 !important;
}

@media (max-width: 900px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 560px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
    }
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    background-color: #FFFFFF;
    border: 1px solid #F0EAD6;
    border-radius: 8px;
    padding: 14px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box;
}

.woocommerce ul.products li.product a img {
    width: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px !important;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 8px 20px rgba(105, 96, 62, 0.12);
    transform: translateY(-2px);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h3.woocommerce-loop-product__title {
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    color: #32373C !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

.woocommerce div.product .product_title {
    font-size: 26px;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 12px;
    color: #32373C;
}

.woocommerce div.product p.price,
.woocommerce ul.products li.product .price {
    font-size: 20px;
    font-weight: 700;
    color: #69603E;
    margin-top: 4px;
    margin-bottom: 14px;
}

/* Кнопка «Додати в кошик» у кольорах садиби (#A0522D теракотовий) */
.woocommerce ul.products li.product .button,
.woocommerce div.product form.cart .button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: #A0522D !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    border-radius: 6px !important;
    padding: 11px 20px !important;
    border: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce div.product form.cart .button:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: #8B4523 !important;
    color: #FFFFFF !important;
}

.woocommerce ul.products li.product .button {
    margin-top: auto;
    text-align: center;
}

/* 5. Кнопка «Купити в 1 клік» (#6B8E23 оливкова контурна) та модальне вікно */
.single-product .btn-fast-click {
    background-color: transparent !important;
    border: 2px solid #6B8E23 !important;
    color: #6B8E23 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    border-radius: 6px !important;
    padding: 9px 18px !important;
    margin-left: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.single-product .btn-fast-click:hover {
    background-color: #6B8E23 !important;
    color: #FFFFFF !important;
}

.fast-click-modal {
    border: none;
    border-radius: 10px;
    padding: 28px 24px 22px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    max-width: 390px;
    width: 92%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #FFFFFF;
}

.fast-click-modal::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.fast-click-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #888888;
}

.fast-click-modal h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
    color: #32373C;
}

.fast-click-modal input[type="tel"],
.fast-click-modal input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D7CFAB;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.fast-click-modal .sadyba-fast-submit,
.fast-click-modal .wpcf7-form-control.wpcf7-submit {
    background-color: #D61347 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    border: none !important;
    width: 100% !important;
    padding: 12px !important;
    border-radius: 6px !important;
    cursor: pointer;
    font-size: 15px;
}

.fast-click-modal .sadyba-fast-submit:hover {
    background-color: #B00F3A !important;
}

.sadyba-fast-msg {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
}

.sadyba-fast-msg.is-success {
    color: #2E7D32;
}

.sadyba-fast-msg.is-error {
    color: #D61347;
}

/* 6. Футер у теракотовій палітрі сайту (#A0522D з білим текстом) */
.site-footer,
.site-footer .footer-widgets,
.site-footer .site-info,
footer.site-info,
.inside-site-info {
    background-color: #A0522D !important;
    color: #FFFFFF !important;
}

.site-footer {
    border-top: 2px solid #8B4523;
}

.site-footer a {
    color: #FFFFFF !important;
    text-decoration: none;
    font-weight: 600;
}

.site-footer a:hover {
    color: #FFF3D6 !important;
    text-decoration: underline;
}

.sadyba-footer-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px 20px;
    font-size: 14px;
    text-align: left;
}

.sadyba-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 16px;
}

.sadyba-footer-links a {
    white-space: nowrap;
}

/* SEO-блок під категорією */
.category-seo-bottom-block {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #D7CFAB;
}

/* 7. Перенесені стилі головної сторінки: заголовки, сітка статей, соцмережі */
.entry-content h3 {
    font-size: 22px;
    color: #A0522D;
    margin-top: 24px;
}

.dz-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .dz-post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dz-post-grid {
        grid-template-columns: 1fr;
    }
}

.dz-post-card {
    background: #F8F4ED;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.dz-post-card:hover {
    transform: scale(1.02);
}

.dz-post-card img {
    width: 100%;
    height: auto;
    display: block;
}

.dz-post-content {
    padding: 16px 14px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.dz-post-cat {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #EEF3E2;
    border: 1px solid #D5E0BE;
    color: #55771A !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dz-post-cat:hover {
    background-color: #6B8E23;
    border-color: #6B8E23;
    color: #ffffff !important;
}

.dz-post-content h4 {
    margin: 4px 0 0;
    font-size: 18px;
    line-height: 1.35;
    color: #333333;
}

.dz-post-content h4 a {
    color: #333333;
    text-decoration: none;
}

.read-more-btn {
    display: inline-block;
    margin-top: auto;
    align-self: center;
    padding: 6px 12px;
    background-color: #6B8E23;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.read-more-btn:hover {
    background-color: #55771a;
    color: #ffffff !important;
}

.share-icons {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    align-items: center;
}

.share-icons img {
    width: 32px;
    height: 32px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.share-icons img:hover {
    transform: scale(1.1);
}

.sadyba-footer-fb img {
    width: 28px;
    height: 28px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .site-header .inside-header {
        flex-wrap: wrap;
        padding: 10px 16px;
    }
    .site-logo img,
    .custom-logo {
        max-height: 52px !important;
    }
    .main-navigation .main-nav > ul {
        flex-direction: column;
        align-items: flex-start;
    }
    .single-product .btn-fast-click {
        margin-left: 0 !important;
        margin-top: 10px !important;
        width: 100%;
    }
    .woocommerce div.product form.cart .button {
        width: 100%;
    }
    .sadyba-footer-bar {
        flex-direction: column;
        text-align: center;
    }
    .sadyba-footer-links {
        justify-content: center;
    }
}

/* 8. Кнопка Back-to-top */
.sadyba-back-to-top {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #6B8E23;
    color: #FFFFFF !important;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease, visibility 0.25s ease;
}

.sadyba-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sadyba-back-to-top:hover {
    background-color: #55771a;
    color: #FFFFFF !important;
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .sadyba-back-to-top {
        right: 14px;
        bottom: 16px;
        width: 40px;
        height: 40px;
    }
}

/* 9. Виправлення Select2 («Місто», «Відділення/поштомат») на сторінці оформлення замовлення */
.woocommerce-checkout .select2-container {
    width: 100% !important;
}

.woocommerce-checkout .select2-container--default .select2-selection--single {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border: 1px solid #C9C3B8 !important;
    border-radius: 6px !important;
    background-color: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px !important;
    padding: 0 32px 0 12px !important;
    margin: 0 !important;
    color: #333333 !important;
    width: 100%;
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #777777 !important;
    line-height: 42px !important;
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
    top: 0 !important;
    right: 6px !important;
}

/* 10. Міні-блок «Про нашу садибу» між товарами та статтями */
.dz-about-strip {
    margin: 42px 0;
    padding: 32px 28px;
    background: linear-gradient(135deg, #F8F4ED 0%, #EEF3E2 100%);
    border: 1px solid #D8E0C8;
    border-left: 5px solid #6B8E23;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.dz-about-head {
    max-width: 760px;
    margin: 0 auto 24px;
    text-align: center;
}

.dz-about-head h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #A0522D;
}

.dz-about-head p {
    margin: 0;
    color: #4B4B4B;
    font-size: 16px;
    line-height: 1.55;
}

.dz-about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dz-about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid #E4E7DC;
    border-radius: 10px;
}

.dz-about-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #EEF3E2;
    color: #6B8E23;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-about-feature strong {
    display: block;
    font-size: 15px;
    color: #333333;
    margin-bottom: 2px;
}

.dz-about-feature span {
    display: block;
    font-size: 13px;
    color: #5E5E5E;
    line-height: 1.35;
}

.dz-about-cta {
    text-align: center;
}

.dz-about-btn {
    display: inline-block;
    padding: 11px 28px;
    background-color: #6B8E23;
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.25s ease, transform 0.15s ease;
}

.dz-about-btn:hover {
    background-color: #55771A;
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

@media (max-width: 820px) {
    .dz-about-features {
        grid-template-columns: 1fr;
    }
    .dz-about-strip {
        padding: 24px 18px;
    }
}

/* Кнопка «Всі статті» під сіткою новин */
.dz-posts-more {
    margin: 26px 0 12px;
    text-align: center;
}

.dz-posts-more-btn {
    display: inline-block;
    padding: 10px 26px;
    border: 2px solid #6B8E23;
    border-radius: 6px;
    background-color: transparent;
    color: #55771A !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.dz-posts-more-btn:hover {
    background-color: #6B8E23;
    color: #FFFFFF !important;
}
