.cart_section {
    padding: 80px 0;
}
.cart_title {
    font-size: 36px;
    font-weight: 600;
    color: #0e8ce4;
    margin-bottom: 40px;
    text-align: center;
}
.cart_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}
.cart_table th, .cart_table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}
.cart_table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}
.product_image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}
.product_name {
    font-weight: 600;
    color: #0e8ce4;
}
.product_category {
    color: #6c757d;
    font-size: 14px;
}
.product-info-mobile {
    flex: 1;
    min-width: 0; /* Allow text to wrap */
}

/* Mobile Card Layout */
.cart_mobile_cards {
    padding: 0;
}

.cart_item_card {
    background: #FFFFFF;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.05);
}

.product_image_mobile {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.product_name_mobile {
    font-weight: 600;
    color: #0e8ce4;
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 2px;
}

.product_category_mobile {
    color: #6c757d;
    font-size: 13px;
}

.remove_btn_mobile {
    color: #dc3545;
    text-decoration: none;
    font-size: 16px;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.remove_btn_mobile:hover {
    background-color: #f8d7da;
    color: #dc3545;
}

.cart_item_details {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
}

.price_info, .quantity_info, .total_info {
    text-align: center;
    flex: 1;
}

.price_label, .quantity_label, .total_label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: 500;
}

.price_value, .total_value {
    font-size: 16px;
    font-weight: 600;
    color: #0e8ce4;
}

.quantity_input_mobile {
    width: 50px;
    padding: 4px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}
.quantity_input {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
}
.remove_btn {
    color: #dc3545;
    text-decoration: none;
    font-weight: 500;
}
.remove_btn:hover {
    color: #c82333;
}
.cart_totals {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}
.cart_totals h4 {
    color: #0e8ce4;
    margin-bottom: 20px;
}
.total_row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}
.total_row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 18px;
    color: #0e8ce4;
}
.checkout_btn {
    background-color: #0e8ce4;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}
.checkout_btn:hover {
    background-color: #0c7cd5;
    color: white;
    text-decoration: none;
}
.continue_shopping {
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
}
.continue_shopping:hover {
    color: #0e8ce4;
}
.empty_cart {
    text-align: center;
    padding: 80px 20px;
}
.empty_cart_icon {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}
.empty_cart h3 {
    color: #6c757d;
    margin-bottom: 20px;
}
body {
    background-color: #ffffff;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 767px) {
    .cart_section {
        padding: 40px 0;
    }

    .cart_title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .cart_table {
        font-size: 14px;
        table-layout: fixed;
        width: 100%;
    }

    .cart_table th,
    .cart_table td {
        padding: 8px 4px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Fixed column widths for better control */
    .cart_table th:nth-child(1), .cart_table td:nth-child(1) { /* Product */
        width: 40%;
        min-width: 120px;
    }
    .cart_table th:nth-child(2), .cart_table td:nth-child(2) { /* Price */
        width: 20%;
        min-width: 60px;
        text-align: right;
    }
    .cart_table th:nth-child(3), .cart_table td:nth-child(3) { /* Quantity */
        width: 15%;
        min-width: 50px;
        text-align: center;
    }
    .cart_table th:nth-child(4), .cart_table td:nth-child(4) { /* Total */
        width: 20%;
        min-width: 60px;
        text-align: right;
    }
    .cart_table th:nth-child(5), .cart_table td:nth-child(5) { /* Remove */
        width: 5%;
        min-width: 50px;
        text-align: center;
    }

    .product_image {
        width: 50px;
        height: 50px;
    }

    .product_name {
        font-size: 13px;
        line-height: 1.3;
        margin-bottom: 2px;
    }

    .product_category {
        font-size: 11px;
    }

    .quantity_input {
        width: 45px;
        padding: 3px;
        font-size: 14px;
    }

    /* Ensure delete button stays visible */
    .remove_btn {
        font-size: 11px;
        padding: 4px 6px;
        white-space: nowrap;
        min-width: 50px;
        display: inline-block;
        text-align: center;
    }

    .cart_totals {
        padding: 20px;
        margin-top: 30px;
    }

    .cart_totals h4 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .total_row {
        font-size: 14px;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .checkout_btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Extra small screens - ensure total price visibility */
@media screen and (max-width: 575px) {
    .cart_section {
        padding: 30px 0;
    }

    .cart_title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    /* Stack layout for very small screens */
    .row {
        flex-direction: column;
    }

    .col-lg-8,
    .col-lg-4 {
        width: 100%;
        margin-bottom: 20px;
    }

    .cart_table {
        font-size: 13px;
    }

    .cart_table th:nth-child(5),
    .cart_table td:nth-child(5) {
        width: 80px;
        min-width: 80px;
    }

    /* Ensure delete button is always visible */
    .remove_btn {
        font-size: 11px;
        padding: 3px 5px;
        min-width: 60px;
        display: block;
        text-align: center;
        margin: 0 auto;
    }

    /* Ensure total price section is fully visible */
    .cart_totals {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .total_row {
        font-size: 13px;
        margin-bottom: 5px;
        padding-bottom: 5px;
    }

    .total_row:last-child {
        font-size: 16px;
        font-weight: 700;
    }

    .checkout_btn {
        padding: 12px;
        font-size: 16px;
        width: 100%;
    }
}

/* Critical fix for very small screens */
@media screen and (max-width: 415px) {
    .cart_table th,
    .cart_table td {
        padding: 8px 3px;
    }

    /* Force delete button visibility */
    .remove_btn {
        font-size: 10px;
        padding: 2px 4px;
        min-width: 50px;
        display: block;
        width: 100%;
        text-align: center;
        margin: 2px 0;
    }

    /* Force total price visibility */
    .cart_totals {
        padding: 12px;
        margin: 10px 0;
        width: 100%;
    }

    .total_row {
        font-size: 12px;
        margin-bottom: 3px;
        padding-bottom: 3px;
    }

    .total_row:last-child {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .cart_totals h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }
}
