/**
 * WC Alientech Bundles — Frontend Styles
 *
 * @package WC_Alientech_Bundles
 */

/* ──────────────────────────────────────────────────────────
   Product name formatter (prefix / main split)
   ────────────────────────────────────────────────────────── */

.wcab-name-prefix {
    font-weight: 300;
    color: #888;
}

.wcab-name-sep {
    font-weight: 300;
    color: #bbb;
}

.wcab-name-main {
    font-weight: 700;
    color: #000;
}

/* [wcab_product_title] shortcode — centered, smaller type, no link underline */
.wcab-product-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 auto;
    margin-bottom: 0;
    max-width: 100%;
}

/* No dash split: whole title bold; in loop card, sit at bottom of title zone */
.wcab-product-title--single {
    font-weight: 700;
}

.wcab-product-title--single a {
    font-weight: 700;
}

.wcab-product-title a {
    text-decoration: none !important;
    color: inherit;
}

.wcab-product-title a:hover,
.wcab-product-title a:focus,
.wcab-product-title a:active {
    text-decoration: none !important;
    color: inherit;
}

/* Prefix / main stack inside shortcode title */
.wcab-product-title .wcab-name-prefix {
    display: block;
    font-size: 0.65em;
    margin-bottom: 2px;
}

.wcab-product-title .wcab-name-sep {
    display: none;
}

.wcab-product-title .wcab-name-main {
    display: block;
}

/* Yellow pill for "Bundle Master" inside formatted titles */
.wcab-product-title .wcab-bundle-badge--inline {
    margin-left: 4px;
    margin-right: 4px;
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.78em;
}

/* [wcab_single_product_title] — left-aligned, larger type, category pills */
.wcab-single-product-title-block {
    width: 100%;
    text-align: left;
}

.wcab-single-product-title-block .wcab-single-product-title.wcab-product-title {
    align-items: flex-start;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    font-size: clamp(1.2rem, 2.8vw, 1.65rem);
    line-height: 1.28;
    /* Override Elementor kit h1 (e.g. --e-global-color-secondary) on single product */
    color: #000;
}

.wcab-single-product-title-block .wcab-name-prefix {
    font-size: 0.88em;
    margin-bottom: 0.12em;
}

.wcab-single-product-title-block .wcab-name-main {
    font-size: 1.12em;
}

.wcab-single-product-title-block .wcab-product-title a {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    color: inherit;
}

.wcab-single-product-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-top: 0.55rem;
    justify-content: flex-start;
}

.wcab-single-product-cat-pill {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #6b7280;
    background: #f1f3f5;
    border: 1px solid #e2e6ea;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.3;
}

/* ──────────────────────────────────────────────────────────
   [alientech_single_product_layout] — full info column
   ────────────────────────────────────────────────────────── */

.at-sp-layout {
    width: 100%;
    max-width: 640px;
}

/* Header row: title left, price right */
.at-sp-layout__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.at-sp-layout__title-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.at-sp-layout__title.wcab-product-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.8vw, 1.65rem);
    line-height: 1.28;
    color: #000;
    text-align: left !important;
}

.at-sp-layout__title .wcab-name-prefix {
    font-size: 0.88em;
    margin-bottom: 0.12em;
}

.at-sp-layout__title .wcab-name-main {
    font-size: 1.12em;
}

.at-sp-layout__price-wrap {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}

.at-sp-layout__price {
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.at-sp-layout__price del {
    font-size: 0.8em;
    font-weight: 400;
    color: #475569;
    text-decoration: line-through;
    display: block;
    margin-bottom: 2px;
}

.at-sp-layout__price ins {
    text-decoration: none;
}

/* Category pills */
.at-sp-layout__cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-top: 0.55rem;
}

.at-sp-layout__cat-pill {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #6b7280;
    background: #f1f3f5;
    border: 1px solid #e2e6ea;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.3;
}

/* Out of stock notice */
.at-sp-layout__out-of-stock {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #dc2626;
}

/* SKU */
.at-sp-layout__sku {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    color: #475569;
}

.at-sp-layout__sku-label {
    font-weight: 600;
    color: #475569;
}

.at-sp-layout__sku-value {
    font-weight: 400;
}

/* WAPF field highlight — pulsed when user clicks ATC without filling serial */
@keyframes at-wapf-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 238, 0, 0.7); }
    60%  { box-shadow: 0 0 0 8px rgba(255, 238, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 238, 0, 0); }
}

.at-wapf-highlight {
    border-radius: 4px;
    animation: at-wapf-pulse 0.6s ease 0s 2;
    outline: 2px solid #ffee00;
    outline-offset: 3px;
}

/* Form section */
.at-sp-layout__form {
    margin-bottom: 1.5rem;
}

.at-sp-layout__form table.variations {
    margin-bottom: 0.75rem;
}

.at-sp-layout__form table.variations th.label {
    padding-right: 1rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

.at-sp-layout__form table.variations td.value select {
    min-width: 200px;
}

.at-sp-layout__form .reset_variations {
    font-size: 0.8em;
    margin-left: 0.5em;
}

/* WAPF fields sit after variations, before add-to-cart */
.at-sp-layout__form .wapf-wrapper,
.at-sp-layout__form .wapf-field-group {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

/* Price display inside the variation form (WC single_variation_wrap) —
   hide the duplicate price since we show it in the header row */
.at-sp-layout__form .woocommerce-variation-price {
    display: none;
}

/* Protocols section */
.at-sp-layout__protocols {
    margin-top: 1.5rem;
}

/* Bundle components section */
.at-sp-layout__bundle {
    margin-top: 1.5rem;
}

/* Responsive: stack on small screens */
@media (max-width: 480px) {
    .at-sp-layout__header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .at-sp-layout__price-wrap {
        text-align: left;
    }
}

/* ──────────────────────────────────────────────────────────
   Sticky top bar — slides in when header row leaves viewport
   ────────────────────────────────────────────────────────── */

/*
 * Layout offsets — kept in custom properties so every rule stays in sync.
 *   --at-theme-header : height of the site's fixed navigation header
 *   --at-admin-bar    : WordPress admin bar (0 when logged out)
 *   --at-sticky-bar   : height of our own sticky bar
 */
:root {
    --at-theme-header:   73px;
    --at-admin-bar:       0px;
    --at-sticky-bar:     56px;
}

/* Admin bar is 32 px on desktop, 46 px on narrow screens */
body.admin-bar               { --at-admin-bar: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar           { --at-admin-bar: 46px; }
}

/* Mobile header is taller (112px) */
@media (max-width: 767px) {
    :root                    { --at-theme-header: 112px; }
}

.at-sp-sticky-bar {
    position: fixed;
    /* Bar is anchored at viewport top.
       --at-bar-top is set dynamically by JS to the header's actual height. */
    top: 0;
    left: 0;
    right: 0;
    /* Below the Elementor sticky header (z-index: 99) AND below the WP
       admin bar (z-index: 99999). The bar slides out from behind the
       header — the header visually masks it during the animation. */
    z-index: 90;
    height: var(--at-sticky-bar);
    background: #fff;
    border-bottom: 1px solid #e2e7ed;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    /* Hidden: sits at top:0 behind the header — invisible because header
       z-index is higher. Animating transform is GPU-friendly. */
    transform: translateY(0);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    pointer-events: none;
}

/* Visible: slide down so its top edge sits just under the header
   (+ the WP admin bar offset when the admin bar is present). */
.at-sp-sticky-bar--visible {
    transform: translateY(var(--at-bar-top, 73px));
    pointer-events: auto;
}

.at-sp-sticky-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 1.25rem;
    overflow: hidden;
}

/* Title + SKU stacked vertically on the left */
.at-sp-sticky-bar__title-group {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.at-sp-sticky-bar__title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    color: #0f172a;
    text-align: left !important;
}

/* Strip any heading margins/padding that get cloned from the title */
.at-sp-sticky-bar__title h1,
.at-sp-sticky-bar__title h2,
.at-sp-sticky-bar__title h3 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    text-align: left !important;
}

/* SKU — tiny grey text under the title */
.at-sp-sticky-bar__sku {
    display: block;
    font-size: 0.6rem;
    font-weight: 400;
    color: #cbd5e1;
    letter-spacing: 0.03em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Right side: price-group (stacked) + ATC button side by side */
.at-sp-sticky-bar__right {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
}

/* Price group: big price on top, savings row below */
.at-sp-sticky-bar__price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

/* Savings sub-row: "Web Price ⓘ ~~X~~ Save Y%" */
.at-sp-sticky-bar__price-sub {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #475569;
    white-space: nowrap;
}

.at-sp-sticky-bar__individual {
    font-size: inherit;
    color: #475569;
    text-decoration: line-through;
}

.at-sp-sticky-bar__individual .woocommerce-Price-amount,
.at-sp-sticky-bar__individual bdi {
    font-size: inherit;
    color: inherit;
    text-decoration: inherit;
}

.at-sp-sticky-bar__save-pct {
    font-weight: 600;
    color: #16a34a;
}

/* ATC button inside sticky bar */
.at-sp-sticky-bar__atc {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 0.45em 1.1em !important;
    border-radius: 50px !important;
    background-color: #ffee00 !important;
    color: #0f172a !important;
    border: 1px solid #ffee00 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease !important;
    line-height: 1.4 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

.at-sp-sticky-bar__atc:hover,
.at-sp-sticky-bar__atc:focus {
    background-color: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

.at-sp-sticky-bar__atc.disabled,
.at-sp-sticky-bar__atc:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background-color: #e2e7ed !important;
    border-color: #e2e7ed !important;
    color: #475569 !important;
}

@media (max-width: 480px) {
    .at-sp-sticky-bar__atc {
        display: none !important; /* too cramped on very small screens */
    }
}

/* Prefix (OBD Master / OBD Slave …) — smaller, grey */
.at-sp-sticky-bar__title .wcab-name-prefix {
    font-size: 0.82em;
    font-weight: 400;
    color: #475569;
    margin-right: 0.3em;
}

.at-sp-sticky-bar__price {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    text-align: right;
}

/* Inherit WC price span styles */
.at-sp-sticky-bar__price .woocommerce-Price-amount,
.at-sp-sticky-bar__price bdi {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.at-sp-sticky-bar__price del {
    font-size: 0.78em;
    font-weight: 400;
    color: #475569;
    text-decoration: line-through;
    margin-right: 0.25em;
}

.at-sp-sticky-bar__price ins {
    text-decoration: none;
}

@media (max-width: 480px) {
    .at-sp-sticky-bar__inner {
        padding: 0 1rem;
        gap: 0.75rem;
    }

    .at-sp-sticky-bar__title {
        font-size: 0.8rem;
    }

    .at-sp-sticky-bar__price {
        font-size: 0.85rem;
    }
}

/* ──────────────────────────────────────────────────────────
   Mobile bottom ATC bar — visible only on ≤ 767px
   ────────────────────────────────────────────────────────── */

.at-sp-mobile-atc {
    display: none; /* desktop: hidden */
}

@media (max-width: 767px) {
    .at-sp-mobile-atc {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 98;
        background: #fff;
        border-top: 1px solid #e2e7ed;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) 16px;
        box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
        transform: translateY(110%);
        transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
    }

    .at-sp-mobile-atc--visible {
        transform: translateY(0);
    }

    /* Button: full width, yellow, rounded, label + price on same row */
    .at-sp-mobile-atc__btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1em !important;
        width: 100% !important;
        background-color: #ffee00 !important;
        color: #0f172a !important;
        border: 1px solid #ffee00 !important;
        border-radius: 50px !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        padding: 0.75em 1.5em !important;
        text-transform: uppercase !important;
        letter-spacing: 0.04em !important;
        cursor: pointer !important;
        transition: background-color 0.18s ease, color 0.18s ease !important;
        line-height: 1.3 !important;
    }

    .at-sp-mobile-atc__btn:hover,
    .at-sp-mobile-atc__btn:focus {
        background-color: #000 !important;
        border-color: #fff !important;
        color: #fff !important;
    }

    .at-sp-mobile-atc__btn.disabled,
    .at-sp-mobile-atc__btn:disabled {
        opacity: 0.4 !important;
        cursor: not-allowed !important;
        pointer-events: none !important;
        background-color: #333 !important;
        border-color: #333 !important;
        color: #888 !important;
    }

    .at-sp-mobile-atc__label {
        flex-shrink: 0;
    }

    /* Price inside button — inherits color */
    .at-sp-mobile-atc__price,
    .at-sp-mobile-atc__price .woocommerce-Price-amount,
    .at-sp-mobile-atc__price bdi {
        font-size: inherit;
        font-weight: inherit;
        color: inherit;
    }

    /* "inc. GST" line */
    .at-sp-mobile-atc__gst {
        margin: 4px 0 0;
        text-align: center;
        font-size: 0.7rem;
        color: #888;
        line-height: 1;
    }
}

/* ──────────────────────────────────────────────────────────
   Sticky product gallery — image column stays in view while
   scrolling through variants / protocols
   ────────────────────────────────────────────────────────── */

/* Applied by JS to the gallery's Elementor column / flex parent */
.at-sp-gallery-sticky {
    position: sticky !important;
    /* Sits below: theme header + admin bar + our sticky bar + 16px gap */
    top: calc(var(--at-theme-header) + var(--at-admin-bar) + var(--at-sticky-bar) + 16px) !important;
    align-self: flex-start !important;
    /* No overflow:hidden — it breaks WooCommerce Flexslider opacity init */
}

/* WooCommerce notices — neutral styling, positioned below sticky bar when visible */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
    background: #fff !important;
    color: #0f172a !important;
    border: 1px solid #e2e7ed !important;
    border-left: 3px solid #0f172a !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07) !important;
    font-size: 0.85rem !important;
    font-weight: 400 !important;
}

.woocommerce-notices-wrapper .woocommerce-error {
    border-left-color: #dc2626 !important;
}

.woocommerce-notices-wrapper .woocommerce-info {
    border-left-color: #3b82f6 !important;
}

.woocommerce-notices-wrapper .woocommerce-message a.button,
.woocommerce-notices-wrapper .woocommerce-message .button {
    background: #0f172a !important;
    color: #fff !important;
    border-radius: 50px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 0.35em 0.9em !important;
    border: none !important;
    text-decoration: none !important;
    float: none !important;
    display: inline-block !important;
    margin-left: 0.75rem !important;
    vertical-align: middle !important;
}

/* When sticky bar is active — fix position below it */
body.at-sticky-bar-active .woocommerce-notices-wrapper .woocommerce-message,
body.at-sticky-bar-active .woocommerce-notices-wrapper .woocommerce-error,
body.at-sticky-bar-active .woocommerce-notices-wrapper .woocommerce-info {
    position: fixed !important;
    top: calc(var(--at-bar-top, calc(var(--at-theme-header) + var(--at-admin-bar))) + var(--at-sticky-bar) + 8px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    z-index: 97 !important;
    margin: 0 !important;
}

/* Disable sticky gallery on mobile — not needed, just scrolls naturally */
@media (max-width: 767px) {
    .at-sp-gallery-sticky {
        position: relative !important;
        top: auto !important;
        align-self: auto !important;
    }

    /* Gallery zoom trigger overlaps content on mobile — hide it */
    .woocommerce div.product div.images .woocommerce-product-gallery__trigger {
        display: none !important;
    }
}

/* ──────────────────────────────────────────────────────────
   [wcab_product_card] — full loop card (thumb, title, price, ATC, includes)
   ────────────────────────────────────────────────────────── */

/*
 * Elementor Loop Grid: theme/template rules like
 * .elementor-… .elementor-loop-container { grid-auto-rows: 1fr; }
 * stretch rows unevenly and break wc card layout. Reset when our shortcode is present.
 */
.elementor .elementor-loop-container:has(.wcab-product-card-shell) {
    grid-auto-rows: auto !important;
}

/* Outer shell (prefix + title + price row heights matched via product-card-match-height.js) */
.wcab-product-card-shell {
    width: 100%;
    box-sizing: border-box;
}

.wcab-product-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    box-sizing: border-box;
}

.wcab-product-card__thumb {
    flex: 0 0 auto;
    align-self: center;
    width: 100%;
    max-width: min(100%, 280px);
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Fixed aspect frame: equal height per card; image contained (no crop), white rounded box; scales with column width. */
.wcab-product-card__thumb a {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    line-height: 0;
    text-decoration: none;
    background: #fff;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Ensure the aspect-ratio container always has a computed height.
   WC outputs img with explicit width/height attrs which can confuse some
   flex/grid layouts — min-height acts as a safety net. */
.wcab-product-card__thumb a {
    min-height: 1px; /* forces the browser to respect aspect-ratio even with absolute children */
}

/* Padding-bottom fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 1) {
    .wcab-product-card__thumb a {
        padding-bottom: 100%;
        height: 0;
        min-height: 0;
    }
}

.wcab-product-card__img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: contain;
    object-position: center;
}

/* Title: JS sets min-height per row on .wcab-product-title.wcab-product-card__heading */
.wcab-product-card__title-wrap {
    width: 100%;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.wcab-product-card .wcab-product-title.wcab-product-card__heading {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    text-align: center;
}

.wcab-product-card__title-wrap .wcab-product-title a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Single-line title: anchor copy to bottom of JS-matched min-height */
.wcab-product-card .wcab-product-title.wcab-product-card__heading.wcab-product-title--single {
    justify-content: flex-end;
}

/* Slightly larger prefix than standalone [wcab_product_title] */
.wcab-product-card .wcab-name-prefix {
    font-size: 0.82em !important;
}

.wcab-product-card__price {
    flex: 0 0 auto;
    width: 100%;
    text-align: center;
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
}

/* Bundle: sum of components if bought separately (strikethrough, above bundle price) */
.wcab-product-card__was-price {
    display: block;
    font-size: 0.75rem;
    line-height: 1.3;
    color: #9a9a9a;
    margin-bottom: 0.2rem;
}

.wcab-product-card__was-price del {
    color: inherit;
    text-decoration: line-through;
    font-weight: 400;
    opacity: 0.95;
}

.wcab-product-card__actions {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 0.5rem;
    text-align: center;
}

.wcab-product-card__actions .button,
.wcab-product-card__actions .add_to_cart_button,
.wcab-product-card__actions a.button,
.wcab-product-card__actions a.add_to_cart_button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-transform: uppercase !important;
    font-weight: 300 !important;
    /* Elementor often sets font-size: 100% on .button — force loop card size */
    font-size: 0.8125rem !important;
    line-height: 1.35 !important;
    letter-spacing: 0.04em !important;
}

.wcab-product-card__includes {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 0.5rem;
    text-align: center;
}

.wcab-product-card__includes .wcab-archive-summary-wrap {
    margin-top: 0;
}

/* ──────────────────────────────────────────────────────────
   Bundle components on the single product page
   ────────────────────────────────────────────────────────── */

.wcab-bundle-section {
    margin: 1.5em 0;
}

.wcab-bundle-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
    margin: 0 0 0.5rem;
}

/* Savings banner */
.wcab-bundle-savings {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.95em;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 1em;
    border: 1px solid #a5d6a7;
}

.wcab-bundle-savings .wcab-savings-icon {
    font-size: 1.2em;
}

/* Component cards grid */
.wcab-component-cards {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.wcab-component-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}


.wcab-component-info {
    flex: 1;
    min-width: 0;
}

.wcab-component-name {
    font-weight: 500;
    font-size: 0.95em;
    color: #333;
    display: block;
    line-height: 1.4;
}

.wcab-component-sku {
    font-size: 0.8em;
    color: #888;
    margin-top: 2px;
}

.wcab-component-qty {
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
}

.wcab-component-price {
    font-size: 0.95em;
    white-space: nowrap;
    flex-shrink: 0;
}

.wcab-component-price del {
    color: #999;
    font-weight: 400;
    margin-right: 4px;
}

.wcab-component-price .wcab-included {
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.85em;
}

/* Bundle total comparison */
.wcab-bundle-total-comparison {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-top: 1em;
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.92em;
    color: #555;
}

.wcab-total-individual {
    text-decoration: line-through;
    color: #bbb;
    font-size: 0.82em;
}

/* Strikethrough individual price in sticky bar */
.at-sp-sticky-bar__individual {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 400;
    color: #475569;
    text-decoration: line-through;
    white-space: nowrap;
}

.at-sp-sticky-bar__individual .woocommerce-Price-amount,
.at-sp-sticky-bar__individual bdi {
    font-size: inherit;
    color: inherit;
    text-decoration: inherit;
}

/* ⓘ icon */
.at-sp-sticky-bar__info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: #475569;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    overflow: visible;
    z-index: 10000;
}

.at-sp-sticky-bar__info-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* Tooltip — appears below the icon, escapes bar overflow */
.at-sp-sticky-bar__tooltip {
    display: none;
    position: fixed;
    width: 240px;
    background: #fff;
    color: #0f172a;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.45;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #e2e7ed;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14);
    white-space: normal;
    text-align: left;
    z-index: 10001;
    pointer-events: none;
    text-decoration: none;
}

/* Arrow pointing up — left position set dynamically via --arrow-left */
.at-sp-sticky-bar__tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: var(--arrow-left, 16px);
    border: 6px solid transparent;
    border-bottom-color: #e2e7ed;
}

.at-sp-sticky-bar__tooltip::after {
    content: '';
    position: absolute;
    bottom: calc(100% - 1px);
    left: var(--arrow-left, 16px);
    margin-left: 1px;
    border: 5px solid transparent;
    border-bottom-color: #fff;
}

/* Inline tooltip hidden — floating clone on body is used instead */
.at-sp-sticky-bar__info-icon .at-sp-sticky-bar__tooltip:not(.at-sp-sticky-bar__tooltip--floating) {
    display: none !important;
}

.wcab-total-bundle {
    font-weight: 700;
    font-size: 1.1em;
    color: #333;
}

.wcab-total-saved {
    color: #2e7d32;
    font-weight: 600;
}

/* ──────────────────────────────────────────────────────────
   Suggestion banner on individual product pages
   ────────────────────────────────────────────────────────── */

.wcab-suggestion-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid #ffcc02;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 1em;
    font-size: 0.92em;
    color: #5d4037;
}

.wcab-suggestion-banner a {
    font-weight: 600;
    color: #e65100;
    text-decoration: underline;
}

.wcab-suggestion-banner a:hover {
    color: #bf360c;
}

.wcab-suggestion-icon {
    font-size: 1.3em;
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────
   Shortcode wrapper (Elementor / classic content)
   ────────────────────────────────────────────────────────── */

.wcab-bundle-shortcode-wrap {
    margin: 1.25em 0;
    clear: both;
}

/* ──────────────────────────────────────────────────────────
   Cart / checkout / mini-cart: bundle includes list (item meta)
   ────────────────────────────────────────────────────────── */

.wcab-cart-includes-list {
    margin: 0.35em 0 0;
    padding: 0.5em 0.65em 0.5em 1.5em;
    list-style: none;
    background: #f4f6f8;
    border-radius: 0;
    border-left: 3px solid #dfe3e8;
    font-size: 0.875rem;
    line-height: 1.5;
}

.wcab-cart-includes-list li {
    margin: 0.35em 0;
    padding: 0;
    position: relative;
}

.wcab-cart-includes-list li::before {
    content: "\2713";
    position: absolute;
    left: -1.1em;
    color: #5c6bc0;
    font-size: 0.85em;
    font-weight: 700;
}

.wcab-cart-includes-list .wcab-inc-name {
    color: #333;
    font-weight: 500;
}

.wcab-cart-includes-list .wcab-inc-sku {
    font-size: 0.8em;
    color: #666;
    background: #e8eaf0;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* WooCommerce cart & checkout: all item meta (bundles + Product Add-ons, etc.) */
.woocommerce-cart-form .cart_item td.product-name dl.variation,
.woocommerce-checkout-review-order-table .product-name dl.variation,
.woocommerce-mini-cart-item dl.variation,
.elementor-menu-cart__product dl.variation {
    margin: 0.5em 0 0;
    padding: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    max-width: 100%;
}

.woocommerce-cart-form .cart_item td.product-name dl.variation dt,
.woocommerce-checkout-review-order-table .product-name dl.variation dt,
.woocommerce-mini-cart-item dl.variation dt,
.elementor-menu-cart__product dl.variation dt {
    font-weight: 600;
    color: #444;
    margin: 0.4em 0 0.15em;
    float: none;
    clear: both;
}

.woocommerce-cart-form .cart_item td.product-name dl.variation dt:first-child,
.woocommerce-checkout-review-order-table .product-name dl.variation dt:first-child,
.woocommerce-mini-cart-item dl.variation dt:first-child,
.elementor-menu-cart__product dl.variation dt:first-child {
    margin-top: 0;
}

.woocommerce-cart-form .cart_item td.product-name dl.variation dd,
.woocommerce-checkout-review-order-table .product-name dl.variation dd,
.woocommerce-mini-cart-item dl.variation dd,
.elementor-menu-cart__product dl.variation dd {
    margin: 0 0 0.35em 0;
    padding: 0;
}

.woocommerce-cart-form .cart_item td.product-name dl.variation dd p,
.woocommerce-checkout-review-order-table .product-name dl.variation dd p {
    margin: 0;
}

/* WooCommerce Blocks (cart / mini-cart) */
.wc-block-components-product-metadata {
    font-size: 0.875rem;
    line-height: 1.45;
}

.wc-block-components-product-metadata .wc-block-components-product-metadata__description {
    margin-top: 0.35em;
}

.wc-block-components-product-metadata .wcab-cart-includes-list {
    margin-top: 0.25em;
}

/* ──────────────────────────────────────────────────────────
   Cart: bundle badge
   ────────────────────────────────────────────────────────── */

.wcab-bundle-badge {
    display: inline-block;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000;
    background: #ffee00;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.wcab-bundle-badge--inline {
    margin-left: 4px;
    margin-right: 4px;
    vertical-align: middle;
}

/* ──────────────────────────────────────────────────────────
   Cart: overlap / suggestion notices
   ────────────────────────────────────────────────────────── */

.wcab-overlap-notices,
.wcab-cart-suggestions {
    margin-bottom: 1.5em;
}

.wcab-overlap-notice,
.wcab-cart-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcab-cart-suggestion a {
    font-weight: 600;
}

/* ──────────────────────────────────────────────────────────
   Order: component list
   ────────────────────────────────────────────────────────── */

.wcab-order-components {
    margin-top: 6px;
}

.wcab-order-components-label {
    color: #888;
    font-size: 0.85em;
}

.wcab-order-components-list {
    margin: 4px 0 0 16px;
    padding: 0;
    list-style: disc;
    font-size: 0.85em;
    color: #666;
}

.wcab-order-components-list li {
    margin-bottom: 2px;
}

/* ──────────────────────────────────────────────────────────
   Cart: component sub-items (used in template)
   ────────────────────────────────────────────────────────── */

.wcab-cart-sub-items {
    margin-top: 6px;
    padding: 0;
    list-style: none;
}

.wcab-cart-sub-items li {
    font-size: 0.85em;
    color: #888;
    padding: 2px 0;
    padding-left: 12px;
    position: relative;
}

.wcab-cart-sub-items li::before {
    content: "↳";
    position: absolute;
    left: 0;
    color: #bbb;
}

/* ──────────────────────────────────────────────────────────
   Archive / loop: bundle summary shortcode
   ────────────────────────────────────────────────────────── */

.wcab-archive-summary-wrap {
    margin-top: 0.6em;
    text-align: center;
}

.wcab-archive-summary-savings {
    display: block;
    font-weight: 700;
    font-size: 0.78rem;
    color: #2e7d32;
    margin-bottom: 6px;
}

.wcab-archive-summary {
    padding: 8px 10px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 6px;
    font-size: 0.8rem;
    line-height: 1.45;
    text-align: left;
}

.wcab-archive-summary-label {
    display: block;
    font-weight: 500;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 4px;
}

.wcab-archive-summary-list {
    margin: 0;
    padding: 0 0 0 0.2em;
    list-style: none;
    color: #444;
}

.wcab-archive-summary-list li {
    margin: 2px 0;
    position: relative;
    padding-left: 1.1em;
}

.wcab-archive-summary-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #2e7d32;
    font-size: 0.85em;
    font-weight: 700;
}

/* ──────────────────────────────────────────────────────────
   Mini-cart: tighter layout, name beside thumbnail
   ────────────────────────────────────────────────────────── */

.woocommerce-mini-cart-item {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
}

.woocommerce-mini-cart-item img,
.woocommerce-mini-cart-item .attachment-woocommerce_thumbnail {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    margin: 0 !important;
    float: none !important;
}

.woocommerce-mini-cart-item .product-info-wrap {
    flex: 1;
    min-width: 0;
}

.woocommerce-mini-cart-item dl.variation {
    margin-top: 4px !important;
    padding: 4px 6px !important;
    font-size: 0.75rem !important;
}

.woocommerce-mini-cart-item .wcab-cart-includes-list {
    font-size: 0.75rem;
    padding: 4px 4px 4px 1.2em;
    margin-top: 4px;
}

.woocommerce-mini-cart-item .wcab-cart-includes-list li {
    margin: 2px 0;
}

.woocommerce-mini-cart-item .wcab-bundle-badge {
    font-size: 0.6em;
    padding: 1px 5px;
}

/* Prevent WooCommerce from wrapping mini-cart items in a second sidebar/drawer */
.widget_shopping_cart_content .woocommerce-mini-cart {
    max-height: none;
    overflow-y: auto;
}

/* ──────────────────────────────────────────────────────────
   Elementor Pro — WooCommerce Cart widget (mobile: section + table padding)
   .e-cart-section (--sections-padding 16px 30px, margin bottom 30px);
   table.cart tr/td (see above).
   ────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    body .elementor-widget-woocommerce-cart .e-cart-section {
        padding: 10px 12px !important;
        margin: 0 0 16px 0 !important;
    }

    body .elementor-widget-woocommerce-cart .woocommerce table.cart tr {
        padding: 8px 12px !important;
    }

    body .elementor-widget-woocommerce-cart .woocommerce table.cart td {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ──────────────────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .wcab-component-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px;
    }

    .wcab-component-price {
        align-self: flex-end;
    }

    .wcab-bundle-total-comparison {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .wcab-suggestion-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* ──────────────────────────────────────────────────────────
   Cart / Checkout — redesigned product row
   ────────────────────────────────────────────────────────── */

/* Product row layout — image on the left, name + meta on the right */
.woocommerce-cart-form table.cart td.product-thumbnail,
.woocommerce table.shop_table_responsive td.product-thumbnail {
    width: 110px;
    padding-right: 16px !important;
    vertical-align: top;
}

.woocommerce-cart-form table.cart td.product-thumbnail img,
.woocommerce table.shop_table_responsive td.product-thumbnail img {
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: block;
}

.woocommerce-cart-form table.cart td.product-name,
.woocommerce table.shop_table_responsive td.product-name {
    vertical-align: top;
    padding-top: 4px !important;
}

.woocommerce-cart-form table.cart td.product-name > a,
.woocommerce table.shop_table_responsive td.product-name > a {
    display: inline-block;
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 6px;
    text-decoration: none;
}

.woocommerce-cart-form table.cart td.product-name > a:hover {
    text-decoration: underline;
}

/* Variation / WAPF meta — reset the default dl.variation box,
   render each field value as a light grey pill.
   Specificity bumped to beat Elementor's widget styles. */
.woocommerce .woocommerce-cart-form .cart_item td.product-name dl.variation,
.woocommerce .woocommerce-checkout-review-order-table .cart_item td.product-name dl.variation,
.woocommerce-mini-cart-item dl.variation,
body .woocommerce td.product-name dl.variation {
    margin: 6px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 0 8px;
    font-size: 0.82em;
    line-height: 1.3;
    color: #334155;
    max-width: 100%;
}

.woocommerce .woocommerce-cart-form .cart_item td.product-name dl.variation dt,
.woocommerce .woocommerce-cart-form .cart_item td.product-name dl.variation dd,
.woocommerce .woocommerce-checkout-review-order-table .cart_item td.product-name dl.variation dt,
.woocommerce .woocommerce-checkout-review-order-table .cart_item td.product-name dl.variation dd,
body .woocommerce td.product-name dl.variation dt,
body .woocommerce td.product-name dl.variation dd,
.woocommerce-mini-cart-item dl.variation dt,
.woocommerce-mini-cart-item dl.variation dd {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}
.woocommerce .woocommerce-cart-form .cart_item td.product-name dl.variation dd p,
.woocommerce .woocommerce-checkout-review-order-table .cart_item td.product-name dl.variation dd p,
body .woocommerce td.product-name dl.variation dd p,
.woocommerce-mini-cart-item dl.variation dd p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: inherit !important;
}

/* Full-width add-ons row injected by JS below each product row */
body .woocommerce table.shop_table tr.at-cart-addons-row > td {
    padding: 0 12px 14px !important;
    border-top: 0 !important;
    background: transparent;
}

.at-cart-addons-wrap {
    margin: 0;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.at-cart-addons-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #475569;
    margin: 0 0 8px;
}

body .woocommerce table.shop_table tr.at-cart-addons-row .at-cart-addons {
    border: 1px solid #e5e7eb;
    background: #fff;
}

/* ──────────────────────────────────────────────────────────
   Checkout review order — group each product + its add-ons
   into a clearly separated card
   ────────────────────────────────────────────────────────── */

.woocommerce-checkout-review-order-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.woocommerce-checkout-review-order-table tbody tr.cart_item > td,
.woocommerce-checkout-review-order-table tbody tr.at-cart-addons-row > td {
    background: #ffffff !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

/* Round the top of each product row */
.woocommerce-checkout-review-order-table tbody tr.cart_item > td:first-child {
    border-top-left-radius: 10px;
}
.woocommerce-checkout-review-order-table tbody tr.cart_item > td:last-child {
    border-top-right-radius: 10px;
}

/* Round the bottom of the add-ons row that closes the card */
.woocommerce-checkout-review-order-table tbody tr.at-cart-addons-row > td {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    padding-bottom: 14px !important;
}

/* If a product has no add-ons row, round the bottom of the product row instead */
.woocommerce-checkout-review-order-table tbody tr.cart_item:not(:has(+ tr.at-cart-addons-row)) > td:first-child {
    border-bottom-left-radius: 10px;
}
.woocommerce-checkout-review-order-table tbody tr.cart_item:not(:has(+ tr.at-cart-addons-row)) > td:last-child {
    border-bottom-right-radius: 10px;
}

/* Visible gap (spacer) between product cards — drawn as a transparent
   top-border on each cart_item that isn't the first one */
.woocommerce-checkout-review-order-table tbody tr.cart_item:not(:first-child) > td {
    border-top: 14px solid transparent !important;
    background-clip: padding-box;
}


/* The light grey wrapper inside the addons row would now collide with the
   white card — make it transparent on checkout so the addons list sits
   directly inside the card */
.woocommerce-checkout-review-order-table .at-cart-addons-row .at-cart-addons-wrap {
    background: transparent;
    border: none;
    padding: 0;
}

/* Tighter, smaller "Included add-ons" block on checkout */
.woocommerce-checkout-review-order-table .at-cart-addons-row > td {
    padding-top: 0 !important;
    padding-bottom: 10px !important;
}

.woocommerce-checkout-review-order-table .at-cart-addons-row .at-cart-addons-title {
    font-size: 0.65rem;
    margin-bottom: 4px;
    color: #475569;
}

.woocommerce-checkout-review-order-table .at-cart-addons-row .at-cart-addons {
    border: 1px solid #f1f5f9;
    border-radius: 6px;
}

.woocommerce-checkout-review-order-table .at-cart-addons-row .at-cart-addon {
    padding: 4px 10px !important;
    font-size: 0.78rem;
    line-height: 1.3;
}

.woocommerce-checkout-review-order-table .at-cart-addons-row .at-cart-addon__name::before {
    width: 5px;
    height: 5px;
}

/* ──────────────────────────────────────────────────────────
   Cart page — same card + spacer treatment as checkout
   ────────────────────────────────────────────────────────── */

.woocommerce-cart-form table.cart {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.woocommerce-cart-form table.cart tbody tr.cart_item > td,
.woocommerce-cart-form table.cart tbody tr.at-cart-addons-row > td {
    background: #ffffff !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

.woocommerce-cart-form table.cart tbody tr.cart_item > td:first-child {
    border-top-left-radius: 10px;
}
.woocommerce-cart-form table.cart tbody tr.cart_item > td:last-child {
    border-top-right-radius: 10px;
}

.woocommerce-cart-form table.cart tbody tr.at-cart-addons-row > td {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    padding-bottom: 14px !important;
}

.woocommerce-cart-form table.cart tbody tr.cart_item:not(:has(+ tr.at-cart-addons-row)) > td:first-child {
    border-bottom-left-radius: 10px;
}
.woocommerce-cart-form table.cart tbody tr.cart_item:not(:has(+ tr.at-cart-addons-row)) > td:last-child {
    border-bottom-right-radius: 10px;
}

/* Spacer between cart items: 16px transparent gap above each non-first cart_item */
.woocommerce-cart-form table.cart tbody tr.cart_item:not(:first-child) > td {
    border-top: 16px solid transparent !important;
    background-clip: padding-box;
}

/* ──────────────────────────────────────────────────────────
   Tighten Elementor cart/checkout section padding (desktop)
   ────────────────────────────────────────────────────────── */
body .elementor-widget-woocommerce-cart,
body .elementor-widget-woocommerce-checkout-page {
    --sections-padding: 18px 22px !important;
    --sections-margin: 0 0 16px 0 !important;
    --sections-border-radius: 8px !important;
}

body .elementor-widget-woocommerce-cart .e-cart-section,
body .elementor-widget-woocommerce-cart .e-cart-totals,
body .elementor-widget-woocommerce-cart .e-coupon-box {
    padding: 18px 22px !important;
    margin: 0 0 16px 0 !important;
}

/* Gap between product summary and cart totals/summary */
body .elementor-widget-woocommerce-cart .e-cart__container {
    gap: 12px !important;
    row-gap: 12px !important;
    column-gap: 12px !important;
}

/* Checkout column gaps (stacked sections inside each column) */
body .elementor-widget-woocommerce-checkout-page .e-checkout__column-inner,
body .elementor-widget-woocommerce-checkout-page .e-sticky-right-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    row-gap: 16px !important;
}

/* Gap between the two checkout columns (address ↔ order summary) */
body .elementor-widget-woocommerce-checkout-page .e-checkout__container {
    gap: 24px !important;
    column-gap: 24px !important;
}

/* Spacing between each product on checkout review table */
body .woocommerce-checkout-review-order-table tbody tr.at-cart-addons-row > td {
    border-bottom: 16px solid transparent !important;
    background-clip: padding-box;
}
body .woocommerce-checkout-review-order-table tbody tr.cart_item:not(:first-of-type) > td {
    border-top: 16px solid transparent !important;
    background-clip: padding-box;
}

/* Cart product summary table — uppercase, light header */
body .woocommerce-cart-form table.cart thead th,
body .woocommerce-checkout-review-order-table thead th {
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background: transparent !important;
}

/* Vertically center cart row cells on desktop */
@media (min-width: 768px) {
    body .woocommerce-cart-form table.cart tbody tr.cart_item > td,
    body .woocommerce-cart-form table.cart tbody tr.woocommerce-cart-form__cart-item > td {
        vertical-align: middle !important;
    }
}

/* Gap BETWEEN product groups (cart_item + its at-cart-addons-row) */
body .woocommerce-cart-form table.cart tbody tr.at-cart-addons-row > td {
    border-bottom: 18px solid transparent !important;
    background-clip: padding-box;
}
body .woocommerce-cart-form table.cart tbody tr.cart_item:not(:first-of-type) > td,
body .woocommerce-cart-form table.cart tbody tr.woocommerce-cart-form__cart-item:not(:first-of-type) > td {
    border-top: 18px solid transparent !important;
    background-clip: padding-box;
}
body .elementor-widget-woocommerce-cart .e-cart-totals {
    margin-top: 12px !important;
}
body .elementor-widget-woocommerce-cart .e-cart-section + .e-cart-totals,
body .elementor-widget-woocommerce-cart .e-cart-section ~ .e-cart-totals {
    margin-top: 12px !important;
}

/* ──────────────────────────────────────────────────────────
   Mobile — tighten further
   ────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    body .elementor-widget-woocommerce-checkout-page,
    body .elementor-widget-woocommerce-cart {
        --sections-padding: 12px 12px !important;
        --sections-margin: 0 0 10px 0 !important;
        --sections-border-radius: 8px !important;
    }

    body .elementor-widget-woocommerce-cart .e-cart-section,
    body .elementor-widget-woocommerce-cart .e-cart-totals,
    body .elementor-widget-woocommerce-cart .e-coupon-box {
        padding: 12px !important;
        margin: 0 0 10px 0 !important;
    }

    body .elementor-widget-woocommerce-cart .e-cart__container {
        gap: 10px !important;
        row-gap: 10px !important;
        column-gap: 10px !important;
    }
    body .elementor-widget-woocommerce-checkout-page .e-checkout__column-inner,
    body .elementor-widget-woocommerce-checkout-page .e-sticky-right-column {
        gap: 12px !important;
        row-gap: 12px !important;
    }
    body .elementor-widget-woocommerce-checkout-page .e-checkout__container {
        gap: 14px !important;
        row-gap: 14px !important;
        column-gap: 14px !important;
    }
    body .woocommerce-checkout-review-order-table tbody tr.at-cart-addons-row > td {
        border-bottom-width: 12px !important;
    }
    body .woocommerce-checkout-review-order-table tbody tr.cart_item:not(:first-of-type) > td {
        border-top-width: 12px !important;
    }
    body .elementor-widget-woocommerce-cart .e-cart-totals {
        margin-top: 10px !important;
    }

    body .elementor-widget-woocommerce-checkout-page .woocommerce #customer_details .col-1,
    body .elementor-widget-woocommerce-checkout-page .woocommerce .e-checkout__order_review,
    body .elementor-widget-woocommerce-checkout-page .woocommerce .e-coupon-box,
    body .elementor-widget-woocommerce-checkout-page .woocommerce .e-woocommerce-login-section,
    body .elementor-widget-woocommerce-checkout-page .woocommerce .shipping_address,
    body .elementor-widget-woocommerce-checkout-page .woocommerce .woocommerce-additional-fields,
    body .elementor-widget-woocommerce-checkout-page .woocommerce .woocommerce-checkout #payment {
        padding: 14px !important;
        margin: 0 0 12px 0 !important;
    }

    body .woocommerce-checkout-review-order-table tbody tr.cart_item > td,
    body .woocommerce-checkout-review-order-table tbody tr.at-cart-addons-row > td {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    body .woocommerce-cart-form table.cart tbody tr.cart_item > td,
    body .woocommerce-cart-form table.cart tbody tr.at-cart-addons-row > td {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    body .elementor-widget-woocommerce-checkout-page .woocommerce #payment .form-row,
    body .elementor-widget-woocommerce-checkout-page .woocommerce .form-row {
        padding: 0 0 8px !important;
        margin: 0 0 8px !important;
    }
}

/* Right-align product totals on checkout */
.woocommerce-checkout-review-order-table thead tr th.product-total,
.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total,
.woocommerce-checkout-review-order-table tfoot tr td:last-child {
    text-align: right !important;
}

.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total,
.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total .amount,
.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total bdi {
    white-space: nowrap;
    font-weight: 600 !important;
    color: #0f172a !important;
    vertical-align: top;
}

/* Bolder product name on checkout */
.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name,
.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name a {
    font-weight: 700 !important;
    color: #0f172a !important;
}

/*
 * Elementor's Checkout widget ships with a hard `max-width: 150px` +
 * `padding-inline-end: 40px` on the product-name cell, which causes a
 * visible layout jump on load and wraps product titles awkwardly.
 * Neutralize it so the cell flows with the rest of the summary.
 */
.elementor-widget-woocommerce-checkout-page .woocommerce .woocommerce-checkout-review-order-table .cart_item td.product-name {
    max-width: none !important;
    padding-inline-end: 16px !important;
}

/* ECM promo badge — rendered inline with the product name. */
.at-ecm-promo-badge {
    white-space: nowrap !important;
    word-break: normal !important;
}

.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name .product-quantity {
    font-weight: 500 !important;
    color: #475569 !important;
}

body .woocommerce td.product-name dl.variation dd,
.woocommerce-mini-cart-item dl.variation dd,
.elementor-menu-cart__product dl.variation dd {
    margin: 0 !important;
    padding: 6px 10px !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    color: #334155 !important;
    font-weight: 500;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

body .woocommerce td.product-name dl.variation dd p,
.woocommerce-mini-cart-item dl.variation dd p,
.elementor-menu-cart__product dl.variation dd p {
    margin: 0 !important;
    padding: 0 !important;
}

/* Add-ons list — clean stack under the pills */
.at-cart-addons-wrap {
    margin-top: 10px;
}

.at-cart-addons-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #475569;
    margin: 0 0 4px;
}

.at-cart-addons {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    max-width: 100%;
    box-sizing: border-box;
    width: 100%;
}

.at-cart-addon {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 7px 12px !important;
    margin: 0 !important;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    min-width: 0;
    box-sizing: border-box;
}

.at-cart-addon:last-child {
    border-bottom: none;
}

.at-cart-addon__name {
    flex: 1 1 auto;
    min-width: 0;
    color: #334155;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: flex;
    align-items: center;
    gap: 8px;
}

.at-cart-addon__name::before {
    content: "";
    display: inline-block;
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
}

.at-cart-addon__price {
    flex: 0 0 auto;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    text-align: right;
}

.at-cart-addon__price .woocommerce-Price-amount {
    font-weight: inherit;
    color: inherit;
}

/* "Included add-ons:" label above the list */
.woocommerce-cart-form .product-name .wc-item-meta,
.woocommerce-checkout-review-order .product-name .wc-item-meta,
.woocommerce-cart-form .product-name > p:has(.at-cart-addons),
.woocommerce-checkout-review-order .product-name > p:has(.at-cart-addons) {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.woocommerce-cart-form .product-name .wc-item-meta-label,
.woocommerce-checkout-review-order .product-name .wc-item-meta-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #475569;
    margin: 0 0 6px;
}

/* Checkout review order — tighter spacing, keep pill variations */
.woocommerce-checkout-review-order table.shop_table td.product-name {
    padding: 10px 8px !important;
    line-height: 1.4;
}

.woocommerce-checkout-review-order table.shop_table td.product-name .at-cart-addons {
    margin-top: 4px;
    font-size: 0.8rem;
}

.woocommerce-checkout-review-order table.shop_table td.product-name .at-cart-addon {
    padding: 5px 10px;
}

/* Mobile — stack image above name */
@media (max-width: 600px) {
    .woocommerce-cart-form table.cart td.product-thumbnail,
    .woocommerce table.shop_table_responsive td.product-thumbnail {
        width: auto;
        padding-right: 0 !important;
    }

    .woocommerce-cart-form table.cart td.product-thumbnail img,
    .woocommerce table.shop_table_responsive td.product-thumbnail img {
        width: 80px !important;
        height: 80px !important;
        max-width: 80px !important;
    }
}

/* ──────────────────────────────────────────────────────────
   Mini cart (Elementor menu cart drawer) — clean layout:

     ┌──────┐  Product name                     [×]
     │ img  │  $ price
     └──────┘  ────────────────────────────────────
                Included add-ons (if any)
   ────────────────────────────────────────────────────────── */

.elementor-menu-cart__products .elementor-menu-cart__product {
    display: grid !important;
    grid-template-columns: 64px 1fr;
    grid-template-areas:
        "img name"
        "img price"
        "addons addons";
    grid-column-gap: 12px;
    grid-row-gap: 4px;
    align-items: start;
    padding: 14px !important;
    border-bottom: 1px solid #e5e7eb !important;
    position: relative;
}

.elementor-menu-cart__products .elementor-menu-cart__product:last-child {
    border-bottom: 0 !important;
}

.elementor-menu-cart__product-image {
    grid-area: img;
    width: 64px;
    height: 64px;
    margin: 0 !important;
    padding: 0 !important;
}

.elementor-menu-cart__product-image a,
.elementor-menu-cart__product-image img {
    display: block;
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.elementor-menu-cart__product-name {
    grid-area: name;
    margin: 0 !important;
    padding-right: 0;
    font-weight: 600;
    line-height: 1.3;
    color: #0f172a;
}

.elementor-menu-cart__product-name a {
    font-weight: 600 !important;
    color: #0f172a !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Price on its own line under the name */
.elementor-menu-cart__product-price {
    grid-area: price;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.85rem;
    color: #334155;
    font-weight: 500;
}

.elementor-menu-cart__product-price .quantity {
    color: #475569;
}

.elementor-menu-cart__product-price .woocommerce-Price-amount,
.elementor-menu-cart__product-price bdi {
    font-weight: 700;
    color: #0f172a;
}

/* Move the remove × to the top-right corner of each row.
   Row padding is 16px; center the 22px button in that inset. */
.elementor-menu-cart__product-remove {
    position: absolute !important;
    top: 14px;
    right: 14px;
    grid-area: unset !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2;
}

.elementor-menu-cart__product-remove a.remove,
.elementor-menu-cart__product-remove a.remove_from_cart_button,
.elementor-menu-cart__product-remove .elementor_remove_from_cart_button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #475569 !important;
    background: #f1f5f9 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    border: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.elementor-menu-cart__product-remove a.remove:hover,
.elementor-menu-cart__product-remove a.remove_from_cart_button:hover {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

/* Variation dl + add-ons sit on their own row spanning both columns */
.elementor-menu-cart__product .variation,
.elementor-menu-cart__product dl.variation,
.elementor-menu-cart__product .at-cart-addons {
    grid-area: addons;
    margin-top: 6px !important;
}

.elementor-menu-cart__product .at-cart-addons {
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    background: #fafafa;
}

.elementor-menu-cart__product .at-cart-addon {
    padding: 4px 10px !important;
    font-size: 0.75rem;
}

/* ──────────────────────────────────────────────────────────
   Mini-cart drawer — align visuals with cart/checkout
   (Do NOT override drawer width/position — Elementor manages
   that via JS + inline styles; touching width here broke the
   right-anchored off-canvas positioning.)
   ────────────────────────────────────────────────────────── */

/* Bigger thumbnails + roomier rows so the drawer reads like the cart page. */
.elementor-menu-cart__products .elementor-menu-cart__product {
    grid-template-columns: 72px 1fr !important;
    grid-column-gap: 14px !important;
    padding: 16px !important;
}

.elementor-menu-cart__product-image,
.elementor-menu-cart__product-image a,
.elementor-menu-cart__product-image img {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
}

/* Name: match cart/checkout typography (0.95rem / 700 / slate-900). */
.elementor-menu-cart__product-name,
.elementor-menu-cart__product-name a {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.35 !important;
}

/* Price row uses the same secondary slate as cart qty labels. */
.elementor-menu-cart__product-price {
    font-size: 0.88rem !important;
    color: #475569 !important;
}

.elementor-menu-cart__product-price .woocommerce-Price-amount,
.elementor-menu-cart__product-price bdi {
    font-weight: 700 !important;
    color: #0f172a !important;
}

/* Footer totals + CTAs pick up the same slate border / spacing. */
.elementor-menu-cart__footer-buttons,
.elementor-menu-cart__subtotal,
.widget_shopping_cart .total,
.widget_shopping_cart .buttons {
    padding: 14px 16px !important;
    border-top: 1px solid #e5e7eb !important;
}

.widget_shopping_cart .total,
.elementor-menu-cart__subtotal {
    font-size: 0.95rem !important;
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Promo badge sits neatly next to the product name inside the drawer. */
.elementor-menu-cart__product .at-ecm-promo-badge {
    margin-left: 6px !important;
    font-size: 0.68rem !important;
}

/* ECM promo: old price struck through + new price highlighted.
   Targets the custom markup emitted by format_cart_item_price. */
.at-ecm-promo-old,
del.at-ecm-promo-old {
    color: #94a3b8 !important;
    text-decoration: line-through !important;
    font-weight: 500 !important;
    margin-right: 6px;
}

.at-ecm-promo-old .woocommerce-Price-amount,
.at-ecm-promo-old bdi {
    color: inherit !important;
    text-decoration: inherit !important;
}

.at-ecm-promo-new,
ins.at-ecm-promo-new {
    background: transparent !important;
    text-decoration: none !important;
    color: #065f46 !important;
    font-weight: 700 !important;
}

.at-ecm-promo-new .woocommerce-Price-amount,
.at-ecm-promo-new bdi {
    color: inherit !important;
}

/* ──────────────────────────────────────────────────────────
   Empty mini-cart — centered message + illustration
   ────────────────────────────────────────────────────────── */

/* Elementor/WC mark the drawer empty on `.elementor-menu-cart--empty`
   or by injecting `<p class="woocommerce-mini-cart__empty-message">`.
   Stretch the inner wrapper so the message sits vertically centered. */
.elementor-menu-cart--empty .elementor-menu-cart__main {
    justify-content: center !important;
}

.elementor-menu-cart--empty .widget_shopping_cart_content,
.elementor-menu-cart--empty .elementor-menu-cart__main-panel {
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40vh;
}

.woocommerce-mini-cart__empty-message,
.elementor-menu-cart--empty .elementor-menu-cart__empty-text,
.elementor-menu-cart--empty p.woocommerce-mini-cart__empty-message {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 !important;
    padding: 32px 24px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    text-align: center;
}

/* Inline SVG bag icon above the message via ::before. */
.woocommerce-mini-cart__empty-message::before,
.elementor-menu-cart--empty .elementor-menu-cart__empty-text::before {
    content: "";
    display: block;
    width: 56px;
    height: 56px;
    background-color: #f1f5f9;
    border-radius: 999px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/><path d='M3 6h18'/><path d='M16 10a4 4 0 1 1-8 0'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 28px 28px;
}

/* Hide the default "Return to shop" button styling residue and re-skin it. */
.woocommerce-mini-cart__buttons,
.elementor-menu-cart--empty .woocommerce-mini-cart__buttons {
    display: flex;
    justify-content: center;
}

.woocommerce-mini-cart__empty-message + .buttons a,
.elementor-menu-cart--empty .wc-forward {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 20px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #0f172a !important;
    border: 1px solid #0f172a !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.woocommerce-mini-cart__empty-message + .buttons a:hover,
.elementor-menu-cart--empty .wc-forward:hover {
    background: #1e293b !important;
    border-color: #1e293b !important;
}
