/* Legendary Cart Page Styles */
.cart-page-wrapper {
    background-color: #f4f7f6;
    min-height: 100vh;
    padding-bottom: 60px;
    font-family: 'Cairo', sans-serif;
}

.cart-page-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
    padding: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.cart-page-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-page-header .logo {
    color: white;
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 1px;
}

.cart-page-header .logo span {
    color: var(--primary-red);
}

.cart-page-header .back-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-page-header .back-link:hover {
    color: white;
    transform: translateX(-5px);
}

.cart-main-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: 800;
    color: #2c3e50;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.cart-main-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 2px;
}

/* Layout Grid */
.cart-layout-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.cart-col-main {
    flex: 2;
    min-width: 300px;
}

.cart-col-sidebar {
    flex: 1;
    min-width: 300px;
}

.cart-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.cart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.cart-header-title {
    background: white;
    color: #2c3e50;
    padding: 25px 30px;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header-title i {
    color: var(--primary-red);
}

.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px;
    margin-top: -15px;
}

.cart-table th {
    padding: 15px;
    text-align: right;
    color: #888;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
}

.cart-table tbody tr {
    background: #fff;
    transition: 0.3s;
}

.cart-table td {
    padding: 20px 15px;
    vertical-align: middle;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-table tbody tr:first-child td {
    border-top: none;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-prod-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cart-prod-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
}

.cart-prod-price {
    color: #666;
    font-weight: 600;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 30px;
    width: fit-content;
    border: 1px solid #eee;
}

.qty-btn {
    background: white;
    border: none;
    cursor: pointer;
    color: #2c3e50;
    font-weight: bold;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: 0.2s;
}

.qty-btn:hover {
    background: var(--primary-red);
    color: white;
}

.remove-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff5f5;
    color: #ff4d4d;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.remove-btn:hover {
    background: #ff4d4d;
    color: white;
    transform: rotate(90deg);
}

/* Form Styles */
.checkout-form-container {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 12px;
    transition: 0.3s;
    font-size: 1rem;
    background: #fdfdfd;
}

.form-control:focus {
    border-color: var(--primary-red);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.file-upload-wrapper {
    border: 2px dashed #ddd;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
    background: #fafafa;
}

.file-upload-wrapper:hover {
    border-color: var(--primary-red);
    background: #fff5f5;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
    color: #666;
    font-size: 1rem;
}

.summary-total {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2c3e50;
    border-top: 2px solid #eee;
    border-bottom: none;
    padding-top: 20px;
    margin-top: 10px;
}

.summary-total span:last-child {
    color: var(--primary-red);
}

.btn-checkout {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary-red) 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 25px;
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(231, 76, 60, 0.4);
}

.btn-checkout::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-checkout:hover::after {
    left: 100%;
}

@media (max-width: 992px) {
    .cart-layout-row {
        flex-direction: column;
    }

    .cart-table thead {
        display: none;
    }
    
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
        display: block;
        width: 100%;
    }
    
    .cart-table tr {
        margin-bottom: 20px;
        border: 1px solid #eee;
        border-radius: 15px;
        padding: 15px;
        background: white;
    }
    
    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 0;
        border: none;
        border-bottom: 1px solid #f9f9f9;
    }
    
    .cart-table td:last-child {
        border-bottom: none;
    }
    
    .cart-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #888;
        font-size: 0.9rem;
    }
    
    .cart-prod-img {
        width: 70px;
        height: 70px;
    }
}
