/* ---------- Cart ---------- */
.woocommerce-cart .woocommerce-shipping-totals th {
    display: none !important;
}

@media (min-width: 769px) {
    .woocommerce-cart .woocommerce-cart-form,
    .woocommerce-cart .cart-collaterals {
        float: none !important;
        width: 100% !important;
    }

    .woocommerce-cart .cart-collaterals {
        clear: both !important;
        margin-top: 30px !important;
    }

    .woocommerce-cart .cart-collaterals .cart_totals {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Paslėpti tuščią kairį stulpelį */
.woocommerce-shipping-totals.shipping th {
    display: none !important;
}

.woocommerce-shipping-totals.shipping td {
    position: relative !important;
    left: 15px !important;
}

.woocommerce-shipping-totals.shipping td,
.woocommerce-shipping-totals.shipping ul#shipping_method,
.woocommerce-shipping-totals.shipping ul#shipping_method li,
.woocommerce-shipping-totals.shipping ul#shipping_method li label {
    text-align: left !important;
}

/* ---------- Checkout review table (mobile) ---------- */
@media (max-width: 768px) {
    .woocommerce-checkout-review-order-table th,
    .woocommerce-checkout-review-order-table td {
        text-align: left !important;
    }

    .woocommerce-checkout-review-order-table .product-name,
    .woocommerce-checkout-review-order-table .product-total,
    .woocommerce-checkout-review-order-table th,
    .woocommerce-checkout-review-order-table td {
        padding-left: 0 !important;
    }
}

@media (max-width: 768px) {
    #order_review,
    #order_review_heading {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
}

#order_review,
.woocommerce-checkout-review-order {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* ---------- Home ---------- */
.home h1 {
    margin-top: 60px !important;
}

/* ---------- Checkout layout (stacked) ---------- */
body.woocommerce-checkout form.checkout.woocommerce-checkout {
    display: flex;
    flex-wrap: wrap;
}

body.woocommerce-checkout #customer_details {
    width: 100% !important;
    float: none !important;
    order: 1;
}

body.woocommerce-checkout #order_review_heading {
    width: 100% !important;
    float: none !important;
    clear: both !important;
    order: 2;
}

body.woocommerce-checkout #order_review {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    clear: both !important;
    order: 3;
}

body.woocommerce-checkout #payment.woocommerce-checkout-payment {
    width: 100% !important;
    max-width: none !important;
}

/* ---------- Hide header account login ---------- */
#ast-hb-account-login-wrap,
#ast-hb-account-login-wrap *,
.ast-hb-account-login-wrapper,
.ast-hb-account-login-bg,
.ast-hb-account-login {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

/* ---------- Artea financing logo in checkout ---------- */
.woocommerce-checkout #payment li[class*="payment_method_artealizingas_"] label img {
    max-height: 22px !important;
    width: auto !important;
    max-width: 120px !important;
    vertical-align: middle;
}

.woocommerce-checkout #payment .artealizingas-title-with-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Single product summary order ---------- */
.single-product .summary.entry-summary {
    display: flex;
    flex-direction: column;
}

.single-product .summary.entry-summary > .woocommerce-breadcrumb        { order: 0; }
.single-product .summary.entry-summary > .product_title                 { order: 0; }
.single-product .summary.entry-summary > p.price                        { order: 1; }
.single-product .summary.entry-summary > .ast-single-product-extras     { order: 2; }  /* "*Kaina galioja tik perkant internetu" — stays with the price */
.single-product .summary.entry-summary > form.cart                      { order: 3; }
.single-product .summary.entry-summary > .product_meta                  { order: 4; }
.single-product .summary.entry-summary > .woocommerce-product-details__short-description { order: 5; }
.single-product .summary.entry-summary > .inbank--calculator            { order: 6 !important; }
.single-product .summary.entry-summary > .artealizingas-calculator-block { order: 7 !important; }

/* ---------- Hide attribute filters with 0 or 1 choice ---------- */
.wp-block-woocommerce-product-filter-attribute:not(:has(.wc-block-product-filter-checkbox-list__item:nth-of-type(2))) {
    display: none !important;
}

/* ---------- Elementor home tweak ---------- */
@media (max-width: 767px) {
    .elementor-1194 .elementor-element.elementor-element-43bc15f {
        transform: translateY(30px);
    }
}

/* ---------- Shop archive: filters always on top (mobile) ---------- */
@media (max-width: 921px) {
    .archive #content > .ast-container,
    .ast-woo-shop-archive #content > .ast-container {
        display: flex !important;
        flex-direction: column !important;
    }
    .archive #content > .ast-container #secondary,
    .ast-woo-shop-archive #content > .ast-container #secondary {
        order: -1 !important;
    }
}