﻿.ag-cart-page {
    background: #f4f5f6;
    padding: 18px 0 0;
}

.ag-cart-bc {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7b848c;
    font-size: 12px;
    margin-bottom: 20px;
}

    .ag-cart-bc a:hover {
        color: var(--ag-red);
    }

    .ag-cart-bc strong {
        color: #171c20;
        font-weight: 800;
    }

.ag-cart-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 24px;
    align-items: start;
    margin-bottom: 34px;
}

    .ag-cart-head h1 {
        margin: 0;
        color: #171c20;
        font-family: Montserrat, Roboto, Arial, sans-serif;
        font-size: 36px;
        font-weight: 900;
        letter-spacing: -1px;
    }

    .ag-cart-head p {
        margin: 8px 0 0;
        color: #6b7280;
        font-size: 15px;
    }

.ag-checkout-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
}

    .ag-checkout-steps::before {
        content: "";
        position: absolute;
        left: 42px;
        right: 42px;
        top: 17px;
        border-top: 2px dotted #d7dce1;
        z-index: 0;
    }

    .ag-checkout-steps li {
        position: relative;
        z-index: 1;
        text-align: center;
        color: #8a939b;
        font-size: 12px;
    }

    .ag-checkout-steps span {
        width: 36px;
        height: 36px;
        margin: 0 auto 8px;
        border-radius: 999px;
        background: #e8ebef;
        color: #7b848c;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 900;
    }

    .ag-checkout-steps strong {
        display: block;
        font-weight: 800;
    }

    .ag-checkout-steps .is-active span {
        background: var(--ag-red);
        color: #fff;
    }

    .ag-checkout-steps .is-active strong {
        color: #171c20;
    }

.ag-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 32px;
    align-items: start;
}

.ag-cart-lines {
    background: #fff;
    border: 1px solid #e7eaee;
    border-radius: 8px;
    overflow: hidden;
}

.ag-cart-table-head {
    min-height: 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 120px 130px 42px;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    border-bottom: 1px solid #e7eaee;
    color: #4b5563;
    font-size: 12px;
    font-weight: 900;
}

.ag-cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 120px 130px 42px;
    gap: 14px;
    padding: 22px 18px;
    border-bottom: 1px solid #edf0f2;
    align-items: center;
}

    .ag-cart-line:last-of-type {
        border-bottom: 0;
    }

.ag-cart-line__product {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-width: 0;
}

.ag-cart-line__img {
    width: 150px;
    height: 130px;
    background: #f7f8fa;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

    .ag-cart-line__img img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.ag-cart-line__info {
    min-width: 0;
}

.ag-cart-line__name {
    display: block;
    color: #171c20;
    font-size: 16px;
    line-height: 1.28;
    font-weight: 900;
}

    .ag-cart-line__name:hover {
        color: var(--ag-red);
    }

.ag-cart-line__variant {
    margin-top: 8px;
    color: #6b7280;
    font-size: 12.5px;
    line-height: 1.45;
}

.ag-cart-line__stock {
    margin-top: 12px;
    color: #16a34a;
    font-size: 12px;
    font-weight: 800;
}

    .ag-cart-line__stock span {
        margin-right: 5px;
    }

.ag-cart-line__fav {
    margin-top: 12px;
    border: 0;
    background: transparent;
    color: #6b7280;
    padding: 0;
    cursor: pointer;
    font-size: 12px;
}

    .ag-cart-line__fav:hover {
        color: var(--ag-red);
    }

.ag-cart-line__price,
.ag-cart-line__total {
    color: #171c20;
    font-size: 14px;
    font-weight: 900;
}

.ag-cart-line__qty {
    width: 104px;
    display: grid;
    grid-template-columns: 32px 40px 32px;
    height: 34px;
    border: 1px solid #e0e4e8;
    border-radius: 4px;
    overflow: hidden;
}

    .ag-cart-line__qty button {
        border: 0;
        background: #f7f8fa;
        color: #171c20;
        cursor: pointer;
        font-size: 17px;
    }

    .ag-cart-line__qty input {
        width: 100%;
        border: 0;
        border-left: 1px solid #e0e4e8;
        border-right: 1px solid #e0e4e8;
        outline: 0;
        text-align: center;
        font-weight: 900;
        color: #171c20;
    }

.ag-cart-line__del {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #8a939b;
    cursor: pointer;
    border-radius: 4px;
}

    .ag-cart-line__del:hover {
        background: #fee2e2;
        color: var(--ag-red);
    }

    .ag-cart-line__del svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
    }

.ag-cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border-top: 1px solid #edf0f2;
}

.ag-cart-back,
.ag-cart-update {
    min-width: 205px;
    height: 42px;
    border-radius: 4px;
    border: 1px solid #e0e4e8;
    background: #fff;
    color: #171c20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

    .ag-cart-back:hover,
    .ag-cart-update:hover {
        border-color: #151a1e;
    }

.ag-cart-coupon {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 0 18px 22px;
}

    .ag-cart-coupon label {
        color: #171c20;
        font-size: 13px;
        font-weight: 900;
    }

.ag-cart-coupon__box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 105px;
    height: 42px;
}

    .ag-cart-coupon__box input {
        min-width: 0;
        border: 1px solid #e0e4e8;
        border-right: 0;
        border-radius: 4px 0 0 4px;
        outline: 0;
        padding: 0 12px;
        font-size: 13px;
    }

    .ag-cart-coupon__box button {
        border: 0;
        background: #151a1e;
        color: #fff;
        border-radius: 0 4px 4px 0;
        cursor: pointer;
        font-size: 12px;
        font-weight: 900;
    }

.ag-cart-alert {
    grid-column: 2;
    padding: 9px 10px;
    border-radius: 6px;
    font-size: 12px;
}

.ag-cart-freebox {
    margin-top: 24px;
    background: #fff;
    border: 1px solid #e7eaee;
    border-radius: 8px;
    padding: 22px;
    display: flex;
    gap: 18px;
    align-items: center;
}

.ag-cart-freebox__icon {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #151a1e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

    .ag-cart-freebox__icon svg {
        width: 28px;
        height: 28px;
        fill: currentColor;
    }

.ag-cart-freebox strong {
    display: block;
    color: #171c20;
    font-size: 15px;
    font-weight: 900;
}

.ag-cart-freebox p {
    margin: 6px 0;
    color: #6b7280;
    font-size: 13px;
}

.ag-cart-freebox a {
    color: #171c20;
    font-size: 12px;
    font-weight: 900;
    text-decoration: underline;
}

.ag-cart-aside {
    position: sticky;
    top: 105px;
}

.ag-cart-summary {
    background: #fff;
    border: 1px solid #e7eaee;
    border-radius: 8px;
    padding: 26px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .04);
}

    .ag-cart-summary h2 {
        margin: 0 0 24px;
        color: #171c20;
        font-family: Montserrat, Roboto, Arial, sans-serif;
        font-size: 24px;
        font-weight: 900;
    }

.ag-cart-summary__rows {
    display: grid;
    gap: 17px;
}

    .ag-cart-summary__rows div {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        color: #4b5563;
        font-size: 14px;
    }

    .ag-cart-summary__rows strong {
        color: #171c20;
        font-weight: 900;
    }

    .ag-cart-summary__rows .is-free,
    .ag-cart-summary__rows .is-green {
        color: #16a34a;
    }

.ag-cart-summary__total {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e7eaee;
}

    .ag-cart-summary__total span {
        display: block;
        color: #171c20;
        font-size: 15px;
        font-weight: 900;
    }

    .ag-cart-summary__total strong {
        display: block;
        margin-top: 8px;
        color: var(--ag-red);
        font-family: Montserrat, Roboto, Arial, sans-serif;
        font-size: 28px;
        font-weight: 900;
    }

.ag-cart-success {
    margin-top: 18px;
    padding: 13px 14px;
    border-radius: 6px;
    background: #ecfdf3;
    border: 1px solid #ccefd7;
    color: #166534;
    display: flex;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
}

.ag-cart-agreement {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 18px 0;
    color: #4b5563;
    font-size: 12.5px;
    line-height: 1.45;
}

    .ag-cart-agreement input {
        margin-top: 3px;
        accent-color: var(--ag-red);
    }

.ag-cart-checkout,
.ag-cart-fastpay {
    width: 100%;
    height: 52px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.ag-cart-checkout {
    background: var(--ag-red);
    color: #fff;
}

.ag-cart-fastpay {
    margin-top: 10px;
    background: #151a1e;
    color: #fff;
}

.ag-cart-secure {
    margin-top: 20px;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f2;
    color: #4b5563;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.ag-cart-summary__benefits {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

    .ag-cart-summary__benefits div {
        display: grid;
        grid-template-columns: 28px 1fr;
        column-gap: 10px;
    }

    .ag-cart-summary__benefits span {
        grid-row: span 2;
        color: #171c20;
        font-size: 22px;
        line-height: 1;
    }

    .ag-cart-summary__benefits strong {
        color: #171c20;
        font-size: 13px;
        font-weight: 900;
    }

    .ag-cart-summary__benefits small {
        color: #6b7280;
        font-size: 12px;
    }

.ag-cart-benefits {
    margin: 34px 0 34px;
    background: #fff;
    border: 1px solid #e7eaee;
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
}

    .ag-cart-benefits div {
        padding: 22px;
        display: grid;
        grid-template-columns: 34px 1fr;
        column-gap: 12px;
        border-right: 1px solid #e7eaee;
    }

        .ag-cart-benefits div:last-child {
            border-right: 0;
        }

    .ag-cart-benefits span {
        grid-row: span 2;
        color: #171c20;
        font-size: 27px;
        line-height: 1;
    }

    .ag-cart-benefits strong {
        color: #171c20;
        font-size: 14px;
        font-weight: 900;
    }

    .ag-cart-benefits small {
        color: #6b7280;
        font-size: 12px;
    }

.ag-cart-empty {
    background: #fff;
    border: 1px solid #e7eaee;
    border-radius: 8px;
    padding: 56px 24px;
    text-align: center;
}

.ag-cart-empty__icon {
    font-size: 42px;
}

.ag-cart-empty h2 {
    margin: 14px 0 8px;
    color: #171c20;
    font-size: 26px;
    font-weight: 900;
}

.ag-cart-empty p {
    color: #6b7280;
}

.ag-cart-empty a {
    display: inline-flex;
    height: 42px;
    align-items: center;
    padding: 0 18px;
    border-radius: 4px;
    background: var(--ag-red);
    color: #fff;
    font-weight: 900;
    margin-top: 14px;
}

.ag-cart-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

    .ag-cart-modal.hidden,
    .ag-cart-modal.is-hidden {
        display: none;
    }

.ag-cart-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}

.ag-cart-modal__panel {
    position: relative;
    width: min(420px, 92vw);
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 24px 70px rgba(0,0,0,.30);
}

    .ag-cart-modal__panel h3 {
        margin: 0 0 8px;
        color: #171c20;
        font-size: 20px;
        font-weight: 900;
    }

    .ag-cart-modal__panel p {
        margin: 0 0 18px;
        color: #6b7280;
    }

.ag-cart-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

    .ag-cart-modal__actions button {
        height: 38px;
        border-radius: 4px;
        padding: 0 14px;
        cursor: pointer;
        font-weight: 900;
    }

#cart-modal-cancel {
    border: 1px solid #e0e4e8;
    background: #fff;
    color: #171c20;
}

#cart-modal-ok {
    border: 0;
    background: var(--ag-red);
    color: #fff;
}

.toast-area {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 10000;
    transform: translateX(-50%);
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    background: rgba(17, 21, 24, .94);
    color: #fff;
    padding: 11px 15px;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0,0,0,.20);
    font-size: 13px;
    transition: opacity .25s ease, transform .25s ease;
}

    .toast-item.success {
        background: rgba(22, 163, 74, .96);
    }

    .toast-item.error {
        background: rgba(220, 38, 38, .96);
    }

.is-hidden {
    display: none !important;
}

@media (max-width: 1100px) {
    .ag-cart-head {
        grid-template-columns: 1fr;
    }

    .ag-cart-layout {
        grid-template-columns: 1fr;
    }

    .ag-cart-aside {
        position: static;
    }
}

@media (max-width: 860px) {
    .ag-cart-table-head {
        display: none;
    }

    .ag-cart-line {
        grid-template-columns: 1fr auto;
        gap: 16px;
    }

    .ag-cart-line__product {
        grid-column: 1 / -1;
        grid-template-columns: 115px minmax(0, 1fr);
    }

    .ag-cart-line__img {
        width: 115px;
        height: 105px;
    }

    .ag-cart-line__price,
    .ag-cart-line__qty,
    .ag-cart-line__total {
        grid-column: auto;
    }

    .ag-cart-line__del {
        grid-column: 2;
        grid-row: 2;
    }

    .ag-cart-coupon {
        grid-template-columns: 1fr;
    }

    .ag-cart-alert {
        grid-column: auto;
    }

    .ag-cart-benefits {
        grid-template-columns: repeat(2, 1fr);
    }

        .ag-cart-benefits div:nth-child(2n) {
            border-right: 0;
        }
}

@media (max-width: 560px) {
    .ag-cart-head h1 {
        font-size: 30px;
    }

    .ag-checkout-steps {
        grid-template-columns: repeat(4, minmax(64px, 1fr));
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .ag-cart-line__product {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .ag-cart-line__img {
        width: 92px;
        height: 90px;
    }

    .ag-cart-line {
        padding: 18px 14px;
    }

    .ag-cart-actions {
        flex-direction: column;
    }

    .ag-cart-back,
    .ag-cart-update {
        width: 100%;
    }

    .ag-cart-coupon__box {
        grid-template-columns: 1fr;
        height: auto;
        gap: 9px;
    }

        .ag-cart-coupon__box input,
        .ag-cart-coupon__box button {
            height: 42px;
            border-radius: 4px;
            border: 1px solid #e0e4e8;
        }

    .ag-cart-benefits {
        grid-template-columns: 1fr;
    }

        .ag-cart-benefits div {
            border-right: 0;
            border-bottom: 1px solid #e7eaee;
        }

            .ag-cart-benefits div:last-child {
                border-bottom: 0;
            }
}
