/* АГРОPROFF Theme Styles */

/* === Переменные === */
:root {
    --primary-color: #28a745;
    --primary-dark: #1e7e34;
    --secondary-color: #6c757d;
    --text-color: #333;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --white: #ffffff;
    --black: #000000;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* === Базовые стили === */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

/* === Хедер === */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__wrapper {
    width: 100%;
}

.header__box_variant_primary {
    padding: 10px 0;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header__burger {
    display: none;
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23333'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

.header__logo img {
    height: 60px;
    width: auto;
}

.header__content {
    flex: 1;
    margin-left: 20px;
}

.header__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.header__list {
    display: flex;
    gap: 20px;
}

.header__item {
    font-size: 14px;
}

.header__link {
    color: var(--text-muted);
}

.header__link:hover {
    color: var(--primary-color);
}

.header__row_variant_bottom {
    margin-top: 10px;
}

.header__col_variant_search {
    flex: 1;
    max-width: 500px;
}

.header__phone {
    text-align: right;
}

.header__phone a {
    display: block;
    color: var(--text-color);
    font-weight: 600;
    font-size: 18px;
}

.call-me-back {
    font-size: 12px;
    color: var(--primary-color);
}

.header__basket {
    margin-left: 20px;
}

.basket-menu__button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    transition: background 0.3s;
}

.basket-menu__button:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.basket-menu__icon {
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.basket-menu__total {
    font-size: 14px;
}

/* === Навигация === */
.header__box_variant_secondary {
    background: var(--primary-color);
}

.navbar {
    padding: 0;
}

.navbar__inner {
    display: flex;
    align-items: center;
}

.navbar__nav {
    display: flex;
    gap: 0;
}

.navbar__link {
    color: var(--white) !important;
    padding: 15px 20px;
    font-weight: 500;
    transition: background 0.3s;
    display: block;
}

.navbar__link:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white) !important;
}

.navbar__item_variant_catalog {
    position: relative;
}

.navbar__item_variant_catalog .navbar__link {
    background: rgba(0,0,0,0.2);
}

.navbar__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 800px;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1001;
}

.navbar__item_variant_catalog:hover .navbar__dropdown {
    display: block;
}

.catalog-menu__row {
    display: flex;
}

.catalog-menu__col_variant_columns {
    flex: 1;
    padding: 20px;
}

.catalog-menu__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.catalog-menu__link {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    border-radius: 5px;
    transition: background 0.3s;
}

.catalog-menu__link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    text-decoration: none;
}

.catalog-menu__col_variant_preview {
    width: 300px;
    background-size: cover;
    background-position: center;
}

/* === Поиск === */
.search {
    position: relative;
}

.search__input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
}

.search__icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* === Каталог товаров === */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.woocommerce ul.products li.product {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.3s;
}

.woocommerce ul.products li.product:hover {
    box-shadow: var(--shadow);
}

.woocommerce ul.products li.product img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.woocommerce ul.products li.product h2 {
    font-size: 14px;
    margin-bottom: 10px;
}

.woocommerce ul.products li.product .price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.woocommerce ul.products li.product .button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.woocommerce ul.products li.product .button:hover {
    background: var(--primary-dark);
}

/* === Карточка товара === */
.woocommerce div.product {
    padding: 30px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.woocommerce div.product div.images {
    border-radius: 8px;
    overflow: hidden;
    width: 400px !important;
    max-width: 400px !important;
    float: none !important;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    padding: 20px;
    text-align: center;
}

.woocommerce div.product div.images img {
    max-width: 100% !important;
    max-height: 350px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.woocommerce-product-gallery {
    max-width: 400px !important;
    margin: 0 !important;
}

.woocommerce-product-gallery__image {
    max-width: 400px !important;
    padding: 0 !important;
}

.woocommerce-product-gallery__image img {
    max-height: 350px !important;
    width: auto !important;
}

.woocommerce div.product div.summary {
    padding: 0 20px;
    width: calc(100% - 440px) !important;
    float: right !important;
}

.woocommerce div.product h1.product_title {
    font-size: 24px;
    margin-bottom: 20px;
}

.woocommerce div.product p.price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.woocommerce div.product .cart {
    display: flex;
    gap: 15px;
    align-items: center;
    margin: 30px 0;
}

.woocommerce div.product .cart .quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.woocommerce div.product .cart .quantity input {
    width: 60px;
    text-align: center;
    border: none;
    padding: 10px;
}

.woocommerce div.product .cart .quantity button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    cursor: pointer;
}

.woocommerce div.product .cart .single_add_to_cart_button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.woocommerce div.product .cart .single_add_to_cart_button:hover {
    background: var(--primary-dark);
}

/* === Корзина === */
.woocommerce table.cart {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce table.cart th,
.woocommerce table.cart td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.woocommerce table.cart img {
    width: 80px;
    height: auto;
}

.woocommerce table.cart .product-remove a {
    color: #dc3545;
}

.woocommerce .cart-collaterals {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.woocommerce .cart-collaterals .cart_totals {
    width: 40%;
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
}

.woocommerce .cart-collaterals .cross-sells {
    width: 55%;
}

/* === Футер === */
.footer {
    background: #2c3e50;
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.footer__logo img {
    height: 50px;
    margin-bottom: 15px;
}

.footer__copyright {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.footer__row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__list li {
    margin-bottom: 10px;
}

.footer__list a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s;
}

.footer__list a:hover {
    color: var(--white);
}

.footer__contacts {
    font-size: 14px;
}

.footer__phone a {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
}

.footer__email a {
    color: rgba(255,255,255,0.7);
}

.footer__address {
    color: rgba(255,255,255,0.7);
    margin-top: 10px;
}

/* === Адаптивность === */
@media (max-width: 992px) {
    .header__burger {
        display: block;
    }
    
    .header__content {
        display: none;
    }
    
    .navbar__nav {
        flex-wrap: wrap;
    }
    
    .navbar__link {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .catalog-menu__list {
        grid-template-columns: 1fr;
    }
    
    .catalog-menu__col_variant_preview {
        display: none;
    }
    
    .footer__row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .woocommerce div.product div.summary {
        padding: 0;
        margin-top: 20px;
    }
    
    .footer__inner {
        grid-template-columns: 1fr;
    }
}

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