/*
Theme Name: EasyShop
Theme URI: https://example.com/easyshop
Author: Alexeev Vasiliy
Author URI: mailto:alexeev_vn@mail.ru
Description: Минималистичная тема для интернет-магазина с поддержкой WooCommerce. Легкая и чистая тема с бесплатными плагинами для Телеграм, Вконтакте, Woocommerc и др.

Сайт с бесплатными плагинами: https://treasurecave.ru/

Бесплатные приложения на телефон: RuStore - https://www.rustore.ru/catalog/developer/dv50k2
Version: 10.0.2
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: easyshop
Tags: e-commerce, woocommerce, minimalist, custom-menu, custom-logo, theme-options

EasyShop - чистый и минималистичный дизайн для вашего магазина.
*/

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --es-primary-color: #2c3e50;
    --es-secondary-color: #3498db;
    --es-accent-color: #ab1e40;
    --es-text-color: #333333;
    --es-light-text: #777777;
    --es-background: #f2ebdf;
    --es-light-bg: #f2ebdf;
    --es-card-bg: #ffffff;
    --es-font-family: 'Montserrat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --es-transition: 0.3s ease;
    --es-container-width: 1400px;
    --es-header-height: auto;
}

body {
    background-color: #f2ebdf !important;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Screen Reader Only - visible for SEO, hidden visually */
.es-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--es-font-family);
    font-weight: 400;
    line-height: 1.6;
    color: var(--es-text-color);
    background-color: var(--es-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--es-transition);
}

a:hover {
    color: var(--es-secondary-color);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Remove default browser/widget iframe border */
iframe {
    border: 0 !important;
}

/* ============================================
   CONTAINER
   ============================================ */
.es-container {
    width: 100%;
    max-width: var(--es-container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HIDE "(необязательно)" GLOBALLY
   ============================================ */
.woocommerce form .form-row .optional,
.woocommerce-page form .form-row .optional,
.woocommerce form .optional,
span.optional,
label .optional,
.woocommerce-billing-fields .optional,
.woocommerce-shipping-fields .optional,
.woocommerce-checkout .optional {
    display: none !important;
}

/* ============================================
   FOOTER STUDIO LINK
   ============================================ */
.es-footer-studio-link {
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.es-footer-studio-link:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

/* ============================================
   TOP BAR - ПЕРВАЯ СТРОКА
   ============================================ */
.es-top-bar {
    background: var(--es-light-bg);
    padding: 10px 0;
    font-size: 14px;
}

.es-top-bar .es-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.es-top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.es-top-bar-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    flex-shrink: 0;
    line-height: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.es-top-bar-image-link img,
.es-top-bar-image-link .es-top-bar-image-img {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    object-fit: contain;
    vertical-align: middle;
    display: block;
}

/* Контейнер для кнопок: Адреса магазинов и Промокоды */
.es-top-bar-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 768px) {
    .es-top-bar-buttons {
        position: static;
        transform: none;
        justify-content: flex-start;
    }
}

.es-phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--es-primary-color);
}

.es-phone-link:hover {
    color: var(--es-secondary-color);
}

.es-phone-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.es-social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.es-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--es-primary-color);
    color: #fff;
    transition: all var(--es-transition);
}

.es-social-icon:hover {
    background: var(--es-secondary-color);
    transform: translateY(-2px);
    color: #fff;
}

.es-social-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Соцсети + поиск + корзина в одной группе справа (десктоп) */
.es-top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.es-header-search-cart {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* На мобильной вёрстке блок из верхней полосы не показываем (поиск/корзина остаются в nav) */
.es-header-search-cart--top {
    display: none;
}

@media (min-width: 769px) {
    .es-has-header-utility-top .es-header-search-cart--nav {
        display: none !important;
    }

    .es-has-header-utility-top .es-header-search-cart--top {
        display: flex !important;
    }

    .es-top-bar .es-header-search-cart--top .es-cart-link {
        margin-left: 0;
    }
}

/* ============================================
   STORES DROPDOWN - Адреса магазинов
   ============================================ */
.es-stores-dropdown {
    position: relative;
}

.es-stores-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--es-card-bg);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--es-primary-color);
    cursor: pointer;
    transition: all var(--es-transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.es-stores-toggle:hover {
    background: var(--es-primary-color);
    color: #fff;
    border-color: var(--es-primary-color);
}

.es-stores-toggle:hover svg {
    fill: #fff;
}

.es-stores-toggle svg {
    fill: var(--es-primary-color);
    transition: all var(--es-transition);
}

.es-dropdown-arrow {
    transition: transform var(--es-transition);
}

.es-stores-dropdown.active .es-dropdown-arrow {
    transform: rotate(180deg);
}

.es-stores-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    background: var(--es-card-bg);
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all var(--es-transition);
    z-index: 1000;
}

.es-stores-dropdown.active .es-stores-menu {
    opacity: 1;
    visibility: visible;
}

.es-stores-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--es-card-bg);
}

.es-store-item {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--es-text-color);
    transition: background var(--es-transition);
}

.es-store-item:hover {
    background: #f5f5f5;
    color: var(--es-primary-color);
}

.es-store-item:first-child {
    border-radius: 8px 8px 0 0;
}

.es-store-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* Кнопка Промокоды - Desktop (такой же стиль как es-stores-toggle) */
.es-promo-button-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--es-card-bg);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--es-primary-color);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--es-transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.es-promo-button-desktop:hover {
    background: var(--es-primary-color);
    color: #fff;
    border-color: var(--es-primary-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.es-promo-button-desktop:hover svg {
    fill: #fff;
}

@media (max-width: 768px) {
    .es-promo-button-desktop {
        display: none !important;
    }
    
    .es-top-bar-buttons {
        justify-content: flex-start;
    }
}

/* ============================================
   MODAL - Модальное окно
   ============================================ */
.es-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--es-transition);
}

.es-modal.active {
    opacity: 1;
    visibility: visible;
}

.es-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.es-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: var(--es-background);
    border-radius: 12px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--es-transition);
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
}

.es-modal.active .es-modal-content {
    transform: scale(1) translateY(0);
}

.es-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--es-background);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all var(--es-transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.es-modal-close:hover {
    background: var(--es-accent-color);
}

.es-modal-close:hover svg {
    fill: #fff;
}

.es-modal-close svg {
    fill: var(--es-text-color);
    transition: fill var(--es-transition);
}

/* ============================================
   PRODUCT MODAL
   ============================================ */
.es-product-modal .es-modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.es-product-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

.es-product-modal-gallery {
    position: relative;
}

.es-product-modal-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.es-product-modal-image img {
    width: 100%;
    height: auto;
    display: block;
}

.es-product-modal-sale-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--es-accent-color);
    color: #fff;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 2;
}

.es-product-modal-info {
    display: flex;
    flex-direction: column;
}

.es-product-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--es-primary-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.es-product-modal-price-wrapper {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

.es-product-modal-price-wrapper .es-product-modal-price-label {
    width: 100%;
}

.es-product-modal-quantity-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.es-product-modal-quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    height: 48px;
    width: fit-content;
}

.es-product-modal-quantity-control .es-qty-btn {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 10px 5px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #000;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    box-sizing: border-box;
}

.es-product-modal-quantity-control .es-qty-btn:hover {
    background: #f5f5f5;
}

.es-product-modal-quantity-control .es-qty-btn:active {
    background: #e8e8e8;
}

.es-product-modal-quantity-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--es-text-color);
    letter-spacing: 0.5px;
}

.es-product-modal-quantity-control .qty {
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    padding: 10px;
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    font-size: 16px;
    font-weight: 500;
    -moz-appearance: textfield;
    flex-shrink: 0;
    box-sizing: border-box;
}

.es-product-modal-quantity-control .qty::-webkit-outer-spin-button,
.es-product-modal-quantity-control .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.es-product-modal-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.es-product-modal-price-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--es-text-color);
    letter-spacing: 0.5px;
}

.es-product-modal-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--es-primary-color);
    white-space: nowrap;
    margin: 0;
    display: flex;
    align-items: center;
    line-height: 1;
}

.es-product-modal-price del {
    font-size: 18px;
    color: var(--es-light-text);
    font-weight: 400;
    margin-right: 10px;
}

.es-product-modal-price ins {
    text-decoration: none;
    color: var(--es-accent-color);
}

.es-product-modal-weight {
    font-size: 14px;
    font-weight: 400;
    color: var(--es-light-text);
    margin-left: 8px;
    white-space: nowrap;
}

.es-product-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-wrap: wrap;
}

.es-product-modal-actions form.cart {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.es-product-modal-actions form.cart .qty {
    display: none;
}

.es-product-modal-add-to-cart {
    width: 100%;
    height: 48px;
    padding: 0 24px;
    background: var(--es-primary-color);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--es-transition);
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}

.es-product-modal-add-to-cart:hover {
    background: var(--es-secondary-color);
    color: #fff;
}

/* ONE CLICK LEAD button in modal */
.es-product-modal-actions .ocl-quick-buy-btn,
.es-product-modal-actions .ocl-quick-buy-btn-popup {
    width: 100% !important;
    height: 48px !important;
    padding: 0 24px !important;
    background: transparent !important;
    color: #ab1e40 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: 1px solid #ab1e40 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

.es-product-modal-actions .ocl-quick-buy-btn:hover,
.es-product-modal-actions .ocl-quick-buy-btn-popup:hover {
    background: #ab1e40 !important;
    color: #fff !important;
}

.es-product-modal-view-full {
    width: 100%;
    text-align: center;
    color: var(--es-primary-color);
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
    display: block;
}

.es-product-modal-view-full:hover {
    text-decoration: underline;
}

/* ============================================
   LOGO BAR
   ============================================ */
.es-logo-bar {
    padding: 20px 0;
    background: var(--es-light-bg);
}

.es-logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.es-header-banner {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.es-header-banner img,
.es-banner-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    display: block;
}

.es-logo-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.es-logo {
    text-align: center;
}

.es-logo img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.es-logo .custom-logo-link img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.es-site-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--es-primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
}

.es-site-title a {
    color: inherit;
}

.es-site-slogan {
    font-family: var(--es-font-family);
    font-size: 14px;
    font-weight: 400;
    color: var(--es-light-text);
    text-align: center;
    margin: 3px 0 0 0;
    letter-spacing: 1px;
}

.es-site-slogan a,
.es-site-slogan-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.es-site-slogan a:hover,
.es-site-slogan a:focus,
.es-site-slogan-link:hover,
.es-site-slogan-link:focus {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   MAIN NAVIGATION
   ============================================ */
.es-main-nav {
    background: var(--es-background);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.es-main-nav .es-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.es-primary-menu {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
}

.es-primary-menu > li {
    position: relative;
    flex-shrink: 0;
}

.es-primary-menu > li > a {
    display: block;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--es-primary-color);
    transition: all var(--es-transition);
    border-radius: 4px;
    white-space: nowrap;
}

.es-primary-menu > li > a:hover,
.es-primary-menu > li.current-menu-item > a,
.es-primary-menu > li.active > a {
    background: var(--es-primary-color);
    color: #fff;
}

/* Search Form */
.es-search-form {
    display: flex;
    align-items: center;
    border: none;
    border-radius: 25px;
    overflow: hidden;
    transition: box-shadow var(--es-transition);
    background: var(--es-card-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.es-search-form:focus-within {
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.es-search-form input[type="search"] {
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-family: inherit;
    width: 250px;
    min-width: 0;
    outline: none;
}

.es-search-form button {
    background: var(--es-primary-color);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: background var(--es-transition);
}

.es-search-form button:hover {
    background: var(--es-secondary-color);
}

.es-search-form button svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* ============================================
   CART ICON
   ============================================ */
.es-cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--es-card-bg);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all var(--es-transition);
    margin-left: 15px;
}

.es-cart-link:hover {
    background: var(--es-primary-color);
    transform: scale(1.05);
}

.es-cart-link:hover .es-cart-icon svg {
    fill: #fff;
}

.es-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.es-cart-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--es-primary-color);
    transition: fill var(--es-transition);
}

.es-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--es-accent-color);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
    padding: 0 5px;
    opacity: 0;
    transform: scale(0);
    transition: all var(--es-transition);
}

.es-cart-link.has-items .es-cart-count {
    opacity: 1;
    transform: scale(1);
}

/* Desktop: одна строка — меню + поиск + корзина, поле поиска и меню сжимаются */
@media (min-width: 769px) {
    .es-main-nav .es-container {
        flex-wrap: nowrap;
    }
    /* Блок меню может сжиматься, чтобы строка не переносилась */
    .es-primary-menu-scroll-wrap {
        flex: 1 1 0%;
        min-width: 0;
        overflow: hidden;
        display: flex;
        align-items: center;
    }
    /* На десктопе стрелки скрыты (только на мобильном) */
    .es-main-nav .es-primary-menu-scroll-wrap .es-menu-arrow {
        display: none !important;
    }
    /* Меню внутри обёртки — горизонтальный скролл при нехватке места */
    .es-primary-menu-scroll-wrap .es-primary-menu {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        flex: 1 1 auto;
        min-width: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .es-search-form {
        flex: 0 1 200px;
        min-width: 100px;
        max-width: 280px;
    }
    .es-search-form input[type="search"] {
        width: 100%;
        box-sizing: border-box;
    }
    .es-cart-link {
        flex-shrink: 0;
    }
}

/* ============================================
   CONTENT AREA
   ============================================ */
.es-content {
    padding: 40px 0;
    min-height: 60vh;
}

.es-page-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--es-primary-color);
    text-align: center;
}

/* ============================================
   WOOCOMMERCE PRODUCTS
   ============================================ */
.es-products-section {
    padding: 40px 0;
}

.es-category-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--es-primary-color);
    text-align: center;
    margin-bottom: 30px;
    display: none;
}

.es-category-title:not(:empty) {
    display: block;
}

.es-main-products {
    min-height: 300px;
}

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

@media (max-width: 992px) {
    .es-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .es-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Sale badge — внутри карточки, не выходит за края */
.es-product-card .es-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    max-width: calc(100% - 20px);
    background: #8b9a4b;
    color: #fff;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    z-index: 5;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.es-product-card {
    background: var(--es-card-bg);
    border-radius: 8px;
    overflow: visible;
    transition: all var(--es-transition);
    cursor: pointer;
    padding: 12px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.es-product-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.es-product-image {
    position: relative !important;
    padding-top: 100%;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    box-sizing: border-box;
    border: none;
}
.es-product-image .onsale {
    position: absolute !important;
    z-index: 5 !important;
}


.es-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform var(--es-transition);
    border-radius: 0;
    z-index: 1;
    border: none;
}

.es-product-card:hover .es-product-image img {
    transform: scale(1.05);
}

.es-product-info {
    padding: 20px;
    box-sizing: border-box;
}

.es-product-rating {
    margin: 6px 0;
}

.es-product-rating .star-rating {
    display: inline-block;
}

.es-product-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--es-text-color);
    line-height: 1.4;
}

.es-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--es-primary-color);
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 10px;
}

.es-product-price del {
    font-size: 14px;
    color: var(--es-light-text);
    font-weight: 400;
}

.es-product-price ins {
    text-decoration: none;
    color: var(--es-accent-color);
}

.es-product-weight {
    font-size: 13px;
    font-weight: 400;
    color: var(--es-light-text);
    margin-left: 6px;
    white-space: nowrap;
}

.es-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    margin-top: 15px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    background: var(--es-primary-color);
    color: #fff;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--es-transition);
    box-sizing: border-box;
    height: 48px;
    line-height: 1;
}

/* Уменьшаем расстояние между кнопками в два раза - Desktop */
.es-product-card .ocl-quick-buy-btn-loop,
.es-product-info .ocl-quick-buy-btn-loop {
    width: 100% !important;
    margin: 8px 0 0 0 !important;
    box-sizing: border-box !important;
}

.es-add-to-cart:hover {
    background: var(--es-secondary-color);
    color: #fff;
}

/* ONE CLICK LEAD Button - Desktop: тот же размер и выравнивание, что и «В корзину» */
.ocl-quick-buy-btn-loop,
button.ocl-quick-buy-btn-loop,
.woocommerce .ocl-quick-buy-btn-loop,
.woocommerce-page .ocl-quick-buy-btn-loop,
.woocommerce ul.products li.product .ocl-quick-buy-btn-loop,
ul.products li.product .ocl-quick-buy-btn-loop,
.es-product-card .ocl-quick-buy-btn-loop,
li.product .ocl-quick-buy-btn-loop {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: calc(100% - 24px) !important;
    margin: 8px 12px 0 12px !important;
    padding: 12px 20px !important;
    background: transparent !important;
    color: #ab1e40 !important;
    text-align: center !important;
    font-family: var(--es-font-family) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: 2px solid #ab1e40 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    height: 48px !important;
}

.ocl-quick-buy-btn-loop:hover,
button.ocl-quick-buy-btn-loop:hover,
.woocommerce .ocl-quick-buy-btn-loop:hover,
ul.products li.product .ocl-quick-buy-btn-loop:hover,
.es-product-card .ocl-quick-buy-btn-loop:hover,
li.product .ocl-quick-buy-btn-loop:hover {
    background: #ab1e40 !important;
    color: #fff !important;
    border-color: #ab1e40 !important;
}

/* WooCommerce Override Styles */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

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

/* Product cards - same style everywhere (shop, category, archive, search) */
.woocommerce-page ul.products li.product,
.archive ul.products li.product,
.tax-product_cat ul.products li.product,
.search-results ul.products li.product,
body.woocommerce ul.products li.product,
.woocommerce ul.products li.product {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 12px !important;
    float: none !important;
    clear: none !important;
    background: var(--es-card-bg);
    border-radius: 8px;
    overflow: visible;
    transition: all var(--es-transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

/* Product images - контейнер с обрезкой для плашки (категории, магазин, поиск) */
.woocommerce-page ul.products li.product > a,
.archive ul.products li.product > a,
.tax-product_cat ul.products li.product > a,
.search-results ul.products li.product > a,
body.woocommerce ul.products li.product > a,
.woocommerce ul.products li.product > a {
    display: block;
    position: relative;
    padding: 12px;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    overflow: hidden;
    border: none;
}

.woocommerce-page ul.products li.product a img,
.archive ul.products li.product a img,
.tax-product_cat ul.products li.product a img,
.search-results ul.products li.product a img,
body.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product a img {
    margin: 0;
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    object-position: center;
    background: transparent;
    border-radius: 0;
    display: block;
    border: none;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce .related.products li.product .woocommerce-loop-product__title,
.es-related-products-wrapper li.product .woocommerce-loop-product__title {
    padding: 20px 20px 10px;
    font-size: 16px;
    font-weight: 500;
    color: var(--es-text-color);
}

/* Эталон: отступ цены до кнопки — используется в каталоге, категориях и похожих товарах */
.woocommerce ul.products li.product .price,
.woocommerce .related.products li.product .price,
.es-related-products-wrapper li.product .price {
    padding: 0 20px 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--es-primary-color);
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 10px;
}

.woocommerce ul.products li.product .price del {
    font-size: 14px;
    color: var(--es-light-text);
    font-weight: 400;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
    color: var(--es-accent-color);
}

/* Removed "СТОИМОСТЬ" label from product preview */
/* .woocommerce ul.products li.product .price::before {
    content: "СТОИМОСТЬ";
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--es-text-color);
    letter-spacing: 0.5px;
    display: block;
} */

/* Related products wrapper - heading next to products */
.es-related-products-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
    width: 100%;
}

.es-related-products-wrapper > h2 {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--es-primary-color);
    white-space: nowrap;
    flex-shrink: 0;
}

.es-related-products-wrapper > ul.products {
    flex: 1;
    min-width: 0;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .ocl-quick-buy-btn-loop,
.woocommerce .related.products li.product .button,
.woocommerce .related.products li.product .ocl-quick-buy-btn-loop,
.es-related-products-wrapper li.product .button,
.es-related-products-wrapper li.product .ocl-quick-buy-btn-loop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 24px) !important;
    margin: 8px 12px 0 12px !important;
    padding: 12px 20px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all var(--es-transition);
    box-sizing: border-box;
    height: 48px;
    line-height: 1;
}

.woocommerce ul.products li.product .button {
    background: var(--es-primary-color);
    color: #fff;
    border: none;
}

.woocommerce .related.products li.product .button,
.es-related-products-wrapper li.product .button {
    background: var(--es-primary-color);
    color: #fff;
    border: none;
}

/* Кнопка «Купить в 1 клик» — тот же размер и выравнивание, что и «В корзину» */
.woocommerce ul.products li.product .ocl-quick-buy-btn-loop {
    background: transparent !important;
    color: #ab1e40 !important;
    border: 2px solid #ab1e40 !important;
}

.woocommerce .related.products li.product .ocl-quick-buy-btn-loop,
.es-related-products-wrapper li.product .ocl-quick-buy-btn-loop {
    background: transparent !important;
    color: #ab1e40 !important;
    border: 2px solid #ab1e40 !important;
}

.woocommerce ul.products li.product .button:hover {
    background: var(--es-secondary-color);
}

/* Green button after add to cart */
.woocommerce ul.products li.product .button.added,
.woocommerce ul.products li.product a.button.added,
.search-results ul.products li.product .button.added,
.es-products-container .es-product-card .button.added,
.es-product-modal-actions .button.added {
    background: #27ae60 !important;
    color: #fff !important;
    border-color: #27ae60 !important;
}

/* Hide "View Cart" link */
.woocommerce ul.products li.product .added_to_cart,
.woocommerce ul.products li.product a.added_to_cart,
.search-results ul.products li.product .added_to_cart,
.es-products-container .es-product-card .added_to_cart,
.es-product-modal-actions .added_to_cart,
.woocommerce a.added_to_cart.wc-forward {
    display: none !important;
}

/* WooCommerce columns support */
.woocommerce ul.products.columns-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.woocommerce ul.products.columns-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.woocommerce ul.products.columns-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

.woocommerce ul.products.columns-5 {
    grid-template-columns: repeat(5, 1fr) !important;
}

.woocommerce ul.products.columns-6 {
    grid-template-columns: repeat(6, 1fr) !important;
}

/* ============================================
   WOOCOMMERCE GLOBAL STYLES
   ============================================ */

/* Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
    background: var(--es-primary-color) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 12px 25px !important;
    font-family: var(--es-font-family) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all var(--es-transition) !important;
    cursor: pointer !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover {
    background: var(--es-secondary-color) !important;
    color: #fff !important;
}

/* Forms */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row textarea,
.woocommerce-page form .form-row select {
    padding: 12px 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-family: var(--es-font-family) !important;
    font-size: 14px !important;
    background: var(--es-card-bg) !important;
    transition: border-color var(--es-transition) !important;
}

/* Checkout fields - Имя и Телефон одинакового размера */
.woocommerce-checkout #billing_first_name_field,
.woocommerce-checkout #billing_phone_field {
    width: 50% !important;
    float: left !important;
    box-sizing: border-box !important;
}

.woocommerce-checkout #billing_first_name_field {
    padding-right: 10px !important;
}

.woocommerce-checkout #billing_phone_field {
    padding-left: 10px !important;
}

@media (max-width: 768px) {
    .woocommerce-checkout #billing_first_name_field,
    .woocommerce-checkout #billing_phone_field {
        width: 100% !important;
        float: none !important;
        padding: 0 !important;
    }
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: var(--es-secondary-color) !important;
    outline: none !important;
}

.woocommerce form .form-row label {
    font-family: var(--es-font-family) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--es-text-color) !important;
    margin-bottom: 8px !important;
}

/* Messages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
    background: var(--es-card-bg) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 15px 20px 15px 50px !important;
    font-family: var(--es-font-family) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08) !important;
}

.woocommerce-message {
    border-left: 4px solid #27ae60 !important;
}

.woocommerce-message::before {
    color: #27ae60 !important;
}

.woocommerce-info {
    border-left: 4px solid var(--es-secondary-color) !important;
}

.woocommerce-info::before {
    color: var(--es-secondary-color) !important;
}

.woocommerce-error {
    border-left: 4px solid var(--es-accent-color) !important;
}

/* Price */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--es-primary-color) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    font-family: var(--es-font-family) !important;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
    color: var(--es-light-text) !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    opacity: 0.7 !important;
}

.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins {
    color: var(--es-accent-color) !important;
    text-decoration: none !important;
}

/* Sale Badge — везде внутри карточки, текст из настроек темы */
.woocommerce span.onsale {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    margin: 0 !important;
    background: #8b9a4b !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    min-width: auto !important;
    min-height: auto !important;
    line-height: 1.2 !important;
    max-width: calc(100% - 20px) !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* ============================================
   CART PAGE
   ============================================ */
.woocommerce-cart .woocommerce {
    background: transparent !important;
}

.woocommerce table.shop_table {
    background: var(--es-card-bg) !important;
    border: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    width: 100% !important;
    table-layout: fixed !important;
}

/* Ensure all cart columns are displayed */
.woocommerce-cart-form table.shop_table .product-remove,
.woocommerce-cart-form table.shop_table .product-thumbnail,
.woocommerce-cart-form table.shop_table .product-name,
.woocommerce-cart-form table.shop_table .product-quantity,
.woocommerce-cart-form table.shop_table .product-price,
.woocommerce-cart-form table.shop_table .product-subtotal {
    display: table-cell !important;
    visibility: visible !important;
}

.woocommerce table.shop_table th {
    font-family: var(--es-font-family) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: var(--es-primary-color) !important;
    background: var(--es-light-bg) !important;
    padding: 15px 20px !important;
    border: none !important;
    vertical-align: middle !important;
}

.woocommerce table.shop_table th.product-remove {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    text-align: center;
    padding: 15px 10px !important;
}

.woocommerce table.shop_table th.product-thumbnail {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    padding: 15px 10px !important;
}

.woocommerce table.shop_table th.product-name {
    padding: 15px 15px !important;
    text-align: left;
}

.woocommerce table.shop_table th.product-quantity {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    text-align: center;
    padding: 15px 10px !important;
}

.woocommerce table.shop_table th.product-price {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    text-align: right;
    padding: 15px 15px !important;
}

.woocommerce table.shop_table th.product-subtotal {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    text-align: right;
    padding: 15px 15px !important;
}

.woocommerce table.shop_table td {
    font-family: var(--es-font-family) !important;
    font-size: 14px !important;
    padding: 20px !important;
    border: none !important;
    border-bottom: 1px solid #eee !important;
    vertical-align: middle !important;
}

/* Ensure all cart table cells are displayed */
.woocommerce-cart-form table.shop_table td.product-remove,
.woocommerce-cart-form table.shop_table td.product-thumbnail,
.woocommerce-cart-form table.shop_table td.product-name,
.woocommerce-cart-form table.shop_table td.product-quantity,
.woocommerce-cart-form table.shop_table td.product-price,
.woocommerce-cart-form table.shop_table td.product-subtotal {
    display: table-cell !important;
    visibility: visible !important;
}

.woocommerce table.shop_table td.product-name a {
    color: var(--es-text-color) !important;
    font-weight: 500 !important;
}

.woocommerce table.shop_table td.product-remove {
    width: 60px;
    text-align: center;
    padding: 20px 10px !important;
}

.woocommerce table.shop_table td.product-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    color: var(--es-accent-color) !important;
    font-size: 24px !important;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1;
}

.woocommerce table.shop_table td.product-remove a:hover {
    background: var(--es-accent-color);
    color: #fff !important;
    transform: scale(1.1);
}

.woocommerce table.shop_table td.product-thumbnail {
    width: 150px;
    padding: 20px 10px !important;
}

.woocommerce table.shop_table td.product-thumbnail img {
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.woocommerce table.shop_table td.product-name {
    padding: 20px 15px !important;
}

.woocommerce table.shop_table td.product-quantity {
    width: 120px;
    text-align: center;
    padding: 20px 10px !important;
    vertical-align: middle !important;
}

.woocommerce table.shop_table td.product-quantity .quantity {
    display: inline-block;
    margin: 0;
}

.woocommerce table.shop_table td.product-quantity .qty {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.woocommerce table.shop_table td.product-price {
    width: 120px;
    text-align: right;
    padding: 20px 15px !important;
    font-weight: 600;
    vertical-align: middle !important;
}

.woocommerce table.shop_table td.product-subtotal {
    width: 140px;
    text-align: right;
    padding: 20px 15px !important;
    font-weight: 700;
    color: var(--es-primary-color);
    vertical-align: middle !important;
}

/* Cart piece goods notice */
.es-cart-piece-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.es-cart-notice-text {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #856404;
    line-height: 1.5;
    text-align: center;
}

.es-cart-piece-options {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.es-cart-piece-options label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #856404;
    cursor: pointer;
    white-space: nowrap;
}

.es-cart-piece-options input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Cart page - center content and limit width */
.woocommerce-cart .woocommerce {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.woocommerce-cart .woocommerce-cart-form {
    max-width: 100% !important;
}

.woocommerce .cart-collaterals {
    max-width: 100% !important;
    margin-top: 30px !important;
}

.woocommerce .cart-collaterals .cart_totals {
    background: var(--es-card-bg) !important;
    border-radius: 8px !important;
    padding: 25px !important;
    max-width: 100% !important;
}

/* Hide shipping options in cart totals - remove delivery section */
.woocommerce .cart-collaterals .cart_totals .woocommerce-shipping-totals,
.woocommerce .cart-collaterals .cart_totals .shipping,
.woocommerce .cart-collaterals .cart_totals .shipping-calculator-form,
.woocommerce .cart-collaterals .cart_totals table.shop_table tbody tr.shipping,
.woocommerce .cart-collaterals .cart_totals .woocommerce-shipping-methods,
.woocommerce .cart-collaterals .cart_totals .shipping-calculator-button,
.woocommerce .cart-collaterals .cart_totals .woocommerce-shipping-destination {
    display: none !important;
}

/* Hide shipping destination notice text */
.woocommerce .cart-collaterals .cart_totals p.woocommerce-shipping-destination,
.woocommerce .cart-collaterals .cart_totals p:contains("Варианты доставки"),
.woocommerce .cart-collaterals .cart_totals p:contains("доставки будут обновлены"),
.woocommerce .cart-collaterals .cart_totals .woocommerce-shipping-destination,
.woocommerce .cart-collaterals .cart_totals table.shop_table tbody tr:has-text("обновлены"),
.woocommerce .cart-collaterals .cart_totals .shipping table tbody tr:has-text("обновлены"),
.woocommerce .cart-collaterals .cart_totals .shipping p {
    display: none !important;
}

/* Center cart totals content */
.es-cart-totals-top {
    max-width: 100% !important;
    margin: 0 auto !important;
}

.es-cart-piece-notice {
    max-width: 100% !important;
    margin: 20px auto !important;
}

.es-cart-products-title {
    margin-top: 30px !important;
    margin-bottom: 20px !important;
}

.woocommerce .cart-collaterals .cart_totals h2 {
    font-family: var(--es-font-family) !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--es-primary-color) !important;
    margin-bottom: 20px !important;
}

/* Hide checkout button in cart-collaterals (old location) */
.cart-collaterals .wc-proceed-to-checkout,
.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout {
    display: none !important;
}

/* Checkout button - GREEN style (new location after table) */
.es-checkout-button-wrapper .checkout-button,
.woocommerce-cart .es-checkout-button-wrapper a.checkout-button,
.woocommerce .es-checkout-button-wrapper a.checkout-button,
a.checkout-button.button.alt.wc-forward.es-checkout-btn {
    display: block !important;
    width: 100% !important;
    background-color: #27ae60 !important;
    color: #ffffff !important;
    border: none !important;
    font-family: var(--es-font-family) !important;
    font-weight: 700 !important;
    padding: 18px 40px !important;
    font-size: 16px !important;
    letter-spacing: 1px !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    margin-top: 15px !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    text-transform: uppercase !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce .wc-proceed-to-checkout a.checkout-button:hover,
.es-checkout-button-wrapper .checkout-button:hover {
    background-color: #219a52 !important;
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */
.woocommerce-checkout .woocommerce {
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.woocommerce-checkout #customer_details,
.woocommerce-checkout .col2-set {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
}

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3,
#order_review_heading {
    font-family: var(--es-font-family) !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--es-primary-color) !important;
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #eee !important;
}

/* Order Review */
.woocommerce-checkout #order_review,
.woocommerce-checkout .woocommerce-checkout-review-order {
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce table.woocommerce-checkout-review-order-table {
    background: var(--es-card-bg) !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
}

.woocommerce table.woocommerce-checkout-review-order-table thead {
    background: #f5f5f5 !important;
}

.woocommerce table.woocommerce-checkout-review-order-table thead th {
    padding: 12px 15px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    color: var(--es-primary-color) !important;
    border-bottom: 1px solid #e0e0e0 !important;
    text-align: left !important;
}

.woocommerce table.woocommerce-checkout-review-order-table tbody td {
    padding: 12px 15px !important;
    border-bottom: 1px solid #eee !important;
    font-size: 14px !important;
}

.woocommerce table.woocommerce-checkout-review-order-table tfoot .order-total th,
.woocommerce table.woocommerce-checkout-review-order-table tfoot .order-total td {
    background: #f0f0f0 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    color: var(--es-primary-color) !important;
}

/* Place Order button - без цветового обрамления */
.woocommerce #place_order,
.woocommerce-checkout #place_order,
#place_order {
    display: block !important;
    width: 100% !important;
    background-color: #27ae60 !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: var(--es-font-family) !important;
    font-weight: 700 !important;
    padding: 18px 40px !important;
    font-size: 16px !important;
    letter-spacing: 1px !important;
    text-align: center !important;
    border-radius: 8px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.woocommerce #place_order:hover,
.woocommerce-checkout #place_order:hover,
#place_order:hover {
    background-color: #219a52 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.woocommerce #place_order:focus,
.woocommerce-checkout #place_order:focus,
#place_order:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Hide shipping section */
.woocommerce-shipping-fields {
    display: none !important;
}

/* Hide payment methods */
.woocommerce-checkout #payment ul.payment_methods {
    display: none !important;
}

.woocommerce-checkout #payment div.payment_box {
    display: none !important;
}

/* ============================================
   FOOTER
   ============================================ */
.es-footer {
    background: var(--es-primary-color);
    color: #fff;
    padding: 40px 0 20px;
}

.es-footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
    align-items: start;
    /* Единый межстрочный интервал для всех колонок подвала */
    line-height: 1.6;
}

.es-footer-column {
    line-height: 1.6;
}

.es-footer-column p,
.es-footer-column li {
    line-height: 1.6;
}

.es-footer-column h3 {
  font-family: var(--es-font-family);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.35;
}

/* Footer Addresses */
.es-footer-addresses {
    text-align: left;
}

.es-footer-stores-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.es-footer-stores-list li {
    margin-bottom: 10px;
}

.es-footer-stores-list li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color var(--es-transition);
    font-size: 14px;
    line-height: 1.6;
}

.es-footer-stores-list li a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Footer Logo */
.es-footer-logo {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.es-footer-logo-img {
    max-width: 150px;
    margin-bottom: 15px;
}

.es-footer-logo-img img {
    max-width: 100%;
    height: auto;
}

.es-footer-site-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.es-footer-site-name a {
    color: #fff;
    text-decoration: none;
}

.es-footer-slogan {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin: 0;
    line-height: 1.6;
}

/* Footer Contacts — одинаковый шаг между всеми строками (как между строками реквизитов) */
.es-footer-contacts {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5em;
}

.es-footer-contacts > h3 {
    margin-bottom: 0;
}

.es-footer-contacts > p,
.es-footer-contacts > .es-footer-social,
.es-footer-contacts > .es-footer-legal {
    margin-top: 0;
    margin-bottom: 0;
}

.es-footer-phone {
    margin-bottom: 0;
}

.es-footer-phone a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: opacity var(--es-transition);
    line-height: 1.6;
}

.es-footer-phone a:hover {
    opacity: 0.8;
}

.es-footer-social {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.es-footer-social .es-social-icons {
    justify-content: flex-end;
}

.es-footer-social .es-social-icon {
    background: rgba(255,255,255,0.1);
}

.es-footer-social .es-social-icon:hover {
    background: rgba(255,255,255,0.2);
}

.es-footer-social .es-social-icon svg {
    fill: #fff;
}

/* Реквизиты ИП под соцсетями — шаг между двумя строками = тот же gap, что и у колонки */
.es-footer-legal {
    margin-top: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5em;
}

.es-footer-legal p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.es-footer-info {
    max-width: 720px;
    margin: 0 auto 24px;
    padding: 0 15px;
    text-align: center;
    font-size: 12px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.75);
}

.es-footer-info p {
    margin: 0 0 0.65em;
}

.es-footer-info p:last-child {
    margin-bottom: 0;
}

.es-footer-info a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.es-footer-info a:hover {
    color: #fff;
}

/* Footer Bottom */
.es-footer-bottom {
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.es-footer-studio-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.es-footer-studio-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .es-footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .es-footer-addresses,
    .es-footer-contacts {
        text-align: center;
    }
    
    .es-footer-contacts {
        align-items: center;
    }
    
    .es-footer-legal {
        align-items: center;
        text-align: center;
    }
    
    .es-footer-logo {
        order: -1;
    }
    
    .es-footer-social {
        justify-content: center;
    }
    
    .es-footer-social .es-social-icons {
        justify-content: center;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablets */
@media (max-width: 992px) {
    .es-logo-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .es-logo-title-wrapper {
        order: -1;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .es-header-banner {
        width: 120px;
        height: 120px;
    }
    
    .es-header-banner img,
    .es-banner-img {
        width: 120px;
        height: 120px;
    }
    
    .es-main-nav .es-container {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Mobile menu styles moved to mobile-marketplace.css */
    /* Desktop menu styles remain unchanged */
    
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .es-top-bar .es-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
    }
    
    .es-logo-bar {
        padding: 15px 0;
    }
    
    .es-header-banner {
        width: 80px;
        height: 80px;
    }
    
    .es-header-banner img,
    .es-banner-img {
        width: 80px;
        height: 80px;
    }
    
    .es-logo img,
    .es-logo .custom-logo-link img {
        width: 120px;
        height: 120px;
    }
    
    .es-site-title {
        font-size: 18px;
        letter-spacing: 1px;
    }
    
    .es-main-nav {
        padding: 10px 0;
    }
    
    /* Mobile menu styles moved to mobile-marketplace.css */
    /* .es-primary-menu styles are now in mobile-marketplace.css with white color and bold font */
    
    .es-cart-link {
        width: 44px;
        height: 44px;
        margin-left: 10px;
    }
    
    .es-cart-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .woocommerce ul.products,
    .woocommerce ul.products.columns-3,
    .woocommerce ul.products.columns-4,
    .woocommerce ul.products.columns-5,
    .woocommerce ul.products.columns-6 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .woocommerce ul.products li.product a img {
        height: 180px;
    }
    
    .es-product-info {
        padding: 15px;
    }
    
    .es-product-title {
        font-size: 14px;
    }
    
    .es-product-price {
        font-size: 16px;
    }
    
    .es-add-to-cart {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .es-category-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .es-footer {
        padding: 30px 0 15px;
    }
    
    .es-product-modal-body {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .es-product-modal-title {
        font-size: 18px;
    }
    
    .es-product-modal-price {
        font-size: 22px;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .es-header-banner {
        display: none;
    }
    
    .es-logo img,
    .es-logo .custom-logo-link img {
        width: 150px;
        height: 150px;
    }
    
    /* Mobile menu styles moved to mobile-marketplace.css */
    /* Desktop menu styles remain unchanged */
    
    .es-content {
        padding: 20px 0;
    }
    
    .es-page-title {
        font-size: 24px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.es-text-center { text-align: center; }
.es-text-left { text-align: left; }
.es-text-right { text-align: right; }
.es-hidden { display: none !important; }
.es-visible { display: block !important; }

/* Loading Animation */
.es-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.es-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #ddd;
    border-top-color: var(--es-secondary-color);
    border-radius: 50%;
    animation: es-spin 0.8s linear infinite;
}

@keyframes es-spin {
    to { transform: rotate(360deg); }
}

/* No Products Message */
.es-no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--es-light-text);
    font-size: 18px;
}

/* ============================================
   SINGLE PRODUCT PAGE - CUSTOM FORM
   ============================================ */
.es-single-product-form {
    margin: 20px 0;
}

.es-single-product-form form.cart {
    margin-bottom: 8px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.es-single-product-form form.cart .quantity {
    display: none;
}

.es-single-product-form form.cart .single_add_to_cart_button {
    width: 100%;
}

.es-price-wrapper {
    margin-bottom: 20px;
}

.es-quantity-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.es-quantity-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--es-text-color);
    letter-spacing: 0.5px;
}

.es-quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    width: fit-content;
}

.es-qty-btn {
    background: transparent;
    border: none;
    color: #000;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 5px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    flex-shrink: 0;
    user-select: none;
    box-sizing: border-box;
}

.es-qty-btn:hover {
    background: #f5f5f5;
}

.es-qty-btn:active {
    background: #e8e8e8;
}

.es-quantity-control .qty {
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    padding: 10px;
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    font-size: 16px;
    font-weight: 500;
    -moz-appearance: textfield;
    flex-shrink: 0;
}

.es-quantity-control .qty::-webkit-outer-spin-button,
.es-quantity-control .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.es-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.es-price-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--es-text-color);
    letter-spacing: 0.5px;
}

.es-current-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--es-primary-color);
    white-space: nowrap;
    display: flex;
    align-items: center;
    line-height: 1;
}

.es-current-price del {
    font-size: 18px;
    color: var(--es-light-text);
    font-weight: 400;
    margin-right: 10px;
}

.es-current-price ins {
    text-decoration: none;
    color: var(--es-accent-color);
}

.es-add-to-cart-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1;
    margin-bottom: 0;
    background: var(--es-primary-color);
    color: #fff;
}

.es-add-to-cart-btn:hover {
    background: var(--es-secondary-color);
    color: #fff;
}

.ocl-quick-buy-btn-single {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #ab1e40;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1;
    margin: 0;
    background: transparent;
    color: #ab1e40;
}

.ocl-quick-buy-btn-single:hover {
    background: #ab1e40;
    color: #fff;
}

/* Hide default quantity input in form */
.es-single-product-form form.cart .quantity {
    display: none !important;
}

/* Notification */
.es-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    padding: 16px 24px;
    background: #27ae60;
    color: #fff;
    font-family: var(--es-font-family);
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.es-notification.visible {
    transform: translateX(0);
}

.es-notification-success {
    background: #27ae60;
}

/* ============================================
   LOAD MORE BUTTON
   ============================================ */
.es-load-more-wrapper {
    text-align: center;
    margin: 40px 0;
    padding: 20px 0;
}

.es-load-more-button {
    display: inline-block;
    padding: 14px 40px;
    background-color: var(--es-primary-color);
    color: #ffffff;
    font-family: var(--es-font-family);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    border: 2px solid var(--es-primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--es-transition);
    text-decoration: none;
    min-width: 200px;
}

.es-load-more-button:hover {
    background-color: var(--es-secondary-color);
    border-color: var(--es-secondary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.es-load-more-button:active {
    transform: translateY(0);
}

.es-load-more-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.es-load-more-button.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .es-load-more-wrapper {
        margin: 30px 0;
        padding: 15px 0;
    }
    
    .es-load-more-button {
        padding: 12px 30px;
        font-size: 14px;
        min-width: 180px;
    }
}

.es-notification-error {
    background: #ab1e40;
}

.es-notification-info {
    background: #3498db;
}
