/* ===== CART ===== */
.cart-page {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 40px var(--container-px) var(--section-gap);
}

.cart-page__title {
    font-size: 40px;
    line-height: 1.1;
    margin-bottom: 32px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
}

.cart-table-wrap {
    background: var(--color-card-bg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    background: var(--color-bg);
    font-weight: var(--fw-semibold);
}

.cart-table td {
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cart-product__img {
    width: 68px;
    height: 68px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--color-bg);
}

.cart-product__name {
    font-size: 14px;
    font-weight: var(--fw-semibold);
    color: var(--color-text);
    line-height: 1.3;
}

.cart-product__brand {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 3px;
}

.cart-qty-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-qty {
    width: 60px;
    padding: 6px 10px;
    font-size: 13px;
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    background: var(--color-input-bg);
    color: var(--color-text);
    outline: none;
    font-family: var(--font-family);
}

.cart-qty:focus {
    border-color: var(--color-accent);
}

.cart-price {
    font-size: 14px;
    font-weight: var(--fw-semibold);
}

.cart-subtotal {
    font-size: 14px;
    font-weight: var(--fw-bold);
    color: var(--color-accent);
}

.btn-remove-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-text-muted);
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
    border: none;
    font-size: 16px;
    font-family: inherit;
}

.btn-remove-item:hover {
    background: #fde8e8;
    color: #b73232;
}

.cart-summary-panel {
    background: var(--color-card-bg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 28px;
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}

.cart-summary-panel h2 {
    font-size: 18px;
    font-weight: var(--fw-bold);
    margin-bottom: 20px;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

.cart-summary-line:last-of-type {
    border-bottom: none;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: var(--fw-bold);
    padding: 16px 0 20px;
    border-top: 2px solid var(--color-border);
    margin-top: 8px;
}

.cart-summary-total span:last-child {
    color: var(--color-accent);
}

.cart-empty {
    text-align: center;
    padding: 80px 0;
}

.cart-empty__title {
    font-size: 24px;
    font-weight: var(--fw-bold);
    margin-bottom: 12px;
}

.cart-empty__text {
    color: var(--color-text-muted);
    margin-bottom: 28px;
}

/* ===== CHECKOUT ===== */
.checkout-page {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 40px var(--container-px) var(--section-gap);
}

.checkout-page__title {
    font-size: 40px;
    line-height: 1.1;
    margin-bottom: 32px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

.checkout-step {
    background: var(--color-card-bg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 28px;
    margin-bottom: 16px;
}

.checkout-step__title {
    font-size: 16px;
    font-weight: var(--fw-bold);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}

.address-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.address-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.address-option:has(input:checked) {
    border-color: var(--color-accent);
    background: #fff6f8;
}

.address-option input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--color-accent);
    flex-shrink: 0;
}

.address-option__body strong {
    font-size: 14px;
    font-weight: var(--fw-semibold);
    display: block;
    margin-bottom: 4px;
}

.address-option__body p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
}

.link-add {
    font-size: 13px;
    color: var(--color-accent);
    font-weight: var(--fw-semibold);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.link-add:hover {
    text-decoration: underline;
}

.checkout-notes {
    width: 100%;
    min-height: 90px;
    resize: vertical;
}

.checkout-order-panel {
    background: var(--color-card-bg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 28px;
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}

.checkout-order-panel h2 {
    font-size: 18px;
    font-weight: var(--fw-bold);
    margin-bottom: 20px;
}

.checkout-order-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
    max-height: 260px;
    overflow-y: auto;
}

.checkout-order-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    gap: 12px;
}

.checkout-order-item:last-child {
    border-bottom: none;
}

.checkout-order-item__name {
    font-size: 13px;
    font-weight: var(--fw-medium);
    flex: 1;
}

.checkout-order-item__qty {
    font-size: 12px;
    color: var(--color-text-muted);
}

.checkout-order-item__price {
    font-size: 13px;
    font-weight: var(--fw-semibold);
    white-space: nowrap;
}

.checkout-totals {
    border-top: 1px solid var(--color-border);
    padding-top: 14px;
}

.checkout-total-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    color: var(--color-text-muted);
}

.checkout-total-final {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: var(--fw-bold);
    padding: 12px 0 0;
    border-top: 2px solid var(--color-border);
    margin-top: 6px;
}

.checkout-total-final span:last-child {
    color: var(--color-accent);
}

@media (max-width: 980px) {
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    .cart-summary-panel,
    .checkout-order-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .cart-page,
    .checkout-page {
        padding-inline: 20px;
    }
    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2) {
        display: none;
    }
}
