.lpv-variants-wrapper {
    margin-bottom: 25px;
    --lpv-accent: var(--theme-palette-color-1, #333);
    --lpv-text: var(--theme-palette-color-8, #333);
    --lpv-border: var(--theme-palette-color-5, #ddd);
}

.lpv-attribute-group {
    margin-bottom: 20px;
}

.lpv-group-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--lpv-text);
    font-family: var(--theme-font-family-1, inherit);
}

.lpv-current-color-name {
    font-weight: 400;
    color: #666;
}

.lpv-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

/* ==========================================
   Второй атрибут — текстовые кнопки
   ========================================== */

.lpv-btn-second {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 10px 18px;
    border: 2px solid #fff;
    border-radius: 6px;
    background: #fff;
    color: var(--lpv-text);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--theme-font-family-1, inherit);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.3;
    position: relative;
}

.lpv-btn-second:hover {
    border-color: var(--lpv-accent);
    color: var(--lpv-accent);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lpv-btn-second.lpv-active {
    border-color: var(--lpv-accent);
    background: var(--lpv-accent);
    color: #fff;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lpv-btn-second.lpv-unavailable {
    opacity: 0.35;
    pointer-events: none;
    text-decoration: line-through;
}

/* ==========================================
   Цвет — миниатюры товаров
   ========================================== */

.lpv-color-buttons {
    gap: 10px;
}

.lpv-btn-color {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    padding: 8px;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.lpv-btn-color:hover {
    border-color: var(--lpv-accent);
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.lpv-btn-color.lpv-active {
    border-color: var(--lpv-accent);
    background: #f9f9f9;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    pointer-events: none;
}

.lpv-btn-color.lpv-unavailable {
    opacity: 0.3;
    pointer-events: none;
}

.lpv-color-thumb {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 6px;
    display: block;
}

.lpv-color-name {
    font-size: 11px;
    color: #555;
    line-height: 1.2;
    display: block;
    word-break: break-word;
    max-width: 100%;
}

.lpv-btn-color.lpv-active .lpv-color-name {
    font-weight: 600;
    color: var(--lpv-text);
}

/* Галочка на активном */
.lpv-btn-color.lpv-active::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--lpv-accent);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

/* ==========================================
   Загрузка при переходе
   ========================================== */

.lpv-btn.lpv-loading {
    pointer-events: none;
    opacity: 0.6;
}

.lpv-btn.lpv-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #999;
    border-top-color: transparent;
    border-radius: 50%;
    animation: lpv-spin 0.6s linear infinite;
}

@keyframes lpv-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   Адаптивность
   ========================================== */

@media (max-width: 768px) {
    .lpv-btn-second {
        min-width: 50px;
        padding: 8px 14px;
        font-size: 13px;
    }

    .lpv-btn-color {
        width: 70px;
        padding: 6px;
    }

    .lpv-color-thumb {
        width: 50px;
        height: 50px;
    }

    .lpv-color-name {
        font-size: 10px;
    }

    .lpv-buttons {
        gap: 6px;
    }

    .lpv-color-buttons {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .lpv-btn-color {
        width: 62px;
        padding: 5px;
    }

    .lpv-color-thumb {
        width: 44px;
        height: 44px;
    }

    .lpv-btn-second {
        min-width: 44px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .lpv-group-label {
        font-size: 13px;
        margin-bottom: 8px;
    }
}