﻿.am-cart-page {
    padding: 18px 0 40px;
}

    .am-cart-page .am-breadcrumb {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 10px;
        font-family: "Roboto","Segoe UI",Arial,sans-serif;
        font-size: 13px;
        font-weight: 400;
        color: rgba(15,23,42,.62);
    }

        .am-cart-page .am-breadcrumb a {
            color: inherit;
            text-decoration: none;
            transition: color .18s ease, opacity .18s ease;
        }

            .am-cart-page .am-breadcrumb a:hover {
                color: #111827;
            }

.am-cart-title {
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -.02em;
    color: #111827;
}

.am-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 16px;
}

.am-card {
    background: #fff;
    border: 1px solid rgba(17,24,39,.10);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(0,0,0,.05);
}

.am-cart-page .am-card,
#am-quickcart .am-card {
    transition: none !important;
    transform: none !important;
}

    .am-cart-page .am-card:hover,
    #am-quickcart .am-card:hover {
        transition: none !important;
        transform: none !important;
        box-shadow: 0 10px 26px rgba(0,0,0,.05) !important;
        border-color: rgba(17,24,39,.10) !important;
    }

.am-cart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 1024px) {
    .am-cart-grid {
        grid-template-columns: 1fr 360px;
        align-items: start;
        gap: 18px;
    }
}

.am-cart-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.am-cart-line {
    position: relative;
    display: grid;
    grid-template-columns: 90px 1fr;
    grid-template-areas:
        "img info"
        "img qty"
        "img total";
    gap: 10px 12px;
    padding: 12px;
}

@media (min-width: 640px) {
    .am-cart-line {
        grid-template-columns: 120px 1fr 180px 150px;
        grid-template-areas: "img info qty total";
        align-items: center;
        padding: 14px;
    }
}

.am-cart-line__img {
    grid-area: img;
}

    .am-cart-line__img img {
        width: 100%;
        height: 70px;
        object-fit: contain;
        background: #f3f4f6;
        border-radius: 14px;
        display: block;
    }

.am-cart-line__info {
    grid-area: info;
    min-width: 0;
}

.am-cart-line__name {
    display: block;
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.38;
    letter-spacing: -.01em;
    color: #111827;
    text-decoration: none;
}

    .am-cart-line__name:hover {
        text-decoration: none;
        color: #0f172a;
    }

.am-cart-line__variant {
    margin-top: 5px;
    font-family: "Roboto","Segoe UI",Arial,sans-serif;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(15,23,42,.62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-cart-line__unit {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-family: "Roboto","Segoe UI",Arial,sans-serif;
    font-size: 13px;
}

.am-cart-line__qty {
    grid-area: qty;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

@media (min-width: 640px) {
    .am-cart-line__qty {
        justify-content: center;
    }
}

.am-qty-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(17,24,39,.12);
    background: #fff;
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    color: #111827;
}

    .am-qty-btn:hover {
        background: #f8fafc;
    }

.am-qty-input {
    width: 72px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(17,24,39,.12);
    text-align: center;
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.am-cart-line__total {
    grid-area: total;
    text-align: right;
    padding-right: 52px;
}

@media (min-width: 640px) {
    .am-cart-line__total {
        padding-right: 0;
    }
}

.am-price {
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: #111827;
}

.am-cart-line__del {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(239,68,68,.25);
    background: #fff;
    color: #ef4444;
    cursor: pointer;
}

    .am-cart-line__del:hover {
        background: #fef2f2;
    }

.am-cart-aside {
    position: relative;
}

@media (min-width: 1024px) {
    .am-cart-totals {
        position: sticky;
        top: 90px;
    }
}

.am-cart-totals {
    padding: 14px;
}

.am-cart-coupon {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

@media (min-width: 420px) {
    .am-cart-coupon {
        grid-template-columns: 1fr auto auto;
        align-items: center;
    }
}

.am-input {
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(17,24,39,.12);
    outline: none;
    font-family: "Roboto","Segoe UI",Arial,sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #111827;
}

    .am-input::placeholder {
        color: rgba(15,23,42,.48);
    }

    .am-input:focus {
        border-color: rgba(99,102,241,.55);
        box-shadow: 0 0 0 4px rgba(99,102,241,.14);
    }

.am-cart-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: "Roboto","Segoe UI",Arial,sans-serif;
    font-size: 14px;
}

.am-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.am-total {
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
}

.am-sep {
    height: 1px;
    background: rgba(17,24,39,.10);
    margin: 6px 0;
}

.am-btn {
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
}

.am-btn-primary {
    background: linear-gradient(90deg, #7c3aed, #4f46e5);
    color: #fff;
}

    .am-btn-primary:hover {
        filter: brightness(1.05);
    }

.am-btn-ghost {
    background: #fff;
    border-color: rgba(17,24,39,.12);
    color: #111827;
}

    .am-btn-ghost:hover {
        background: #f8fafc;
    }

.am-btn-danger {
    background: #fff;
    border-color: rgba(239,68,68,.25);
    color: #ef4444;
}

    .am-btn-danger:hover {
        background: #fef2f2;
    }

.am-btn-checkout {
    width: 100%;
    height: 44px;
    margin-top: 14px;
    background: linear-gradient(90deg, #0F4C5C, #0C3F4D);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
}

    .am-btn-checkout:hover {
        filter: brightness(1.05);
    }

.am-muted {
    color: rgba(15,23,42,.65);
    font-family: "Roboto","Segoe UI",Arial,sans-serif;
    font-weight: 400;
}

.am-strong {
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-weight: 600;
    color: #111827;
}

.is-hidden {
    display: none !important;
}

.am-empty {
    padding: 28px;
    text-align: center;
}

.am-empty__icon {
    font-size: 34px;
}

.am-empty__title {
    margin: 10px 0 14px;
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    color: #111827;
}

.am-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    padding: 18px;
}

    .am-modal.is-hidden {
        display: none;
    }

.am-modal__panel {
    width: min(520px, 96vw);
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
}

.am-modal__title {
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 6px;
    color: #111827;
}

.am-modal__text {
    margin: 0 0 14px;
    font-family: "Roboto","Segoe UI",Arial,sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    color: rgba(15,23,42,.72);
}

.am-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* --- Cart Toast (store/js/cart.js) --- */
#toast.toast-area {
    position: fixed;
    top: calc(90px + env(safe-area-inset-top));
    right: 16px;
    left: auto;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    pointer-events: none;
}

@media (max-width: 768px) {
    #toast.toast-area {
        left: 12px;
        right: 12px;
        max-width: none;
    }
}

#toast .toast-item {
    pointer-events: auto;
    background: #fff;
    border: 1px solid rgba(17,24,39,.12);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: 0 16px 42px rgba(0,0,0,.18);
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .2s ease, transform .2s ease;
}

    #toast .toast-item.success {
        border-color: rgba(34,197,94,.35);
    }

    #toast .toast-item.error {
        border-color: rgba(239,68,68,.35);
    }

    #toast .toast-item.info {
        border-color: rgba(17,24,39,.12);
    }
