﻿.tp-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 18px 54px;
}

.hidden {
    display: none !important;
}

.is-hidden {
    display: none !important;
}

.tp-cart-page {
    color: #0f172a;
    font-weight: 500;
}

.tp-cart-head {
    margin-bottom: 14px;
}

.tp-cart-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-cart-title__icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
}

    .tp-cart-title__icon svg {
        width: 28px;
        height: 28px;
    }

.tp-cart-title__text {
    margin: 0;
    font-size: 26px; 
    line-height: 1.15;
    font-weight: 700;
    color: #0f172a;
}

.tp-cart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 28px;
    align-items: start;
}

@media (max-width: 1100px) {
    .tp-cart-grid {
        grid-template-columns: 1fr;
    }
}

.tp-card {
    background: #fff;
    border: 1px solid #e9eef5;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.tp-cart-lines {
    overflow: hidden;
}

.tp-cart-line {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 150px 160px 34px;
    gap: 16px;
    align-items: center;
    padding: 16px 16px;
    border-bottom: 1px solid #eef2f7;
}

    .tp-cart-line:last-of-type {
        border-bottom: 1px solid #eef2f7;
    }

@media (max-width: 740px) {
    .tp-cart-line {
        grid-template-columns: 92px minmax(0, 1fr) 1fr 34px;
        grid-template-areas:
            "img info del del"
            "img qty total total";
        align-items: start;
    }

    .tp-cart-line__img {
        grid-area: img;
    }

    .tp-cart-line__info {
        grid-area: info;
    }

    .tp-cart-line__qty {
        grid-area: qty;
        justify-content: flex-start;
        margin-top: 10px;
    }

    .tp-cart-line__total {
        grid-area: total;
        justify-content: flex-end;
        margin-top: 10px;
    }

    .tp-cart-line__del {
        grid-area: del;
        justify-self: end;
    }
}

.tp-cart-line__img {
    width: 110px;
    height: 110px;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}

    .tp-cart-line__img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.tp-cart-line__name {
    display: block;
    font-weight: 650;
    color: #0f172a;
    text-decoration: none;
    font-size: 15px; 
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .tp-cart-line__name:hover {
        text-decoration: underline;
    }

.tp-cart-line__meta {
    margin-top: 6px;
    font-size: 12px; 
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-cart-line__unit {
    margin-top: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.tp-cart-line__unitPrice {
    font-size: 18px; 
    font-weight: 700;
    color: #0f172a;
}

.tp-cart-line__unitSuffix {
    font-size: 13px; 
    color: #94a3b8;
}

.tp-cart-line__qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tp-qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0f172a;
    user-select: none;
    font-weight: 700;
}

    .tp-qty-btn:hover {
        background: #f8fafc;
    }

    .tp-qty-btn span {
        font-size: 20px;
        line-height: 1;
        margin-top: -1px;
    }

.tp-qty-input {
    width: 52px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    text-align: center;
    font-weight: 650;
    font-size: 14px; 
    color: #0f172a;
    outline: none;
}

    .tp-qty-input:focus {
        border-color: #cbd5e1;
        box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
    }

.tp-cart-line__total {
    display: flex;
    justify-content: flex-end;
}

.tp-cart-line__totalPrice {
    font-size: 18px; 
    font-weight: 800;
    color: #0f172a;
}

.tp-cart-line__del {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 26px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .tp-cart-line__del:hover {
        color: #0f172a;
    }

.tp-cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.tp-cart-btn {
    height: 54px; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px; 
    padding: 0 16px;
}

.tp-cart-btn__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .tp-cart-btn__icon svg {
        width: 18px;
        height: 18px;
    }

.tp-cart-btn--back {
    background: #cbd5e1;
    color: #0f172a;
    border-bottom-left-radius: 18px;
}

    .tp-cart-btn--back:hover {
        filter: brightness(0.97);
    }

.tp-cart-btn--clear {
    background: #ef4444;
    color: #fff;
    border-bottom-right-radius: 18px;
}

    .tp-cart-btn--clear:hover {
        filter: brightness(0.97);
    }

@media (max-width: 540px) {
    .tp-cart-actions {
        grid-template-columns: 1fr;
    }

    .tp-cart-btn--back {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .tp-cart-btn--clear {
        border-bottom-left-radius: 18px;
        border-bottom-right-radius: 18px;
    }
}

.tp-cart-summary {
    padding: 16px 16px 16px;
    position: sticky;
    top: 24px;
}

@media (max-width: 1100px) {
    .tp-cart-summary {
        position: static;
    }
}

.tp-cart-summary__title {
    font-size: 18px; 
    font-weight: 800;
    color: #0f172a;
    padding: 6px 2px 10px;
    border-bottom: 1px solid #eef2f7;
}

.tp-cart-summary__rows {
    padding-top: 12px;
    display: grid;
    gap: 10px;
}

.tp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 14px; 
    color: #0f172a;
    font-weight: 500;
}

.tp-row--muted {
    color: #64748b;
}

.tp-row__v {
    font-weight: 700;
    color: inherit;
}

.tp-free {
    color: #16a34a;
    font-weight: 800;
}

.tp-sep {
    height: 1px;
    background: #eef2f7;
    margin: 14px 0;
}

.tp-sep--dashed {
    background: transparent;
    border-top: 2px dashed #e5e7eb;
    height: 0;
}

.tp-coupon__head {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 10px;
    font-size: 14px; 
}

.tp-coupon__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
}

    .tp-coupon__icon svg {
        width: 18px;
        height: 18px;
    }

.tp-coupon__box {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 10px;
    align-items: center;
}

.tp-coupon__input {
    height: 44px; 
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 0 14px;
    font-weight: 650;
    font-size: 14px;
    outline: none;
}

    .tp-coupon__input:focus {
        border-color: #cbd5e1;
        box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
    }

.tp-coupon__apply,
.tp-coupon__remove {
    height: 44px; 
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 800;
    color: #fff;
    font-size: 14px;
    background: #334155;
}

    .tp-coupon__apply:hover,
    .tp-coupon__remove:hover {
        filter: brightness(0.97);
    }

.tp-coupon__remove {
    background: #0f172a;
    grid-column: 2 / 3;
}

.tp-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.tp-total__k {
    font-size: 16px; 
    font-weight: 800;
    color: #0f172a;
}

.tp-total__v {
    font-size: 26px; 
    font-weight: 900;
    letter-spacing: -0.3px;
    color: #0f172a;
}

.tp-checkout {
    margin-top: 14px;
    width: 100%;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(90deg, #22c55e 0%, #06b6d4 100%);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 850;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 24px rgba(6, 182, 212, 0.18);
}

    .tp-checkout:hover {
        filter: brightness(1.03);
    }

.tp-checkout__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .tp-checkout__icon svg {
        width: 18px;
        height: 18px;
    }

.tp-hidden {
    display: none !important;
}

.tp-cart-empty {
    padding: 24px;
    text-align: center;
}

.tp-cart-empty__title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.tp-modal.hidden,
.tp-modal.is-hidden {
    display: none !important;
}

.tp-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 18px;
}

.tp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}

.tp-modal__panel {
    position: relative;
    width: min(520px, 92vw);
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 30px 70px rgba(0,0,0,.25);
    padding: 18px;
}

.tp-modal__title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.tp-modal__text {
    margin: 0 0 14px;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
}

.tp-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.tp-modal__btn {
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.tp-modal__btn--ghost {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #0f172a;
}

.tp-modal__btn--danger {
    border: none;
    background: #ef4444;
    color: #fff;
}

.toast-area {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    min-width: min(520px, calc(100vw - 24px));
    max-width: min(520px, calc(100vw - 24px));
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: opacity .25s ease, transform .25s ease;
    backdrop-filter: blur(10px);
}

    .toast-item.success {
        background: rgba(220, 252, 231, .92); 
        border-color: rgba(134, 239, 172, .95);
        color: #065f46;
    }

    .toast-item.error {
        background: rgba(254, 226, 226, .92); 
        border-color: rgba(252, 165, 165, .95);
        color: #7f1d1d;
    }

    .toast-item.info {
        background: rgba(224, 242, 254, .92);
        border-color: rgba(125, 211, 252, .95);
        color: #075985;
    }
