/**
 * Стили блока рекомендаций — Swiper + макет Figma
 * Шрифт: Open Sans
 */

 .form_section_single_step_1_elementor_2 {
    display:none !important;
  }
  
.swiper-slide {
    transition: unset !important;
}

  .wfacp-next-btn-wrap {
    display:none !important;
  }

  .wfacp_form_steps {
    display:none !important;
  }
.added_to_cart.wc-forward {
    display:none !important;
}
  .fakeButton {
    font-size: 25px;
    font-weight: 700;
    font-family: inherit;
    background-color: #6EC1E4;
    width: 100%;
    padding: 15px 25px 15px 25px;
    margin: 0px 0px 0px 0px;
    border-radius: 0px 0px 0px 0px;
    color: #fff;
    text-align: center;
    letter-spacing: 0;
    cursor: pointer;
    text-decoration: none;
    border-color: transparent;
    transition: all .3s ease 0s;
    outline: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top:40px;
    margin-bottom:40px;
  }

  .fakeButton:hover {
    background-color: #017DC7;
  }

/* ====== Контейнер ====== */
.ccr-recommendations {
    position: relative;
    /* Включаем touch для мобильных устройств */
    touch-action: pan-y;
    width: 100%;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
}

/* Скрываем skeleton после инициализации */
.ccr-recommendations.swiper-initialized .ccr-skeleton {
    display: none;
}

/* Скрываем контент до инициализации (но оставляем место для Swiper) */
.ccr-recommendations:not(.swiper-initialized) .ccr-recommendations-title,
.ccr-recommendations:not(.swiper-initialized) .ccr-swiper-container {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Показываем контент после инициализации */
.ccr-recommendations.swiper-initialized .ccr-recommendations-title,
.ccr-recommendations.swiper-initialized .ccr-swiper-container {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* ====== Skeleton загрузки ====== */
.ccr-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-family: 'Open Sans', sans-serif;
    background: #fff;
    z-index: 1;
}

.ccr-skeleton-title {
    width: 200px;
    height: 25px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 30px;
}

.ccr-skeleton-container {
    display: flex;
    gap: 16px;
    overflow: hidden;
}

.ccr-skeleton-slide {
    flex: 0 0 calc(50% - 8px);
    max-width: 195px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ccr-skeleton-image {
    width: 100%;
    aspect-ratio: 195 / 176;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 20px;
    border: 0.5px solid #e0e0e0;
}

.ccr-skeleton-name {
    width: 100%;
    height: 53px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite 0.1s;
    border-radius: 4px;
    margin-top: 12px;
}

.ccr-skeleton-price {
    width: 80px;
    height: 16px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite 0.2s;
    border-radius: 4px;
    margin-top: 18px;
}

.ccr-skeleton-button {
    width: 150px;
    height: 42px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite 0.3s;
    border-radius: 10px;
    margin-top: 15px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Адаптив для skeleton */
@media (min-width: 769px) {
    .ccr-skeleton-container {
        gap: 32px;
    }
    
    .ccr-skeleton-slide {
        flex: 0 0 calc(25% - 24px);
    }
}

@media (min-width: 1200px) {
    .ccr-skeleton-slide {
        flex: 0 0 calc(20% - 26px);
    }
}

@media (max-width: 768px) {
    .ccr-skeleton-title {
        width: 150px;
        height: 15px;
        margin-bottom: 12px;
    }
    
    .ccr-skeleton-container {
        gap: 16px;
        padding: 0 24px;
    }
    
    .ccr-skeleton-slide {
        flex: 0 0 calc(50% - 8px);
        max-width: 138px;
    }
    
    .ccr-skeleton-image {
        aspect-ratio: 138 / 124;
        border-radius: 18px;
        border-width: 0.45px;
    }
    
    .ccr-skeleton-name {
        height: 40px;
        margin-top: 8px;
    }
    
    .ccr-skeleton-price {
        width: 60px;
        height: 14px;
        margin-top: 6px;
    }
    
    .ccr-skeleton-button {
        width: 120px;
        height: 32px;
        margin-top: 8px;
    }
}

/* ====== Заголовок ====== */
.ccr-recommendations-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    text-align: Left;
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1.5;
    color: #414141;
    margin: 0 0 30px 0;
    padding: 0;
}

/* ====== Обёртка Swiper + стрелки ====== */
.ccr-swiper-container {
    position: relative;
}

/* Swiper: pan-y = браузер скроллит вертикально, Swiper ловит горизонтальный свайп */
.ccr-swiper {
    touch-action: pan-y;
    overflow: hidden;
}

.ccr-swiper .swiper-wrapper {
    touch-action: pan-y;
}

/* Блокируем перелистывание за пределы на мобильных */
@media (max-width: 768px) {
    .ccr-swiper {
        overflow: hidden !important;
    }
    

    .ccr-swiper-container {
        overflow: hidden !important;
    }
}


/* ====== Стрелки навигации ====== */
.ccr-slider-arrow {
    position: absolute;
    top: 30%;
    transform: translateY(-50%);
    z-index: 10;
    width: 26px;
    height: 26px;
    display: none; /* Скрываем по умолчанию, пока Swiper не инициализируется */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    background-color: #009BDE !important;
}

/* Показываем стрелки после инициализации Swiper */
.ccr-swiper-container:has(.ccr-swiper.swiper-initialized) .ccr-slider-arrow {
    display: flex;
}

.ccr-slider-arrow:hover {
    opacity: 1;
    background: transparent;
}

.ccr-slider-arrow--prev {
    left: 3px;
}

.ccr-slider-arrow--next {
    right: 3px;
}

.ccr-slider-arrow svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ccr-slider-arrow.swiper-button-disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

/* Скрываем стрелки, когда все слайды помещаются */
.ccr-slider-arrow.swiper-button-lock {
    display: none !important;
}

/* ====== Карточка товара (swiper-slide) ====== */
.ccr-product-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
    height: auto;
    width: 100%;
    max-width: 195px;
}

.wfacp_anim_active .amount:after {
    background: transparent !important;
}

/* ====== Изображение ====== */
.ccr-product-card .ccr-product-image {
    width: 100%;
    aspect-ratio: 195 / 176;
    border-radius: 20px;
    border: 0.5px solid #8f8f8f;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px;
    box-sizing: border-box;
}

.ccr-product-card .ccr-product-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ccr-product-card .ccr-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
}

/* ====== Название ====== */
.ccr-product-card .ccr-product-name {
    margin-top: 12px;
    width: 100%;
    min-height: 53px; /* ~3 строки: 16px * 1.1 * 3 */
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.1;
    color: #414141;
}

.ccr-product-card .ccr-product-name a {
    color: #414141;
    text-decoration: none;
}

.ccr-product-card .ccr-product-name a:hover {
    text-decoration: underline;
}

/* ====== Цена ====== */
.ccr-product-card .ccr-product-price {
    margin-top: 18px;
    width: 100%;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.1;
    color: #414141;
}

/* WooCommerce price overrides */
.ccr-product-card .ccr-product-price .woocommerce-Price-amount {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #414141;
}

.ccr-product-card .ccr-product-price del {
    font-weight: 400;
    font-size: 10px;
    color: #bfbfbf;
    text-decoration: line-through;
    display: block;
    margin-bottom: 2px;
}

.ccr-product-card .ccr-product-price del .woocommerce-Price-amount {
    font-weight: 400;
    font-size: 10px;
    color: #bfbfbf;
}

.ccr-product-card .ccr-product-price ins {
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    color: #414141;
}

.ccr-product-card .ccr-product-price ins .woocommerce-Price-amount {
    font-weight: 600;
    font-size: 16px;
    color: #414141;
}

/* ====== Кнопка «Добавить» ====== */
.ccr-product-card .ccr-add-to-cart,
.ccr-product-card .ccr-view-product {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 42px;
    margin-top: 15px;
    background: #d9d9d9;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.1;
    color: #414141;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease;
    -webkit-appearance: none;
    outline: none;
    padding: 0;
}

.ccr-product-card .ccr-add-to-cart:hover,
.ccr-product-card .ccr-view-product:hover {
    background: #cecece;
}

.ccr-product-card .ccr-add-to-cart.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Убран зеленый стиль для added - кнопка остается обычной */

/* ====== Адаптив — мобильная (по макету Figma) ====== */
@media (max-width: 768px) {
    /* Заголовок: 15px SemiBold */
    .ccr-recommendations-title {
        font-size: 18px;
        margin-bottom: 12px;
        font-weight: 600;
    text-align: Left;
    }

    /* Уменьшаем паддинги под маленькие стрелки */
    .ccr-swiper-container {
        padding: 0 24px;
    }

    /* Стрелки: 15x15px */
    .ccr-slider-arrow {
        width: 15px;
        height: 30%;
    }

    .ccr-slider-arrow svg {
        width: 15px;
        height: 15px;
        stroke-width: 2.5;
    }

    /* Карточка: заполняет слайд целиком (Swiper рассчитает ~138px) */
    .ccr-product-card {
        width: 100%;
    }

    /* Изображение: border-radius 18px */
    .ccr-product-card .ccr-product-image {
        border-radius: 18px;
        border-width: 0.45px;
        aspect-ratio: 138 / 124;
    }

    .ccr-product-card .ccr-product-image img {
        border-radius: 18px;
    }

    /* Название: 12px */
    .ccr-product-card .ccr-product-name {
        font-size: 14px;
        margin-top: 8px;
        min-height: 40px; /* ~3 строки: 12px * 1.1 * 3 */
    }

    /* Цена: 14px SemiBold */
    .ccr-product-card .ccr-product-price {
        font-size: 14px;
        margin-top: 6px;
    }

    .ccr-product-card .ccr-product-price .woocommerce-Price-amount {
        font-size: 14px;
    }

    .ccr-product-card .ccr-product-price del {
        font-size: 9px;
    }

    .ccr-product-card .ccr-product-price del .woocommerce-Price-amount {
        font-size: 9px;
    }

    .ccr-product-card .ccr-product-price ins,
    .ccr-product-card .ccr-product-price ins .woocommerce-Price-amount {
        font-size: 14px;
    }

    /* Кнопка: 120x32px, текст 12px */
    .ccr-product-card .ccr-add-to-cart,
    .ccr-product-card .ccr-view-product {
        width: 120px;
        height: 32px;
        font-size: 14px;
        margin-top: 8px;
    }
    .elementor-3904 .elementor-element.elementor-element-7d3bf1c {
        margin-top:15px !important;
    }
}
