﻿.ag-cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 9995;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}

    .ag-cart-drawer.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

.ag-cart-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .58);
    opacity: 0;
    transition: opacity .22s ease;
}

.ag-cart-drawer.is-open .ag-cart-drawer__backdrop {
    opacity: 1;
}

.ag-cart-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 94vw);
    height: 100%;
    background: #fff;
    box-shadow: -18px 0 55px rgba(0, 0, 0, .22);
    transform: translateX(104%);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    display: flex;
    flex-direction: column;
}

.ag-cart-drawer.is-open .ag-cart-drawer__panel {
    transform: translateX(0);
}

.ag-cart-drawer__close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    z-index: 3;
}

    .ag-cart-drawer__close:hover {
        color: #111518;
        background: #f3f4f6;
    }

.ag-cart-drawer__body {
    height: 100%;
    overflow-y: auto;
    padding: 24px 22px 22px;
    scrollbar-width: thin;
    scrollbar-color: #151a1e transparent;
}

    .ag-cart-drawer__body::-webkit-scrollbar {
        width: 5px;
    }

    .ag-cart-drawer__body::-webkit-scrollbar-track {
        background: transparent;
    }

    .ag-cart-drawer__body::-webkit-scrollbar-thumb {
        background: #151a1e;
        border-radius: 999px;
    }

.ag-cart-drawer__success {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 8px 36px 20px 0;
    border-bottom: 1px solid #edf0f2;
}

.ag-cart-drawer__successIcon {
    width: 34px;
    height: 34px;
    border: 2px solid #22c55e;
    color: #22c55e;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.ag-cart-drawer__success strong {
    display: block;
    color: #151a1e;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.25;
}

.ag-cart-drawer__success span {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12.5px;
}

.ag-cart-drawer__loading {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ag-cart-drawer__spinner {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--ag-red);
    animation: agCartSpin .8s linear infinite;
}

@keyframes agCartSpin {
    to {
        transform: rotate(360deg);
    }
}

.ag-cart-drawer__sectionTitle {
    margin: 22px 0 14px;
    color: #151a1e;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .35px;
}

.ag-cart-drawer__items {
    display: grid;
    gap: 10px;
}

.ag-drawer-line {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 34px 14px 0;
    border-bottom: 1px solid #edf0f2;
}

.ag-drawer-line__img {
    width: 92px;
    height: 92px;
    border-radius: 7px;
    background: #f7f8fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

    .ag-drawer-line__img img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.ag-drawer-line__brand {
    color: #151a1e;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.ag-drawer-line__name {
    display: block;
    color: #151a1e;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
    text-decoration: none;
}

    .ag-drawer-line__name:hover {
        color: var(--ag-red);
    }

.ag-drawer-line__variant {
    margin-top: 5px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.35;
}

.ag-drawer-line__price {
    margin-top: 8px;
    color: var(--ag-red);
    font-size: 13px;
    font-weight: 900;
}

.ag-drawer-line__qty {
    margin-top: 11px;
    display: inline-grid;
    grid-template-columns: 30px 36px 30px;
    height: 30px;
    border: 1px solid #e0e4e8;
    border-radius: 4px;
    overflow: hidden;
}

    .ag-drawer-line__qty button {
        border: 0;
        background: #f7f8fa;
        cursor: pointer;
        color: #151a1e;
        font-size: 15px;
    }

    .ag-drawer-line__qty input {
        width: 100%;
        border: 0;
        border-left: 1px solid #e0e4e8;
        border-right: 1px solid #e0e4e8;
        text-align: center;
        outline: 0;
        font-size: 12px;
        font-weight: 900;
    }

.ag-drawer-line__del {
    position: absolute;
    right: 0;
    top: 12px;
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    color: #8a939b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .ag-drawer-line__del:hover {
        color: var(--ag-red);
    }

    .ag-drawer-line__del svg {
        width: 15px;
        height: 15px;
        fill: currentColor;
    }

.ag-cart-drawer__summary {
    padding-top: 20px;
}

.ag-cart-drawer__sumRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    color: #4b5563;
    font-size: 13px;
    margin-bottom: 12px;
}

    .ag-cart-drawer__sumRow strong {
        color: #151a1e;
        font-weight: 900;
    }

    .ag-cart-drawer__sumRow .is-free {
        color: #16a34a;
    }

.ag-cart-drawer__total {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e7eaee;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 18px;
}

    .ag-cart-drawer__total span {
        color: #151a1e;
        font-size: 15px;
        font-weight: 900;
    }

    .ag-cart-drawer__total strong {
        color: var(--ag-red);
        font-size: 22px;
        font-weight: 900;
        font-family: Montserrat, Roboto, Arial, sans-serif;
    }

.ag-cart-drawer__secure {
    margin-top: 22px;
    padding: 15px 16px;
    border-radius: 7px;
    background: #f8fafc;
    border: 1px solid #edf0f2;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.ag-cart-drawer__secureIcon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #fff;
    color: var(--ag-red);
    border: 1px solid #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ag-cart-drawer__secure strong {
    color: #151a1e;
    font-size: 12px;
    font-weight: 900;
}

.ag-cart-drawer__secure small {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 11px;
}

.ag-cart-drawer__buttons {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.ag-cart-drawer__continue,
.ag-cart-drawer__go {
    height: 48px;
    border-radius: 4px;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
}

.ag-cart-drawer__continue {
    background: #151a1e;
    color: #fff;
}

.ag-cart-drawer__go {
    background: var(--ag-red);
    color: #fff;
}

.ag-cart-drawer__empty {
    padding: 50px 0;
    text-align: center;
}

.ag-cart-drawer__emptyIcon {
    font-size: 34px;
    margin-bottom: 12px;
}

.ag-cart-drawer__empty strong {
    display: block;
    color: #151a1e;
    font-size: 18px;
    font-weight: 900;
}

.ag-cart-drawer__empty p {
    color: #6b7280;
    font-size: 13px;
}

@media (max-width: 520px) {
    .ag-cart-drawer__panel {
        width: 100vw;
    }

    .ag-cart-drawer__body {
        padding: 22px 18px 20px;
    }

    .ag-drawer-line {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .ag-drawer-line__img {
        width: 82px;
        height: 82px;
    }
}
