.salon-order-table {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.salon-order-table__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.salon-order-table__header h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
}

.salon-order-table__group {
    margin-bottom: 10px;
    border: 1px solid #d6d6d6;
    background: #fff;
}

.salon-order-table__group-header {
    display: grid;
    grid-template-columns: 1fr auto 22px;
    align-items: center;
    width: 100%;
    gap: 16px;
    padding: 14px 16px;
    border: 0;
    background: #f4f4f4;
    color: #222;
    text-align: left;
    cursor: pointer;
}

.salon-order-table__group-header:hover,
.salon-order-table__group-header:focus {
    background: #ececec;
}

.salon-order-table__group-title {
    font-size: 18px;
    font-weight: 700;
}

.salon-order-table__group-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    white-space: nowrap;
}

.salon-order-table__group-total {
    min-width: 90px;
    text-align: right;
    font-weight: 700;
}

.salon-order-table__group-icon {
    position: relative;
    width: 18px;
    height: 18px;
}

.salon-order-table__group-icon::before,
.salon-order-table__group-icon::after {
    position: absolute;
    top: 8px;
    left: 2px;
    width: 14px;
    height: 2px;
    content: "";
    background: #333;
}

.salon-order-table__group-icon::after {
    transform: rotate(90deg);
}

.salon-order-table__group.is-open .salon-order-table__group-icon::after {
    display: none;
}

.salon-order-table__group-content {
    display: none;
}

.salon-order-table__group.is-open .salon-order-table__group-content {
    display: block;
}

.salon-order-table__scroll {
    overflow-x: auto;
    background: #fff;
}

.salon-order-table__table {
    width: 100%;
    margin: 0;
}

.salon-order-table__table th,
.salon-order-table__table td {
    padding: 12px 14px;
    vertical-align: middle;
}

.salon-order-table__table th {
    background: #fafafa;
    font-weight: 700;
    white-space: nowrap;
}

.salon-order-table__table td:first-child {
    width: 72px;
}

.salon-order-table__table td:nth-child(2) {
    width: 150px;
    white-space: nowrap;
}

.salon-order-table__table td:nth-child(4),
.salon-order-table__table td:nth-child(5),
.salon-order-table__table td:nth-child(6) {
    width: 130px;
    white-space: nowrap;
}

.salon-order-table__table td:nth-child(7) {
    width: 110px;
}

.salon-order-table__table td:last-child {
    width: 140px;
    white-space: nowrap;
    text-align: right;
}

.salon-order-table__qty {
    width: 82px;
    min-width: 82px;
    text-align: center;
}

.salon-order-table__thumb {
    display: block;
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.salon-order-table__thumb-wrap {
    display: inline-block;
    cursor: zoom-in;
}

.salon-order-table__product {
    border-bottom: 1px dotted #777;
    cursor: default;
}

.salon-order-table__details-template {
    display: none;
}

.salon-order-table__line-total {
    font-weight: 700;
}

.salon-order-table__row--disabled {
    opacity: .55;
}

.salon-order-table__stock {
    font-size: 13px;
    color: #777;
}

.salon-order-table__summary {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    margin-top: 16px;
    padding: 14px 16px;
    background: #f4f4f4;
    font-size: 16px;
}

.salon-order-table__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.salon-order-table__return {
    margin: 0 0 18px;
}

.salon-order-table__preview {
    position: fixed;
    z-index: 5000;
    display: none;
    width: 280px;
    min-height: 220px;
    padding: 10px;
    border: 1px solid #d6d6d6;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    pointer-events: none;
}

.salon-order-table__preview.is-visible {
    display: block;
}

.salon-order-table__preview img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
}

.salon-order-table__details {
    position: fixed;
    z-index: 5001;
    display: none;
    width: min(420px, calc(100vw - 24px));
    max-height: min(520px, calc(100vh - 24px));
    overflow: auto;
    padding: 16px;
    border: 1px solid #d6d6d6;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    color: #222;
    pointer-events: none;
}

.salon-order-table__details.is-visible {
    display: block;
}

.salon-order-table__details-title,
.salon-order-table__details-description,
.salon-order-table__details-list,
.salon-order-table__details-row,
.salon-order-table__details-label,
.salon-order-table__details-value {
    display: block;
}

.salon-order-table__details-title {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.salon-order-table__details-description {
    margin-bottom: 12px;
    color: #444;
    font-size: 13px;
    line-height: 1.5;
}

.salon-order-table__details-row {
    padding: 7px 0;
    border-top: 1px solid #ececec;
}

.salon-order-table__details-label {
    color: #666;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.salon-order-table__details-value {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .salon-order-table {
        padding: 18px 10px 32px;
    }

    .salon-order-table__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .salon-order-table__header h1 {
        font-size: 26px;
    }

    .salon-order-table__table th,
    .salon-order-table__table td {
        padding: 10px 8px;
    }

    .salon-order-table__group-header,
    .salon-order-table__summary {
        align-items: flex-start;
        flex-direction: column;
        display: flex;
    }

    .salon-order-table__preview,
    .salon-order-table__details {
        display: none !important;
    }
}
