/* --- Shared Design System (Matches Package Detail) --- */
:root {
    --color-bg-dark: #0f172a;
    --color-bg-card: #1e293b;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-accent-blue: #2889d8;
    --color-accent-amber: #f59e0b;
    --color-accent-amber-hover: #d97706;
    --color-text-main: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-danger: #ef4444;
    --radius-lg: 16px;
    --radius-full: 999px;
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

button {
    font-family: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Glass Navbar --- */
.glass-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-accent-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--color-text-main);
}

/* --- Cart Layout --- */
.cart-wrapper {
    padding: 3rem 0;
    flex: 1;
}

.page-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    /* Wide items area, fixed summary width */
    gap: 2rem;
    align-items: start;
}

/* --- Empty State --- */
.empty-state {
    grid-column: 1 / -1;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--color-border);
    padding: 5rem 2rem;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    display: inline-block;
}

.empty-text {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn-browse {
    background: var(--color-accent-blue);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.btn-browse:hover {
    background: #1e70c2;
    box-shadow: 0 4px 12px rgba(40, 137, 216, 0.3);
}

/* --- Custom Modal/Pop-up Styles (NEW) --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-card);
    transform: scale(0.95) translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-backdrop.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-danger);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.modal-btn-cancel {
    background: var(--color-bg-dark);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.modal-btn-confirm {
    background: var(--color-danger);
    color: #fff;
}

.modal-btn-confirm:hover {
    background: #c53030;
}


/* --- Mobile --- */
@media (max-width: 900px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }
}