/**
 * WoodMart product loop — global parity (shop, homepage, related, carousels).
 * Design tokens match WoodMart default product archive spacing & proportions.
 */

.wd-product-loop-section,
.wd-product-loop-context,
.theme-shop-listing.wd-products-element,
.wd-products-element {
    --wd-img-ratio: 1 / 1;
    --wd-loop-gap: 15px;
    --wd-carousel-gutter: 7.5px;
    --wd-icon-size: 38px;
    --wd-icon-gap: 8px;
    --wd-icon-offset: 10px;
    --wd-atc-height: 44px;
    --wd-atc-bg: #333;
    --wd-action-radius: 50%;
    --wd-btn-accent: var(--primary, #00b4f0);
    --wd-btn-accent-hover: var(--hov-primary, #0099d1);
    --wd-loop-title: #111827;
    --wd-loop-title-size: 14px;
    --wd-loop-title-lh: 1.4;
    --wd-loop-muted: #999;
    --wd-loop-border: #ebebeb;
    --wd-loop-bottom-pt: 10px;
    --wd-img-bg: #f5f5f5;
    --wd-img-radius: var(--wd-brd-radius, 8px);
}

.wd-product-loop-section.product-in-carousel,
.wd-product-loop-context.product-in-carousel {
    --wd-icon-size: 34px;
    --wd-icon-gap: 6px;
}

.wd-product-loop-context.product-grid-item,
.theme-shop-listing .product-grid-item {
    position: relative;
    margin-bottom: 0;
    width: 100%;
    min-width: 0;
}

.wd-product-loop-context .product-wrapper,
.theme-shop-listing .product-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
}

.wd-product-loop-context .product-element-top,
.theme-shop-listing .product-element-top {
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    width: 100%;
    border-radius: var(--wd-img-radius, 8px);
}

.wd-product-loop-context .product-image-link,
.theme-shop-listing .product-image-link {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    line-height: 0;
    aspect-ratio: var(--wd-img-ratio, 1 / 1);
    background: var(--wd-img-bg, #f5f5f5);
    border-radius: var(--wd-img-radius, 8px);
}

.wd-product-loop-context .product-image-link .wd-main-img,
.wd-product-loop-context .hover-img .wd-hover-img,
.theme-shop-listing .product-image-link .wd-main-img,
.theme-shop-listing .hover-img .wd-hover-img,
.wd-product-loop-section .product-image-link .wd-main-img,
.wd-product-loop-section .hover-img .wd-hover-img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: var(--wd-img-object-fit, cover) !important;
    object-position: center;
    vertical-align: top;
}

.wd-product-loop-context.wd-img-fit-contain .product-image-link,
.theme-shop-listing .wd-img-fit-contain .product-image-link,
.wd-product-loop-section .wd-img-fit-contain .product-image-link {
    background: var(--wd-img-bg, #f5f5f5);
}

.wd-product-loop-context .product-image-link .wd-main-img,
.theme-shop-listing .product-image-link .wd-main-img,
.wd-product-loop-section .product-image-link .wd-main-img {
    position: absolute;
    inset: 0;
    transition: opacity 0.35s ease, transform 0.5s ease;
}

.wd-product-loop-context:not(:has(.hover-img)) .product-element-top:hover .product-image-link .wd-main-img,
.theme-shop-listing .wd-product-loop-context:not(:has(.hover-img)) .product-element-top:hover .product-image-link .wd-main-img,
.wd-product-loop-section .wd-product-loop-context:not(:has(.hover-img)) .product-element-top:hover .product-image-link .wd-main-img,
.cibato-main-wrapper .wd-product-loop-context:not(:has(.hover-img)) .product-element-top:hover .product-image-link .wd-main-img {
    transform: scale(1.05);
}

/* Second image swap — hide main image so hover image does not stack/ghost */
.wd-product-loop-context:has(.hover-img):not(.wd-image-hover-none) .product-element-top:hover .product-image-link .wd-main-img,
.theme-shop-listing .wd-product-loop-context:has(.hover-img):not(.wd-image-hover-none) .product-element-top:hover .product-image-link .wd-main-img,
.wd-product-loop-section .wd-product-loop-context:has(.hover-img):not(.wd-image-hover-none) .product-element-top:hover .product-image-link .wd-main-img,
.cibato-main-wrapper .wd-product-loop-context:has(.hover-img):not(.wd-image-hover-none) .product-element-top:hover .product-image-link .wd-main-img,
html:not(.theme-pa-hover-none) .wd-product-loop-context:has(.hover-img) .product-element-top:hover .product-image-link .wd-main-img {
    opacity: 0;
    transform: none;
}

.wd-product-loop-context .hover-img,
.theme-shop-listing .hover-img,
.wd-product-loop-section .hover-img,
.cibato-main-wrapper .hover-img {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Second image on hover — global (WoodMart standard, all frontend product cards) */
.wd-product-loop-context:not(.wd-image-hover-none) .product-element-top:hover .hover-img,
.wd-product-loop-context:not(.wd-image-hover-none) .product-wrapper:hover .product-element-top .hover-img,
.wd-product-loop-section .wd-product-loop-context:not(.wd-image-hover-none) .product-element-top:hover .hover-img,
.theme-shop-listing .wd-product-loop-context:not(.wd-image-hover-none) .product-element-top:hover .hover-img,
.cibato-main-wrapper .wd-product-loop-context:not(.wd-image-hover-none) .product-element-top:hover .hover-img,
html:not(.theme-pa-hover-none) .wd-product-loop-context .product-element-top:hover .hover-img {
    opacity: 1;
}

.wd-product-loop-context.wd-image-hover-info .product-element-top:hover .wd-main-img,
.wd-product-loop-section .wd-product-loop-context.wd-image-hover-info .product-element-top:hover .wd-main-img,
.theme-shop-listing .wd-product-loop-context.wd-image-hover-info .product-element-top:hover .wd-main-img,
.cibato-main-wrapper .wd-product-loop-context.wd-image-hover-info .product-element-top:hover .wd-main-img,
html.theme-pa-hover-info .wd-product-loop-context .product-element-top:hover .wd-main-img {
    opacity: 0;
}

.wd-product-loop-context.wd-image-hover-none .hover-img,
.theme-shop-listing .wd-image-hover-none .hover-img,
.wd-product-loop-section .wd-image-hover-none .hover-img,
html.theme-pa-hover-none .wd-product-loop-context .hover-img {
    display: none !important;
}

/* Labels */
.wd-product-loop-context .product-labels,
.theme-shop-listing .product-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 5px;
    pointer-events: none;
}

.wd-product-loop-context .product-label,
.theme-shop-listing .product-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    padding: 3px 8px;
    text-transform: uppercase;
}

.wd-product-loop-context .product-label.onsale,
.theme-shop-listing .product-label.onsale { background: #e74c3c; color: #fff; }
.wd-product-loop-context .product-label.new,
.theme-shop-listing .product-label.new { background: #2ecc71; color: #fff; }
.wd-product-loop-context .product-label.hot,
.theme-shop-listing .product-label.hot { background: #f97316; color: #fff; }
.wd-product-loop-context .product-label.featured,
.theme-shop-listing .product-label.featured { background: var(--wd-btn-accent); color: #fff; }
.wd-product-loop-context .product-label.out-of-stock,
.theme-shop-listing .product-label.out-of-stock { background: #777; color: #fff; }

.wd-product-loop-context .product-labels--right,
.theme-shop-listing .product-labels--right {
    left: auto;
    right: 10px;
    align-items: flex-end;
}

/* Hover overlay + action icons — reference: center row on image hover */
.wd-product-loop-context .product-element-top::before,
.theme-shop-listing .product-element-top::before,
.wd-product-loop-section .product-element-top::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.08);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
}

.wd-product-loop-context .product-element-top:hover::before,
.theme-shop-listing .product-element-top:hover::before,
.wd-product-loop-section .product-element-top:hover::before {
    opacity: 1;
}

.wd-product-loop-context .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-buttons.wd-pos-r-t,
.wd-product-loop-section .wd-buttons.wd-pos-r-t {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    z-index: 5;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--wd-icon-gap, 8px);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.wd-product-loop-context .product-element-top:hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-context .wd-visible-buttons .wd-buttons.wd-pos-r-t,
.wd-product-loop-context .wd-image-hover-icons .wd-buttons.wd-pos-r-t,
.theme-shop-listing .product-element-top:hover .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-visible-buttons .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-image-hover-icons .wd-buttons.wd-pos-r-t,
.wd-product-loop-section .product-element-top:hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-section .wd-visible-buttons .wd-buttons.wd-pos-r-t {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Loop designs that keep icons top-right column */
.wd-product-loop-context.wd-icons-top-right .wd-buttons.wd-pos-r-t,
.wd-product-loop-context.wd-hover-icons .wd-buttons.wd-pos-r-t,
.wd-product-loop-context.wd-hover-buttons-on-hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-context.wd-hover-fw-button .wd-buttons.wd-pos-r-t,
.wd-product-loop-context.wd-hover-icons .wrapp-buttons .wd-buttons,
.theme-shop-listing .wd-icons-top-right .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-hover-icons .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-hover-buttons-on-hover .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-hover-fw-button .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-hover-icons .wrapp-buttons .wd-buttons {
    top: var(--wd-icon-offset, 10px);
    left: auto;
    right: var(--wd-icon-offset, 10px);
    flex-direction: column;
    gap: var(--wd-icon-gap, 5px);
    transform: translate3d(12px, 0, 0);
}

.wd-product-loop-context.wd-icons-top-right .product-element-top:hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-context.wd-hover-icons .product-element-top:hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-context.wd-hover-icons .wrapp-buttons .wd-buttons,
.wd-product-loop-context.wd-hover-buttons-on-hover .product-element-top:hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-context.wd-hover-fw-button .product-element-top:hover .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-icons-top-right .product-element-top:hover .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-hover-icons .product-element-top:hover .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-hover-icons .wrapp-buttons .wd-buttons,
.theme-shop-listing .wd-hover-buttons-on-hover .product-element-top:hover .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-hover-fw-button .product-element-top:hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-section .wd-icons-top-right .product-element-top:hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-section .wd-hover-icons .product-element-top:hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-section .wd-hover-icons .wrapp-buttons .wd-buttons,
.wd-product-loop-section .wd-hover-buttons-on-hover .product-element-top:hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-section .wd-hover-fw-button .product-element-top:hover .wd-buttons.wd-pos-r-t {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) !important;
}

.wd-product-loop-context .wd-action-btn,
.theme-shop-listing .wd-action-btn,
.wd-product-loop-section .wd-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #444;
}

.wd-product-loop-context .wd-action-btn.wd-style-icon,
.theme-shop-listing .wd-action-btn.wd-style-icon,
.wd-product-loop-section .wd-action-btn.wd-style-icon {
    width: var(--wd-icon-size, 40px);
    height: var(--wd-icon-size, 40px);
    background: #fff;
    border: none;
    border-radius: var(--wd-action-radius);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
    transition: color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wd-product-loop-context .wd-action-btn.wd-style-icon:hover,
.theme-shop-listing .wd-action-btn.wd-style-icon:hover,
.wd-product-loop-section .wd-action-btn.wd-style-icon:hover {
    color: var(--wd-btn-accent);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.wd-product-loop-context .wd-action-icon,
.theme-shop-listing .wd-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.wd-product-loop-context .wd-action-text,
.theme-shop-listing .wd-action-text {
    display: none;
}

/* Add to cart bar on image */
.wd-product-loop-context .wd-add-btn.wd-add-btn-replace,
.theme-shop-listing .wd-add-btn.wd-add-btn-replace {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: translateY(100%);
    transition: transform 0.35s ease;
    overflow: hidden;
}

.wd-product-loop-context .wd-add-btn.wd-add-btn-replace .add-to-cart-loop,
.theme-shop-listing .wd-add-btn.wd-add-btn-replace .add-to-cart-loop {
    border-radius: 0;
}

.wd-product-loop-context .product-element-top:hover .wd-add-btn.wd-add-btn-replace:not(.wd-add-btn-below),
.theme-shop-listing .product-element-top:hover .wd-add-btn.wd-add-btn-replace:not(.wd-add-btn-below) {
    transform: translateY(0);
}

.wd-product-loop-context.wd-add-always .wd-add-btn.wd-add-btn-replace:not(.wd-add-btn-below),
.theme-shop-listing .wd-add-always .wd-add-btn.wd-add-btn-replace:not(.wd-add-btn-below) {
    transform: translateY(0);
}

.wd-product-loop-context.wd-add-below-image .product-element-top,
.theme-shop-listing .wd-add-below-image .product-element-top {
    overflow: visible;
}

.wd-product-loop-context .wd-add-btn-below,
.theme-shop-listing .wd-add-btn-below {
    position: static;
    transform: none;
    margin-top: 0;
    width: 100%;
}

.wd-product-loop-context .wd-add-btn-below .add-to-cart-loop,
.theme-shop-listing .wd-add-btn-below .add-to-cart-loop {
    border-radius: 0 0 var(--wd-img-radius, 8px) var(--wd-img-radius, 8px);
}

.wd-product-loop-context.wd-bottom-meta-hidden .product-element-bottom .swap-elements .wd-entities-title,
.wd-product-loop-context.wd-bottom-meta-hidden .product-element-bottom .swap-elements .price,
.theme-shop-listing .wd-bottom-meta-hidden .product-element-bottom .swap-elements .wd-entities-title,
.theme-shop-listing .wd-bottom-meta-hidden .product-element-bottom .swap-elements .price {
    display: none;
}

.wd-product-loop-context .add-to-cart-loop,
.theme-shop-listing .add-to-cart-loop,
.wd-product-loop-section .add-to-cart-loop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: var(--wd-atc-height, 44px);
    padding: 0 16px;
    border: 0;
    background: var(--wd-atc-bg, #333);
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    cursor: pointer;
    text-decoration: none !important;
}

.wd-product-loop-context .add-to-cart-loop .wd-action-icon,
.theme-shop-listing .add-to-cart-loop .wd-action-icon,
.wd-product-loop-section .add-to-cart-loop .wd-action-icon {
    flex-shrink: 0;
    display: inline-flex;
}

.wd-product-loop-context .add-to-cart-loop:hover,
.theme-shop-listing .add-to-cart-loop:hover,
.wd-product-loop-section .add-to-cart-loop:hover {
    background: var(--wd-btn-accent);
    color: #fff !important;
}

/* Bottom content */
.wd-product-loop-context .product-element-bottom,
.theme-shop-listing .product-element-bottom,
.wd-product-loop-section .product-element-bottom {
    padding: var(--wd-loop-bottom-pt, 12px) 0 0;
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wd-product-loop-context .wd-entities-title,
.theme-shop-listing .wd-entities-title,
.wd-product-loop-section .wd-entities-title {
    font-size: var(--wd-loop-title-size, 14px);
    font-weight: 400;
    line-height: var(--wd-loop-title-lh, 1.4);
    margin: 0 0 4px;
    color: var(--wd-loop-title);
    text-align: left;
}

.wd-product-loop-context .wd-entities-title a,
.theme-shop-listing .wd-entities-title a,
.wd-product-loop-section .wd-entities-title a {
    color: var(--wd-loop-title, #111827);
    text-decoration: none;
}

/* WoodMart: loop titles — max 2 lines (ellipsis), or 1 line when configured */
.wd-product-loop-context .wd-entities-title.wd-title-line-two > a,
.theme-shop-listing .wd-entities-title.wd-title-line-two > a,
.wd-product-loop-section .wd-entities-title.wd-title-line-two > a,
.wd-product-loop-context .wd-hover-with-bg .wd-entities-title.wd-title-line-two > a,
.theme-shop-listing .wd-hover-with-bg .wd-entities-title.wd-title-line-two > a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: var(--wd-loop-title-lh, 1.4);
    max-height: calc(var(--wd-loop-title-size, 14px) * var(--wd-loop-title-lh, 1.4) * 2);
}

.wd-product-loop-context .wd-entities-title.wd-title-line-two,
.theme-shop-listing .wd-entities-title.wd-title-line-two,
.wd-product-loop-section .wd-entities-title.wd-title-line-two {
    overflow: hidden;
    max-height: calc(var(--wd-loop-title-size, 14px) * var(--wd-loop-title-lh, 1.4) * 2);
}

.wd-product-loop-context .wd-title-line-one,
.theme-shop-listing .wd-title-line-one,
.wd-product-loop-section .wd-title-line-one {
    overflow: hidden;
}

.wd-product-loop-context .wd-title-line-one > a,
.theme-shop-listing .wd-title-line-one > a,
.wd-product-loop-section .wd-title-line-one > a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Title lines from Theme Settings (class on product item) */
.wd-product-loop-context.theme-loop-title-lines-2 .product-element-bottom .wd-entities-title:not(.wd-title-line-one) > a,
.theme-shop-listing .theme-loop-title-lines-2 .product-element-bottom .wd-entities-title:not(.wd-title-line-one) > a,
.wd-product-loop-section .theme-loop-title-lines-2 .product-element-bottom .wd-entities-title:not(.wd-title-line-one) > a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.wd-product-loop-context.theme-loop-title-lines-1 .product-element-bottom .wd-entities-title > a,
.theme-shop-listing .theme-loop-title-lines-1 .product-element-bottom .wd-entities-title > a,
.wd-product-loop-section .theme-loop-title-lines-1 .product-element-bottom .wd-entities-title > a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wd-product-loop-context.theme-loop-title-lines-0 .product-element-bottom .wd-entities-title > a,
.theme-shop-listing .theme-loop-title-lines-0 .product-element-bottom .wd-entities-title > a,
.wd-product-loop-section .theme-loop-title-lines-0 .product-element-bottom .wd-entities-title > a {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    -webkit-line-clamp: unset;
}

.wd-product-loop-context .wd-entities-title a:hover,
.theme-shop-listing .wd-entities-title a:hover,
.wd-product-loop-section .wd-entities-title a:hover {
    color: var(--primary, #00b4f0);
}

.wd-product-loop-context .swap-elements,
.theme-shop-listing .swap-elements,
.wd-product-loop-section .swap-elements {
    text-align: left;
}

.wd-product-loop-context .price,
.theme-shop-listing .price,
.wd-product-loop-section .price {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    color: var(--wd-loop-title);
}

.wd-product-loop-context .price > .woocommerce-Price-amount,
.theme-shop-listing .price > .woocommerce-Price-amount,
.wd-product-loop-section .price > .woocommerce-Price-amount {
    color: var(--wd-btn-accent);
    font-weight: 600;
}

.wd-product-loop-context .price del,
.theme-shop-listing .price del {
    color: var(--wd-loop-muted);
    font-weight: 400;
    font-size: 13px;
    margin-right: 6px;
}

.wd-product-loop-context .price ins,
.theme-shop-listing .price ins {
    text-decoration: none;
    color: var(--wd-btn-accent);
    font-weight: 600;
}

.wd-product-loop-context .wd-product-brands-links,
.wd-product-loop-context .wd-product-cats,
.theme-shop-listing .wd-product-brands-links,
.theme-shop-listing .wd-product-cats {
    font-size: 11px;
    margin-bottom: 4px;
    opacity: 0.7;
}

.wd-product-loop-context .wd-product-brands-links a,
.wd-product-loop-context .wd-product-cats a,
.theme-shop-listing .wd-product-brands-links a,
.theme-shop-listing .wd-product-cats a {
    color: inherit;
    text-decoration: none;
}

.wd-product-loop-context .wd-swatches-grid,
.theme-shop-listing .wd-swatches-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.wd-product-loop-context .wd-swatch.wd-color-swatch,
.theme-shop-listing .wd-swatch.wd-color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--wd-swatch-color, #cbd5e1);
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    display: inline-block;
}

.wd-product-loop-context .wd-swatch.wd-color-swatch--labeled,
.theme-shop-listing .wd-swatch.wd-color-swatch--labeled {
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    max-width: 52px;
}

.wd-product-loop-context .wd-color-swatch__dot,
.theme-shop-listing .wd-color-swatch__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--wd-swatch-color, #cbd5e1);
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.wd-product-loop-context .wd-color-swatch__label,
.theme-shop-listing .wd-color-swatch__label {
    font-size: 9px;
    line-height: 1.2;
    color: inherit;
    opacity: 0.75;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.wd-product-loop-context .wd-swatch.wd-text-swatch,
.theme-shop-listing .wd-swatch.wd-text-swatch {
    font-size: 10px;
    padding: 2px 6px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    background: #fafafa;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-product-loop-context .wd-progress-bar,
.theme-shop-listing .wd-progress-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    margin: 6px 0;
}

.wd-product-loop-context .wd-progress-bar span,
.theme-shop-listing .wd-progress-bar span {
    display: block;
    height: 100%;
    background: var(--wd-btn-accent);
}

/* Design variants — fw_button, buttons_on_hover, icons only */
.wd-product-loop-context.wd-hover-icons .wd-add-btn.wd-add-btn-replace:not(.wd-add-cart-icon),
.theme-shop-listing .wd-hover-icons .wd-add-btn.wd-add-btn-replace:not(.wd-add-cart-icon) {
    display: none;
}

/* Shared: second image hover */
.wd-product-loop-context .product-image-link,
.theme-shop-listing .product-image-link,
.wd-product-loop-section .product-image-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.wd-product-loop-context .product-image-link .hover-image,
.wd-product-loop-context .product-image-link .hover-img .wd-hover-img,
.theme-shop-listing .product-image-link .hover-image,
.theme-shop-listing .product-image-link .hover-img .wd-hover-img,
.wd-product-loop-section .product-image-link .hover-image,
.wd-product-loop-section .product-image-link .hover-img .wd-hover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.wd-product-loop-context .product-element-top:hover .hover-image,
.wd-product-loop-context .product-element-top:hover .hover-img .wd-hover-img,
.theme-shop-listing .product-element-top:hover .hover-image,
.theme-shop-listing .product-element-top:hover .hover-img .wd-hover-img,
.wd-product-loop-section .product-element-top:hover .hover-image,
.wd-product-loop-section .product-element-top:hover .hover-img .wd-hover-img {
    opacity: 1;
}

/* buttons_on_hover */
.wd-product-loop-context.wd-hover-buttons-on-hover .wd-buttons,
.wd-product-loop-context.wd-hover-buttons-on-hover .wd-add-btn,
.theme-shop-listing .wd-hover-buttons-on-hover .wd-buttons,
.theme-shop-listing .wd-hover-buttons-on-hover .wd-add-btn,
.wd-product-loop-section .wd-hover-buttons-on-hover .wd-buttons,
.wd-product-loop-section .wd-hover-buttons-on-hover .wd-add-btn {
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 8px, 0);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

.wd-product-loop-context.wd-hover-buttons-on-hover:hover .wd-buttons,
.wd-product-loop-context.wd-hover-buttons-on-hover:hover .wd-add-btn,
.wd-product-loop-context.wd-hover-buttons-on-hover .product-element-top:hover .wd-buttons,
.wd-product-loop-context.wd-hover-buttons-on-hover .product-element-top:hover .wd-add-btn,
.wd-product-loop-context.wd-hover-buttons-on-hover .product-element-top:hover .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-hover-buttons-on-hover:hover .wd-buttons,
.theme-shop-listing .wd-hover-buttons-on-hover:hover .wd-add-btn,
.theme-shop-listing .wd-hover-buttons-on-hover .product-element-top:hover .wd-buttons,
.theme-shop-listing .wd-hover-buttons-on-hover .product-element-top:hover .wd-add-btn,
.theme-shop-listing .wd-hover-buttons-on-hover .product-element-top:hover .wd-buttons.wd-pos-r-t,
.wd-product-loop-section .wd-hover-buttons-on-hover:hover .wd-buttons,
.wd-product-loop-section .wd-hover-buttons-on-hover:hover .wd-add-btn,
.wd-product-loop-section .wd-hover-buttons-on-hover .product-element-top:hover .wd-buttons,
.wd-product-loop-section .wd-hover-buttons-on-hover .product-element-top:hover .wd-add-btn,
.wd-product-loop-section .wd-hover-buttons-on-hover .product-element-top:hover .wd-buttons.wd-pos-r-t {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) !important;
}

/* fw_button */
.wd-product-loop-context.wd-hover-fw-button .wd-add-btn-fw,
.theme-shop-listing .wd-hover-fw-button .wd-add-btn-fw {
    position: relative;
    width: 100%;
    display: block;
    opacity: 1;
    transform: none;
}

.wd-product-loop-context.wd-hover-fw-button .wd-fw-btn,
.wd-product-loop-context.wd-hover-fw-button .wd-add-btn-fw .add-to-cart-loop,
.theme-shop-listing .wd-hover-fw-button .wd-fw-btn,
.theme-shop-listing .wd-hover-fw-button .wd-add-btn-fw .add-to-cart-loop {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    background: var(--theme-btn-bg, var(--wd-btn-accent, #0055FF));
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    text-decoration: none !important;
}

.wd-product-loop-context.wd-hover-fw-button .wd-fw-btn:hover,
.wd-product-loop-context.wd-hover-fw-button .wd-add-btn-fw .add-to-cart-loop:hover,
.theme-shop-listing .wd-hover-fw-button .wd-fw-btn:hover,
.theme-shop-listing .wd-hover-fw-button .wd-add-btn-fw .add-to-cart-loop:hover {
    opacity: 0.88;
}

.wd-product-loop-context.wd-hover-fw-button .wd-buttons,
.theme-shop-listing .wd-hover-fw-button .wd-buttons {
    opacity: 0;
    transition: opacity 0.25s;
}

.wd-product-loop-context.wd-hover-fw-button:hover .wd-buttons,
.wd-product-loop-context.wd-hover-fw-button .product-element-top:hover .wd-buttons,
.theme-shop-listing .wd-hover-fw-button:hover .wd-buttons,
.theme-shop-listing .wd-hover-fw-button .product-element-top:hover .wd-buttons,
.wd-product-loop-section .wd-hover-fw-button:hover .wd-buttons,
.wd-product-loop-section .wd-hover-fw-button .product-element-top:hover .wd-buttons {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) !important;
}

/* icons */
.wd-product-loop-context.wd-hover-icons .wrapp-buttons,
.wd-product-loop-context.wd-hover-icons .wd-buttons.wd-pos-r-t,
.wd-product-loop-context.wd-hover-icons .wrapp-buttons .wd-buttons,
.theme-shop-listing .wd-hover-icons .wrapp-buttons,
.theme-shop-listing .wd-hover-icons .wd-buttons.wd-pos-r-t,
.theme-shop-listing .wd-hover-icons .wrapp-buttons .wd-buttons,
.wd-product-loop-section .wd-hover-icons .wrapp-buttons,
.wd-product-loop-section .wd-hover-icons .wd-buttons.wd-pos-r-t,
.wd-product-loop-section .wd-hover-icons .wrapp-buttons .wd-buttons {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) !important;
}

.wd-product-loop-context.wd-hover-icons .wd-action-btn,
.theme-shop-listing .wd-hover-icons .wd-action-btn {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.wd-product-loop-context.wd-hover-icons .wd-action-btn:hover,
.theme-shop-listing .wd-hover-icons .wd-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* Card appearance toggles — visual only; must not change grid/carousel cell size */
.wd-product-loop-context .product-wrapper,
.theme-shop-listing .product-wrapper,
.wd-product-loop-section .product-wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* Border ring via inset shadow — no layout shift / no clipping */
.wd-product-loop-context.wd-with-border .product-wrapper,
.wd-product-loop-context.wd-with-border .wd-product-wrapper,
.theme-shop-listing .wd-with-border .product-wrapper,
.theme-shop-listing .wd-with-border .wd-product-wrapper,
.wd-product-loop-section .wd-with-border .product-wrapper,
.wd-product-loop-section .wd-with-border .wd-product-wrapper,
html.theme-pa-card-border .wd-product-loop-context .product-wrapper,
html.theme-pa-card-border .wd-product-loop-context .wd-product-wrapper {
    position: relative;
    background: #fff;
    border-radius: var(--wd-brd-radius, 8px);
    overflow: hidden;
    box-shadow: none;
}

.wd-product-loop-context.wd-with-border .product-wrapper::after,
.wd-product-loop-context.wd-with-border .wd-product-wrapper::after,
.theme-shop-listing .wd-with-border .product-wrapper::after,
.theme-shop-listing .wd-with-border .wd-product-wrapper::after,
.wd-product-loop-section .wd-with-border .product-wrapper::after,
.wd-product-loop-section .wd-with-border .wd-product-wrapper::after,
html.theme-pa-card-border .wd-product-loop-context .product-wrapper::after,
html.theme-pa-card-border .wd-product-loop-context .wd-product-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid var(--wd-loop-border, #e8e8e8);
    border-radius: inherit;
    pointer-events: none;
    z-index: 6;
}

/* Text/meta inset inside framed cards — image stays full-bleed */
.wd-product-loop-context.wd-with-border .product-element-bottom,
.theme-shop-listing .wd-product-loop-context.wd-with-border .product-element-bottom,
.theme-shop-listing:not(.theme-pa-view-list) #products-row .wd-product-loop-context.wd-with-border .product-element-bottom,
.wd-product-loop-section .wd-product-loop-context.wd-with-border .product-element-bottom,
html.theme-pa-card-border .wd-product-loop-context .product-element-bottom {
    padding: var(--wd-loop-bottom-pt, 12px) var(--wd-loop-card-inset, 12px) var(--wd-loop-card-inset, 12px);
    border-top: 1px solid var(--wd-loop-border, #e8e8e8);
}

/* Stock */
.wd-product-loop-context .wd-product-stock,
.theme-shop-listing .wd-product-stock,
.wd-product-loop-section .wd-product-stock {
    font-size: 12px;
    margin: 4px 0;
}

.wd-product-loop-context .wd-product-stock.in-stock,
.theme-shop-listing .wd-product-stock.in-stock,
.wd-product-loop-section .wd-product-stock.in-stock {
    color: #27500A;
}

.wd-product-loop-context .wd-product-stock.out-of-stock,
.theme-shop-listing .wd-product-stock.out-of-stock,
.wd-product-loop-section .wd-product-stock.out-of-stock {
    color: #791F1F;
}

.wd-product-loop-context .wd-product-stock-progress,
.theme-shop-listing .wd-product-stock-progress,
.wd-product-loop-section .wd-product-stock-progress {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.wd-product-loop-context .wd-product-stock-progress .wd-progress-bar,
.wd-product-loop-context .wd-product-stock-progress .wd-stock-bar,
.theme-shop-listing .wd-product-stock-progress .wd-progress-bar,
.theme-shop-listing .wd-product-stock-progress .wd-stock-bar,
.wd-product-loop-section .wd-product-stock-progress .wd-progress-bar,
.wd-product-loop-section .wd-product-stock-progress .wd-stock-bar {
    height: 100%;
    background: transparent;
    border-radius: 2px;
}

.wd-product-loop-context .wd-product-stock-progress .wd-progress-bar span,
.wd-product-loop-context .wd-product-stock-progress .wd-stock-bar span,
.theme-shop-listing .wd-product-stock-progress .wd-progress-bar span,
.theme-shop-listing .wd-product-stock-progress .wd-stock-bar span,
.wd-product-loop-section .wd-product-stock-progress .wd-progress-bar span,
.wd-product-loop-section .wd-product-stock-progress .wd-stock-bar span {
    display: block;
    height: 100%;
    background: #0055FF;
    border-radius: 2px;
    transition: width 0.3s;
}

/* Stock status + progress (Theme Settings → Products styles) */
.wd-product-loop-context .wd-product-stock,
.theme-shop-listing .wd-product-stock,
.wd-product-loop-section .wd-product-stock {
    font-size: 12px;
    line-height: 1.3;
    margin: 4px 0 2px;
    font-weight: 500;
}

.wd-product-loop-context .wd-product-stock.in-stock,
.theme-shop-listing .wd-product-stock.in-stock,
.wd-product-loop-section .wd-product-stock.in-stock {
    color: #2ecc71;
}

.wd-product-loop-context .wd-product-stock.out-of-stock,
.theme-shop-listing .wd-product-stock.out-of-stock,
.wd-product-loop-section .wd-product-stock.out-of-stock {
    color: #e74c3c;
}

.wd-product-loop-context .wd-product-stock-progress,
.theme-shop-listing .wd-product-stock-progress,
.wd-product-loop-section .wd-product-stock-progress {
    margin: 6px 0 4px;
    max-width: 100%;
}

.wd-product-loop-context .wd-product-stock-progress .wd-progress-bar,
.theme-shop-listing .wd-product-stock-progress .wd-progress-bar,
.wd-product-loop-section .wd-product-stock-progress .wd-progress-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.wd-product-loop-context .wd-product-stock-progress .wd-progress-bar span,
.theme-shop-listing .wd-product-stock-progress .wd-progress-bar span,
.wd-product-loop-section .wd-product-stock-progress .wd-progress-bar span {
    display: block;
    height: 100%;
    background: var(--wd-btn-accent, var(--primary, #00b4f0));
    border-radius: inherit;
    transition: width 0.3s ease;
}

/* =================================================================
   Shop archive product grid — CSS Grid (reliable full-width columns)
   ================================================================= */
.theme-shop-listing .cibato-listing-products-col {
    min-width: 0;
    flex: 1 1 auto;
}

.theme-shop-listing #products-row,
.cibato-commerce .cc-home-category-grid,
.cibato-commerce .cc-home-categories-2-grid,
.cibato-commerce .cc-products-grid-row {
    --wd-pa-gap: var(--wd-loop-gap, 20px);
    --wd-pa-row-gap: calc(var(--wd-pa-gap) + 14px);
    display: grid !important;
    grid-template-columns: repeat(var(--wd-pa-cols-mobile, var(--cc-hc-cols-mobile, var(--cc-hc2-cols-mobile, 2))), minmax(0, 1fr));
    column-gap: var(--wd-pa-gap);
    row-gap: var(--wd-pa-row-gap);
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-items: stretch;
    grid-auto-flow: row;
}

@media (min-width: 768px) {
    .theme-shop-listing #products-row,
    .cibato-commerce .cc-home-category-grid,
    .cibato-commerce .cc-home-categories-2-grid,
    .cibato-commerce .cc-products-grid-row {
        grid-template-columns: repeat(var(--wd-pa-cols-tablet, var(--cc-hc-cols-tablet, var(--cc-hc2-cols-tablet, 3))), minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .theme-shop-listing #products-row,
    .cibato-commerce .cc-home-category-grid,
    .cibato-commerce .cc-home-categories-2-grid,
    .cibato-commerce .cc-products-grid-row {
        grid-template-columns: repeat(var(--wd-pa-cols-desktop, var(--cc-hc-cols-desktop, var(--cc-hc2-cols-desktop, 4))), minmax(0, 1fr));
    }
}

.theme-shop-listing #products-row > .col,
.theme-shop-listing #products-row > .product-grid-item-col,
.cibato-commerce .cc-home-category-grid__item,
.cibato-commerce .cc-home-category-grid__item.product-grid-item-col,
.cibato-commerce .cc-home-categories-2-grid__item,
.cibato-commerce .cc-home-categories-2-grid__item.product-grid-item-col,
.cibato-commerce .cc-products-grid-row > .product-grid-item-col {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0;
    height: auto !important;
    display: flex;
    flex-direction: column;
}

.theme-shop-listing:not(.theme-pa-view-list) #products-row .product-grid-item,
.theme-shop-listing:not(.theme-pa-view-list) #products-row .wd-product-loop-context,
.cibato-commerce .cc-home-category-grid__item .product-grid-item,
.cibato-commerce .cc-home-category-grid__item .wd-product-loop-context,
.cibato-commerce .cc-home-categories-2-grid__item .product-grid-item,
.cibato-commerce .cc-home-categories-2-grid__item .wd-product-loop-context,
.cibato-commerce .cc-products-grid-row > .product-grid-item-col .wd-product-loop-context {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.theme-shop-listing.theme-pa-spacing-compact #products-row { --wd-pa-gap: 10px; --wd-loop-gap: 10px; --wd-pa-row-gap: 22px; }
.theme-shop-listing.theme-pa-spacing-large #products-row { --wd-pa-gap: 24px; --wd-loop-gap: 24px; --wd-pa-row-gap: 38px; }

.theme-shop-listing:not(.theme-pa-view-list) #products-row .product-element-bottom {
    padding-bottom: 6px;
}

.theme-shop-listing.theme-pa-view-list #products-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0;
}

.theme-shop-listing.theme-pa-view-list #products-row > .product-grid-item-col {
    border-bottom: 1px solid #eef1f5;
    padding: 18px 0 !important;
}

.theme-shop-listing.theme-pa-view-list #products-row > .product-grid-item-col:last-child {
    border-bottom: none;
}

.theme-shop-listing.theme-pa-view-list #products-row .product-grid-item,
.theme-shop-listing.theme-pa-view-list #products-row .wd-product-loop-context {
    width: 100%;
    max-width: 100%;
    height: auto;
}

.theme-shop-listing.theme-pa-view-list #products-row .product-wrapper {
    flex-direction: row !important;
    align-items: stretch;
    gap: clamp(16px, 2.5vw, 28px);
    width: 100%;
    min-height: 0;
    height: auto;
}

.theme-shop-listing.theme-pa-view-list #products-row .product-element-top {
    flex: 0 0 clamp(132px, 20vw, 240px);
    max-width: clamp(132px, 20vw, 240px);
    width: clamp(132px, 20vw, 240px);
}

.theme-shop-listing.theme-pa-view-list #products-row .product-element-bottom {
    flex: 1 1 auto;
    padding: 10px 0;
    justify-content: center;
    min-width: 0;
}

.theme-shop-listing.theme-pa-view-list #products-row .swap-elements {
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.theme-shop-listing.theme-pa-view-list #products-row .swap-elements .price {
    margin-top: 0;
}

.theme-shop-listing.theme-pa-view-list #products-row > .product-grid-item-col,
.theme-shop-listing.theme-pa-view-list #products-row > .col {
    grid-column: 1 / -1;
}

.theme-pa-even-grid #products-row .product-element-top,
.cibato-commerce .cc-home-category-grid.theme-pa-even-grid .product-element-top,
.cibato-commerce .cc-home-categories-2-grid.theme-pa-even-grid .product-element-top { flex: 0 0 auto; }

.theme-pa-even-grid #products-row .product-element-bottom,
.cibato-commerce .cc-home-category-grid.theme-pa-even-grid .product-element-bottom,
.cibato-commerce .cc-home-categories-2-grid.theme-pa-even-grid .product-element-bottom {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.theme-pa-even-grid #products-row .swap-elements,
.cibato-commerce .cc-home-category-grid.theme-pa-even-grid .swap-elements,
.cibato-commerce .cc-home-categories-2-grid.theme-pa-even-grid .swap-elements {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.theme-pa-even-grid #products-row .price,
.cibato-commerce .cc-home-category-grid.theme-pa-even-grid .price,
.cibato-commerce .cc-home-categories-2-grid.theme-pa-even-grid .price { margin-top: auto; }

/* Global even-height product cards (WoodMart shop grid behaviour) */
.wd-product-loop-section:not(.theme-pa-view-list) .wd-product-loop-context,
.wd-products-element:not(.theme-pa-view-list) .wd-product-loop-context,
.theme-shop-listing:not(.theme-pa-view-list) #products-row .wd-product-loop-context {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.wd-product-loop-section:not(.theme-pa-view-list) .product-wrapper,
.wd-products-element:not(.theme-pa-view-list) .product-wrapper,
.theme-shop-listing:not(.theme-pa-view-list) #products-row .product-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
}

.wd-product-loop-section:not(.theme-pa-view-list) .product-element-bottom,
.wd-products-element:not(.theme-pa-view-list) .product-element-bottom,
.theme-shop-listing:not(.theme-pa-view-list) #products-row .product-element-bottom {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.wd-product-loop-section:not(.theme-pa-view-list) .swap-elements,
.wd-products-element:not(.theme-pa-view-list) .swap-elements,
.theme-shop-listing:not(.theme-pa-view-list) #products-row .swap-elements {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wd-product-loop-section:not(.theme-pa-view-list) .swap-elements .price,
.wd-products-element:not(.theme-pa-view-list) .swap-elements .price,
.theme-shop-listing:not(.theme-pa-view-list) #products-row .swap-elements .price {
    margin-top: auto;
}

/* Reserve 2-line title block — keeps card bottoms aligned (WoodMart even grid) */
.wd-product-loop-context.theme-loop-title-lines-2 .product-element-bottom .wd-entities-title,
.wd-product-loop-section .wd-product-loop-context.theme-loop-title-lines-2 .product-element-bottom .wd-entities-title,
.theme-shop-listing .theme-loop-title-lines-2 .product-element-bottom .wd-entities-title,
.wd-product-loop-context .product-element-bottom .wd-entities-title.wd-title-line-two {
    min-height: calc(var(--wd-loop-title-size, 14px) * var(--wd-loop-title-lh, 1.4) * 2);
}

.wd-product-loop-context.theme-loop-title-lines-1 .product-element-bottom .wd-entities-title,
.wd-product-loop-context .product-element-bottom .wd-entities-title.wd-title-line-one {
    min-height: calc(var(--wd-loop-title-size, 14px) * var(--wd-loop-title-lh, 1.4));
}

.wd-product-loop-context .wd-swatches-product.wd-swatches-grid {
    min-height: 26px;
    margin-top: 8px;
    flex-shrink: 0;
}

.theme-pa-view-list .product-grid-item .product-wrapper {
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
}

.theme-pa-view-list .product-element-top {
    flex: 0 0 240px;
    max-width: 240px;
}

.theme-pa-view-list .product-element-bottom {
    padding: 16px 16px 16px 0;
    justify-content: center;
}

.theme-pa-tiled-grid.theme-shop-listing #products-row {
    gap: 0;
}

.theme-pa-tiled-grid.theme-shop-listing #products-row > .col,
.theme-pa-tiled-grid.theme-shop-listing #products-row > .product-grid-item-col {
    border: 1px solid #e0e0e0;
    padding: 12px !important;
}

/* Archive: add-to-cart bar only on hover unless fw_button loop design */
.theme-shop-listing:not(.theme-loop-design-fw_button) .wd-add-btn.wd-add-btn-replace:not(.wd-add-btn-fw) {
    transform: translateY(100%);
}

.theme-shop-listing:not(.theme-loop-design-fw_button) .product-element-top:hover .wd-add-btn.wd-add-btn-replace:not(.wd-add-btn-fw) {
    transform: translateY(0);
}

.theme-shop-listing.theme-loop-design-fw_button .wd-add-btn.wd-add-btn-replace,
.theme-shop-listing.theme-loop-design-fw_button .wd-add-btn-fw {
    transform: translateY(0);
}

.wd-product-loop-context.wd-hover-fw-button .product-element-top,
.theme-shop-listing .wd-hover-fw-button .product-element-top {
    overflow: visible;
}

.wd-product-loop-context.wd-hover-fw-button .wd-add-btn.wd-add-btn-replace,
.wd-product-loop-context.wd-hover-fw-button .wd-add-btn-fw,
.theme-shop-listing .wd-hover-fw-button .wd-add-btn.wd-add-btn-replace,
.theme-shop-listing .wd-hover-fw-button .wd-add-btn-fw {
    position: static;
    transform: none;
    margin-top: 10px;
}

.wd-product-loop-context.product-catalog-mode .wd-add-btn,
.wd-product-loop-context.product-catalog-mode .wd-buttons,
.wd-product-loop-context.product-catalog-mode .btn-add,
.theme-shop-listing .product-catalog-mode .wd-add-btn,
.theme-shop-listing .product-catalog-mode .wd-buttons,
.theme-shop-listing .product-catalog-mode .btn-add { display: none !important; }

html.theme-catalog-mode .wd-product-loop-context .price,
html.theme-catalog-mode .theme-shop-listing .price { display: none !important; }

/* Homepage carousels — equal-height slides (all breakpoints; keeps arrows centered on full card) */
.wd-product-loop-section.cibato-carousel .slick-track {
    display: flex !important;
    align-items: stretch !important;
}

.wd-product-loop-section.cibato-carousel .slick-slide {
    height: auto !important;
    display: flex !important;
    align-items: stretch !important;
}

.wd-product-loop-section.cibato-carousel .slick-slide > div {
    display: flex !important;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
}

.wd-product-loop-section.cibato-carousel .carousel-box {
    flex: 1 1 auto;
    height: 100% !important;
}

.wd-product-loop-section.cibato-carousel .wd-product-loop-context {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.wd-product-loop-section.cibato-carousel .product-wrapper {
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 100% !important;
}

.wd-product-loop-section.cibato-carousel .wd-product-brands-links--placeholder {
    visibility: hidden;
    pointer-events: none;
}

.wd-product-loop-section.cibato-carousel .wd-product-brands-links {
    min-height: calc(var(--wd-loop-title-size, 14px) * var(--wd-loop-title-lh, 1.4));
    line-height: var(--wd-loop-title-lh, 1.4);
}

.wd-product-loop-section.cibato-carousel:not(.cc-hero-slider) .slick-arrow {
    top: 50% !important;
    transform: translateY(-50%) !important;
    -webkit-transform: translateY(-50%) !important;
}

.wd-product-loop-section .carousel-box {
    transform: none !important;
    transform-origin: center center !important;
    display: flex !important;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
}

.wd-product-loop-context .wd-add-to-cart-btn--oos,
.theme-shop-listing .wd-add-to-cart-btn--oos,
.wd-product-loop-section .wd-add-to-cart-btn--oos {
    background: #9ca3af !important;
    color: #fff !important;
    cursor: not-allowed;
    opacity: 0.95;
    pointer-events: none;
}

.wd-product-loop-context .wd-add-cart-icon--oos .wd-action-btn,
.theme-shop-listing .wd-add-cart-icon--oos .wd-action-btn,
.wd-product-loop-section .wd-add-cart-icon--oos .wd-action-btn {
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
    background: #fff !important;
    cursor: not-allowed;
    pointer-events: none;
}

.wd-product-loop-section .carousel-box > .wd-product-loop-context {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.wd-product-loop-section .carousel-box img,
.wd-product-loop-section .slick-current .carousel-box img {
    border: 0 !important;
    outline: 0 !important;
}

.wd-product-loop-section.cibato-carousel .slick-list {
    overflow: hidden;
}

.wd-product-loop-section .product-element-bottom {
    display: flex !important;
    flex-direction: column;
    visibility: visible !important;
    opacity: 1 !important;
}

.wd-product-loop-section .product-element-bottom .wd-entities-title,
.wd-product-loop-section .product-element-bottom .price {
    display: block !important;
}

.wd-product-loop-section .product-element-bottom .wd-entities-title.wd-title-line-two > a,
.wd-product-loop-section .product-element-bottom .wd-entities-title:not(.wd-title-line-one) > a {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.wd-product-loop-section .carousel-box > .wd-product-loop-context,
.wd-product-loop-section .carousel-box > .product-grid-item {
    width: 100%;
    max-width: 100%;
}

.wd-product-loop-section .product-element-top {
    overflow: hidden;
}

.wd-product-loop-section .wd-add-btn.wd-add-btn-replace:not(.wd-add-btn-fw) {
    transform: translateY(100%);
    visibility: hidden;
}

.wd-product-loop-section .product-element-top:hover .wd-add-btn.wd-add-btn-replace:not(.wd-add-btn-fw),
.wd-product-loop-section .wd-hover-buttons-on-hover:hover .wd-add-btn.wd-add-btn-replace:not(.wd-add-btn-fw),
.wd-product-loop-section .wd-hover-buttons-on-hover .product-element-top:hover .wd-add-btn.wd-add-btn-replace:not(.wd-add-btn-fw) {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
}

.wd-product-loop-section.theme-loop-design-fw_button .wd-add-btn.wd-add-btn-replace,
.wd-product-loop-section.theme-loop-design-fw_button .wd-add-btn-fw,
.wd-product-loop-section .wd-hover-fw-button .wd-add-btn-fw {
    transform: translateY(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.wd-product-loop-section .wd-hover-icons .wrapp-buttons,
.wd-product-loop-section .wd-hover-icons .wd-buttons.wd-pos-r-t,
.wd-product-loop-section .wd-hover-icons .wrapp-buttons .wd-buttons {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) !important;
}

.wd-product-loop-section .product-image-link .wd-main-img,
.wd-product-loop-section .product-image-link .wd-hover-img {
    object-fit: var(--wd-img-object-fit, cover) !important;
}

.wd-product-loop-section.newest-products-list {
    --wd-loop-gap: 20px;
    margin-left: calc(var(--wd-loop-gap, 20px) / -2) !important;
    margin-right: calc(var(--wd-loop-gap, 20px) / -2) !important;
}

.wd-product-loop-section.newest-products-list > .col,
.wd-product-loop-section.newest-products-list > .product-card,
.wd-product-loop-section.newest-products-list > [class*="col-"] {
    padding-left: calc(var(--wd-loop-gap, 20px) / 2) !important;
    padding-right: calc(var(--wd-loop-gap, 20px) / 2) !important;
    padding-top: 0 !important;
    padding-bottom: var(--wd-loop-gap, 20px) !important;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.wd-product-loop-section.newest-products-list .wd-product-loop-context {
    width: 100%;
    flex: 1 1 auto;
    height: 100%;
}

/* Related / secondary product grids */
.wd-product-loop-section.wd-related-grid {
    --wd-loop-gap: 20px;
    margin-left: calc(var(--wd-loop-gap, 20px) / -2) !important;
    margin-right: calc(var(--wd-loop-gap, 20px) / -2) !important;
}

.wd-product-loop-section.wd-related-grid > .col,
.wd-product-loop-section.wd-related-grid > [class*="col-"] {
    padding-left: calc(var(--wd-loop-gap, 20px) / 2) !important;
    padding-right: calc(var(--wd-loop-gap, 20px) / 2) !important;
    padding-bottom: var(--wd-loop-gap, 20px) !important;
    display: flex;
    flex-direction: column;
}

.wd-product-loop-section.wd-related-grid .wd-product-loop-context {
    width: 100%;
    flex: 1 1 auto;
    height: 100%;
}

/* Icon button wrappers — never shrink to icon-only box */
.wd-product-loop-context .product-action-button,
.wd-product-loop-section .product-action-button,
.theme-shop-listing .product-action-button {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    line-height: 0;
}

/* WooCommerce .button class reset on slide-up add bar */
.wd-product-loop-context .add-to-cart-loop.button,
.theme-shop-listing .add-to-cart-loop.button,
.wd-product-loop-section .add-to-cart-loop.button {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: var(--wd-atc-height, 44px);
    padding: 0 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
    white-space: nowrap;
}

.wd-product-loop-context .add-to-cart-loop .wd-action-icon .wd-premium-icon,
.theme-shop-listing .add-to-cart-loop .wd-action-icon .wd-premium-icon,
.wd-product-loop-section .add-to-cart-loop .wd-action-icon .wd-premium-icon {
    width: 22px;
    height: 22px;
    color: currentColor;
}

.wd-product-loop-context .add-to-cart-loop .wd-action-icon .wd-premium-icon svg,
.theme-shop-listing .add-to-cart-loop .wd-action-icon .wd-premium-icon svg,
.wd-product-loop-section .add-to-cart-loop .wd-action-icon .wd-premium-icon svg {
    width: 22px;
    height: 22px;
}

.wd-product-loop-context .star-rating-wrap,
.theme-shop-listing .star-rating-wrap,
.wd-product-loop-section .star-rating-wrap {
    margin: 2px 0 4px;
    font-size: 12px;
    line-height: 1;
}

@media (max-width: 575.98px) {
    .theme-shop-listing.theme-pa-view-list #products-row .product-wrapper {
        flex-direction: column !important;
    }

    .theme-shop-listing.theme-pa-view-list #products-row .product-element-top {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .theme-pa-view-list .product-grid-item .product-wrapper { flex-direction: column; }
    .theme-pa-view-list .product-element-top { flex: none; max-width: 100%; }
}

/* =================================================================
   Universal: any carousel/grid with WoodMart cards (full-site parity)
   ================================================================= */
.cibato-main-wrapper .cibato-carousel .carousel-box:has(.wd-product-loop-context),
.cibato-main-wrapper .cibato-carousel .carousel-box:has(.product-grid-item.wd-product) {
    transform: none !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    width: 100%;
    min-width: 0;
    height: 100%;
    overflow: visible;
}

.cibato-main-wrapper .cibato-carousel:has(.wd-product-loop-context) .slick-current .carousel-box img,
.cibato-main-wrapper .cibato-carousel:has(.product-grid-item) .slick-current .carousel-box img {
    border: 0 !important;
    outline: 0 !important;
}

.cibato-main-wrapper .row:has(> .col .wd-product-loop-context),
.cibato-main-wrapper .row:has(> .product-card .wd-product-loop-context),
.cibato-main-wrapper .row:has(> [class*="col-"] .wd-product-loop-context) {
    --wd-loop-gap: 15px;
    align-items: stretch;
}

.cibato-main-wrapper .row:has(> .col .wd-product-loop-context) > [class*="col-"],
.cibato-main-wrapper .row:has(> [class*="col-"] .wd-product-loop-context) > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.cibato-main-wrapper #products-row:has(.wd-product-loop-context) {
    --wd-pa-gap: var(--wd-loop-gap, 15px);
    --wd-pa-row-gap: calc(var(--wd-pa-gap) + 14px);
}

/* Product card titles: black default, primary on hover (all loops) */
.wd-product-loop-context .wd-entities-title,
.theme-shop-listing .wd-entities-title,
.wd-product-loop-section .wd-entities-title {
    color: var(--wd-loop-title, #111827) !important;
}

.wd-product-loop-context .product-element-bottom .wd-entities-title a,
.theme-shop-listing .product-element-bottom .wd-entities-title a,
.wd-product-loop-section .product-element-bottom .wd-entities-title a,
.cibato-commerce .wd-entities-title a {
    color: var(--wd-loop-title, #111827) !important;
}

.wd-product-loop-context .product-element-bottom .wd-entities-title a:hover,
.wd-product-loop-context .product-element-bottom .wd-entities-title a:focus,
.wd-product-loop-context .product-element-bottom .wd-entities-title a:focus-visible,
.theme-shop-listing .product-element-bottom .wd-entities-title a:hover,
.theme-shop-listing .product-element-bottom .wd-entities-title a:focus,
.theme-shop-listing .product-element-bottom .wd-entities-title a:focus-visible,
.wd-product-loop-section .product-element-bottom .wd-entities-title a:hover,
.wd-product-loop-section .product-element-bottom .wd-entities-title a:focus,
.wd-product-loop-section .product-element-bottom .wd-entities-title a:focus-visible,
.cibato-commerce .wd-entities-title a:hover,
.cibato-commerce .wd-entities-title a:focus,
.cibato-commerce .wd-entities-title a:focus-visible {
    color: var(--primary, #00b4f0) !important;
}

/* =================================================================
   Global product image frame — shop, homepage carousels, related, grids
   ================================================================= */
.cibato-main-wrapper .wd-product-loop-context .product-element-top,
.cibato-main-wrapper .theme-shop-listing .product-element-top,
.cibato-main-wrapper .wd-product-loop-section .product-element-top {
    background: #fff;
}

.cibato-main-wrapper .wd-product-loop-context .product-image-link,
.cibato-main-wrapper .theme-shop-listing .product-image-link,
.cibato-main-wrapper .wd-product-loop-section .product-image-link {
    box-shadow: inset 0 0 0 1px var(--wd-loop-border, #e8e8e8);
}

.cibato-main-wrapper .wd-product-loop-context .product-element-bottom,
.cibato-main-wrapper .theme-shop-listing .product-element-bottom,
.cibato-main-wrapper .wd-product-loop-section .product-element-bottom {
    border-top: 1px solid var(--wd-loop-border, #e8e8e8);
}

.theme-shop-listing.theme-pa-view-list #products-row .product-element-bottom,
.theme-pa-view-list .product-element-bottom {
    border-top: 0;
}
