/* --- Global Reset & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #F8F9FA; /* Very light gray bg */
    --card-bg: #FFFFFF;
    --primary-blue: #2563EB; /* The vivid blue from the image */
    --text-dark: #111827;
    --text-gray: #6B7280;
    --border-light: #E5E7EB;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif; /* Clean font like image */
    color: var(--text-dark);
}

.main-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-dark);
}

/* --- Layout Grid --- */
.cart-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.cart-items-container {
    flex: 2; /* Left side is wider */
}

.summary-section {
    flex: 1; /* Right side is narrower */
    max-width: 400px;
}

/* --- Cart Item Card --- */
.cart-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    /* No distinct shadow in image, maybe very subtle or none */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
}

.card-content {
    display: flex;
    gap: 24px;
}

/* Image */
.img-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    background: #F3F4F6;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Middle Details */
.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.brand {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 4px;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--text-dark);
}

.specs {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0 0 24px 0; /* Space before qty buttons */
}

/* Qty Buttons (Minimalist style) */
.qty-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qty-btn {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.qty-btn:hover {
    color: var(--primary-blue);
}

.qty-val {
    font-size: 16px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

/* Right Column (Delete & Price) */
.item-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    min-width: 100px;
}

.delete-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #9CA3AF; /* Light gray trash icon */
    cursor: pointer;
    transition: color 0.2s;
}

.delete-btn:hover {
    color: #EF4444;
}

.price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

/* --- Order Summary Card --- */
.summary-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.summary-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 25px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 15px;
    color: var(--text-gray);
}

.summary-row .val {
    color: var(--text-dark);
    font-weight: 500;
}

.summary-row .val.green {
    color: #10B981; /* Green "Free" text */
}

.summary-row.total {
    margin-top: 20px;
    margin-bottom: 25px;
    padding-top: 20px;
    /* No border-top shown in image, likely just spacing */
}

.summary-row.total span {
    font-size: 18px;
    font-weight: 800; /* Extra bold for Total */
    color: var(--text-dark);
}

.checkout-btn {
    width: 100%;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 20px;
}

.checkout-btn:hover {
    background-color: #1d4ed8;
}

.continue-link {
    display: block;
    text-align: center;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.continue-link:hover {
    text-decoration: underline;
}

/* --- Pagination (Bottom) --- */
.pagination-container {
    display: flex;
    justify-content: center; /* CHANGED: Centers everything instead of spreading them apart */
    align-items: center;
    margin-top: 60px;
    padding: 0 10px;
    gap: 40px; /* ADDED: This sets the specific distance between Prev, Numbers, and Next */
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.nav-link:hover {
    color: var(--text-dark);
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-num {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-gray);
    font-size: 14px;
    border-radius: 6px;
    transition: 0.2s;
}

.page-num:hover {
    background-color: #F3F4F6;
}

.page-num.active {
    background-color: var(--primary-blue);
    color: white;
    font-weight: 600;
}

price-display {
    text-align: right;
    margin-top: auto; /* Pushes price to bottom if using flex column */
}

/* Container for discounted price items */
.discount-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

/* The Final/Current Price */
.price {
    font-size: 1.1em;
    font-weight: 700;
    color: #1f2937; /* Dark Gray */
}

/* Red color for when an offer is active */
.price.discounted {
    color: #ef4444; /* Red */
}

/* The Old Price (Strikethrough) */
.old-price {
    text-decoration: line-through;
    color: #9ca3af; /* Light Gray */
    font-size: 0.9em;
}

/* The Savings Badge (Green Box) */
.save-badge {
    font-size: 0.75em;
    color: #166534; /* Dark Green Text */
    background-color: #dcfce7; /* Light Green Background */
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* --- Responsive Mobile --- */
@media (max-width: 900px) {
    .cart-layout {
        flex-direction: column;
    }

    .summary-section {
        max-width: 100%;
        width: 100%;
    }

}