/*
Theme Name: VPK Theme
Theme URI: https://vpk.ooo
Author: VPK Team
Author URI: https://vpk.ooo
Description: Тема для интернет-магазина ВПК — водоснабжение и инженерные системы.
    -webkit-mask-image: var(--icon);
    mask-image: var(--icon);
Version: 1.0.0
License: GPL v2 or later
Text Domain: vpk-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --color-primary: #1b5a9e;
    --color-primary-dark: #14457a;
    --color-text: #222222;
    --color-gray: #7a8c9e;
    --shadow-card: 0 4px 15px rgba(0, 45, 90, 0.08);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-image: url('style/img/BG.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    color: var(--color-text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1240px;
    padding: 0 20px;
    margin: 0 auto;
}

/* --- Header --- */
.header {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.top-bar, .footer-bottom {
    background: linear-gradient(to right, rgb(37, 103, 187) 0%, rgb(45, 117, 199) 28%, rgb(46, 121, 202) 51%, rgb(57, 136, 213) 100%);
    color: #ffffff;
}

.top-bar {
    font-size: 13px;
    padding: 12px 0;
    font-weight: 500;
    box-shadow: inset 0 -8px 14px -4px rgba(27, 90, 158, 0.3);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left, .top-bar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-bar-right a:hover, .callback-link:hover {
    opacity: 0.8;
}

.callback-link {
    border-bottom: 1px dashed rgba(255,255,255,0.5);
    padding-bottom: 2px;
}

.main-header {
    padding: 20px 0;
}

.main-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.search-bar {
    flex: 1;
    position: relative;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border-radius: 30px;
    border: 1px solid #e0ebf5;
    background: #f7faff;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}

.search-bar input:focus {
    border-color: var(--color-primary);
    background: #fff;
}

.search-bar button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 18px;
    cursor: pointer;
}

.main-nav ul {
    display: flex;
    gap: 25px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.main-nav ul li a {
    position: relative;
    padding-bottom: 5px;
}

.main-nav ul li.active a,
.sidebar-menu li.active a {
    background: linear-gradient(to right, #135ccd 0%, #07308c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #135ccd;
    border-bottom: none;
}
.main-nav ul li.active a {
    border-bottom: 2px solid #135ccd; 
    padding-bottom: 5px;
}

.main-nav ul li:not(.active) a,
.user-actions a i {
    color: #7a8c9e;
    transition: all 0.3s ease;
}

.main-nav ul li:not(.active) a:hover,
.user-actions a:hover i {
    color: #135ccd;
}

/* WordPress: поддержка current-menu-item */
.main-nav ul li.current-menu-item a {
    background: linear-gradient(to right, #135ccd 0%, #07308c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #135ccd;
    border-bottom: 2px solid #135ccd; 
    padding-bottom: 5px;
}
.main-nav ul li:not(.current-menu-item) a {
    color: #7a8c9e;
    transition: all 0.3s ease;
}
.main-nav ul li:not(.current-menu-item) a:hover {
    color: #135ccd;
}

/* Сайдбар — тёмный градиент */
.sidebar-menu li:not(.active) a {
    background: linear-gradient(to right, #48474f 0%, #1c1a25 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #48474f;
    transition: all 0.3s ease;
}

.sidebar-menu li:not(.active) a:hover {
    background: linear-gradient(to right, #135ccd 0%, #07308c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.user-actions {
    display: flex;
    gap: 20px;
    font-size: 20px;
    color: #7a8c9e;
}

/* --- Main Content --- */
.main-content {
    padding-top: 30px;
}

.main-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-menu {
    background: linear-gradient(145deg, #ffffff 0%, #f6faff 100%);
    border-radius: var(--border-radius);
    padding: 15px 10px;
    box-shadow: var(--shadow-card);
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--color-gray);
    font-size: 15px;
    font-weight: 500;
    gap: 15px;
    transition: 0.2s;
    position: relative;
}

.sidebar-menu li a:hover {
    background: #e8f4ff;
}

/* Синяя полоса справа у активного пункта сайдбара */
.sidebar-menu li.active {
    background: #e8f4ff;
    border-radius: 8px;
}

.sidebar-menu li.active a::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--color-primary);
    border-radius: 4px;
}

.sidebar-menu li.active a:hover {
    background: linear-gradient(to right, #135ccd 0%, #07308c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: default;
}

.sidebar-menu li a i {
    width: 20px;
    text-align: center;
img.cat-menu-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    vertical-align: middle;
}
}

.sidebar-cta {
    background: linear-gradient(145deg, #ffffff 0%, #f6faff 100%);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.cta-icon {
    font-size: 40px;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.sidebar-cta h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.sidebar-cta p {
    font-size: 13px;
    color: var(--color-gray);
    margin-bottom: 20px;
    line-height: 1.4;
}

.btn-cta {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
}

.btn-cta:hover {
    background: var(--color-primary);
    color: #ffffff;
}

/* Content Area */
.content-area {
    flex: 1;
}

/* Filter Bar */
.filter-bar {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    gap: 15px;
}

.filter-select {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f4f9ff;
    border: 1px solid #e5eff9;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #222;
    transition: 0.2s;
}

.filter-select:hover {
    border-color: var(--color-primary);
}

.view-toggle {
    display: flex;
    background: #f0f6fd;
    border-radius: 6px;
    padding: 3px;
    gap: 3px;
}

.view-toggle button {
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    color: var(--color-gray);
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}

.view-toggle button:hover, .view-toggle button.active {
    background: #ffffff;
    color: var(--color-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Product Card */
.product-card {
    background: linear-gradient(145deg, #ffffff 0%, #f4faff 100%);
    border-radius: var(--border-radius);
    padding: 25px 20px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 45, 90, 0.07); 
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 45, 90, 0.13);
}

.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 18px;
    color: #7a8c9e;
    cursor: pointer;
    transition: 0.2s;
}

.favorite-btn:hover, .favorite-btn.active {
    color: #ff4757;
}

.product-card img {
    width: 100%;
    max-width: 100%;
    height: 160px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-card a {
    color: inherit;
    text-decoration: none;
}

.product-card a:hover {
    color: inherit;
}

.card-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.card-info h3 {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 36px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.price {
    background: linear-gradient(to right, #135ccd 0%, #07308c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #135ccd;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    display: inline-block;
}

.btn-add-cart {
    width: 100%;
    background: #2a71c7;
    color: #fff;
    border: none;
    padding: 10px 0;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    margin-top: auto;
}

.btn-add-cart:hover {
    background: var(--color-primary-dark);
}

/* Brands Section */
.brands-section {
    background: linear-gradient(to right, rgba(234, 243, 252, 1) 0%, rgb(238, 243, 249) 37%, rgb(242, 245, 254) 60%, rgb(234, 243, 252) 100%);
    padding: 15px 0;
    height: 113px;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(0, 45, 90, 0.15);
    margin-top: 40px;
    margin-bottom: 0;
}

.brands-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
}

.brands-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    margin-right: 10px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    font-size: 16px;
    color: #5c5d72;
    min-width: 80px;
    min-height: 50px;
    transition: 0.3s;
}

.brand-logo:hover {
    opacity: 1;
    color: var(--color-primary);
}

.brand-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Footer */
.footer {
    background: linear-gradient(to right, rgba(234, 243, 252, 1) 0%, rgb(238, 243, 249) 37%, rgb(242, 245, 254) 60%, rgb(234, 243, 252) 100%);
    padding-top: 60px;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.8);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    align-items: start;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #222;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
}

.contact-list i {
    width: 20px;
    color: var(--color-primary);
}

.socials {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.socials a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: #ffffff;
    color: #175a9c;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.socials a:hover {
    background: #175a9c;
    color: #ffffff;
    transform: translateY(-3px);
}

.map-placeholder {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    height: 160px;
}

.map-placeholder img {
    width: 100%;
    height: 100%;
.map-placeholder iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}
}

.map-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-primary);
    font-size: 30px;
    background: #fff;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.about-col p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
}

.btn-about {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 14px;
}

.btn-about:hover {
    opacity: 0.7;
}

.footer-bottom {
    padding: 19px 0;
    font-size: 13px;
    box-shadow: inset 0 8px 14px -4px rgba(27, 90, 158, 0.3);
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.policies a:hover, .developer a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.developer i {
    font-size: 8px;
    vertical-align: middle;
    margin-left: 5px;
}

.page-content {
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--border-radius);
    padding: 30px;
    min-height: 300px;
    box-shadow: var(--shadow-card);
}
/* Responsive Media Queries */
@media screen and (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .sidebar-menu {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    .sidebar-menu li {
        flex: 1 1 30%;
        min-width: 120px;
    }
    .sidebar-cta {
        flex: 1;
    }
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .main-header-inner {
        flex-wrap: wrap;
        gap: 15px;
    }
    .main-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    .main-nav ul {
        width: max-content;
    }
    .search-bar {
        order: 2;
        flex: 1 1 100%;
        max-width: 100%;
    }
    .user-actions {
        order: 2;
    }
    .top-bar-right {
        display: none;
    }
    .top-bar-left {
        width: 100%;
        justify-content: space-between;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .sidebar-menu li {
        flex: 1 1 45%;
    }
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
    .footer-bottom-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .sidebar-menu li {
        flex: 1 1 100%;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-list li {
        justify-content: center;
    }
    .socials {
        justify-content: center;
    }
    .filter-bar {
        flex-wrap: wrap;
        gap: 15px;
    }
    .filter-group {
        width: 100%;
        justify-content: space-between;
    }
    .view-toggle {
        margin: 0 auto;
    }
    .brands-inner {
        justify-content: center;
    }
}


/* ══════════════════════════════════════════════════════════════════
   Карточка товара (WooCommerce single product) — аккуратная вёрстка
   ══════════════════════════════════════════════════════════════════ */

.single-product .product {
    display: grid;
    grid-template-columns: minmax(260px, 400px) 1fr;
    gap: 40px;
    align-items: start;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 30px rgba(16, 42, 90, .08);
}

.single-product .woocommerce-product-gallery,
.single-product .summary {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.single-product .woocommerce-product-gallery img {
    border-radius: 12px;
}

.single-product .product_title {
    font-size: 26px;
    line-height: 1.25;
    margin: 0 0 14px;
}

.single-product .summary .price {
    font-size: 26px;
    font-weight: 700;
    color: #0f2f66;
    margin: 0 0 18px;
}

.single-product .summary .price .woocommerce-Price-currencySymbol {
    font-weight: 500;
    opacity: .65;
}

/* таблица выбора вариации */
.single-product .variations {
    width: 100%;
    margin-bottom: 18px;
}

.single-product .variations th.label {
    text-align: left;
    width: 140px;
    padding: 6px 12px 6px 0;
    font-weight: 600;
    color: #41506b;
    vertical-align: middle;
}

.single-product .variations td.value {
    padding: 6px 0;
}

.single-product .variations select {
    width: 100%;
    max-width: 320px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #cfd8e6;
    border-radius: 8px;
    background: #fff;
    color: #1d2327;
}

.single-product .woocommerce-variation-price {
    margin: 10px 0;
}

/* кнопка и количество */
.single-product .quantity input {
    height: 40px;
    width: 70px;
    border: 1px solid #cfd8e6;
    border-radius: 8px;
}

.single-product .single_add_to_cart_button {
    background: #1352cd !important;
    border-radius: 8px !important;
    padding: 10px 24px !important;
    font-weight: 600;
    transition: background .15s ease;
}

.single-product .single_add_to_cart_button:hover {
    background: #0f43a8 !important;
}

.single-product .single_add_to_cart_button.disabled,
.single-product .single_add_to_cart_button:disabled {
    background: #b9c6db !important;
    cursor: not-allowed;
}

.single-product .product_meta {
    margin-top: 18px;
    font-size: 14px;
    color: #6b7a90;
}

.single-product .product_meta a {
    color: #1352cd;
    text-decoration: none;
}

/* вкладки */
.single-product .woocommerce-tabs {
    margin-top: 26px;
    background: #fff;
    border-radius: 16px;
    padding: 10px 26px 26px;
    box-shadow: 0 8px 30px rgba(16, 42, 90, .06);
}

.single-product .woocommerce-tabs ul.tabs {
    margin: 0 0 6px;
    padding: 0;
    border-bottom: 1px solid #e3e9f2;
}

.single-product .woocommerce-tabs ul.tabs li a {
    color: #41506b;
    font-weight: 600;
}

.single-product .woocommerce-tabs ul.tabs li.active a {
    color: #1352cd;
}

/* таблица характеристик */
.single-product table.woocommerce-product-attributes {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.single-product table.woocommerce-product-attributes th,
.single-product table.woocommerce-product-attributes td {
    padding: 9px 12px;
    border-bottom: 1px solid #edf1f7;
    text-align: left;
    vertical-align: top;
}

.single-product table.woocommerce-product-attributes th {
    width: 46%;
    font-weight: 600;
    color: #41506b;
    background: #f8fafd;
}

.single-product .pp-specs-more summary {
    margin-top: 12px;
    cursor: pointer;
    color: #1352cd;
    font-weight: 600;
}

@media (max-width: 820px) {
    .single-product .product {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 18px;
    }
    .single-product .woocommerce-tabs {
        padding: 8px 16px 18px;
    }
    .single-product .variations th.label {
        width: 110px;
    }
}

/* вкладки и блоки под карточкой занимают всю ширину */
.single-product .product > .woocommerce-tabs,
.single-product .product > .related,
.single-product .product > .upsells,
.single-product .product > .woocommerce-product-gallery + .summary ~ * {
    grid-column: 1 / -1;
}

/* если сайдбар всё же где-то появится — не показываем */
.single-product #secondary,
.single-product .widget-area,
.woocommerce-page #secondary,
.woocommerce-page .widget-area { display: none !important; }

/* служебный сайдбар WordPress (theme-compat) на страницах магазина не нужен */
.single-product #sidebar,
.woocommerce-page #sidebar,
.single-product #secondary,
.woocommerce-page #secondary { display: none !important; }
