/* KZ Public Product Card Title + Rating Polish v1.0.0
   Presentation only. Scoped to public product cards on desktop + mobile.
   No product, review, rating, price, order, stock, or finance logic lives here. */

body.az-product-first-market .product-card h3 {
    display: block !important;
    min-height: 52px !important;
    margin: 7px 0 6px !important;
    overflow: visible !important;
}

body.az-product-first-market .product-card h3 > button[data-open-product] {
    -webkit-appearance: none;
    appearance: none;
    display: -webkit-box !important;
    width: 100% !important;
    min-height: 50px !important;
    max-height: 50px !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    overflow: hidden !important;
    border: 1px solid #e4e9f0 !important;
    border-radius: 11px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .035) !important;
    color: #172033 !important;
    font: inherit !important;
    font-size: inherit !important;
    font-weight: 850 !important;
    line-height: 1.45 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.az-product-first-market .product-card h3 > button[data-open-product]:hover,
body.az-product-first-market .product-card h3 > button[data-open-product]:focus-visible {
    border-color: #fdba74 !important;
    background: linear-gradient(180deg, #fffdfa 0%, #fff7ed 100%) !important;
    box-shadow: 0 5px 14px rgba(249, 115, 22, .09) !important;
    outline: none !important;
}

/* Center the complete rating badge and give it a quieter, cleaner visual finish. */
body.az-product-first-market .product-card .product-rating.az-card-rating,
body.az-product-first-market .product-card .az-card-rating {
    align-self: center !important;
    justify-content: center !important;
    width: max-content !important;
    max-width: 100% !important;
    margin: 4px auto 8px !important;
    border-color: #ead7b0 !important;
    background: linear-gradient(180deg, #fffefb 0%, #fff9ed 100%) !important;
    box-shadow: 0 4px 13px rgba(180, 107, 20, .055) !important;
}

body.az-product-first-market .product-card .az-card-rating.is-empty {
    border-color: #e5eaf0 !important;
    background: linear-gradient(180deg, #fbfcfd 0%, #f7f9fb 100%) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .025) !important;
}

body.az-product-first-market .product-card .az-card-rating .az-public-rating-stars {
    text-align: center !important;
}

html[data-theme="dark"] body.az-product-first-market .product-card h3 > button[data-open-product] {
    border-color: #334155 !important;
    background: linear-gradient(180deg, #1c2838 0%, #172033 100%) !important;
    color: #f8fafc !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.az-product-first-market .product-card h3 > button[data-open-product]:hover,
html[data-theme="dark"] body.az-product-first-market .product-card h3 > button[data-open-product]:focus-visible {
    border-color: #9a5a22 !important;
    background: #202c3c !important;
}

@media (max-width: 760px) {
    body.az-product-first-market .product-card h3 {
        min-height: 34px !important;
        margin: 4px 0 4px !important;
    }

    body.az-product-first-market .product-card h3 > button[data-open-product] {
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 3px 5px !important;
        border-radius: 8px !important;
        font-size: inherit !important;
        font-weight: 850 !important;
        line-height: 1.28 !important;
        box-shadow: 0 2px 7px rgba(15, 23, 42, .025) !important;
    }

    body.az-product-first-market .product-card .product-rating.az-card-rating,
    body.az-product-first-market .product-card .az-card-rating {
        align-self: center !important;
        justify-content: center !important;
        width: max-content !important;
        max-width: 100% !important;
        min-height: 22px !important;
        margin: 3px auto 5px !important;
        padding: 3px 7px !important;
        gap: 4px !important;
        border-radius: 999px !important;
    }
}

@media (max-width: 390px) {
    body.az-product-first-market .product-card h3 {
        min-height: 32px !important;
    }

    body.az-product-first-market .product-card h3 > button[data-open-product] {
        min-height: 32px !important;
        max-height: 32px !important;
        padding-inline: 4px !important;
    }

    body.az-product-first-market .product-card .product-rating.az-card-rating,
    body.az-product-first-market .product-card .az-card-rating {
        width: max-content !important;
        max-width: 100% !important;
        margin-inline: auto !important;
    }
}
