/*
Theme Name:   Woodmart Child
Description:  Woodmart Child Theme
Author:       XTemos
Author URI:   http://xtemos.com
Template:     woodmart
Version:      1.0.0
Text Domain:  woodmart
*/

.cart-widget-side .wd-heading {
    justify-content: flex-start;
}

.cart-widget-side .gk-cart-widget-heading {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    margin-inline-start: 0;
    margin-inline-end: auto;
}

.cart-widget-side .close-side-widget {
    flex: 0 0 auto;
}

.cart-widget-side .gk-empty-cart-link {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
    text-transform: none;
    opacity: 0.75;
}

.cart-widget-side .gk-empty-cart-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.cart-widget-side .gk-empty-cart-link.is-loading {
    pointer-events: none;
    opacity: 0.45;
}

/* Стили для описания бренда на странице брендов */
.brand-description-wrapper {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #333;
}

.brand-description {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.brand-description h1,
.brand-description h2,
.brand-description h3,
.brand-description h4,
.brand-description h5,
.brand-description h6 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #222;
}

.brand-description p {
    margin-bottom: 15px;
}

.brand-description ul,
.brand-description ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.brand-description img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.brand-description a {
    color: #007cba;
    text-decoration: none;
}

.brand-description a:hover {
    text-decoration: underline;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .brand-description-wrapper {
        margin: 20px 0;
        padding: 15px;
    }
    
    .brand-description {
        font-size: 14px;
    }
}


/* Контейнер для иконок платежей */
.gk-pay-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Базовый класс для иконки */
.gk-pay-icon {
    display: inline-block;
    width: 38px;
    height: 24px;
    background-image: url('/wp-content/uploads/2025/08/pay_icons.svg');
    background-repeat: no-repeat;
    background-size: auto; /* временно - чтобы увидеть весь спрайт */
    /* border: 1px solid red;  для отладки */
}
.gk-pay-icon.gk-pay-icon--tbank {
    width: 60px;
}

/* Позиции для каждой иконки в спрайте */
.gk-pay-icon--cash { background-position: 0 0; }
.gk-pay-icon--mastercard { background-position: -42px 0; }
.gk-pay-icon--visa { background-position: -89px 0; }
.gk-pay-icon--sberbank { background-position: -260px 0; }
.gk-pay-icon--alfabank { background-position: -296px 0; }
.gk-pay-icon--mir { background-position: -339px 0; }
.gk-pay-icon--yookassa { background-position: -388px 0; }
.gk-pay-icon--money { background-position: -433px 0; }
.gk-pay-icon--tbank { background-position: -484px 0; }


/* Исправление для слайдеров Elementor между 1024px и 768px */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Исправляем стили слайдеров для промежуточного диапазона */
    .elementor-widget-wd_slider .wd-slide,
    .elementor-widget-wd_slider .swiper-slide,
    .wd-slider .wd-slide,
    .swiper-slide {
        min-height: 600px !important;
    }
    
    /* Исправляем размеры стрелок */
    .elementor-widget-wd_slider .wd-slider-arrows,
    .wd-slider .wd-slider-arrows {
        --wd-arrow-size: 50px;
        --wd-arrow-offset-h: 15px;
    }
    
    /* Исправляем отступы контента */
    .elementor-widget-wd_slider .wd-slide-inner,
    .wd-slider .wd-slide-inner {
        padding: 40px 20px;
    }
    
    /* Исправляем размеры текста */
    .elementor-widget-wd_slider .wd-slide-title,
    .wd-slider .wd-slide-title {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    .elementor-widget-wd_slider .wd-slide-subtitle,
    .wd-slider .wd-slide-subtitle {
        font-size: 1.2rem !important;
    }
    
    /* Исправляем контейнер слайдера */
    .elementor-widget-wd_slider .wd-slider-container,
    .wd-slider .wd-slider-container {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Исправляем позиционирование контента */
    .elementor-widget-wd_slider .wd-slide-content,
    .wd-slider .wd-slide-content {
        max-width: 90%;
        margin: 0 auto;
    }
    
    /* Специфичные исправления для ваших слайдеров */
    #slider-70 .wd-slide,
    #slider-71 .wd-slide,
    #slider-227 .wd-slide {
        min-height: 600px !important;
    }
    
    #slider-70 .wd-slide-inner,
    #slider-71 .wd-slide-inner,
    #slider-227 .wd-slide-inner {
        max-width: 90%;
        margin: 0 auto;
        padding: 40px 20px;
    }
    
    /* Исправляем стрелки для ваших слайдеров */
    #slider-70 .wd-slider-arrows,
    #slider-71 .wd-slider-arrows,
    #slider-227 .wd-slider-arrows {
        --wd-arrow-size: 50px;
        --wd-arrow-offset-h: 15px;
    }
    
    /* Исправления для Elementor слайдеров */
    .elementor-widget-image-carousel .swiper-slide,
    .elementor-widget-testimonial-carousel .swiper-slide,
    .elementor-widget-media-carousel .swiper-slide {
        min-height: 400px !important;
    }
    
    .elementor-widget-image-carousel .elementor-swiper-button,
    .elementor-widget-testimonial-carousel .elementor-swiper-button,
    .elementor-widget-media-carousel .elementor-swiper-button {
        font-size: 20px;
        width: 40px;
        height: 40px;
    }
    
    .elementor-widget-image-carousel .elementor-swiper-button-prev,
    .elementor-widget-testimonial-carousel .elementor-swiper-button-prev,
    .elementor-widget-media-carousel .elementor-swiper-button-prev {
        left: 10px;
    }
    
    .elementor-widget-image-carousel .elementor-swiper-button-next,
    .elementor-widget-testimonial-carousel .elementor-swiper-button-next,
    .elementor-widget-media-carousel .elementor-swiper-button-next {
        right: 10px;
    }
}

/* SSR-вариация: short description уже содержит описание вариации (см. gk-variation-ssr.php),
   поэтому отдельный блок .woocommerce-variation-description внутри формы становится дублем.
   Скрываем его на single-product, когда у тела есть наш класс. */
body.gk-has-variation-color .woocommerce-variation-description {
    display: none !important;
}

/* Cart table: keep price on one line and size column to content */
.woocommerce-cart-form__contents :is(th.product-price, td.product-price),
.woocommerce-cart-form__contents :is(th.product-subtotal, td.product-subtotal) {
    white-space: nowrap;
    width: 1%;
}

/* Checkout: keep line totals on one line (Woodmart checkout layout). */
.woocommerce-checkout-review-order-table .wd-checkout-prod-total {
    white-space: nowrap;
    flex: 0 0 auto;
}

/* Hide empty categories widget block ("Рубрик нет"). */
.elementor-widget-wp-widget-categories .cat-item-none,
.elementor-widget-wp-widget-woocommerce_product_categories .cat-item-none,
.widget_product_categories .cat-item-none {
    display: none !important;
}

.elementor-widget-wp-widget-categories:has(.cat-item-none),
.elementor-widget-wp-widget-woocommerce_product_categories:has(.cat-item-none),
.widget_product_categories:has(.cat-item-none),
.wd-product-category-filter:has(.cat-item-none) {
    display: none !important;
}

/* Header categories dropdown: hide empty state block entirely. */
.wd-nav-product-cat .cat-item-none {
    display: none !important;
}

/* Collapse empty Woodmart categories widgets completely (including parent widget div). */
.elementor-widget-wd_product_categories:has(> .elementor-widget-container > .wd-nav-product-cat > li.cat-item-none:only-child) {
    display: none !important;
}

/* Cart totals: make the right column ~20% narrower on desktop */
@media (min-width: 1025px) {
    .woocommerce-cart .cart-content-wrapper > .cart_totals {
        flex: 0.56 0 0;
    }
}

/* Cart/Checkout: hide "Shipping to <strong>address</strong>" destination line (WooCommerce template output). */
.woocommerce-cart .woocommerce-shipping-destination,
.woocommerce-checkout .woocommerce-shipping-destination {
    display: none;
}

/* Cart: hide WooCommerce shipping calculator ("Изменить адрес") entirely. */
.woocommerce-cart .woocommerce-shipping-calculator,
.woocommerce-cart .shipping-calculator-button {
    display: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .gk-pay-icons {
        gap: 0;
    }
    .gk-pay-icon.gk-pay-icon--tbank {
        width: 56px;
    }
    
    
}

/* Дополнительные стили для селектора городов */
.city-selector-nav .city-dropdown {
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.city-selector-nav .city-dropdown.show {
  display: block;
  opacity: 1;
  visibility: visible;
}

.city-selector-nav .city-item.current-city .woodmart-nav-link {
  color: var(--wd-primary-color, #0073aa) !important;
  font-weight: 600;
}

.city-selector-nav .city-count {
  font-size: 0.85em;
  opacity: 0.7;
  margin-left: 4px;
}

.city-selector-nav .city-loading-item,
.city-selector-nav .city-error-item {
  padding: 10px 15px;
  text-align: center;
  color: #666;
}

.city-selector-nav .city-error-item {
  color: #d32f2f;
}

.wd-dropdown.city-dropdown {
    position: absolute;
    z-index: 9999;
    pointer-events: auto;
}

/* Hover эффекты для городов */
.city-selector-nav .city-item:hover .woodmart-nav-link {
  color: var(--wd-primary-color, #0073aa) !important;
}

/* Анимация загрузки */
.city-selector-nav .city-loading-text {
  display: inline-block;
  animation: city-loading 1.5s infinite;
}

@keyframes city-loading {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

label.required_field > span.required:has(+ abbr.required) {
    display: none !important;
  }

.woocommerce-MyAccount-navigation ul li.is-active>a, .woocommerce-MyAccount-navigation ul li a:hover {
    border-radius: 5px !important;
}

@media (max-width: 768px) {
    .woocommerce-MyAccount-navigation ul li.is-active a {
        background: #0066CC !important;
        border-radius: 0 !important;
    }
}

/* Woodmart social buttons: MAX support (text icon fallback) */
.social-max {
    --wd-social-brand-color: #000;
    --wd-social-icon: "MAX";
    --wd-max-mask: url("/wp-content/themes/woodmart-child/images/max-logo-black.svg");
}

.social-max .wd-icon:before {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 800;
    font-size: 0.55em;
    letter-spacing: -0.06em;
}

@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
    .social-max {
        --wd-social-icon: "";
    }

    .social-max .wd-icon:before {
        content: "";
        display: block;
        width: 1em;
        height: 1em;
        background-color: currentColor;
        -webkit-mask-image: var(--wd-max-mask);
        mask-image: var(--wd-max-mask);
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
        -webkit-mask-size: contain;
        mask-size: contain;
        font: inherit;
        letter-spacing: normal;
    }
}