/**
 * Стили для кастомного блока woocommerce_before_single_product_summary
 * Подключить в style.css темы или через wp_enqueue_style()
 *
 * @package YourTheme
 */

/* ── Обёртка ── */
.custom-product-before-summary {
    position: relative;
}

/* ══════════════════════════════════════
   1. Бейджи
══════════════════════════════════════ */
.custom-product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge--sale {
    background: #e63946;
    color: #fff;
}

.badge--featured {
    background: #f4a261;
    color: #fff;
}

.badge--new {
    background: #2a9d8f;
    color: #fff;
}

/* ══════════════════════════════════════
   2. Галерея — основное фото
══════════════════════════════════════ */
.custom-product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius:45px;
    overflow: hidden;
}

.custom-product-gallery__main {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f8f8;
    aspect-ratio: 1 / 1; /* квадрат; замените под свой формат */
}

.custom-product-gallery__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.custom-product-gallery__main:hover .custom-product-gallery__main-img {
    transform: scale(1.03);
}

/* Кнопка зума */
.custom-product-gallery__zoom {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.2s, transform 0.2s;
}

.custom-product-gallery__zoom:hover {
    background: #fff;
    transform: scale(1.1);
}

.custom-product-gallery__zoom:focus-visible {
    outline: 3px solid #2a9d8f;
    outline-offset: 2px;
}

/* ══════════════════════════════════════
   3. Миниатюры
══════════════════════════════════════ */
.custom-product-gallery__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.custom-product-gallery__thumb {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #f8f8f8;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.custom-product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.custom-product-gallery__thumb.is-active,
.custom-product-gallery__thumb:hover {
    border-color: #2a9d8f;
}

.custom-product-gallery__thumb:focus-visible {
    outline: 3px solid #2a9d8f;
    outline-offset: 2px;
}

/* ══════════════════════════════════════
   Адаптив
══════════════════════════════════════ */
@media (max-width: 600px) {
    .custom-product-gallery__thumb {
        width: 56px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .custom-product-gallery__main-img,
    .custom-product-gallery__zoom {
        transition: none;
    }
}
