/* accessories.css — движковые стили конфигуратора аксессуаров. Базовый вид;
   тема может переопределить через свой product.css (селекторы .product-accessories*). */

.product-accessories {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.product-accessories__head {
    font-weight: 600;
    font-size: 1.02rem;
    margin-bottom: 0.75rem;
}

.product-accessories__group {
    margin-bottom: 1rem;
}

.product-accessories__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text, #1f2937);
    margin-bottom: 0.5rem;
}

.product-accessories__items {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.acc-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.acc-item:hover {
    border-color: var(--primary, #4f46e5);
}

.acc-item:has(.acc-item__check:checked) {
    border-color: var(--primary, #4f46e5);
    background: color-mix(in srgb, var(--primary, #4f46e5) 6%, transparent);
}

.acc-item--off {
    opacity: 0.5;
    cursor: not-allowed;
}

.acc-item__check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary, #4f46e5);
}

.acc-item__img {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.acc-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acc-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.acc-item__name {
    font-size: 0.9rem;
    color: var(--text, #1f2937);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-item__name:hover {
    text-decoration: underline;
}

.acc-item__price {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.acc-item__now {
    font-weight: 600;
    font-size: 0.92rem;
}

.acc-item__old {
    font-size: 0.8rem;
    color: #9ca3af;
}

.product-accessories__foot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.product-accessories__total {
    font-size: 1rem;
}

.product-accessories__total-value {
    font-weight: 700;
}

.product-accessories__add {
    padding: 0.6rem 1.2rem;
    border: 0;
    border-radius: 10px;
    background: var(--primary, #4f46e5);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.product-accessories__add:hover {
    opacity: 0.9;
}

.product-accessories__add.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.product-accessories__done {
    color: #16a34a;
    font-size: 0.9rem;
    font-weight: 500;
}
