/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* GM: Product title 2 lines fix */
.gm-product-title,
.wd-entities-title.gm-product-title,
.wd-product .wd-entities-title.gm-product-title {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    --title-line-count: 3 !important;
}
.gm-cat-label {
    display: block !important;
    font-size: 11px;
    font-weight: 400;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1.4;
    margin-bottom: 2px;
}
.gm-prod-name {
    display: block !important;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
}
.woocommerce-loop-product__title { display: none !important; }

/* GM: Price format — "680–890 грн/м²" */
.wd-product .price .gm-price-wrap,
.product .price .gm-price-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: inherit;
    color: inherit;
}
.wd-product .price .gm-price-nums,
.product .price .gm-price-nums {
    font-size: 1.15em;
    font-weight: 700;
    color: #d4870a;
    white-space: nowrap;
}
.wd-product .price .gm-price-unit,
.product .price .gm-price-unit {
    font-size: 0.72em;
    font-weight: 400;
    color: #8a9bb0;
    white-space: nowrap;
    opacity: 1;
}
/* GM: CLS fix (reserve space for product gallery + header phones) 2026-07-21 */
.woocommerce-product-gallery__image,
.woocommerce-product-gallery .wd-carousel-item,
.woocommerce-product-gallery img {
    aspect-ratio: 1 / 1;
}
.woocommerce-product-gallery {
    min-height: 1px;
}
.whb-column.whb-col-right.whb-visible-lg {
    min-height: 50px;
}

/* CLS fix: reserve space for catalog grid product thumbnails (220x165) */
.product-grid-item .product-image-link,
.product-grid-item .product-image-link picture {
    display: block;
    aspect-ratio: 220 / 165;
}
.product-grid-item .product-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* A11y contrast fix: darken orange bg for white-text badges (2.19 -> 4.72) */
.gm-tb-badge, .gm-help-accent {
    background-color: #A26617 !important;
}

/* A11y: distinguish in-text links by underline (not color alone) */
.wd-text-block p a,
.wd-text-block li a {
    text-decoration: underline;
}

/* GM: LCP fix - hidden .zoomImg (jquery.zoom) is 800x800, larger than visible thumbnail, browser mis-detects it as LCP. Static CSS opacity:0 applies at first paint (before JS), no !important so hover fadeTo(1) zoom-in still works via inline style precedence. */
.zoomImg {
  opacity: 0;
}

/* gm-sale-price-red */
.woocommerce-variation-price ins,
.woocommerce-variation-price ins .woocommerce-Price-amount,
.woocommerce-variation-price ins .woocommerce-Price-amount bdi,
.woocommerce-variation-price ins .woocommerce-Price-currencySymbol{color:#DD3333!important}

/* GM: old (regular) price in catalog cards */
.wd-product .price .gm-price-old,
.product .price .gm-price-old{color:#999;font-weight:400;text-decoration:line-through;margin-right:6px;font-size:.85em}

/* GM: highlight "Акції" in header + mobile menu */
.whb-row a.btn[href*="/accii/"],
.whb-row a.btn[href*="/akczii/"],
.wd-nav-mobile > li > a[href*="/accii/"],
.wd-nav-mobile > li > a[href*="/akczii/"]{color:#ff3b30!important;font-weight:700!important;font-size:16px!important;letter-spacing:.02em!important}
.whb-row a.btn[href*="/accii/"]:hover,
.whb-row a.btn[href*="/akczii/"]:hover,
.wd-nav-mobile > li > a[href*="/accii/"]:hover,
.wd-nav-mobile > li > a[href*="/akczii/"]:hover{color:#ff6b63!important}

/* GM: sale price in red */
.price:has(> del.gm-price-old) .gm-price-nums{color:#dd3333!important}
.price ins,
.price ins bdi,
.price ins .woocommerce-Price-amount,
.price ins .woocommerce-Price-currencySymbol{color:#dd3333!important;text-decoration:none}
.price del,
.price del bdi,
.price del .woocommerce-Price-amount,
.price del .woocommerce-Price-currencySymbol{color:#999!important}

/* GM: promo line in top bar */
.gm-tb-promo{display:block;text-decoration:none!important;color:inherit}
.gm-tb-promo:hover .gm-tb-text{text-decoration:underline}
.gm-tb-badge--sale{background:#dd3333!important}

/* sale price: only the number is red, currency and unit stay neutral */
.price ins .woocommerce-Price-currencySymbol,
.woocommerce-variation-price ins .woocommerce-Price-currencySymbol,
.price ins .woocommerce-price-suffix,
.woocommerce-variation-price .woocommerce-price-suffix,
.price .woocommerce-price-suffix{color:#5f7288!important}
