﻿.cart-list {
    display: grid;
    gap: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(180px, 220px) auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: rgba(16, 18, 22, .82);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .22);
}

.cart-update {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
    min-width: 0;
}

.cart-update label {
    display: block;
    min-width: 0;
}

.cart-update-label {
    margin: 0;
    color: rgba(247, 245, 242, .6);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cart-update input[type="number"] {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    color: var(--text);
}

.cart-update .btn {
    width: 100%;
    margin-top: 0;
    min-height: 40px;
}

.cart-item p {
    margin: 4px 0 0;
    color: rgba(247, 245, 242, .68);
}

.cart-total {
    margin-top: 18px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    background: rgba(16, 18, 22, .82);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .22);
}

.cart-total h2 {
    margin: 0;
    color: var(--gold);
}

.cart-total-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cart-item-enhanced {
    grid-template-columns: 72px minmax(0, 1fr) 100px minmax(160px, 200px) 90px auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .07);
    transition: border-color .18s ease;
}

.cart-item-enhanced:hover {
    border-color: rgba(255, 255, 255, .14);
}

.cart-item-img {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, .04);
    flex-shrink: 0;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-img-placeholder {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(200,155,60,.2), rgba(255,106,0,.12));
    color: var(--gold);
    font-weight: 900;
    font-size: 22px;
    font-family: "Bebas Neue", sans-serif;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-info strong {
    font-size: 15px;
    font-weight: 800;
}

.cart-custom-tag {
    font-size: 12px;
    color: rgba(247, 245, 242, .58);
    background: rgba(255, 255, 255, .05);
    border-radius: 4px;
    padding: 2px 8px;
    display: inline-block;
    width: fit-content;
}

.cart-notes {
    color: rgba(72, 214, 210, .7) !important;
}

.cart-edit-link {
    font-size: 12px;
    color: var(--gold);
    opacity: .7;
    transition: opacity .15s;
    text-decoration: underline;
    width: fit-content;
    margin-top: 4px;
}

.cart-edit-link:hover {
    opacity: 1;
}

.cart-price-label {
    display: block;
    font-size: 11px;
    color: rgba(247, 245, 242, .4);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.cart-item-price,
.cart-item-subtotal {
    display: flex;
    flex-direction: column;
}

.cart-subtotal-val {
    color: var(--gold);
    font-size: 15px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.cart-trust-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cart-trust-badges span {
    font-size: 13px;
    color: rgba(247, 245, 242, .6);
}

.cart-total-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.mini-cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

.mini-cart-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mini-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 41;
    width: min(380px, 100vw);
    background: var(--surface);
    border-left: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: -20px 0 60px rgba(0, 0, 0, .4);
}

.mini-cart-drawer.open {
    transform: translateX(0);
}

.mini-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
}

.mini-cart-header strong {
    font-size: 16px;
    font-weight: 900;
}

.mini-cart-close {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 6px;
    background: rgba(255, 255, 255, .05);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    transition: background .15s;
}

.mini-cart-close:hover {
    background: rgba(255, 255, 255, .1);
}

.mini-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-cart-empty {
    text-align: center;
    color: rgba(247, 245, 242, .4);
    padding: 40px 0;
}

.mini-cart-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.mini-cart-item-img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.mini-cart-item-img-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    background: rgba(200,155,60,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-family: "Bebas Neue", sans-serif;
    font-size: 20px;
    flex-shrink: 0;
}

.mini-cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.mini-cart-item-info strong {
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-cart-item-info span {
    font-size: 12px;
    color: rgba(247, 245, 242, .52);
}

.mini-cart-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
}

.mini-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 15px;
}

.mini-cart-total strong {
    color: var(--gold);
    font-size: 18px;
}

@media (max-width: 700px) {
    .cart-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .cart-item .btn,
    .cart-total .btn {
        width: 100%;
    }

    .cart-item-enhanced {
        grid-template-columns: 56px minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto;
    }

    .cart-item-img {
        width: 56px;
        height: 56px;
        grid-row: 1 / 3;
    }

    .cart-item-info {
        grid-column: 2 / 4;
    }

    .cart-item-price {
        display: none;
    }

    .cart-update {
        grid-column: 2 / 3;
        grid-row: 3;
        width: 100%;
    }

    .cart-item-subtotal {
        grid-column: 3 / 4;
        grid-row: 3;
        text-align: right;
    }

    .btn-icon {
        grid-column: 3 / 4;
        grid-row: 1;
    }

    .cart-trust-badges,
    .cart-total,
    .cart-total-actions {
        flex-direction: column;
    }

    .cart-total {
        align-items: flex-start;
    }

    .cart-total-right {
        align-items: stretch;
        width: 100%;
    }

    .mini-cart-drawer {
        width: 100vw;
    }
}
