* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
}

body {
    font-family: Arial, sans-serif;
    background-color: #0b1020;
    background-image:
        radial-gradient(1200px 600px at 10% -10%, rgba(30, 58, 138, 0.35), transparent 60%),
        radial-gradient(800px 400px at 110% 10%, rgba(2, 6, 23, 0.6), transparent 60%),
        linear-gradient(180deg, #0b1020 0%, #000 100%),
        url('/images/bg-veo3.svg');
    background-blend-mode: screen, normal, normal, multiply;
    background-attachment: fixed, fixed, fixed, fixed;
    background-size: cover, cover, cover, 1200px;
    background-repeat: no-repeat, no-repeat, no-repeat, repeat;
    color: #e2e8f0;
    line-height: 1.6;
}

.body-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Header styles are now handled by style.css */

.cart-section {
    padding: 32px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.8));
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 20px 40px rgba(2, 8, 23, 0.6);
    max-width: 900px;
    margin: 32px auto;
    backdrop-filter: blur(10px);
}

.cart-section h1 {
    margin-bottom: 24px;
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    text-align: center;
}

.cart-items {
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    position: relative;
    transition: background-color 0.2s ease;
}

.cart-item:hover {
    background-color: rgba(148, 163, 184, 0.03);
    border-radius: 8px;
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -12px;
    margin-right: -12px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 600;
    color: #f8fafc;
}

.cart-item-price {
    color: #93c5fd;
    font-weight: 500;
}

.cart-summary {
    text-align: center;
    margin-top: 32px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.cart-summary p {
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
    color: #f8fafc;
}

.checkout-button {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.checkout-button:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.checkout-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.remove-button {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 80px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.remove-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.remove-button:hover::before {
    left: 100%;
}

.remove-button:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

.remove-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.footer {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(2, 8, 23, 0.9));
    color: #cbd5e1;
    text-align: center;
    padding: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

/* Note: Mobile navigation styles are now handled by mobile-navigation.css */

/* Responsive Design */
@media (max-width: 768px) {
    .cart-section {
        margin: 16px;
        padding: 16px 16px 28px; /* extra bottom space so button doesn't touch footer */
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .cart-section h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    
    .cart-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 16px 0;
        position: relative;
    }
    
    .cart-item img {
        width: 60px;
        height: 60px;
    }
    
    .cart-item-details {
        margin-left: 0;
        flex: 1;
        overflow-wrap: break-word;
        word-wrap: break-word;
        min-width: 0;
    }
    
    .cart-item-title {
        font-size: 1.1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        margin-bottom: 6px;
    }
    
    .cart-summary {
        text-align: center;
        margin-top: 20px;
    }
    
    .checkout-button {
        width: 100%;
        max-width: 100%;
        margin: 8px auto;
        padding: 14px 20px;
        display: block;
        box-sizing: border-box;
        white-space: nowrap;
        word-break: keep-all;
        font-size: 1rem;
    }
    
    .remove-button {
        padding: 8px 14px;
        font-size: 0.85rem;
        min-width: 70px;
        flex-shrink: 0;
        margin-left: 8px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .cart-item {
        gap: 8px;
        padding: 12px 0;
    }
    
    .cart-section {
        padding: 14px 14px 32px; /* more bottom padding on very small screens */
    }
    
    .cart-section h1 {
        font-size: 1.4rem;
        line-height: 1.2;
    }
    
    .cart-item-details {
        margin-left: 0;
    }
    
    .cart-item-title {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .cart-item-price {
        font-size: 0.9rem;
    }
    
    .cart-summary p {
        font-size: 1rem;
    }
    
    .remove-button {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 60px;
        margin-left: 6px;
    }
    
    .checkout-button {
        font-size: 0.95rem;
        padding: 12px 16px;
        max-width: 100%;
        white-space: nowrap;
    }
}

/* Prevent horizontal scrolling on all screen sizes */
.cart-section,
.cart-items,
.cart-item,
.cart-item-details,
.cart-summary {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ultra-small devices */
@media (max-width: 360px) {
    .cart-section h1 {
        font-size: 1.25rem;
    }
    .cart-item-title {
        font-size: 0.95rem;
    }
    .checkout-button {
        font-size: 0.9rem;
        padding: 10px 14px;
        white-space: normal; /* allow wrapping on very small screens */
        line-height: 1.2;
        text-wrap: balance;
    }
}