/* ===========================================================================
   sure:look.buy.panel — общий компонент "Купить весь образ".
   Стили только для содержимого панели; обёртка/позиционирование задаётся
   контейнером, в котором панель отрисована (попап, drawer, секция).
   =========================================================================== */

.look-buy-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
    font-family: 'Nunito Sans', NunitoSans, sans-serif;
    color: #130F0F;
}

/* Header */

.look-buy-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 40px;
    flex-shrink: 0;
}

.look-buy-panel__title {
    font-weight: 500;
    font-size: 28px;
    line-height: 100%;
    color: #291A13;
    margin: 0;
    transition: opacity 0.25s ease;
}

.look-buy-panel__title.--fading { opacity: 0; }

.look-buy-panel__close {
    background: transparent;
    border: 0;
    padding: 4px;
    cursor: pointer;
    color: #130F0F;
    line-height: 0;
}

.look-buy-panel__subtitle {
    font-weight: 500;
    font-size: 18px;
    line-height: 125%;
    color: #130F0F;
    margin: 0 0 40px;
    flex-shrink: 0;
}

/* Items */

.look-buy-panel__items {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.look-buy-panel__item {
    display: grid;
    grid-template-columns: 83px 1fr;
    gap: 12px;
    padding: 24px 0;
    border-bottom: 1px solid #D3D3D3;
}

.look-buy-panel__item:first-child { padding-top: 0; }
.look-buy-panel__item:last-child { border-bottom: 0; }

.look-buy-panel__item-img {
    display: block;
    background: var(--light-grey, #ECE7E1);
    aspect-ratio: 83 / 120;
    overflow: hidden;
    text-decoration: none;
}

.look-buy-panel__item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.look-buy-panel__item-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.look-buy-panel__item-top {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.look-buy-panel__item-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.look-buy-panel__item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.look-buy-panel__item-name {
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    color: #130F0F;
    text-decoration: none;
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.look-buy-panel__item-prices {
    flex-shrink: 0;
    font-size: 14px;
    white-space: nowrap;
}

.look-buy-panel__price-old {
    font-weight: 400;
    font-size: 12px;
    line-height: 100%;
    text-decoration: line-through;
    color: #A6A6A6;
}

.look-buy-panel__price-new {
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    color: #130F0F;
}

.look-buy-panel__item-color {
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    color: #130F0F;
}

.look-buy-panel__item-color span {
    font-weight: 400;
    color: #8A8A8A;
}

.look-buy-panel__item-sizes-label {
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    color: #130F0F;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.look-buy-panel__item-sizes-label.--invalid {
    color: #E6420C;
}

.look-buy-panel__item-sizes {
    display: flex;
    gap: 0;
}

.look-buy-panel__size {
    width: 48px;
    height: 36px;
    padding: 0;
    border: 0.5px solid #D3D3D3;
    background: #FFFFFF;
    font-family: inherit;
    font-weight: 400;
    font-size: 12px;
    line-height: 100%;
    text-align: center;
    text-transform: uppercase;
    color: #291A13;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.look-buy-panel__size.--active,
.look-buy-panel__size:not(.look-buy-panel__size--unavailable):hover {
    background: #291A13;
    border-color: #291A13;
    color: #FFFFFF;
}

.look-buy-panel__size--unavailable {
    color: #A6A6A6;
    cursor: not-allowed;
}

.look-buy-panel__size--locked {
    pointer-events: none;
}

/* Summary */

.look-buy-panel__summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #D3D3D3;
    flex-shrink: 0;
}

.look-buy-panel__summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
}

.look-buy-panel__summary-label {
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    color: #130F0F;
}

.look-buy-panel__summary-value--accent {
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    text-align: right;
    color: #E6420C;
}

.look-buy-panel__summary-row--total {
    font-size: 20px;
    font-weight: 500;
    margin-top: 4px;
}

.look-buy-panel__total-label,
.look-buy-panel__total-value {
    font-weight: 500;
    font-size: 24px;
    line-height: 100%;
    color: #130F0F;
}

.look-buy-panel__total-value {
    color: #291A13;
    text-align: right;
}

/* Buy */

.look-buy-panel__buy-wrap {
    margin-top: 16px;
    height: 48px;
    min-height: 48px;
    flex-shrink: 0;
}

.look-buy-panel__buy {
    width: 100%;
    height: 100%;
    background: #291A13;
    color: #FFFFFF;
    border: 0;
    border-radius: 2px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.25s ease, background-color 0.2s ease;
}

.look-buy-panel__buy-text {
    text-align: center;
}

.look-buy-panel__buy.--fading { opacity: 0; }

.look-buy-panel__buy-label {
    font-weight: 400;
    font-size: 14px;
    line-height: 115%;
    letter-spacing: 0.03em;
    text-align: center;
    color: #FFFFFF;
}

.look-buy-panel__buy-old {
    font-weight: 400;
    font-size: 12px;
    line-height: 115%;
    text-align: center;
    text-decoration: line-through;
    color: #A6A6A6;
}

.look-buy-panel__buy-new {
    font-weight: 400;
    font-size: 14px;
    line-height: 115%;
    text-align: center;
    color: #FFFFFF;
}

/* Validation toast (singleton) */

.look-buy-panel__toast {
    position: fixed;
    top: env(safe-area-inset-top);
    left: 0;
    right: 0;
    height: 48px;
    background: #FFFFFF;
    color: #FFFFFF;
    font-family: 'Nunito Sans', NunitoSans, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0.03em;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transform: translateY(calc(-100% - env(safe-area-inset-top)));
    transition: background-color 0s 0s, opacity 0.3s ease-out, transform 0.3s ease-out;
    pointer-events: none;
}

.look-buy-panel__toast.--visible {
    transform: translateY(0);
    opacity: 1;
    background: #E6420C;
    transition: background-color 0s 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out;
}
