/* Woo Add to cart css Start */
.trad-woo-mini-cart {
    display: flex;
}
.trad-woo-mini-cart.cart-icon-left  { justify-content: flex-start; }
.trad-woo-mini-cart.cart-icon-center{ justify-content: center; }
.trad-woo-mini-cart.cart-icon-right { justify-content: flex-end; }

/* ── Cart bag item list ─────────────────────────────────── */
.trad-cart-items-list {
    padding: 0;
    margin: 0;
}

/* Single cart item row */
.trad-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
.trad-cart-item:last-of-type {
    border-bottom: none;
}

/* Thumbnail */
.trad-cart-item-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,0.05);
}
.trad-cart-item-thumb a,
.trad-cart-item-thumb img {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: none;
    outline: none;
    box-shadow: none;
}

/* Info: name + qty/price */
.trad-cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.trad-cart-item-name {
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
    text-decoration: none;
    display: block;
}
.trad-cart-item-qty {
    font-size: 0.82em;
    opacity: 0.7;
    line-height: 1;
}

/* Remove button */
.trad-cart-item-remove {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.08);
    text-decoration: none;
    transition: background 0.2s ease;
    /* Hard reset — prevent Astra/theme pill styles */
    border: none !important;
    outline: none;
    padding: 0;
    box-shadow: none;
    line-height: 1;
    color: inherit;
}
.trad-cart-item-remove:hover {
    background: rgba(0,0,0,0.2);
}
.trad-cart-item-remove svg {
    display: block;
    pointer-events: none;
}

/* Subtotal row */
.trad-cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 10px;
    font-weight: 700;
    font-size: 0.95em;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 4px;
}

/* Action buttons (View cart / Checkout) */
.trad-cart-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.trad-cart-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s ease;
    /* Reset Astra pill */
    border: 1px solid rgba(0,0,0,0.15) !important;
    box-shadow: none !important;
    line-height: 1.2;
}
.trad-cart-action-btn:hover {
    opacity: 0.85;
    text-decoration: none;
}
.trad-cart-view-btn {
    background: #fff;
    color: #333;
}
.trad-cart-checkout-btn {
    background: #2e3195;
    color: #fff;
    border-color: transparent !important;
}

/* Empty cart message */
.trad-cart-empty {
    padding: 20px 0;
    text-align: center;
    opacity: 0.7;
    font-size: 0.9em;
    margin: 0;
}

/* Legacy WC classes (hover/click mode still uses woocommerce-mini-cart__buttons) */
.trad-woo-cart-bag .woocommerce-mini-cart__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 10px;
    font-weight: 700;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 4px;
}
.trad-woo-cart-bag .woocommerce-mini-cart__buttons {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.trad-woo-mini-cart-wrapper.button-full-width .trad-woo-cart-bag .woocommerce-mini-cart__buttons {
    flex-direction: column;
}
.trad-woo-cart-bag .woocommerce-mini-cart__buttons .wc-forward {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 6px !important;
    font-size: 0.88em;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
    border: 1px solid rgba(0,0,0,0.15) !important;
    box-shadow: none !important;
    text-align: center;
}

/* ── Cart icon / trigger ────────────────────────────────── */
.trad-woo-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.trad-woo-mini-cart-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}
.trad-woo-mini-cart-wrapper.trad-cart-icon-box-yes .trad-woo-cart-icon {
    position: relative;
}
.trad-woo-mini-cart-wrapper.trad-cart-icon-box-yes .trad-woo-cart-icon i,
.trad-woo-mini-cart-wrapper.trad-cart-icon-box-yes .trad-woo-cart-icon svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ── Count badge ────────────────────────────────────────── */
.trad-cart-items-count-number {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    color: #fff;
}

/* ── Cart bag dropdown ──────────────────────────────────── */
.trad-woo-cart-bag {
    position: absolute;
    top: 100%;
    width: 350px;
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.trad-woo-mini-cart.slide-up   .trad-woo-cart-bag { transform: translateY(-10px); }
.trad-woo-mini-cart.slide-down .trad-woo-cart-bag { transform: translateY(10px); }
.trad-woo-mini-cart.zoom-down  .trad-woo-cart-bag { transform: scaleY(0); transform-origin: top; }

.trad-woo-mini-cart.cart-bag-position-left  .trad-woo-cart-bag { right: 0; }
.trad-woo-mini-cart.cart-bag-position-right .trad-woo-cart-bag { left: 0; }

.trad-woo-mini-cart-wrapper.hover-active .trad-woo-cart-bag,
.trad-woo-mini-cart-wrapper.click-active .trad-woo-cart-bag {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.trad-woo-mini-cart.zoom-down .trad-woo-mini-cart-wrapper.hover-active .trad-woo-cart-bag,
.trad-woo-mini-cart.zoom-down .trad-woo-mini-cart-wrapper.click-active .trad-woo-cart-bag {
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
}

/* ── Cart heading ───────────────────────────────────────── */
.trad-cart-items-heading {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Subtotal row ───────────────────────────────────────── */
.trad-woo-cart-bag .woocommerce-mini-cart__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-weight: 600;
}

/* ── Action buttons ─────────────────────────────────────── */
.trad-woo-cart-bag .woocommerce-mini-cart__buttons {
    margin: 10px 0 0;
    display: flex;
    gap: 8px;
}
.trad-woo-mini-cart-wrapper.button-full-width .trad-woo-cart-bag .woocommerce-mini-cart__buttons {
    flex-direction: column;
}
.trad-woo-cart-bag .woocommerce-mini-cart__buttons .wc-forward {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}
.trad-woo-cart-bag .woocommerce-mini-cart__buttons .wc-forward:not(:last-child) {
    margin-right: 0;
}

/* ── Fly-out mode ───────────────────────────────────────── */
.trad-woo-mini-cart.fly-out .trad-woo-mini-cart-wrapper .trad-woo-cart-bag {
    position: fixed;
    top: 0;
    height: 100vh;
    min-height: 100vh;
    width: 350px; /* default width — overridden by Elementor width control */
    transform: unset !important;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    opacity: 1;       /* don't use opacity for fly-out — use left/right offset */
    visibility: hidden;
    transition: left 0.35s ease, right 0.35s ease, visibility 0s linear 0.35s;
}

/* Left side — starts off-screen to the left */
.trad-woo-mini-cart.fly-out.fly-out-appear-position-left .trad-woo-mini-cart-wrapper .trad-woo-cart-bag {
    left: -350px; /* matches default width — Elementor width control overrides */
    right: auto;
}
/* Right side — starts off-screen to the right */
.trad-woo-mini-cart.fly-out.fly-out-appear-position-right .trad-woo-mini-cart-wrapper .trad-woo-cart-bag {
    right: -350px;
    left: auto;
}

/* Active: slide in */
.trad-woo-mini-cart.fly-out.fly-out-appear-position-left  .trad-woo-mini-cart-wrapper .trad-woo-cart-bag.fly-out-active {
    left: 0 !important;
    visibility: visible;
    transition: left 0.35s ease, visibility 0s linear 0s;
}
.trad-woo-mini-cart.fly-out.fly-out-appear-position-right .trad-woo-mini-cart-wrapper .trad-woo-cart-bag.fly-out-active {
    right: 0 !important;
    visibility: visible;
    transition: right 0.35s ease, visibility 0s linear 0s;
}

.trad-woo-mini-cart.fly-out .trad-woo-mini-cart-wrapper .trad-woo-cart-bag .trad-cart-items-heading {
    flex-shrink: 0;
    padding-right: 50px; /* space for close button */
}
.trad-woo-mini-cart.fly-out .trad-woo-mini-cart-wrapper .trad-woo-cart-bag .trad-cart-items-list {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}
.trad-woo-mini-cart.fly-out .trad-woo-mini-cart-wrapper .trad-woo-cart-bag .trad-cart-subtotal,
.trad-woo-mini-cart.fly-out .trad-woo-mini-cart-wrapper .trad-woo-cart-bag .trad-cart-actions {
    flex-shrink: 0;
}

body.admin-bar .trad-woo-mini-cart.fly-out .trad-woo-mini-cart-wrapper .trad-woo-cart-bag {
    top: 32px;
    height: calc(100vh - 32px);
    min-height: calc(100vh - 32px);
}

/* ── Fly-out close button ───────────────────────────────── */
.trad-woo-cart-bag-fly-out-close-icon {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    z-index: 10;
    transition: background 0.2s ease;
    color: #333;
    flex-shrink: 0;
}
.trad-woo-cart-bag-fly-out-close-icon:hover {
    background: rgba(0,0,0,0.35);
}
.trad-woo-cart-bag-fly-out-close-icon svg {
    display: block;
    pointer-events: none;
    width: 14px;
    height: 14px;
}
.trad-woo-cart-bag-fly-out-close-icon svg line {
    stroke: #333;
}
/* Remove any pseudo-element interference */
.trad-woo-cart-bag-fly-out-close-icon::before,
.trad-woo-cart-bag-fly-out-close-icon::after {
    display: none !important;
    content: none !important;
}

/* ── Fly-out overlay ────────────────────────────────────── */
.trad-woo-cart-bag-fly-out-overlay {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    height: 100%;
    width: 100%;
    z-index: 9998;
    visibility: hidden;
    transition: all 0.3s ease;
}
.trad-woo-cart-bag-fly-out-overlay.fly-out-active {
    opacity: 1;
    visibility: visible;
}

/* Hide WC shop-loop elements that can leak into mini cart in some themes */
.trad-woo-cart-bag .widget_shopping_cart_content .woocommerce-ordering,
.trad-woo-cart-bag .widget_shopping_cart_content .woocommerce-result-count,
.trad-woo-cart-bag .widget_shopping_cart_content .woocommerce-breadcrumb,
.trad-woo-cart-bag .widget_shopping_cart_content form.woocommerce-ordering {
    display: none !important;
}

/* Woo Add to cart css End */