.line {
    display: flex;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
    border-top: 1px solid var(--line);
}

.line:first-child {
    border-top: 0;
}

.line__media {
    width: 64px;
    height: 64px;
    flex: none;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface);
    display: grid;
    place-items: center;
    color: var(--muted);
}

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

.line__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.line__name {
    font-size: var(--step-0);
    font-weight: 500;
    line-height: 1.3;
}

.line__meta {
    font-size: var(--step--1);
    color: var(--muted);
}

.line__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-top: auto;
    padding-top: var(--sp-2);
}

.line__foot strong {
    font-weight: 700;
}

.stepper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border-radius: var(--r-pill);
    background: var(--surface);
    padding: 3px;
}

.stepper button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--graphite);
    transition: background var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}

.stepper button:active {
    transform: scale(0.9);
    background: var(--line);
}

.stepper button:disabled {
    opacity: 0.3;
}

.stepper svg {
    width: 15px;
    height: 15px;
}

.stepper__value {
    min-width: 26px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: var(--step-0);
}

.totals {
    display: grid;
    gap: var(--sp-2);
    padding: var(--sp-4);
    border-radius: var(--r-md);
    background: var(--surface);
}

.totals__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-3);
    font-size: var(--step-0);
    color: var(--graphite);
}

.totals__row span:last-child {
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.totals__row--muted {
    color: var(--muted);
    font-size: var(--step--1);
}

.totals__row--accent span:last-child {
    color: var(--accent-deep);
}

.totals__row--final {
    margin-top: var(--sp-1);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--line);
    font-size: var(--step-1);
    font-weight: 700;
    color: var(--ink);
}

.promo-row {
    display: flex;
    gap: var(--sp-2);
}

.promo-row .field__control {
    text-transform: uppercase;
}

.alert {
    display: flex;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-md);
    background: var(--signal-soft);
    color: var(--signal);
    font-size: var(--step--1);
    line-height: 1.35;
}

.alert svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.option-card {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    width: 100%;
    padding: var(--sp-4);
    border-radius: var(--r-md);
    background: var(--surface);
    text-align: left;
    border: 1.5px solid transparent;
    transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}

.option-card--active {
    border-color: var(--ink);
    background: var(--paper);
}

.option-card__mark {
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    display: grid;
    place-items: center;
    transition: border-color var(--dur-2) var(--ease);
}

.option-card--active .option-card__mark {
    border-color: var(--ink);
}

.option-card--active .option-card__mark::after {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ink);
}

.option-card__title {
    display: block;
    font-weight: 600;
}

.option-card__hint {
    display: block;
    margin-top: 2px;
    font-size: var(--step--1);
    color: var(--muted);
}

.option-card__price {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-2) 0 var(--sp-4);
}

.order-head__number {
    font-size: var(--step-3);
    font-weight: 700;
    line-height: 1.15;
}

.timeline {
    display: grid;
    gap: 0;
    padding-left: var(--sp-2);
}

.timeline__item {
    position: relative;
    padding: 0 0 var(--sp-4) var(--sp-5);
    border-left: 1.5px solid var(--line);
}

.timeline__item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.timeline__item::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--line-strong);
}

.timeline__item--current::before {
    background: var(--accent);
}

.timeline__title {
    font-weight: 600;
    font-size: var(--step-0);
}

.timeline__meta {
    font-size: var(--step--1);
    color: var(--muted);
    margin-top: 2px;
}

.fav-btn {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--graphite);
    transition: transform var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease);
}

.fav-btn svg {
    width: 20px;
    height: 20px;
}

.fav-btn--on {
    color: var(--signal);
}

.fav-btn--on svg {
    fill: var(--signal);
}

.fav-btn:active {
    transform: scale(0.88);
}

.buy-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--dock-height) + var(--safe-bottom));
    z-index: 25;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--gutter);
    background: var(--paper);
    border-top: 1px solid var(--line);
    animation: rise var(--dur-3) var(--ease-out) both;
}

.buy-bar__price {
    font-size: var(--step-2);
    font-weight: 700;
    white-space: nowrap;
}

.buy-bar__action {
    margin-left: auto;
    min-height: 48px;
    padding: 0 var(--sp-6);
    border-radius: var(--r-md);
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    transition: transform var(--dur-1) var(--ease), opacity var(--dur-2) var(--ease);
}

.buy-bar__action:active {
    transform: scale(0.97);
}

.buy-bar__action:disabled {
    opacity: 0.4;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--r-xs);
    font-size: var(--step--1);
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent-deep);
}

.status-pill--cancelled {
    background: var(--signal-soft);
    color: var(--signal);
}

.status-pill--done {
    background: var(--surface);
    color: var(--graphite);
}
