/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

.faq-wrapper { margin: 0 auto; border-bottom: 1px solid rgba(0, 0, 0, 0.11);}
.faq-item { border-top: 1px solid rgba(0, 0, 0, 0.11); margin-bottom: 5px; }
.faq-question {
    cursor: pointer; 
    padding: 18px 25px 18px 5px;
    background: #fff; 
    position: relative;
    color: #767676;
    font-family: Lato;
    font-size: 16px;
    font-weight: 700;
    line-height: 16px;
}
.faq-question::before {
    content: "\f129"; 
    font-family: "woodmart-font"; 
    font-weight: 900;
    position: absolute;
    right: 15px;
    font-size: 12px;
    transition: transform 0.3s ease;
}
.faq-answer { display: none; padding: 0 5px; background: #fff; }
.faq-answer p { 
    margin-bottom:19px !important; 
    color: #767676; 
    font-family: Lato; 
    font-size: 14px; 
    font-weight: 400; 
    line-height: 22.4px; 
}
.faq-question.active::before { transform: rotate(180deg); }

.shop_attributes tr {
    display: block !important;
}

.shop_attributes tr {
    display: block !important;
}

/* Small Image Hover overlay for product listings */
.product-image-link {
    position: relative;
    display: block;
    overflow: hidden;
}

.wd-acf-hover-image {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.product-image-link:hover .wd-acf-hover-image {
    opacity: 1;
}

.wd-acf-hover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Kolekcje badges */
.kolekcja-image-wrap {
    position: relative;
}

.kolekcja-badges {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px;
    padding: 8px;
    font-weight: 600;
}

/* Product-listing badges render as the first thing inside .product-image-link
   (see functions.php), in normal flow, so they're always fully visible - no
   height cap, no clipping - however many badges a product has. .product-
   element-top is pinned to height:100% of the (already equal-height, see
   below) card, and .product-element-bottom back to its own natural content
   height, so the flex-shrink math between those two siblings gives every
   card's image area roughly the same height regardless of badge count. Then
   .product-image-link itself (badges + image, ignoring the position:absolute
   gallery/hover-swap overlays) uses justify-content:space-between to pin the
   image to the bottom of that area and the badges to the top, so image tops
   (and thus titles) line up across a row even though badges are free to grow.
   z-index keeps the badges above Woodmart's hover-swap image on hover.
   !important on .product-image-link's display: see the note further down on
   .wd-product .product-image-link - Woodmart's own product-loop CSS loads
   after this stylesheet and sets display:block at the same specificity. */
.wd-product .product-image-link {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.kolekcja-badges--product {
    position: relative;
    z-index: 3;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0 0 8px;
}

.product-element-top {
    height: 100%;
}

/* Badge count varies per product, so image height varies too. Woodmart ships
   an "equal height" mode for exactly this (.wd-products.wd-stretch-cont in
   its core CSS) but it's off by default (.wd-products has align-items:
   flex-start). Reproducing that mode's own rules here rather than gating it
   behind the class, so every product grid gets equal-height cards with
   title/price pinned to the bottom, regardless of image/badge height. */
.wd-products {
    align-items: stretch;
}

.wd-product {
    height: 100%;
}

.product-wrapper {
    height: 100%;
}

.product-element-bottom {
    flex: 1 1 auto;
    height: auto;
}

/* !important: Woodmart's own .wd-product.wd-hover-base .product-rating-price
   rule sets margin-block: -.2em at higher specificity (0,3,0 vs 0,2,0 here),
   so a plain override can't win this without matching/exceeding that chain. */
.wd-product :is(.price, .wrap-price, .product-rating-price) {
    margin-top: auto !important;
}

.kolekcja-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Collections view on pomieszczenia child category pages */
.szynaka-kolekcje-view .shop-loop-head,
.szynaka-kolekcje-view .wd-shop-tools,
.szynaka-kolekcje-view .woodmart-filters-area,
.szynaka-kolekcje-view .wd-active-filters {
    display: none !important;
}

.szynaka-kolekcje-view .szynaka-filters,
.szynaka-kolekcje-view .products.wd-products {
    display: none !important;
}

.szynaka-kolekcje-view .kolekcje-lista {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Collection badges: show above the image instead of overlapping it.
   Reserve a fixed-height row so image tops line up even when a card has no badge. */
.kolekcje-lista .kolekcja-image-wrap {
    display: grid;
    grid-template-rows: 36px 1fr;
}

.kolekcje-lista .kolekcja-badges {
    position: static;
    grid-row: 1;
    align-self: end;
    padding: 0 0 8px;
}

.kolekcje-lista .kolekcja-image-wrap img {
    grid-row: 2;
    width: 100%;
}

@media (max-width: 767px) {
    .szynaka-kolekcje-view .kolekcje-lista {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .kolekcja-badge {
        font-size: 0.85em;
    }
}

/* English catalogue mode — hide cart icon and all add-to-cart elements */
html[lang^="en"] .wd-header-cart,
html[lang^="en"] form.cart,
html[lang^="en"] .single_add_to_cart_button,
html[lang^="en"] .woocommerce-variation-add-to-cart,
html[lang^="en"] .add_to_cart_button,
html[lang^="en"] .wd-add-btn {
    display: none !important;
}

.wrapp-swatches {
    display: none !important;
}

.product-labels {
    display: none !important;
}

/* Same Collection / Related widgets: hide price until hover */
.elementor-widget-wd_same_collection_products .wrapp-product-price,
.elementor-widget-wd_same_collection_products .wrap-price,
.elementor-widget-wd_related_products .wrapp-product-price,
.elementor-widget-wd_related_products .wrap-price {
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility 0s .3s ease;
}

.elementor-widget-wd_same_collection_products .wd-product:is(:hover, .state-hover) .wrapp-product-price,
.elementor-widget-wd_same_collection_products .wd-product:is(:hover, .state-hover) .wrap-price,
.elementor-widget-wd_related_products .wd-product:is(:hover, .state-hover) .wrapp-product-price,
.elementor-widget-wd_related_products .wd-product:is(:hover, .state-hover) .wrap-price {
    opacity: 1;
    visibility: visible;
    transition: opacity .3s ease, visibility 0s ease;
}
/* Partner-discount text shown above the EAN code on the product page */
.partner-discount-text {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}
