/* === 4 колонки на десктопе, 2 на мобильных === */
.products {
    display: grid !important;
    gap: 20px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Мобильные: 2 колонки */
.products {
    grid-template-columns: repeat(2, 1fr) !important;
}

/* Планшеты (768-1199px): 3 колонки */
@media (min-width: 768px) and (max-width: 1199px) {
    .products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Десктоп (1200px+): 4 колонки */
@media (min-width: 1200px) {
    .products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* === Карточки товаров === */
li.product {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    padding: 12px !important;
    transition: box-shadow 0.3s ease !important;
    background: #fff !important;
}

li.product:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14) !important;
}

/* === Подвешенная корзина === */
.floating-cart {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    will-change: transform;
}

.floating-cart:hover {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.22);
}

.floating-cart svg {
    width: 28px;
    height: 28px;
    fill: #5a4a3a;
}

.floating-cart .fc-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #c87f3a;
    color: #fff;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    font-family: -apple-system, sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.floating-cart .fc-badge.fc-hidden { display: none; }
.floating-cart .fc-badge.fc-bump { transform: scale(1.5); }

/* === Карусель фото в карточке === */
.woocommerce-loop-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
}

.woocommerce-loop-image-link .carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.woocommerce-loop-image-link .carousel-img.active {
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
}

/* === Кнопка «В корзину» === */
.add_to_cart_button {
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
}

/* === Колечки-индикаторы фото === */
.product-image-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    cursor: pointer;
}

.product-image-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    border: 1px solid #bbb;
    pointer-events: auto;
}

.product-image-dot:hover {
    background: #bbb;
    border-color: #bbb;
    transform: scale(1.2);
}

.product-image-dot.active {
    background: #c87f3a;
    border-color: #c87f3a;
    transform: scale(1.2);
}

.product-image-dot:hover.active {
    transform: scale(1.3);
}

/* === Плавный скролл === */
html {
    scroll-behavior: smooth;
}
