/* Budha ADT — List Mode front-end polish.
 * Only does what PHP hooks can't: hide the odd UI remnant cleanly. */

/* Hide the payment-method radio list (COD stays default silently). */
body.budha-list-mode--hide-payment ul.wc_payment_methods,
body.budha-list-mode--hide-payment .woocommerce-checkout-payment .payment_box,
body.budha-list-mode--hide-payment .woocommerce-checkout-payment > .form-row.woocommerce-terms-and-conditions-wrapper:empty {
    display: none !important;
}

/* Keep the "place order" button visible and spaced nicely without the
   payment methods above it. */
body.budha-list-mode--hide-payment .woocommerce-checkout-payment {
    padding-top: 8px;
    background: transparent !important;
}
body.budha-list-mode--hide-payment .woocommerce-checkout-payment .place-order {
    margin-top: 0;
}

/* Hide the "ship to a different address" toggle when shipping stays on. */
body.budha-list-mode .woocommerce-shipping-fields__field-wrapper .shipping_address { /* noop placeholder */ }
body:not(.budha-list-mode--no-shipping).budha-list-mode #ship-to-different-address {
    display: none;
}
body.budha-list-mode--no-shipping #ship-to-different-address,
body.budha-list-mode--no-shipping .shipping_address,
body.budha-list-mode--no-shipping .woocommerce-shipping-fields,
body.budha-list-mode--no-shipping .cart-subtotal + .shipping,
body.budha-list-mode--no-shipping tr.shipping,
body.budha-list-mode--no-shipping tr.woocommerce-shipping-totals {
    display: none !important;
}

/* Hide any stray coupon UI the theme might render. */
body.budha-list-mode .checkout_coupon,
body.budha-list-mode .woocommerce-form-coupon,
body.budha-list-mode .woocommerce-form-coupon-toggle,
body.budha-list-mode .coupon,
body.budha-list-mode td.actions .coupon {
    display: none !important;
}

/* Soften the "Place order" → "Send Request" button so it reads as a submit-list CTA. */
body.budha-list-mode #place_order {
    border-radius: var(--budha-radius-pill, 9999px);
    padding: 14px 28px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------
 * Off-canvas mini-cart panel (.panel__container > #cart-panel)
 * ------------------------------------------------------------- */

/* Header-icon subtotal price chip. */
body.budha-list-mode--no-header-subtotal #header-cart-subtotal,
body.budha-list-mode--no-header-subtotal .header-cart .total-price,
body.budha-list-mode--no-header-subtotal .header-cart-subtotal {
    display: none !important;
}

/* "You may also like..." cross-sell carousel inside the panel. */
body.budha-list-mode--no-upsells .glozin-mini-products-recommended,
body.budha-list-mode--no-upsells .glozin-mini-products-recommended-carousel,
body.budha-list-mode--no-upsells .products-recommended-header {
    display: none !important;
}

/* Subtotal / totals block — mini-cart drawer + cart page ONLY.
   The checkout order-review totals are intentionally NOT hidden:
   the user needs to see what they are submitting. */

/* Off-canvas mini-cart drawer */
body.budha-list-mode--no-totals #cart-panel .woocommerce-mini-cart__total,
body.budha-list-mode--no-totals #cart-panel p.total,
body.budha-list-mode--no-totals .panel__container .woocommerce-mini-cart__total,
body.budha-list-mode--no-totals .panel__container p.total {
    display: none !important;
}

/* Cart PAGE only — scoped via WooCommerce's body class so the
   checkout page is unaffected. */
body.budha-list-mode--no-totals.woocommerce-cart .cart_totals,
body.budha-list-mode--no-totals.woocommerce-cart tr.cart-subtotal,
body.budha-list-mode--no-totals.woocommerce-cart tr.order-total,
body.budha-list-mode--no-totals.woocommerce-cart .cart-collaterals {
    display: none !important;
}

/* Coupon icon button in the note/coupon/estimate row. */
body.budha-list-mode--no-mc-coupon .glozin-note-estimate-coupon__button.glozin-discount,
body.budha-list-mode--no-mc-coupon #discount-popover {
    display: none !important;
}

/* Shipping-estimate icon button. */
body.budha-list-mode--no-mc-estimate .glozin-note-estimate-coupon__button.glozin-estimate,
body.budha-list-mode--no-mc-estimate #estimate-popover {
    display: none !important;
}

/* If both coupon and estimate are hidden and only the note button remains,
   centre the row instead of leaving lopsided spacing. */
body.budha-list-mode--no-mc-coupon.budha-list-mode--no-mc-estimate .glozin-note-estimate-coupon {
    justify-content: flex-start;
}

/* Hide any stray "Free shipping" progress / amount-left hints if the theme prints them. */
body.budha-list-mode--no-shipping .free-shipping-bar,
body.budha-list-mode--no-shipping .glozin-free-shipping-progress,
body.budha-list-mode--no-shipping [data-free-shipping] {
    display: none !important;
}

/* ---------------------------------------------------------------
 * Phase 3c — Cart "removed" only means the standalone /cart/ page
 * redirects to checkout. The off-canvas mini-cart drawer is the
 * "list preview" and MUST still open on cart-icon click, so we do
 * NOT hide #cart-panel here. (Earlier versions did — that broke
 * the panel-open behaviour and was removed in 1.0.16.)
 *
 * What we DO hide: the "View cart" / "View List" button inside the
 * panel — it would just go to /cart/ which redirects right back.
 * Leaves only the Submit-list / Checkout button, which is the
 * single action the user needs.
 * ------------------------------------------------------------- */
body.budha-list-mode--no-cart .woocommerce-mini-cart__buttons a:not(.checkout):not(.wc-forward.checkout),
body.budha-list-mode--no-cart p.buttons a.gz-button-outline-dark:not(.checkout) {
    display: none !important;
}

/* ---------------------------------------------------------------
 * Phase 3d — Mask everything that screams "shop":
 *   - product prices & sale prices
 *   - "On sale" / "Sale!" flash badges
 *   - in-stock / out-of-stock indicators
 *   - currency badges
 * Filters in PHP already empty most of these; CSS is defense-in-depth
 * for theme markup that wraps prices in extra spans/divs.
 * ------------------------------------------------------------- */
body.budha-list-mode--mask-commerce .price,
body.budha-list-mode--mask-commerce .product-price,
body.budha-list-mode--mask-commerce .woocommerce-Price-amount,
body.budha-list-mode--mask-commerce .price ins,
body.budha-list-mode--mask-commerce .price del,
body.budha-list-mode--mask-commerce .from,
body.budha-list-mode--mask-commerce .price-saved,
body.budha-list-mode--mask-commerce .gz-price,
body.budha-list-mode--mask-commerce .product_meta .product-price {
    display: none !important;
}

/* Sale flashes (the "Sale!" red ribbon on product cards) */
body.budha-list-mode--mask-commerce .onsale,
body.budha-list-mode--mask-commerce .sale,
body.budha-list-mode--mask-commerce .wc-sale-flash,
body.budha-list-mode--mask-commerce .product-onsale,
body.budha-list-mode--mask-commerce .product-badge.onsale,
body.budha-list-mode--mask-commerce .gz-product-card__sale,
body.budha-list-mode--mask-commerce span.glozin-sale-percentage,
body.budha-list-mode--mask-commerce .product-badges {
    display: none !important;
}

/* Stock indicators */
body.budha-list-mode--mask-commerce .stock,
body.budha-list-mode--mask-commerce .in-stock,
body.budha-list-mode--mask-commerce .out-of-stock,
body.budha-list-mode--mask-commerce .product-stock,
body.budha-list-mode--mask-commerce .available-stock,
body.budha-list-mode--mask-commerce .glozin-product-stock-progress {
    display: none !important;
}

/* Currency / "From" prefixes left empty after the price is gone */
body.budha-list-mode--mask-commerce .woocommerce-Price-currencySymbol {
    display: none !important;
}

/* Cart and checkout TABLE cells for price/subtotal — keep the row,
   hide just the price column so the "your list" reads as items. */
body.budha-list-mode--mask-commerce td.product-price,
body.budha-list-mode--mask-commerce th.product-price,
body.budha-list-mode--mask-commerce td.product-subtotal,
body.budha-list-mode--mask-commerce th.product-subtotal {
    display: none !important;
}

/* Optional friendly replacement string (when admin sets one) — give it a
   subtle muted look so it reads as a label, not a CTA. */
body.budha-list-mode--mask-commerce .budha-adt-price-replacement {
    display: inline-block;
    color: var(--budha-text-muted, rgba(0,0,0,0.55));
    font-style: italic;
    font-size: 0.92em;
}

/* ---------------------------------------------------------------
 * Checkout total exception — even with mask-commerce ON, the visitor
 * must see the final total of what they are submitting on the
 * Submit-List (checkout) page. We re-expose just the totals rows
 * inside #order_review with higher selector specificity so the
 * earlier .woocommerce-Price-amount { display: none } is overridden.
 * ------------------------------------------------------------- */
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.order-total,
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.cart-subtotal {
    display: table-row !important;
}
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.order-total td,
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.order-total th,
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.cart-subtotal td,
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.cart-subtotal th {
    display: table-cell !important;
}
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.order-total .woocommerce-Price-amount,
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.order-total .woocommerce-Price-currencySymbol,
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.order-total .amount,
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.cart-subtotal .woocommerce-Price-amount,
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.cart-subtotal .woocommerce-Price-currencySymbol,
body.budha-list-mode--mask-commerce.woocommerce-checkout #order_review tr.cart-subtotal .amount {
    display: inline !important;
}

/* ---------------------------------------------------------------
 * Checkout visual polish — uses Glozin's own tokens so styling
 * matches the theme.
 *   --gz-color-dark, --gz-border-color, --gz-input-rounded,
 *   --gz-heading-font-weight, --gz-rounded-md
 * Falls back gracefully if the tokens are missing.
 * ------------------------------------------------------------- */

/* Section headings (Contact Details / Your List / Product / Total) */
body.budha-list-mode.woocommerce-checkout .woocommerce-billing-fields h3,
body.budha-list-mode.woocommerce-checkout #order_review_heading,
body.budha-list-mode.woocommerce-checkout #order_review h3,
body.budha-list-mode.woocommerce-checkout .shop_table thead th,
body.budha-list-mode.woocommerce-checkout #order_review .cart_item th,
body.budha-list-mode.woocommerce-checkout tr.order-total th {
    font-size: 17px;
    font-weight: var(--gz-heading-font-weight, 600);
    color: var(--gz-color-dark, #111);
    letter-spacing: -0.01em;
}

/* Make every input border noticeable — slightly darker grey than the
   theme's near-invisible default so the form feels solid. */
body.budha-list-mode.woocommerce-checkout .woocommerce form .form-row input.input-text,
body.budha-list-mode.woocommerce-checkout .woocommerce form .form-row textarea,
body.budha-list-mode.woocommerce-checkout .woocommerce form .form-row .select2-selection,
body.budha-list-mode.woocommerce-checkout #order_comments {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: rgba(17, 17, 17, 0.22) !important;
    background-color: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body.budha-list-mode.woocommerce-checkout .woocommerce form .form-row input.input-text:hover,
body.budha-list-mode.woocommerce-checkout .woocommerce form .form-row textarea:hover {
    border-color: rgba(17, 17, 17, 0.55) !important;
}
body.budha-list-mode.woocommerce-checkout .woocommerce form .form-row input.input-text:focus,
body.budha-list-mode.woocommerce-checkout .woocommerce form .form-row textarea:focus,
body.budha-list-mode.woocommerce-checkout #order_comments:focus {
    border-color: var(--budha-accent, #7cc04a) !important;
    box-shadow: 0 0 0 3px rgba(124, 192, 74, 0.18) !important;
    outline: 0 !important;
}

/* Field labels — bolder + darker so they read as proper labels. */
body.budha-list-mode.woocommerce-checkout .woocommerce form .form-row label {
    font-weight: 600;
    color: #000;
    margin-bottom: 6px;
    display: inline-block;
}

/* Breathing room between field rows + the order-notes block.
   No divider line above the notes — just spacing. */
body.budha-list-mode.woocommerce-checkout .woocommerce form .form-row {
    margin-bottom: 18px;
}
body.budha-list-mode.woocommerce-checkout #order_comments_field {
    margin-top: 18px;
}
body.budha-list-mode.woocommerce-checkout #order_comments {
    min-height: 110px;
    padding: 12px 14px;
    line-height: 1.5;
}

/* Soften the right-side "Your List" panel border so it reads as a card */
body.budha-list-mode.woocommerce-checkout .woocommerce-checkout-review-order,
body.budha-list-mode.woocommerce-checkout #order_review {
    border: 1px solid var(--gz-border-color, #ebebeb);
    border-radius: var(--gz-rounded-md, 10px);
    padding: 18px 20px;
    background: #fafafa;
}
body.budha-list-mode.woocommerce-checkout #order_review .shop_table {
    background: transparent;
    border: 0;
    margin: 0;
}
body.budha-list-mode.woocommerce-checkout #order_review tfoot tr.order-total td,
body.budha-list-mode.woocommerce-checkout #order_review tfoot tr.order-total th {
    padding-top: 14px;
    border-top: 1px solid var(--gz-border-color, #ebebeb);
    font-size: 16px;
}

/* Belt-and-braces: keep the hidden country/state fields truly hidden
   even if the theme's checkout layout reveals fields by class. */
body.budha-list-mode .budha-adt-hidden-field,
body.budha-list-mode #billing_country_field.budha-adt-hidden-field,
body.budha-list-mode #billing_state_field.budha-adt-hidden-field {
    display: none !important;
}

/* Hide the terms-and-conditions wrapper + privacy text in case the
   theme renders it without going through WC's filterable path. */
body.budha-list-mode .woocommerce-terms-and-conditions-wrapper,
body.budha-list-mode .woocommerce-privacy-policy-text,
body.budha-list-mode .woocommerce-terms-and-conditions,
body.budha-list-mode .woocommerce-form__label-for-checkbox.checkbox:has(#terms),
body.budha-list-mode #terms_field {
    display: none !important;
}

/* Hide the Glozin "Delivery Information / Up to 30-Day Guarantee /
   Payment Support" info box rendered inside the checkout order review. */
body.budha-list-mode .gz-checkout-information-box,
body.budha-list-mode .gz-checkout-information-box__content {
    display: none !important;
}

/* ---------------------------------------------------------------
 * Mobile bottom nav bar — list-mode / shop-mode adjustments
 *
 * IMPORTANT: We must hide the OUTER Elementor widget wrapper
 * (.elementor-widget-glozin-navigation-bar-item), not just the
 * inner .glozin-navigation-bar-elementor div. Each widget wrapper
 * is a flex child of .e-con-inner; hiding only the inner element
 * leaves an invisible empty flex slot that creates uneven spacing.
 * ------------------------------------------------------------- */

/* Hide the Wishlist item — common to both list and catalogue modes. */
body.budha-shop-mode--hide-wishlist-nav
    .elementor-widget-glozin-navigation-bar-item:has(.header-wishlist__counter) {
    display: none !important;
}

/* ---------------------------------------------------------------
 * Catalogue Mode
 * ------------------------------------------------------------- */

/* Hide the header cart icon (desktop header). */
body.budha-catalogue-mode--no-cart .header-cart,
body.budha-catalogue-mode--no-cart .header-cart__counter,
body.budha-catalogue-mode--no-cart .glozin-header-cart {
    display: none !important;
}

/* Hide the Cart item in the mobile nav bar — target the OUTER
   Elementor widget wrapper so it's fully removed from the flex row. */
body.budha-catalogue-mode--no-cart
    .elementor-widget-glozin-navigation-bar-item:has([data-target="cart-panel"]) {
    display: none !important;
}

/* Optional contact CTA shown where Add to Cart was. */
.budha-adt-catalogue-cta {
    display: inline-block;
    margin-top: 8px;
}

/* ---------------------------------------------------------------
 * Catalogue Mode — Glozin theme ATC overlay buttons
 *
 * Glozin renders its own ATC button overlays inside product cards
 * via theme-specific hooks (.product-featured-icons--primary and
 * --second). The remove_action in PHP handles the standard WC
 * below-image button; this CSS hides the hover-icon overlays and
 * the quickview popup ATC button that PHP can't reach cleanly.
 * ------------------------------------------------------------- */

/* Product card hover-icon ATC (both mobile primary and desktop secondary icon rows) */
body.budha-catalogue-mode .product-loop-button-atc {
    display: none !important;
}

/* Catalogue mode: hide the entire ATC form everywhere — product single
   pages, quickview popups, and any AJAX-rendered fragments.
   Safe to blanket: cart/checkout use form.woocommerce-cart-form and
   form.woocommerce-checkout, not form.cart. */
body.budha-catalogue-mode form.cart {
    display: none !important;
}
