/* General Styles for Cart Table */
.shop_table.cart {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Base styles remain the same until the media query */

/* Enhanced Media Queries for Better Responsiveness */
@media (max-width: 768px) {
    .shop_table.cart {
        border: 0;
        box-shadow: none;
        padding: 0.8rem 1rem;
    }

    .shop_table.cart thead {
        display: none;
    }

    .shop_table.cart tbody tr {
        display: block;
        margin-bottom: 1.5rem;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        position: relative;
    }

    .shop_table.cart td {
        display: grid;
        grid-template-columns: 120px 1fr;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #eee;
    }

    .shop_table.cart td:before {
        content: attr(data-title);
        font-weight: 600;
        color: #666;
    }

    /* Special handling for product thumbnail - Increased size */
    .shop_table.cart td.product-thumbnail {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem 1rem; /* Increased padding */
    }

    .shop_table.cart td.product-thumbnail:before {
        display: none;
    }

    .shop_table.cart td.product-thumbnail img {
        max-width: 130px; /* Increased from 80px */
        width: 100%;
        height: auto;
        margin: 0 auto;
        display: block;
    }

    /* Product name styling */
    .shop_table.cart td.product-name {
        font-size: 1.1rem;
    }

    /* Center align quantity input */
    .shop_table.cart td.product-quantity {
        justify-content: start;
    }

    .shop_table.cart td.product-quantity .quantity {
        margin-left: auto;
    }

    /* Remove button positioning */
    .shop_table.cart td.product-remove {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        border: none;
        padding: 0.5rem;
    }

    .shop_table.cart td.product-remove:before {
        display: none;
    }

    /* Price and subtotal alignment */
    .shop_table.cart td.product-price,
    .shop_table.cart td.product-subtotal {
        text-align: left;
    }

    .shop_table.cart td.product-price span,
    .shop_table.cart td.product-subtotal span {
        margin-left: auto;
    }

    /* Empty cart message */
    .shop_table.cart tr.empty-cart-row td {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    .shop_table.cart td {
        grid-template-columns: 100px 1fr;
        padding: 0.9rem 1rem;
    }

    .shop_table.cart td.product-thumbnail img {
        max-width: 120px; /* Still larger than original but slightly smaller for very small screens */
    }

    .shop_table.cart td.product-name {
        font-size: 1rem;
    }

    .shop_table.cart .quantity input {
        width: 50px;
    }
}

.coupon-section {
    margin: 20px 0;
    padding: 20px;
}

.coupon-align-left {
    text-align: left;
}

.coupon-align-center {
    text-align: center;
}

.coupon-align-right {
    text-align: right;
}

.coupon-full-width {
    width: 100%;
    text-align: center;
}

.coupon-full-width .woocommerce-coupon-form {
    width: 100%;
}

.coupon-full-width .coupon-input-wrapper {
    justify-content: center;
}

@media (max-width: 768px) {
    .coupon-full-width .coupon-input-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .coupon-full-width .coupon-input-wrapper input,
    .coupon-full-width .coupon-input-wrapper .apply-coupon-button {
        width: 100%;
        max-width: 400px;
        margin: 5px 0;
    }
}

.checkout-button {
    width: auto;
    display: inline-block;
    text-align: center; /* Default alignment */
    margin: 0; /* Remove default margin */
}

/* Full width */
.checkout-button.full-width {
    width: 100%;
}

/* Left alignment */
.checkout-button.left {
    text-align: left;
    margin-left: 0; /* Align to the left */
}

/* Right alignment */
.checkout-button.right {
    text-align: right;
    margin-right: 0; /* Align to the right */
}

/* Center alignment */
.checkout-button.center {
    text-align: center;
    margin-left: auto;
    margin-right: auto; /* Center horizontally */
}

/*cart details*/

.cart-totals-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-totals-stacked .cart-subtotal,
.cart-totals-stacked .cart-discount,
.cart-totals-stacked .order-total {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cart-totals-wrapper .coupon-entry {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .cart-totals-wrapper {
        align-items: stretch;
    }
}
