/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f1f3f6;
    color: #333;
    padding-bottom: 70px; /* Space for bottom navigation */
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #5a189a;
    padding: 15px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #9d4edd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.site-logo {
    max-height: 50px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.1);
}

.welcome-message {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    flex-grow: 1;
    margin-left: 20px;
}

/* Container */
.cart-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
}

/* Heading */
.cart-container h1 {
    font-size: 2.5rem;
    color: #2d3436;
    text-align: center;
    margin-bottom: 30px;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: #5a189a;
}

table th {
    color: #fff;
    padding: 15px;
    text-transform: uppercase;
    font-size: 14px;
}

table td {
    padding: 15px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #ddd;
}

table td img {
    max-width: 80px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

table td img:hover {
    transform: scale(1.1);
}

/* Discount Highlight */
.discount-highlight {
    background: linear-gradient(45deg, #ffe8e8, #ffc7c7);
    border-left: 4px solid #d63031;
    border-radius: 5px;
    padding: 10px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 10px rgba(255, 99, 72, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 99, 72, 0.7); }
    100% { box-shadow: 0 0 10px rgba(255, 99, 72, 0.4); }
}

/* Quantity Inputs */
.quantity-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn {
    background-color: #dfe6e9;
    border: none;
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}

.quantity-btn:hover {
    background-color: #b2bec3;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid #dfe6e9;
    margin: 0 5px;
    font-size: 16px;
    padding: 5px;
    border-radius: 5px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 10px 5px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: #5a189a;
    color: #fff;
}

.btn-primary:hover {
    background-color: #6c1ba0;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #2d3436;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #636e72;
    transform: translateY(-2px);
}

.remove-btn {
    background-color: transparent;
    color: #d63031;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.remove-btn:hover {
    color: #e17055;
}

/* Floating Summary Box */
.total-summary {
    position: sticky;
    top: 20px;
    background: #fff;
    padding: 15px;
    border: 2px solid #5a189a;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: right;
    font-size: 22px;
    font-weight: bold;
    color: #2d3436;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 50px 20px;
}

.empty-cart img {
    max-width: 150px;
    margin-bottom: 20px;
}

.empty-cart h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #5a189a;
}

.empty-cart p {
    font-size: 1rem;
    color: #636e72;
    margin-bottom: 20px;
}

/* Sticky Checkout Bar (Mobile) */
.sticky-checkout {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #5a189a;
    color: white;
    text-align: center;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.sticky-checkout a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
}

.sticky-checkout a:hover {
    text-decoration: underline;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    table thead {
        display: none;
    }
    
    table, table tbody, table tr, table td {
        display: block;
        width: 100%;
    }
    
    table tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #ddd;
    }
    
    table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }
    
    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 15px;
        font-weight: bold;
        text-align: left;
    }
    
    .quantity-container {
        justify-content: flex-end;
    }
    
    .total-summary {
        text-align: center;
    }
    
    .btn {
        width: 100%;
        margin: 10px 0;
    }
}
