/* ============================================================
   WOOCOMMERCE
   ============================================================ */

/* -- Product category badge ---------------------------------------- */
.wd-product-cats.wd-loop-prod-meta a {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: var(--bs-secondary);
    color: #fff !important;
    font-size: .75em;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none !important;
    transition: background-color .2s ease;
}
/* Subcategory link in loop (child category) */
.wd-product-cats.wd-loop-prod-meta a ~ a {
    background-color: #495057 !important;
    color: #fff !important;
    text-decoration: none !important;
}
.wd-product-cats.wd-loop-prod-meta a ~ a:hover {
    background-color: #343a40 !important;
    color: #fff !important;
}
.wd-product-cats.wd-loop-prod-meta a:hover {
    background-color: var(--bs-secondary);
    color: #fff !important;
}

/* Show attribute label in archive quick-shop (hidden by theme default) */
/* NOTE: .wd-quick-shop-2 has font-size:0 — must use rem, not em */
.wd-loop-prod-variations .wd-quick-shop-2 th.cell.label {
    display: table-cell !important;
    visibility: visible !important;
    font-size: 0 !important;
    white-space: nowrap !important;
    padding-right: 8px !important;
    vertical-align: middle !important;
}
.wd-loop-prod-variations .wd-quick-shop-2 th.cell.label label {
    display: inline-block !important;
    background-color: transparent !important;
    color: var(--bs-secondary) !important;
    border: 1.5px solid var(--bs-secondary) !important;
    padding: 1px 7px !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
}
.wd-loop-prod-variations .wd-quick-shop-2 th.cell.label label::after,
.single-product .variations th.cell.label label::after,
.popup-quick-view .variations th.cell.label label::after {
    content: "" !important;
}

/* Hide the selected-value label injected by Woodmart JS next to the swatch label on mobile */
.single-product .variations th.cell.label .wd-attr-selected,
.popup-quick-view .variations th.cell.label .wd-attr-selected {
    display: none !important;
}

/* -- Single product page: same label badge style as archive quick-shop -- */
.single-product .variations th.cell.label label {
    display: inline-block !important;
    background-color: transparent !important;
    color: var(--bs-secondary) !important;
    border: 1.5px solid var(--bs-secondary) !important;
    padding: 1px 7px !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
}
.single-product .variations th.cell.label,
.popup-quick-view .variations th.cell.label {
    padding-right: 12px !important;
    padding-bottom: 6px !important;
    vertical-align: middle !important;
}
.single-product .variations td.cell,
.popup-quick-view .variations td.cell {
    padding-bottom: 6px !important;
}

/* -- Reduce gap between individual swatches on single product page -- */
.single-product .wd-swatches-single,
.popup-quick-view .wd-swatches-single {
    --wd-swatch-v-sp: 5px;
    --wd-swatch-h-sp: 6px;
}
.single-product .variations th.cell.label label,
.popup-quick-view .variations th.cell.label label {
    display: inline-block !important;
    background-color: transparent !important;
    color: var(--bs-secondary) !important;
    border: 1.5px solid var(--bs-secondary) !important;
    padding: 1px 7px !important;
    border-radius: 4px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
}

/* -- Product label: out-of-stock text color fix -------------------- */
/* Customizer sets dark background but theme default uses dark text — force white */
.product-label.out-of-stock {
    color: #fff !important;
}


/* -- Archive quick-shop: show all attribute rows immediately (like single product page) */
.wd-quick-shop-2:not(.wd-form-inited) tr:not(:first-child) .wd-swatches-grid {
    display: flex !important;
}
/* Match theme's swatch margin-top on label cell so they stay aligned */
.wd-quick-shop-2 table.variations tr:not(:first-child) th.cell.label {
    padding-top: calc(var(--wd-prod-gap, 10px) - 2px) !important;
}

/* -- Hide add-to-cart button on out-of-stock loop products --------- */
li.outofstock .wd-add-btn-wrapp {
    display: none !important;
}

/* -- Product loop star rating badge -------------------------------- */
.wd-loop-prod-rating {
    display: inline-flex;
    align-items: center;
}
.wd-loop-prod-rating .star-rating {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px!important;
    padding: 2px 7px !important;
    border-radius: 4px;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    font-size: .78em !important;
    font-weight: 700;
    line-height: 1.3 !important;
    margin: 0 !important;
    white-space: nowrap;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}
.wd-loop-prod-rating .star-rating::before {
    color: #f9a825 !important;
}
.wd-loop-prod-rating .star-rating div {
    font-weight: 700 !important;
    color: #111 !important;
    font-style: normal !important;
    line-height: 1 !important;
    position: relative!important;
    top: .05rem!important;
}

/* -- Single product meta (COD / Category / Brand) ------------------ */
.product_meta.wd-layout-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 10px 14px;
    border-radius: 6px;
    background-color: var(--bs-gray-100);
    font-size: .875em;
}

/* Labels (COD:, Category:, Brand:) */
.product_meta .meta-label {
    font-weight: 600;
    color: var(--bs-dark);
    margin-inline-end: 3px;
}

/* SKU value */
.product_meta .sku_wrapper .sku {
    color: var(--bs-gray-600);
    font-family: monospace;
}

/* Category and brand badge links */
.product_meta .posted_in a {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 4px;
    background-color: var(--bs-secondary);
    color: #fff !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: background-color .2s ease;
}
.product_meta .posted_in a:hover {
    background-color: var(--bs-secondary);
    color: #fff !important;
}

/* Mobile: stack meta rows and keep label + badges aligned */
@media (max-width: 768px) {
    .single-product .product_meta.wd-layout-inline {
        gap: 5px 0;
        padding: 8px 12px;
    }
    .single-product .product_meta.wd-layout-inline > span {
        flex: 1 1 100% !important;
    }
    .single-product .product_meta .posted_in,
    .single-product .product_meta .sku_wrapper {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
    }
}

/* -- General ---------------------------------------- */
.wd-empty-block-title:before,
.wd-action-btn .wd-action-icon:before {
    font-family: "compformed-icons"!important;
}
.wd-empty-mini-cart:before {
    font-family: "compformed-icons"!important;
    font-size: 100px!important;
    content: "\f131"!important;
}
.create-account-question:before {
    font-family: "compformed-icons"!important;
    font-size: 64px!important;
    content: "\f128"!important;
}
.cart-empty {
    --wd-empty-block-icon: "\f131"!important;
}
.wd-empty-wishlist {
    --wd-empty-block-icon: "\f114"!important;
}
.wd-empty-compare {
    --wd-empty-block-icon: "\f11d"!important;
}
.wd-compare-icon {
    --wd-btn-icon: "\f11d"
}
.wd-quick-view-icon {
    --wd-btn-icon: "\f10a";
    position: relative;
    left: 2px;
}
.wd-wishlist-icon {
    --wd-btn-icon: "\f114";
    position: relative;
    left: 2px;
}
.wd-add-btn {
    --wd-btn-icon: "\f132"!important;
}
.wd-cross-icon {
    --wd-btn-icon: "\f133";
}
.wd-burger-icon{
    --wd-btn-icon: "\f10f";
}
.wd-filter-action .wd-burger-icon {
    --wd-btn-icon: "\f118";
}
.track_order p,
.track_order p label {
    color: #4C5262;
}
.track_order p label {
    padding-left: 5px;
}

/* -- Product Item Loop ---------------------------------------- */
.wd-product-wrapper .quantity input[type="button"] {
    min-width: 20px;
}
.wd-product-wrapper .quantity input[type="number"] {
    font-size: 11px;
}
.wd-product-wrapper .wd-loop-prod-btn.wd-add-btn .quantity {
    --wd-form-height: 20px!important;
}

/* Suppress transition and focus-visible outline on qty +/- buttons */
div.quantity input[type="button"] {
    transition: none !important;
}
div.quantity input[type="button"]:focus-visible {
    outline: none !important;
}

/* Overlay shown behind the toast to improve readability */
.wd-wc-toast-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99998;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
    cursor: pointer;
}
.wd-wc-toast-overlay--visible {
    opacity: 1;
}

/* WooCommerce stock toast */
.wd-wc-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background-color: color-mix(in srgb, var(--bs-danger) 8%, #fff);
    border: 1px solid rgba(220,53,69,.2);
    border-left: 4px solid var(--bs-danger);
    box-shadow: 0 4px 24px rgba(0,0,0,.14);
    color: var(--bs-gray-700);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    padding: 14px 16px;
    border-radius: 10px;
    z-index: 99999;
    width: clamp(300px, 90vw, 520px);
    text-align: left;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
}
.wd-wc-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.wd-wc-toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(220,53,69,.12);
    color: var(--bs-danger);
    font-size: 1rem;
    margin-top: 1px;
}
.wd-wc-toast-body {
    flex: 1 1 0;
    min-width: 0;
}
.wd-wc-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 2px 0 0 2px;
    cursor: pointer;
    color: var(--bs-gray-400);
    font-size: 0.875rem;
    line-height: 1;
    transition: color .2s ease;
    align-self: flex-start;
    outline: none;
}
.wd-wc-toast-close:hover,
.wd-wc-toast-close:focus {
    background: none;
    color: var(--bs-gray-700);
}
.wd-wc-toast li {
    list-style: none !important;
}
.wd-wc-toast li::before {
    display: none !important;
}
.wd-wc-toast a {
    color: var(--bs-gray-900) !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font-size: inherit !important;
    display: inline !important;
    pointer-events: auto;
}
@media (max-width: 480px) {
    .wd-wc-toast {
        left: 12px;
        right: 12px;
        width: auto;
        transform: translateY(-20px);
    }
    .wd-wc-toast--visible {
        transform: translateY(0);
    }
}

/* Cart icon always on the right */
.wd-add-btn-wrapp {
    width: 100%;
}
.wd-add-btn {
    justify-content: space-between!important;
    align-items: center!important;
    flex-direction: row!important;
    width: 100%;
}
.wd-add-btn .quantity {
    left: 0!important;
    position: static!important;
}
/* Simple products: icon only */
.product-type-simple .wd-add-btn-wrapp .wd-action-btn .wd-action-text {
    display: none!important;
}
.product-type-simple .wd-add-btn-wrapp .wd-action-btn .wd-action-icon {
    display: flex!important;
    margin-inline-end: 0!important;
}

/* Variable products in loop: three states.
   HTML: .wd-add-btn-wrapp > div.wd-add-btn.wd-action-btn.wd-style-text > [.quantity + <a>]
   .wd-add-btn and .wd-action-btn are the SAME flex container element.
   Size rules go on the <a> inside, NOT on the container. */

/* --- No selection: <a> as compact pill centered, icon hidden --- */
.product-type-variable:not(.wd-variation-active) .wd-add-btn-wrapp .wd-add-btn {
    justify-content: center!important;
}
.product-type-variable:not(.wd-variation-active) .wd-add-btn-wrapp .wd-add-btn > a {
    min-height: unset!important;
    height: 20px;
    font-size: 11px;
    padding: 0 8px;
    border-radius: 50px;
}
.product-type-variable:not(.wd-variation-active) .wd-add-btn-wrapp .wd-add-btn > a .wd-action-icon {
    display: none!important;
}
.product-type-variable:not(.wd-variation-active) .wd-add-btn-wrapp .wd-add-btn > a .wd-action-text {
    display: inline!important;
}

/* --- Any selection: qty left + compact icon <a> right --- */
.product-type-variable.wd-variation-active .wd-add-btn-wrapp .wd-add-btn {
    justify-content: space-between!important;
    align-items: center!important;
}
.product-type-variable.wd-variation-active .wd-add-btn-wrapp .quantity {
    display: flex!important;
}
.product-type-variable.wd-variation-active .wd-add-btn-wrapp .wd-add-btn > a {
    min-height: unset!important;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-type-variable.wd-variation-active .wd-add-btn-wrapp .wd-add-btn > a .wd-action-text {
    display: none!important;
}
.product-type-variable.wd-variation-active .wd-add-btn-wrapp .wd-add-btn > a .wd-action-icon {
    display: flex!important;
    margin-inline-end: 0!important;
}

/* --- Partial selection: greyed out, non-interactive --- */
.product-type-variable.wd-variation-active:not(.wd-full-variation-found) .wd-add-btn-wrapp .wd-add-btn > a {
    opacity: 0.35;
    pointer-events: none;
}
.product-type-variable.wd-variation-active:not(.wd-full-variation-found) .wd-add-btn-wrapp .quantity {
    opacity: 0.35;
    pointer-events: none;
    user-select: none;
}

/* Single product: restore quantity for simple products in sliders */
.single-product .product-type-simple .wd-add-btn-wrapp .quantity {
    display: flex!important;
}
/* Single product: restore icon for simple products in sliders */
.single-product .product-type-simple .wd-add-btn-wrapp .wd-add-btn > a .wd-action-text {
    display: none!important;
}
.single-product .product-type-simple .wd-add-btn-wrapp .wd-add-btn > a .wd-action-icon {
    display: flex!important;
    margin-inline-end: 0!important;
}
.single-product .product-type-simple .wd-add-btn-wrapp .wd-add-btn > a {
    min-height: unset!important;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Single product: quantity on left, icon on right for simple products */
.single-product .product-type-simple .wd-add-btn-wrapp .wd-add-btn {
    justify-content: space-between!important;
}
/* Single product: restore quantity for variable products with a selected variant */
.single-product .product-type-variable.wd-variation-active .wd-add-btn-wrapp .quantity {
    display: flex!important;
}
/* Single product: quantity on left, icon on right for selected variant */
.single-product .product-type-variable.wd-variation-active .wd-add-btn-wrapp .wd-add-btn {
    justify-content: space-between!important;
}

/* -- Category Navigation ---------------------------------------- */
.widget_nav_mega_menu .wd-nav > li > a {
    border: 1.5px solid transparent;
    transition: .3s ease-in-out;
}
.widget_nav_mega_menu .wd-nav:where(:not(.wd-dis-hover)) > li:where(.wd-opened,:hover) > a {
    background-color: rgba(var(--bs-secondary-rgb), .06);
    border: 1.5px solid var(--bs-secondary);
}
.widget_nav_mega_menu .wd-nav > li.current-menu-item > a,
.widget_nav_mega_menu .wd-nav > li.current-menu-item > a {
    background-color: var(--bs-secondary);
    color: var(--bs-white);
}

/* -- Home Page Filter ---------------------------------------- */
.wd-pf-dropdown .wd-active>a {
    background-color: var(--bgcolor-gray-200);
    font-weight: 500;
    color: var(--bs-gray-900);
}

/* -- Shop Page ---------------------------------------- */
.woocommerce-shop .sidebar-container {
    padding-top: 5px;
}
.product_title:first-letter,
.product-grid-item .wd-entities-title:first-letter {
    text-transform: uppercase;
}
.wd-hover-base .wrapp-swatches {
    border-top: none!important;
    background-color: transparent!important;
}
[class*="wd-spacing-"]>[class*="col"] {
    margin-top: 10px;
}
.wd-nav-product-cat .wd-sub-menu {
    border-radius: 5px;
    box-shadow: 0 10px 15px 0 rgb(0 0 0 / 10%);
}
.wd-hover-with-fade .content-product-imagin {
    border-radius: 5px!important;
    box-shadow: 0 10px 15px 0 rgb(0 0 0 / 10%)!important;
}
.product-element-top .wd-buttons {
    border-radius: 5px!important;
}

/* -- Ajax Product Slider ---------------------------------------- */
.product-element-top {
    box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 15%) !important;
    margin-bottom: 20px!important;
}
[class*="title-line-"] .product-grid-item .wd-entities-title {
    color: var(--wd-primary-color)!important;
    font-weight: 700!important;
}

/* -- Single product Page ---------------------------------------- */
.woocommerce-breadcrumb .breadcrumb-last:first-letter,
a.wd-entities-title:first-letter {
    text-transform: uppercase!important;
}
.product-summary-shadow .summary-inner {
    border-radius: 5px!important;
    box-shadow: 0 10px 15px 0 rgb(0 0 0 / 10%)!important;
}
.single_add_to_cart_button.disabled {
    opacity: .7;
    cursor: not-allowed;
}
.wd-sticky-btn-cart .wd-action-btn .wd-action-icon:before,
.wd-single-action-btn .wd-action-btn .wd-action-icon:before {
    font-size: 1.5rem;
}
.wd-sticky-btn-cart .wd-compare-icon {
    position: relative;
    left: 10px;
}

/* -- Related Products ---------------------------------------- */
.slider-title:before {
    background-color: var(--bs-gray-500)!important;
}

/* -- Quick Shop Popup ---------------------------------------- */
.popup-quick-view .woocommerce-product-gallery {
    border: 1px solid var(--brdcolor-gray-300, rgba(0, 0, 0, 0.105));
    border-radius: var(--wd-brd-radius, 8px);
    overflow: hidden;
}

.popup-quick-view .woocommerce-product-gallery img {
    border-radius: 0;
}

.popup-quick-view .product_meta .posted_in a {
    font-size: .75em;
}

/* -- Attribute text swatches: border style ---------------------------------------- */
/* Always 1px shadow — color changes only */
[class*="wd-swatches"] .wd-swatch.wd-text {
    box-shadow: 0 0 0 1px var(--brdcolor-gray-300, rgba(0,0,0,.15)) inset;
    border-radius: 4px !important;
    --wd-swatch-text-size: 13px;
    width: 34px !important;
    height: 28px !important;
    min-width: 34px !important;
    min-height: 28px !important;
}

/* Selected / active: gray-800 border (1px) — suppress underline decoration */
[class*="wd-swatches"] .wd-swatch.wd-text.wd-active,
[class*="wd-swatches"] .wd-swatch-wrap.wd-active .wd-swatch.wd-text {
    box-shadow: 0 0 0 1px var(--bs-gray-800) inset;
    border-radius: 4px !important;
}

/* Suppress ::after underline on ALL text swatches at all times */
[class*="wd-swatches"] .wd-swatch.wd-text:after,
[class*="wd-swatches"] .wd-swatch-wrap .wd-swatch.wd-text:after {
    opacity: 0 !important;
}
@media (hover: hover) {
    [class*="wd-swatches"].wd-text-style-1 .wd-swatch.wd-text:hover:after,
    [class*="wd-swatches"].wd-text-style-1 .wd-swatch.wd-text.wd-active:hover:after {
        opacity: 0 !important;
    }
}

/* Hover (pointer devices): gray-500 border — skip if already selected */
@media (hover: hover) {
    [class*="wd-swatches"] .wd-swatch.wd-text:hover:not(.wd-disabled):not(.wd-active),
    [class*="wd-swatches"] .wd-swatch-wrap:not(.wd-active) .wd-swatch.wd-text:hover:not(.wd-disabled) {
        box-shadow: 0 0 0 1px var(--bs-gray-500) inset;
    }
}

/* Disabled swatches: suppress :active visual change when clicked */
[class*="wd-swatches"] .wd-swatch.wd-text.wd-disabled:active {
    box-shadow: 0 0 0 1px var(--brdcolor-gray-300, rgba(0,0,0,.15)) inset !important;
}

/* Hover (pointer devices): gray-500 border — skip if already selected */
@media (hover: hover) {
    [class*="wd-swatches"] .wd-swatch.wd-text:hover:not(.wd-disabled):not(.wd-active),
    [class*="wd-swatches"] .wd-swatch-wrap:not(.wd-active) .wd-swatch.wd-text:hover:not(.wd-disabled) {
        box-shadow: 0 0 0 1px var(--bs-gray-500) inset;
    }
}

/* Disabled swatches: suppress :active visual change when clicked */
[class*="wd-swatches"] .wd-swatch.wd-text.wd-disabled:active {
    box-shadow: 0 0 0 1px var(--brdcolor-gray-300, rgba(0,0,0,.15)) inset !important;
}
/* If a swatch ends up both active and disabled (first-click before AJAX loads),
   override the dark active border with the disabled (light) one. */
[class*="wd-swatches"] .wd-swatch.wd-text.wd-active.wd-disabled,
[class*="wd-swatches"] .wd-swatch-wrap.wd-active .wd-swatch.wd-text.wd-disabled {
    box-shadow: 0 0 0 1px var(--brdcolor-gray-300, rgba(0,0,0,.15)) inset !important;
    border-radius: 4px !important;
}

/* -- Label badge: same height as swatches (28px) to align vertically -------------- */
.wd-loop-prod-variations .wd-quick-shop-2 th.cell.label label,
.single-product .variations th.cell.label label,
.popup-quick-view .variations th.cell.label label {
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
}

