/* ============ Cart Page Styles ============ */
.cart-page .shopping-cart-table {
    margin-bottom: 30px;
}

/* Image styling - matches wishlist exactly */
.cart-page .cart-img-container {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #d0ad6d;
    margin: 0 auto;
}

.cart-page .cart-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Table styling */
.cart-page .table-responsive {
    overflow-x: auto;
}

.cart-page table {
    width: 100%;
    border-collapse: collapse;
}

.cart-page th,
.cart-page td {
    padding: 12px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #333;
    word-break: normal; /* Fix tablet text breaking */
}

/* Product name styling */
.cart-page .product-name {
    margin: 8px 0;
    text-align: left;
    padding-right: 40px;
    white-space: normal; /* Fix text wrapping */
}

.cart-page .product-name a {
    color: #d0ad6d;
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-word; /* Proper word breaking */
}

.cart-page .product-name a:hover {
    color: #ffdd35;
}

/* Price styling */
.cart-page .price,
.cart-page .subtotal {
    font-weight: bold;
    margin: 5px 0;
}

/* Quantity buttons */
.cart-page .qty-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.cart-page .qty-input {
    width: 40px;
    text-align: center;
    height: 31px;
    background-color: #10001A;
    color: white;
    border: none;
}

/* Remove button - matches wishlist exactly */
.cart-page .btn-remove {
    background-color: #10001A;
    color: white;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cart-page .btn-remove:hover {
    background-color: #d0ad6d;
}

/* Mobile Card View - EXACT wishlist match */
.cart-page .mobile-cart-item {
    display: none;
    border: 1px solid #d0ad6d; /* Wishlist border */
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: #200036;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.cart-page .mobile-cart-content {
    padding-left: 95px; /* Image width + margin */
    min-height: 80px; /* Match image height */
    position: relative;
}

/* ============ Responsive Behavior ============ */
/* Mobile View (up to 767px) - EXACT wishlist match */
@media (max-width: 767px) {
    .cart-page .table-responsive {
        display: none;
    }

    .cart-page .mobile-cart-item {
        display: block;
        padding: 12px;
    }

    .cart-page .mobile-cart-item .cart-img-container {
        position: absolute;
        left: 12px;
        top: 12px;
        margin: 0;
    }

    .cart-page .btn-remove {
        position: absolute;
        top: 12px;
        right: 12px;
        background-color: #10001A;
        color: white;
        padding: 0.3rem 0.5rem;
    }

    .cart-page .product-name {
        padding-right: 30px;
        margin-bottom: 5px;
    }

    .cart-page .qty-buttons {
        justify-content: flex-start;
        margin-top: 8px;
    }
}

/* Tablet View (768px-991px) - Fixed layout */
@media (min-width: 768px) and (max-width: 991px) {
    .cart-page .mobile-cart-item {
        display: none !important;
    }

    .cart-page .table-responsive {
        overflow-x: auto;
    }

    .cart-page table {
        table-layout: auto; /* Prevent text breaking */
    }

    .cart-page th,
    .cart-page td {
        padding: 10px 8px;
        word-break: normal;
        white-space: normal;

    }

    .cart-page .product-name {

        text-align: left;
        padding-right: 0px;
        white-space: normal; /* Fix text wrapping */
        padding: 0px;
    }

    .cart-page td:first-child {
        width: 100px;
    }

    .cart-page td:nth-child(2) {
        width: auto;
        min-width: 200px;
        padding: 0px;
    }

    .cart-page .btn-remove {
        display: block !important;
        margin: 0 auto;
        width: 32px;
    }
}

/* Desktop View (992px+) */
@media (min-width: 992px) {
    .cart-page .mobile-cart-item {
        display: none !important;
    }

    .cart-page .btn-remove {
        display: inline-block !important;
    }
}
