/* ========================================================================
   WOODMART CUSTOM PRODUCT CARD - FINAL CLEAN VERSION
   - Desktop: başlık + fiyat görünür, kart hover olunca buton görsel altından gelir
   - Tablet / mobil: buton normal akışta kalır
   - Başlık / fiyat ortalıdır
   - Buton içindeki ikon + yazı yan yana kalır
   - Buton hover animasyonu iptal edilmiştir
   - Görsel, badge ve ürün resmi alanına dokunulmaz
   ======================================================================== */


/* ========================================================================
   1) BASE
   ======================================================================== */

body.wb-shop-card-hover .products .wd-product:not(.product-list-item),
body.wb-shop-card-hover .wd-products .wd-product:not(.product-list-item) {
    height: 100%;
    margin-bottom: 24px;
}

body.wb-shop-card-hover .products .wd-product:not(.product-list-item) .product-wrapper,
body.wb-shop-card-hover .wd-products .wd-product:not(.product-list-item) .product-wrapper {
    height: 100%;
    box-sizing: border-box;
}

body.wb-shop-card-hover .wd-product:not(.product-list-item) a,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-element-bottom > *,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-element-bottom .hover-content,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-element-bottom .wd-buttons {
    box-sizing: border-box;
    max-width: 100%;
}

/* Başlık */
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-entities-title,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .woocommerce-loop-product__title {
    margin: 0 0 4px !important;
    text-align: center !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-entities-title a,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .woocommerce-loop-product__title a {
    display: block;
    text-align: center !important;
}

/* Fiyat */
body.wb-shop-card-hover .wd-product:not(.product-list-item) .price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center !important;
    gap: 6px !important;
    margin: 0 !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

body.wb-shop-card-hover .wd-product:not(.product-list-item) .price del,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .price ins,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .price .amount {
    margin: 0 !important;
    white-space: nowrap;
}

/* Alt bilgi alanı */
body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-element-bottom {
    text-align: center !important;
    align-items: center !important;
    gap: 4px !important;
}

/* Buton temel görünüm */
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button {
    position: static !important;
    inset: auto !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    line-height: 1 !important;
    border-radius: 0 !important;
    background-color: #000 !important;
    color: #fff !important;
    box-shadow: none !important;
    overflow: hidden !important;
    letter-spacing: 0 !important;
}

/* Buton hover sabit kalsın */
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button:hover,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button:hover,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button:hover,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button:hover {
    background-color: #000 !important;
    color: #fff !important;
}

/* İkon / pseudo ikon sabit */
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button i,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button i,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button i,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button i,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button svg,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button svg,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button svg,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button svg {
    position: static !important;
    display: inline-flex !important;
    margin: 0 !important;
    vertical-align: middle;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    flex: 0 0 auto;
}

body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button::before,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button::before,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button::before,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button::before {
    position: static !important;
    display: inline-block !important;
    margin-right: 6px !important;
    vertical-align: middle;
    line-height: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
}

/* Buton içindeki metin kaybolmasın */
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button span,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button span,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button span,
body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button span {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
}


/* ========================================================================
   2) DESKTOP
   ======================================================================== */

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {

    body.wb-shop-card-hover .wd-product.wd-hover-standard:not(.product-list-item) .product-wrapper,
    body.wb-shop-card-hover .wd-product.wd-hover-base:not(.product-list-item) .product-wrapper,
    body.wb-shop-card-hover .wd-product.wd-hover-fw-button:not(.product-list-item) .product-wrapper {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-content: start;
        position: relative;
        overflow: visible !important;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-element-top,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .content-product-imagin {
        grid-column: 1;
        grid-row: 1;
        position: relative !important;
        overflow: hidden !important;
        z-index: 1;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-element-bottom {
        grid-column: 1;
        grid-row: 2;
        position: relative;
        z-index: 2;
        margin-top: 14px !important;
    }

    body.wb-shop-card-hover .wd-product.wd-hover-base:not(.product-list-item) .product-element-bottom,
    body.wb-shop-card-hover .wd-product.wd-hover-fw-button:not(.product-list-item) .product-element-bottom {
        display: block !important;
    }

    /* Hover'da gelen buton alanı */
    body.wb-shop-card-hover .wd-product.wd-hover-standard:not(.product-list-item) .product-wrapper > .wd-add-btn,
    body.wb-shop-card-hover .wd-product.wd-hover-standard:not(.product-list-item) .product-element-bottom > .wd-add-btn,
    body.wb-shop-card-hover .wd-product.wd-hover-base:not(.product-list-item) .product-element-bottom > .fade-in-block,
    body.wb-shop-card-hover .wd-product.wd-hover-fw-button:not(.product-list-item) .product-element-bottom > .fade-in-block {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        bottom: calc(100% + 6px) !important;
        width: 100%;
        margin: 0 !important;
        z-index: 9;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(100%);
        transition:
            transform .32s ease,
            opacity .24s ease,
            visibility 0s linear .32s;
    }

    body.wb-shop-card-hover .wd-product.wd-hover-standard:not(.product-list-item):hover .product-wrapper > .wd-add-btn,
    body.wb-shop-card-hover .wd-product.wd-hover-standard:not(.product-list-item):hover .product-element-bottom > .wd-add-btn,
    body.wb-shop-card-hover .wd-product.wd-hover-standard:not(.product-list-item):focus-within .product-wrapper > .wd-add-btn,
    body.wb-shop-card-hover .wd-product.wd-hover-standard:not(.product-list-item):focus-within .product-element-bottom > .wd-add-btn,
    body.wb-shop-card-hover .wd-product.wd-hover-base:not(.product-list-item):hover .product-element-bottom > .fade-in-block,
    body.wb-shop-card-hover .wd-product.wd-hover-base:not(.product-list-item):focus-within .product-element-bottom > .fade-in-block,
    body.wb-shop-card-hover .wd-product.wd-hover-fw-button:not(.product-list-item):hover .product-element-bottom > .fade-in-block,
    body.wb-shop-card-hover .wd-product.wd-hover-fw-button:not(.product-list-item):focus-within .product-element-bottom > .fade-in-block {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition:
            transform .32s ease,
            opacity .24s ease,
            visibility 0s linear 0s;
    }

    body.wb-shop-card-hover .wd-product.wd-hover-base:not(.product-list-item) .product-element-bottom > .fade-in-block,
    body.wb-shop-card-hover .wd-product.wd-hover-fw-button:not(.product-list-item) .product-element-bottom > .fade-in-block {
        padding: 0 !important;
        max-height: none !important;
        clip: auto !important;
    }

    /* Desktop buton boyutu */
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button {
        height: 38px !important;
        min-height: 38px !important;
        font-size: 12px !important;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button i,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button i,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button i,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button i,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button svg,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button svg,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button svg,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button svg,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button::before,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button::before,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button::before,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button::before {
        font-size: 14px !important;
        width: 14px !important;
        height: 14px !important;
    }
}


/* ========================================================================
   3) TABLET + MOBİL
   ======================================================================== */

@media (max-width: 1024px) {

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-wrapper {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        position: relative;
        overflow: visible !important;
        height: 100%;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-element-top,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .content-product-imagin {
        position: relative !important;
        overflow: hidden !important;
        width: 100%;
        flex: 0 0 auto;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-element-bottom {
        display: flex !important;
        flex-direction: column;
        align-items: stretch !important;
        justify-content: flex-start;
        width: 100%;
        flex: 1 1 auto;
        margin-top: 8px !important;
        gap: 4px !important;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block {
        position: static !important;
        inset: auto !important;
        width: 100%;
        margin: 6px 0 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        order: 3;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-element-bottom > *:not(.wd-add-btn):not(.fade-in-block) {
        order: 2;
    }

    /* Başlık alanı sabit */
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-entities-title,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .woocommerce-loop-product__title,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-entities-title a,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .woocommerce-loop-product__title a {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        min-height: calc(1.3em * 2) !important;
        max-height: calc(1.3em * 2) !important;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .price {
        min-height: 24px !important;
        margin: 0 !important;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button {
        white-space: nowrap !important;
    }
}


/* ========================================================================
   4) TABLET
   ======================================================================== */

@media (min-width: 768px) and (max-width: 1024px) {

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-entities-title,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .woocommerce-loop-product__title {
        font-size: 16px;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button {
        height: 42px !important;
        min-height: 42px !important;
        font-size: 13px !important;
    }
}


/* ========================================================================
   5) MOBİL
   ======================================================================== */

@media (max-width: 767px) {

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .product-element-bottom {
        margin-top: 6px !important;
        gap: 3px !important;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-entities-title,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .woocommerce-loop-product__title {
        margin-bottom: 3px !important;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button {
        height: 32px !important;
        min-height: 32px !important;
        font-size: 13px !important;
    }

    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button i,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button i,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button i,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button i,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button svg,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button svg,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button svg,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button svg,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.button::before,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .wd-add-btn > a.add_to_cart_button::before,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .button::before,
    body.wb-shop-card-hover .wd-product:not(.product-list-item) .fade-in-block .add_to_cart_button::before {
        font-size: 13px !important;
        width: 13px !important;
        height: 13px !important;
    }
}