/*
Theme Name: My Woo Theme
Theme URI: https://example.com
Author: Your Name
Description: Проста тема для WooCommerce зі стилями
Version: 0.5
License: GPLv2 or later
Text Domain: my-woo-theme
*/

/* ====== БАЗОВІ СТИЛІ ====== */
body {
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 16px;
    color: #333;
    background: #f9fafb;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    color: #2e7d32;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
a:hover {
    color: #1b5e20;
}

/* ====== КОНТЕЙНЕР ====== */
.container,
.site-main,
.woocommerce-page #content,
.entry-content,
.page,
.woocommerce {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
}

@media (min-width: 1200px) {
    .container,
    .site-main,
    .woocommerce-page #content,
    .entry-content,
    .page,
    .woocommerce {
        padding: 0 40px;
    }
}

/* ====== Заголовки сторінок ====== */
.woocommerce-products-header,
.page-header,
.page-title,
.entry-title,
.woocommerce h1,
.woocommerce h2 {
    margin: 20px auto 30px auto;
    padding: 0 10px;
    max-width: 1800px;
    font-size: 2rem;
    font-weight: 600;
    text-align: left;
}

/* ====== ШАПКА ====== */
header.site-header {
    width: 100%;
    background: #fff;
    /* padding: 15px 20px; */
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

header.site-header h1.site-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #2e7d32;
}

header.site-header nav {
    /* margin-left: auto; */
	margin-left: 0;
}

header.site-header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

header.site-header nav ul li a {
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s ease-in-out;
}
header.site-header nav ul li a:hover {
    background: rgba(46, 125, 50, 0.1);
}

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


@media (max-width: 768px) {
    header.site-header {
        flex-direction: column;
        align-items: flex-start;
    }
    header.site-header nav {
        width: 100%;
        margin-top: 10px;
    }
    header.site-header nav ul {
        flex-direction: column;
        width: 100%;
    }
    header.site-header nav ul li a {
        display: block;
        width: 100%;
        padding: 10px;
    }
}

/* ====== Список товарів ====== */

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    content: none !important;
    display: none !important;
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 30px 0;
    padding: 0 10px;
    list-style: none;
    justify-content: center;
}

/* 3 товари в ряд при ширині < 1700px */
@media (max-width: 1700px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

.woocommerce ul.products li.product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.woocommerce ul.products li.product img {
    border-radius: 12px;
    max-height: 220px;
    width: 100%;
    object-fit: contain; /* поміщається у блок */
    margin-bottom: 12px;
}

.woocommerce ul.products li.product a img {
    min-height: 220px; /* фіксована мінімальна висота */
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0;
    color: #222;
    min-height: 48px;
}

.woocommerce ul.products li.product .price {
    font-size: 24px;
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 12px;
}

.woocommerce ul.products li.product .button {
    background: #4CAF50;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px !important;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.25s ease;
    margin-top: auto;
}
.woocommerce ul.products li.product .button:hover {
    background: #388E3C;
}

/* Планшети */
@media (max-width: 992px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Телефони */
@media (max-width: 576px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
}

/* ====== ОДИНИЧНИЙ ТОВАР ====== */
.woocommerce div.product {
    background: #fff;
    border-radius: 14px;
    padding: 35px;
	margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}
.woocommerce div.product h1.product_title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}
.woocommerce div.product .price {
    font-size: 22px;
    color: #2e7d32;
    font-weight: 600;
    margin: 15px 0;
}
.woocommerce div.product form.cart .button {
    background: #4CAF50;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: 0.25s;
}
.woocommerce div.product form.cart .button:hover {
    background: #388E3C;
}

/* Обмеження висоти фото товару */
.woocommerce div.product div.images img {
    max-height: 450px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* ====== КОШИК ====== */
.woocommerce-cart table.shop_table {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.woocommerce-cart .cart_totals {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* ====== CHECKOUT ====== */
.woocommerce-checkout form.checkout {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.woocommerce form .form-row label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    background: #fafafa;
    transition: all 0.2s ease-in-out;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
    border-color: #4CAF50;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
    outline: none;
}
#billing_number_post_office_field {
    background: #f9fdf9;
    border: 1px solid #e0f0e0;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}
#billing_number_post_office_field label {
    color: #2e7d32;
}


/* Скидаємо дефолтний стиль WooCommerce для onsale */
.woocommerce span.onsale {
    all: unset;
}

/* Єдиний стиль для бейджів */
.woocommerce span.onsale,
.woocommerce ul.products li.product.outofstock::before {
    position: absolute;
    top: 15px;
    right: 15px;
    display: inline-block;
    color: #fff;    
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 10;
}

/* Червоний для Акція */
.woocommerce span.onsale {
    background: #e53935;
	font-size: 18px;
}

/* Сірий для Немає в наявності */
.woocommerce ul.products li.product.outofstock::before {
    content: "Немає в наявності";
    background: #757575;
	font-size: 13px;
}

/* Ціна у списку товарів */
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price ins {
    font-size: 24px !important;
    color: #2e7d32 !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.15) !important;
}

/* Ціна на сторінці товару */
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce div.product .price ins {
    font-size: 28px !important;
    color: #1b5e20 !important;
    font-weight: 700 !important;
    margin: 15px 0 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2) !important;
    letter-spacing: 0.5px !important;
}

/* Кнопка Купити / Додати в кошик */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .single_add_to_cart_button {
    background: linear-gradient(135deg, #4CAF50, #2e7d32) !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 13px 30px !important;
    border-radius: 50px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
}

/* Ефект при наведенні */
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .single_add_to_cart_button:hover {
    background: linear-gradient(135deg, #66bb6a, #43a047) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(0,0,0,0.25) !important;
}



/* ===== Хлібні крихти ===== */
.breadcrumbs-wrapper {
    max-width: 1200px;
    margin: 15px auto;
    padding: 0 20px;
    font-size: 14px;
    color: #666;
}

.woocommerce-breadcrumb {
    display: block;
    color: #555;
}

.woocommerce-breadcrumb a {
    color: #2e7d32;
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}



/* ===== Стиль WooCommerce Lightbox (PhotoSwipe) ===== */

/* Фон lightbox */
.pswp__bg {
    background: rgba(240, 240, 240, 0.9) !important; /* світлий прозорий фон */
}

/* Стрілки навігації */
.pswp__button--arrow--left,
.pswp__button--arrow--right {
    background-color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 50%;
    width: 44px;
    height: 44px;
}

/* Іконки всередині стрілок */
.pswp__button--arrow--left::before,
.pswp__button--arrow--right::before {
    filter: invert(1); /* робимо іконки темними */
}

/* Кнопка закриття */
.pswp__button--close {
    background-color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 50%;
    filter: invert(1);
}

/* Ціна + кнопка в одному блоці */
.woocommerce div.product .price,
.woocommerce div.product form.cart {
    display: inline-block;
    vertical-align: middle;
    margin-right: 15px;
}

.woocommerce div.product form.cart {
    margin: 0;
}

.woocommerce div.product .price {
    font-size: 24px;
    font-weight: 600;
    color: #2e7d32;
}

/* Контейнер футера товару */
.woocommerce ul.products li.product .product-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column; /* ціна над кнопкою */
    gap: 12px;
}

/* Ціна */
.woocommerce ul.products li.product .product-price {
    font-size: 22px;
    font-weight: 700;
    color: #2e7d32;
    text-align: center;
}

/* Кнопка Купити */
.woocommerce ul.products li.product .product-buy .button {
    display: block;
    width: 100%;           /* на всю ширину картки */
	box-sizing: border-box;   /* враховує padding картки */
    text-align: center;
    background: #4CAF50;
    color: #fff !important;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 18px;
    border-radius: 5px;
    transition: background 0.25s ease, transform 0.15s ease;
}

.woocommerce ul.products li.product .product-buy .button:hover {
    background: #388E3C;
    transform: translateY(-2px);
}



/* ====== Sidebar ====== */
.page-layout {
  display: flex;
  gap: 20px;
  max-width: 1800px;
  margin: 0 auto;
}

.left-sidebar {
  flex: 0 0 250px; /* ширина сайдбару */
}

.main-content {
  flex: 1; /* решта ширини під контент */
}


/* ====== FOOTER ====== */
footer.site-footer {
    background: #2e7d32;
    color: #fff;
    padding: 30px;
    text-align: center;
    margin-top: 40px;
}
footer.site-footer a {
    color: #c8e6c9;
}
footer.site-footer a:hover {
    color: #fff;
}

