/* ==========================================================================
   CART PAGE STYLES - Matching Mini Cart Design
   ========================================================================== */

/* Only target the cart table and totals, not the main page layout */

/* Cart Table Styling - Match Mini Cart Design */
.woocommerce-cart table.cart {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.woocommerce-cart table.cart thead th {
    background: #f8f9fa;
    color: #2e3841;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
}

.woocommerce-cart table.cart tbody td {
    padding: 15px;
    vertical-align: middle;
}

.woocommerce-cart table.cart tbody tr:last-child td {
    border-bottom: none;
}

/* Product Thumbnail - Match Mini Cart */
.woocommerce-cart table.cart .product-thumbnail {
    width: 80px;
}

.woocommerce-cart table.cart .product-thumbnail img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0;
}

/* Product Name - Match Mini Cart */
.woocommerce-cart table.cart .product-name {
    font-weight: 500;
    color: #2e3841;
    font-size: 16px;
    line-height: 1.4;
}

.woocommerce-cart table.cart .product-name a {
    color: #2e3841;
    text-decoration: none;
}

.woocommerce-cart table.cart .product-name a:hover {
    color: #1ca792;
}

/* Product Price - Match Mini Cart */
.woocommerce-cart table.cart .product-price {
    color: #1ca792;
    font-weight: 700;
    font-size: 16px;
}

/* Product Subtotal - Match Mini Cart */
.woocommerce-cart table.cart .product-subtotal {
    color: #1ca792;
    font-weight: 700;
    font-size: 16px;
}

/* Quantity Input - Match Mini Cart Style */
.woocommerce-cart table.cart .quantity input[type="number"] {
    width: 60px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.woocommerce-cart table.cart .quantity input[type="number"]:focus {
    outline: none;
    border-color: #1ca792;
    box-shadow: 0 0 0 2px rgba(28, 167, 146, 0.1);
}

/* Remove Button - Match Mini Cart */
.woocommerce-cart table.cart .product-remove a {
    font-size: 20px;
    text-decoration: none;
    display: flex
;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    border-radius: 50%;
    background: #f8f9fa;
    transition: all 0.3s ease;
    flex-direction: row;
    justify-content: center;
}
.order-total th {
    padding-left: 20px !important;
    /* padding-right: 20px !important; */
}

.order-total td {
    padding-right: 20px !important;
    width:30%!important;
}
.shipping td {
    border: unset !important;
}
#add_payment_method .cart-collaterals .cart_totals table th, .woocommerce-cart .cart-collaterals .cart_totals table th, .woocommerce-checkout .cart-collaterals .cart_totals table th {
    width: 30%;
}
div#ast-checkout-coupon {
    display: none;
}
/* Remove button hover - handled by global styles */

/* Product Variations - Match Mini Cart */
.woocommerce-cart table.cart .product-variation {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #666;
}

.woocommerce-cart table.cart .variation-item {
    display: flex;
    margin-bottom: 2px;
}

.woocommerce-cart table.cart .variation-label {
    font-weight: 500;
    margin-right: 5px;
}

.woocommerce-cart table.cart .variation-value {
    color: #1ca792;
}

/* Cart Page Variation Display - Uses global dl.variation styles from style.css */

/* Delivery Information - Uses global fast-shipping/tarnealt styles from style.css */

/* Cart Actions */
.woocommerce-cart .actions {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.woocommerce-cart .actions .coupon {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.woocommerce-cart .actions .coupon input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.woocommerce-cart .actions .coupon input[type="text"]:focus {
    outline: none;
    border-color: #1ca792;
    box-shadow: 0 0 0 2px rgba(28, 167, 146, 0.1);
}

.woocommerce-cart .actions .coupon button {
    background: #1ca792;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.woocommerce-cart .actions .coupon button:hover {
    background: #159a7a;
}

/* Gift Card Redemption Form Styling */
#wc_gc_cart_redeem_form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

#wc_gc_cart_redeem_form input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

#wc_gc_cart_redeem_form input[type="text"]:focus {
    outline: none;
    border-color: #1ca792;
    box-shadow: 0 0 0 2px rgba(28, 167, 146, 0.1);
}

#wc_gc_cart_redeem_form button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#wc_gc_cart_redeem_form button:hover {
    background: #5a6268;
}

.woocommerce-cart .actions .button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.woocommerce-cart .actions .button:hover {
    background: #5a6268;
}

/* Cart Totals - Match Mini Cart */
.woocommerce-cart .cart-collaterals {
    background: white;
    border-radius: 12px;
  
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.woocommerce-cart .cart_totals h2 {
    color: #2e3841;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.woocommerce-cart .cart_totals table th,
.woocommerce-cart .cart_totals table td {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.woocommerce-cart .cart_totals table th {
    font-weight: 500;
    color: #2e3841;
}

.woocommerce-cart .cart_totals table td {
    text-align: right;
    font-weight: 500;
}

.woocommerce-cart .cart_totals .order-total {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 18px;
    color: #1ca792;
    border: 2px solid #1ca792;
}

.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total td {
    border-bottom: none;
    background: transparent;
}

/* Checkout Button */
.woocommerce-cart .wc-proceed-to-checkout {
    text-align: center;
    margin-top: 20px;
}

.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    background: #1ca792;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
    background: #159a7a;
}

/* Empty Cart */
.woocommerce-cart .cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.woocommerce-cart .cart-empty h2 {
    color: #2e3841;
    margin-bottom: 20px;
}

.woocommerce-cart .cart-empty .return-to-shop {
    background: #1ca792;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.woocommerce-cart .cart-empty .return-to-shop:hover {
    background: #159a7a;
}

/* Mini Cart Swatches in Cart Page */
.woocommerce-cart .mini-cart-swatches {
    margin-top: 8px;
}

.woocommerce-cart .mini-cart-swatch {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 4px;
}

.woocommerce-cart .mini-cart-swatch .swatch-label {
    font-size: 11px;
    color: #666;
    margin-right: 4px;
}

.woocommerce-cart .mini-cart-swatch .cfvsw-swatches-option {
    display: inline-block;
    min-width: 20px;
    min-height: 20px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.woocommerce-cart .mini-cart-swatch .cfvsw-swatch-inner {
    width: 100%;
    height: 100%;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 500;
    color: #333;
}
.woocommerce-js .quantity .minus, .woocommerce-js .quantity .plus {
   
}
/* Responsive Design - Only for cart table and totals */
@media (max-width: 768px) {
    .woocommerce-cart table.cart {
        font-size: 12px;
    }
    .woocommerce-shipping-totals.shipping ul#shipping_method li {
     
        min-width: inherit!important;
        clear: both!important;    
    }

    .woocommerce-cart table.cart thead th,
    .woocommerce-cart table.cart tbody td {
        padding: 10px 5px;
    }
    
    .woocommerce-cart table.cart .product-thumbnail img {
        width: 50px;
        height: 50px;
    }
    
    .woocommerce-cart .actions {
        flex-direction: column;
        align-items: stretch;
    }
    

    .woocommerce-cart .actions .coupon {
        min-width: auto;
        flex-direction: column;
        align-items: stretch;
    }
    
    .woocommerce-cart .actions .coupon input[type="text"] {
        margin-bottom: 10px;
    }
    
    #wc_gc_cart_redeem_form {
        min-width: auto;
        flex-direction: column;
        align-items: stretch;
    }
    
    #wc_gc_cart_redeem_form input[type="text"] {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .woocommerce-cart table.cart {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .woocommerce-cart table.cart thead,
    .woocommerce-cart table.cart tbody,
    .woocommerce-cart table.cart th,
    .woocommerce-cart table.cart td,
    .woocommerce-cart table.cart tr {
        display: block;
    }
    
    .woocommerce-cart table.cart thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .woocommerce-cart table.cart tr {
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 10px;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        display: grid;
        grid-template-columns: var(--mini-cart-thumb) 1fr auto;
        grid-auto-rows: auto;
        column-gap: 10px;
        row-gap: 8px;
        align-items: start;
        position: relative;
    }
    
    .woocommerce-cart table.cart td {
        border: none;
        position: relative;
        padding: 0;
        white-space: normal;
    }
    
    /* Product thumbnail - Column 1 */
    .woocommerce-cart table.cart .product-thumbnail {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: start;
    }
    
    .woocommerce-cart table.cart .product-thumbnail img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    /* Product name - Column 2, Row 1 */
    .woocommerce-cart table.cart .product-name {
        grid-column: 2 / span 2;
        grid-row: 1;
        align-self: start;
        text-align: left !important;
        padding-right: 30px;
    }
    td.product-variations.mobile-only {
        grid-column: 1 / span 3;
        grid-row: 2;
    }
    /* Variations - Column 2, Row 2 */
    .woocommerce-cart table.cart .product-name dl.variation {
        grid-column: 2;
        grid-row: 2;
        margin: 5px 0 0 0;
        font-size: 11px;
        color: #666;
        display: none; 
    }
    td.product-variations.mobile-only {
        min-height: unset !important;
        border: 0px !important;
        padding: 0 !important;
    }
    /* Delivery info - Column 2, Row 3 */
    .woocommerce-cart table.cart .product-name .fast-shipping,
    .woocommerce-cart table.cart .product-name .tarnealt {
        grid-column: 2;
        grid-row: 3;
        margin-top: 4px;
        font-size: 10px;
        display: none;
        padding: 3px 6px;
        text-align: center;
    }
    .mobile-only span.fast-button,
    .mobile-only span.tarne-button {
        width: 100% !important;
        justify-content: center;
    }
    span.tarne-button {
        width: 100%;
        display: block;
        background: #f0f0f0;
        text-align: center;
    }
    .order-total td {
        width: 100% !important;
    }

    small.includes_tax {
        display: block;
    }
    .mobile-only .fast-shipping,
    .mobile-only .tarnealt {
        width: 100% !important;
    }
    
    /* Price - Column 3, Row 1 */
    .woocommerce-cart table.cart .product-price {
        grid-column: 3;
        grid-row: 3;
        align-self: start;
        justify-self: end;
        white-space: nowrap;
        font-weight: 600;
        color: #1ca792;
        display:none;
    }
    
    /* Quantity - Column 2, Row 4 */
    .woocommerce-cart table.cart .product-quantity {
        grid-column: 1;
        grid-row: 3;
        align-self: center;
        justify-self: start;
    }
    
    /* Subtotal - Column 3, Row 4 */
    .woocommerce-cart table.cart .product-subtotal {
        grid-column: 3;
        grid-row: 3;
        align-self: center;
        justify-self: end;
        white-space: nowrap;
        font-weight: 600;
        color: #1ca792;
    }
    td.product-delivery.mobile-only {
        grid-column: 1 / span 3;
        grid-row: 4;
    }
    /* Remove button - Absolute positioned */
    .woocommerce-cart table.cart .product-remove {
        position: absolute;
        top: 10px;
        right: 10px;
        grid-column: 3;
        grid-row: 1;
        z-index:999;
    }
    
    .woocommerce-cart table.cart .product-remove a {
       
        border-radius: 50%;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        text-decoration: none;
    }
    
    /* Show mobile-only columns on mobile */
    .woocommerce-cart table.cart th.mobile-only,
    .woocommerce-cart table.cart td.mobile-only {
        display: block !important;
    }
    
    /* Variations column on mobile */
    .woocommerce-cart table.cart .product-variations {
        text-align: left;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #e0e0e0;
    }
    
    .woocommerce-cart table.cart .product-variations:before {
        content: "Variatsioonid: ";
        font-weight: 600;
        color: #2e3841;
        display: block;
        margin-bottom: 8px;
    }
    
    /* Delivery column on mobile */
    .woocommerce-cart table.cart .product-delivery {
        text-align: left;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #e0e0e0;
    }
    
    .woocommerce-cart table.cart .product-delivery:before {
        content: "Tarneaeg: ";
        font-weight: 600;
        color: #2e3841;
        display: none;
        margin-bottom: 8px;
    }
    
    /* Hide data-title pseudo-elements for other columns */
    .woocommerce-cart table.cart td:not(.product-delivery):before {
        display: none;
    }
    
    /* Hide desktop delivery info on mobile (since we have it in mobile-only column) */
    .woocommerce-cart table.cart .product-name .fast-shipping,
    .woocommerce-cart table.cart .product-name .tarnealt {
        display: none !important;
    }
}

/* Shipping Methods Styling */
.woocommerce-shipping-totals.shipping ul#shipping_method li {
    display: flex
;
min-width: 378px;
    align-content: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid #e3e3e3;
    min-height: 70px;
    border-radius: 8px;
    flex-direction: row;
}

/* Mobile-only columns */
.woocommerce-cart table.cart th.mobile-only,
.woocommerce-cart table.cart td.mobile-only {
    display: none;
}

/* Variations column styling - Uses global dl.variation styles from style.css */
.woocommerce-cart table.cart .product-variations {
    text-align: left;
    vertical-align: top;
}

.woocommerce-cart table.cart .product-variations .variation {
    margin: 0;
    font-size: 12px;
    color: #666;
    padding: 10px;
    text-align: left;
}

/* Delivery column styling */
.woocommerce-cart table.cart .product-delivery {
    text-align: center;
    vertical-align: middle;
}

.woocommerce-cart table.cart .product-delivery .fast-shipping,
.woocommerce-cart table.cart .product-delivery .tarnealt {
    margin: 0;
    display: inline-block;
}

.woocommerce-cart table.cart .product-delivery .fast-button,
.woocommerce-cart table.cart .product-delivery .tarne-button {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Shipping Methods Styling */
ul#shipping_method {
    margin: 0;
    padding: 10px;
    list-style: none;
    margin-bottom: 5px;
}

ul#shipping_method li {
    display: flex;
    align-content: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 10px;
    margin-bottom: 10px !important;
    border: 2px solid #e3e3e3;
    min-height: 70px;
}

ul#shipping_method li.active_method {
    border: 2px solid #1ca792!important;
    background: #f7f7f7;
}

ul#shipping_method li label input {
    display: none;
}

ul#shipping_method li label {
    margin: 0;
    display: flex!important;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    width: 95%;
}
@media screen and (min-width: 922px) {
    .woocommerce-cart-form .woocommerce-cart-form__contents .product-subtotal {
        padding-right: 0;
    }
}
/* Shipping Images */
span.shipping_image.mobile_show {
    margin-right: 10px;
    width: auto;
    display: inline-block;
    flex-shrink: 0;
}

span.shipping_image.mobile_show img {
    width: 80px;
    height: auto;
    max-height: 50px;
    object-fit: contain;
    margin-left: -15px;
}

.woocommerce-shipping-totals.shipping ul#shipping_method li label > span {
    display: flex;
    align-items: center;
    font-weight: 500;
    justify-content: space-between;
}

.woocommerce-shipping-totals.shipping ul#shipping_method li label span .amount,
.woocommerce-shipping-totals.shipping ul#shipping_method li label .amount {
    color: #1ca792;
    text-align: right;
    font-weight: bold;
}

#shipping_method span.woocommerce-Price-amount.amount {
    float: right;
}

.shipping th {
    display: none;
}

p.woocommerce-shipping-destination {
    display: none;
}