/* ==========================================================================
   Premium Cart Page — Shivam Diamonds
   Loaded only on the WooCommerce cart page. Pure CSS, no markup changes.
   ========================================================================== */

.woocommerce-cart .woocommerce {
    --cart-radius: 14px;
    --cart-shadow: 0 2px 14px rgba(32, 32, 32, .05);
    --cart-shadow-hover: 0 14px 34px rgba(32, 32, 32, .10);
}

/* --------------------------------------------------------------------
   Cart item rows
   -------------------------------------------------------------------- */

.woocommerce-cart .shop_table.woocommerce-cart-form__contents {
    border-spacing: 0;
}

.woocommerce-cart .shop_table.woocommerce-cart-form__contents thead th {
    font-family: var(--theme-heading-font-family);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--theme-three-color);
}

.woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item {
    animation: la-cart-row-in .5s ease both;
}

.woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item:nth-child(1) { animation-delay: .02s; }
.woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item:nth-child(2) { animation-delay: .08s; }
.woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item:nth-child(3) { animation-delay: .14s; }
.woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item:nth-child(4) { animation-delay: .2s; }

@keyframes la-cart-row-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Product thumbnail */
.woocommerce-cart .product-thumbnail a {
    display: block;
    width: 90px;
    height: 90px;
    padding-right: 0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    border: 1px solid var(--theme-border-color);
}

.woocommerce-cart .product-thumbnail img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform .5s ease;
}

.woocommerce-cart tr.cart_item:hover .product-thumbnail img {
    transform: scale(1.08);
}

/* Product title */
.woocommerce-cart .product-name a {
    font-family: var(--theme-heading-font-family);
    color: var(--theme-heading-font-color);
    font-size: 1.05em;
    transition: color .2s ease;
}

.woocommerce-cart .product-name a:hover {
    color: var(--theme-primary-color);
}

/* Variation meta (Metal Purity, Metal Tone, Diamond Shape, Ring Size…)
   rendered as a refined divided meta line instead of stacked labels. */
.woocommerce-cart .product-name dl.variation {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 0 0;
    font-size: .8em;
}

.woocommerce-cart .product-name dl.variation dt,
.woocommerce-cart .product-name dl.variation dd {
    float: none;
    margin: 0;
    line-height: 1.6;
}

.woocommerce-cart .product-name dl.variation dt {
    color: var(--theme-three-color);
    font-weight: 400;
    margin-right: 4px;
}

.woocommerce-cart .product-name dl.variation dd {
    color: var(--theme-secondary-color);
    font-weight: 500;
    margin-right: 12px;
    padding-right: 12px;
    border-right: 1px solid var(--theme-border-color);
}

.woocommerce-cart .product-name dl.variation dd p {
    display: inline;
}

.woocommerce-cart .product-name dl.variation dd:last-of-type {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

/* Quantity stepper — compact pill shape */
.woocommerce-cart .product-quantity .quantity {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: 40px !important;
    border: 1px solid var(--theme-border-color);
    border-radius: 30px;
    overflow: hidden;
    transition: border-color .2s ease;
}

.woocommerce-cart .product-quantity .quantity:hover,
.woocommerce-cart .product-quantity .quantity:focus-within {
    border-color: var(--theme-primary-color);
}

.woocommerce-cart .product-quantity .qty {
    width: 34px !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: none;
    text-align: center;
}

.woocommerce-cart .product-quantity .qty-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px !important;
    height: 100% !important;
    padding: 0 !important;
    font-size: 12px;
}

/* Remove button — soft circular icon */
.woocommerce-cart .product-remove {
    position: relative;
}

.woocommerce-cart .product-remove .remove {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    line-height: 1 !important;
    border: 1px solid var(--theme-border-color) !important;
    border-radius: 50% !important;
    background: var(--theme-body-bg-color);
    color: var(--theme-three-color) !important;
    opacity: 1;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.woocommerce-cart .product-remove .remove:before {
    font-size: 11px;
    line-height: 1;
}

.woocommerce-cart .product-remove .remove:hover {
    background-color: #C0392B;
    border-color: #C0392B !important;
    color: #fff !important;
    transform: rotate(90deg);
}

/* Subtotal emphasis */
.woocommerce-cart td.product-subtotal {
    font-family: var(--theme-heading-font-family);
    font-size: 1.05em;
    color: var(--theme-heading-font-color);
}

/* --------------------------------------------------------------------
   Desktop: turn rows into elevated cards
   -------------------------------------------------------------------- */

@media (min-width: 768px) {
    .woocommerce-cart .shop_table.woocommerce-cart-form__contents thead {
        display: none;
    }

    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item {
        position: relative;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 20px;
        background: var(--theme-body-bg-color);
        border: 1px solid var(--theme-border-color);
        border-radius: var(--cart-radius) !important;
        padding: 20px 56px 20px 24px;
        margin-bottom: 16px;
        box-shadow: var(--cart-shadow);
        transition: box-shadow .3s ease, border-color .3s ease;
    }

    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item:hover {
        box-shadow: var(--cart-shadow-hover);
        border-color: var(--theme-primary-color);
    }

    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item td {
        border: none !important;
        padding: 0 !important;
    }

    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item td.product-thumbnail {
        width: 90px;
        flex-shrink: 0;
        order: 1;
    }

    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item td.product-name {
        flex: 1 1 240px;
        min-width: 0;
        text-align: left !important;
        order: 2;
    }

    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item td.product-price {
        order: 3;
        white-space: nowrap;
        color: var(--theme-three-color);
    }

    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item td.product-quantity {
        order: 4;
    }

    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item td.product-subtotal {
        order: 5;
        min-width: 110px;
        text-align: right !important;
    }

    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item td.product-remove {
        position: absolute;
        top: 16px;
        right: 16px;
    }

    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr:not(.cart_item) td.actions {
        padding-top: 20px !important;
    }
}

/* --------------------------------------------------------------------
   Actions row — coupon + update cart
   -------------------------------------------------------------------- */

.woocommerce-cart td.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.woocommerce-cart td.actions .coupon {
    display: flex;
    flex: 1 1 320px;
    align-items: center;
    gap: 10px;
    border-bottom: none !important;
    width: auto !important;
}

.woocommerce-cart td.actions .coupon .input-text {
    flex: 1 1 auto;
    width: auto !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 18px !important;
    border: 1px solid var(--theme-border-color) !important;
    border-radius: 30px !important;
    background: var(--theme-body-bg-color);
}

.woocommerce-cart td.actions .coupon .input-text:focus {
    border-color: var(--theme-primary-color) !important;
}

.woocommerce-cart td.actions .coupon .button,
.woocommerce-cart td.actions .button[name="update_cart"] {
    display: inline-block !important;
    height: 46px !important;
    line-height: 44px !important;
    padding: 0 26px !important;
    border-radius: 30px !important;
    font-size: .8em !important;
    font-weight: 500 !important;
    letter-spacing: .05em;
    text-transform: uppercase !important;
    white-space: nowrap;
    cursor: pointer;
}

.woocommerce-cart td.actions .coupon .button {
    background: var(--theme-secondary-color) !important;
    border: 1px solid var(--theme-secondary-color) !important;
    color: #fff !important;
}

.woocommerce-cart td.actions .coupon .button:hover {
    background: var(--theme-primary-color) !important;
    border-color: var(--theme-primary-color) !important;
    color: #fff !important;
}

.woocommerce-cart td.actions .button[name="update_cart"] {
    background: none !important;
    border: 1px solid var(--theme-border-color) !important;
    color: var(--theme-secondary-color) !important;
}

.woocommerce-cart td.actions .button[name="update_cart"]:hover {
    border-color: var(--theme-primary-color) !important;
    color: var(--theme-primary-color) !important;
}

/* --------------------------------------------------------------------
   Order summary sidebar
   -------------------------------------------------------------------- */

.woocommerce-cart .cart_totals {
    background: var(--theme-body-bg-color);
    border-radius: var(--cart-radius) !important;
    border: 1px solid var(--theme-border-color);
    box-shadow: var(--cart-shadow-hover);
    overflow: hidden;
}

.woocommerce-cart .cart_totals:after {
    display: none;
}

.woocommerce-cart .cart_totals:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-primary-color), transparent 85%);
}

.woocommerce-cart .cart_totals h2 {
    font-size: 1.1em;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 500;
    padding-bottom: 16px;
    margin-bottom: 16px !important;
    border-bottom: 1px solid var(--theme-border-color);
}

.woocommerce-cart .cart_totals .order-total {
    border-top-color: var(--theme-border-color);
}

.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total .amount {
    font-family: var(--theme-heading-font-family);
    font-size: 1.3em;
    color: var(--theme-primary-color);
}

/* Proceed to checkout button */
.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    border-radius: 40px !important;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .95em;
    box-shadow: 0 10px 24px rgba(149, 107, 58, .28);
    transition: transform .25s ease, box-shadow .25s ease;
}

.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(149, 107, 58, .38);
}

/* --------------------------------------------------------------------
   Free shipping progress bar
   -------------------------------------------------------------------- */

.lakit-goal-free-shipping .la-loading-bar {
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
}

.lakit-goal-free-shipping .load-percent {
    border-radius: 10px;
    transition: width .5s ease;
}

.lakit-goal-free-shipping .load-percent:after {
    display: none;
}

/* --------------------------------------------------------------------
   Empty cart state
   -------------------------------------------------------------------- */

.woocommerce > .return-to-shop .button {
    box-shadow: 0 10px 24px rgba(149, 107, 58, .18);
    transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease;
}

.woocommerce > .return-to-shop .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(149, 107, 58, .28);
}

@media (prefers-reduced-motion: reduce) {
    .woocommerce-cart .shop_table.woocommerce-cart-form__contents tbody tr.cart_item {
        animation: none;
    }
    .woocommerce-cart .product-thumbnail img,
    .woocommerce-cart .product-remove .remove,
    .woocommerce-cart .wc-proceed-to-checkout .checkout-button,
    .woocommerce > .return-to-shop .button {
        transition: none;
    }
}
