:root {
    --bg: #f4f6fb;
    --card-bg: #ffffff;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --danger: #ef4444;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 16px;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
}

body {
    background: var(--bg);
    font-family: 'Nunito', sans-serif;
    color: var(--text);
    min-height: 100vh;
}

.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

/* ── CART PANEL ── */
.cart-panel {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
}

.cart-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.cart-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.cart-count-badge {
    background: #eff6ff;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ── CART HEADER ── */
.cart-header {
    display: grid;
    grid-template-columns: 1fr 120px 110px 44px;
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 8px;
}

/* ── CART ITEM ── */
.cart-item {
    display: grid;
    grid-template-columns: 1fr 120px 110px 44px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
    border: 1.5px solid var(--border);
    transition: box-shadow .2s, border-color .2s;
    animation: fadeUp .3s ease both;
}

.cart-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

/* Product info */
.item-product {
    display: flex;
    align-items: center;
    gap: 14px;
}

.item-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

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

.item-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
    line-height: 1.3;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.item-meta span {
    font-size: 0.72rem;
    color: var(--muted);
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 20px;
}

.item-unit-price {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* Quantity */
.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
    line-height: 1;
}

.qty-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.qty-val {
    min-width: 24px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    border: none;
    background: transparent;
    line-height: 1;
    padding: 0;
}


/* Price */
.item-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

/* Delete */
.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #d1d5db;
    font-size: 1.2rem;
    padding: 6px;
    border-radius: 8px;
    transition: color .15s, background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    color: var(--danger);
    background: #fee2e2;
}


button {
    padding: 2px;
    border-radius: 10px;
    border: 1px solid #050505;
    background: #ffffff;
}


/* ── ACTIONS ── */
.cart-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1.5px solid var(--border);
}

.btn-back {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: background .15s;
}

.btn-back:hover {
    background: #f3f4f6;
}

.btn-cancel {
    background: #fee2e2;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--danger);
    cursor: pointer;
    transition: background .15s;
}

.btn-cancel:hover {
    background: #fecaca;
}

/* ── SIDE PANEL ── */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.side-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--border);
}

/* Summary rows */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--muted);
    padding: 8px 0;
}

.summary-divider {
    height: 1.5px;
    background: var(--border);
    margin: 8px 0;
}

.summary-row.total {
    color: var(--text);
    font-weight: 800;
    font-size: 1.05rem;
    padding-top: 12px;
}

.summary-row.total span:last-child {
    font-size: 1.25rem;
    color: var(--accent);
}

/* Payment */
.payment-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.pay-icon {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
    font-size: 1.3rem;
}

.pay-icon small {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
}

.pay-icon:hover {
    border-color: var(--accent);
    background: #eff6ff;
}

.pay-icon.active {
    border-color: var(--accent);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.pay-icon.active small {
    color: var(--accent);
}

.btn-checkout {
    width: 100%;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background .15s, transform .1s;
}

.btn-checkout:hover {
    background: var(--accent-hover);
}

.btn-checkout:active {
    transform: scale(0.98);
}

/* ── EMPTY STATE ── */
.cart-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--muted);
}

.cart-empty .empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.cart-empty p {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* ── ANIMATION ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item:nth-child(2) {
    animation-delay: .05s;
}

.cart-item:nth-child(3) {
    animation-delay: .10s;
}

.cart-item:nth-child(4) {
    animation-delay: .15s;
}

.cart-item:nth-child(5) {
    animation-delay: .20s;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {

    .cart-title {
        font-size: 1rem;
    }
    .cart-header {
        display: none;
    }

    .cart-item {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 10px;
    }

    .item-price {
        text-align: right;
    }

    .delete-btn {
        grid-row: 1;
        grid-column: 2;
        align-self: start;
    }

    .page-wrapper {
        padding: 12px;
    }
}