body{
    background-color: #ffffff;
}
h1 {
    text-align: center;
    color: var(--text-color-primary);
    font-size: 2.5em;
    font-weight: 900;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.cart-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    font-family: 'Inter', sans-serif;
}

.cart-item {
    display: flex;
    flex-direction: column; /* Key change: stacks children vertically */
    align-items: flex-start; /* Aligns content to the left */
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-breadcrumbs {
    /* Style for the breadcrumbs */
    width: 100%; /* Ensures it spans the full width of the container */
    margin-bottom: 10px; /* Adds space below the breadcrumbs */
    font-size: 1rem;
    font-weight: bold;
    color: #666;
}

.cart-item-breadcrumbs a {
    text-decoration: none;
    color: #a44949;
}

.cart-item-breadcrumbs a:hover {
    text-decoration: underline;
}

/* New container to hold the image and item details side-by-side */
.cart-item-body {
    display: flex;
    align-items: flex-start;
    gap: 40px; /* Aligns with the previous gap */
    width: 100%;
}

.cart-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.cart-item img:hover {
    transform: scale(1.05);
}

.item-details {
    flex-grow: 1;
}

.item-details h3 {
    margin: 0 0 15px 0;
    font-weight: 700;
    font-size: 1.5em;
}

/* Corrected rule to change the color of the product name link */
.item-details h3 a {
    color: var(--text-color-primary); /* Sets the color of the link */
    text-decoration: none; /* Removes underline from the link */
}

/* Added hover effect for the product name link */
.item-details h3 a:hover {
    text-decoration: underline;
}

.item-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.716);
    font-size: 1.1em;
    font-weight: 500;
    font-weight: bold;
}

/* Better color for pricing and quantity details */
.item-price,
.item-subtotal {
    color: #fff; /* A bright white color for better readability */
    font-weight: bold; /* Make the text bolder */
}

/* --- New Item Action Styles --- */
.item-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    margin-right: 20px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    overflow: hidden;
}

.quantity-controls button {
    background-color: transparent;
    border: none;
    color: var(--text-color-primary);
    font-size: 1.5em;
    font-weight: 700;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quantity-controls button:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.quantity-display {
    width: 60px;
    text-align: center;
    color: #e6e6e6;
    font-size: 1.2em;
    font-weight: 500;
    padding: 10px 0;
    user-select: none;
}

.remove-btn {
    --remove-color: #ff6347;
    background-color: transparent;
    color: var(--remove-color);
    border: 2px solid var(--remove-color);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.remove-btn:hover {
    background-color: var(--remove-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* --- Cart Total and Checkout Buttons --- */
.cart-total {
    text-align: right;
    margin-top: 50px;
    font-size: 2em;
    font-weight: 800;
    color: var(--text-color-primary);
    border-top: 2px solid var(--border-color);
    padding-top: 20px;
}

.cart-actions {
    margin-top: 60px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-checkout,
.btn-continue {
    padding: 20px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2em;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-checkout {
    background-color: var(--accent-color);
    color: white;
    border: 2px solid var(--accent-color);
}

.btn-checkout:hover {
    background-color: rgba(23, 132, 37, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
}

.btn-continue {
    background-color: transparent;
    color: var(--text-color-primary);
    border: 2px solid var(--border-color);
}

.btn-continue:hover {
    background-color:#000000cc;
    color: rgb(255, 255, 255);
    transform: translateY(-3px);
}

.empty-cart {
    text-align: center;
    padding: 100px 0;
    color: var(--text-color-secondary);
    font-size: 1.5em;
    font-weight: 500;
}

.empty-cart .btn-continue {
    margin-top: 30px;
}

.modal { 
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 50%;
}

.close-btn {
    float: right;
    font-size: 28px;
    cursor: pointer;
}


/* ========================================= */
/* --- STYLING FOR INSTALLATION DETAILS --- */
/* ========================================= */

.cart-item .item-details h3 .toggle-details {
    /* Style the button itself */
    margin-left: 15px;
    padding: 5px 10px;
    border: 1px solid #007bff; /* Blue border */
    background-color: #f0f8ff; /* Light blue background */
    color: #007bff; /* Blue text */
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85em;
    transition: background-color 0.2s, border-color 0.2s;
    font-weight: normal; /* Override H3's strong weight */
}

.cart-item .item-details h3 .toggle-details:hover {
    background-color: #e6f7ff; /* Lighter blue on hover */
    border-color: #0056b3;
}

.installation-details {
    /* Style the main details container */
    background-color: #f9f9f9;
    border: 1px solid #ddd !important; /* Make border a bit lighter */
    padding: 15px !important;
    border-radius: 8px !important;
    margin-top: 15px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.installation-details ul {
    list-style: none; /* Remove bullet points */
    padding: 0;
    margin: 0;
}

.installation-details ul li {
    padding: 5px 0;
    border-bottom: 1px dashed #eee; /* Subtle separator */
    line-height: 1.4;
}

.installation-details ul li:last-child {
    border-bottom: none;
}

.installation-details strong {
    /* Change the color of the labels (strong tags) */
    color: #28a745; /* Green color for labels */
    display: inline-block;
    min-width: 150px; /* Gives nice alignment to the values */
    font-weight: 600;
}

.installation-details .section-header {
    /* Style the section dividers (CCTV Details, Contact Details, etc.) */
    font-weight: bold;
    color: #555;
    padding: 10px 0 5px 0;
    margin-top: 10px;
    border-bottom: 2px solid #ccc;
}

.installation-details .notes {
    /* Style for the customer-supplied material notes */
    font-style: italic;
    color: #dc3545; /* Red warning color */
    margin-top: 5px;
    padding-left: 10px;
    border-left: 3px solid #dc3545;
}


/* Styling for the new Edit Details link/button */
.cart-item .item-actions .btn-edit-details {
    /* Base style to look like an action button */
    display: inline-block;
    padding: 6px 12px;
    margin-right: 10px; /* Space from Remove button */
    border: 1px solid #ffc107; /* Amber/Yellow border */
    background-color: #fff3cd; /* Light Yellow background */
    color: #856404; /* Darker Yellow text */
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cart-item .item-actions .btn-edit-details:hover {
    background-color: #ffe8a1;
}

.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.95rem;
}

.flash-message .icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Default success/info look */
.flash-message.info,
.flash-message.success {
    background-color: #e6f9ec; /* light green */
    color: #256d1b;           /* dark green text */
    border: 1px solid #b8e6c2;
}

/* If you still use "warning" category, soften it */
.flash-message.warning {
    background-color: #fffbea;
    color: #8a6d3b;
    border: 1px solid #ffe58f;
}


/* /* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .cart-item img {
        margin-right: 0;
        margin-bottom: 20px;
    }
    .item-actions {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 15px;
        margin-top: 20px;
    }
    .quantity-controls {
        width: 100%;
        justify-content: space-between;
    }
    .quantity-controls input {
        flex-grow: 1;
    }
    .cart-total {
        text-align: center;
        font-size: 1.5em;
    }
    .cart-actions {
        flex-direction: column;
    }
    .btn-checkout, .btn-continue {
        width: 100%;
        margin-left: 0;
        margin-bottom: 15px;
    }
}













