/* Card único das vitrines públicas: busca, home, loja e produtos relacionados. */
.ps-product.md-product-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-width: 0;
    margin: 0 !important;
    padding: 5px 5px 0 !important;
    overflow: hidden;
    border: 1px solid #eef0f3 !important;
    border-radius: 14px !important;
    background: #fff;
    box-shadow: none;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.ps-product.md-product-card:hover {
    border-color: #e3e6ea !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .10) !important;
    transform: translateY(-3px);
}

.ps-product.md-product-card .ps-product__thumbnail,
.ps-product.md-product-card .ajuste_thumb {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 170px !important;
    min-height: 170px;
    margin: 0 !important;
    padding: 10px !important;
    overflow: hidden;
    border-radius: 11px 11px 0 0;
    background: #fff !important;
}

.ps-product.md-product-card .ps-product__thumbnail > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.ps-product.md-product-card .ps-product__thumbnail img,
.ps-product.md-product-card .ajuste_img {
    display: block;
    width: 100% !important;
    height: 150px !important;
    max-width: 100%;
    max-height: 100%;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center;
    background: transparent;
}

.ps-product.md-product-card:hover .ps-product__thumbnail img,
.ps-product.md-product-card:hover .ajuste_img {
    transform: none;
}

.ps-product.md-product-card .ps-product__container {
    box-sizing: border-box;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 0 10px 12px !important;
}

.ps-product.md-product-card .ps-product__content:not(.hover) {
    position: relative !important;
    left: 0 !important;
    display: flex !important;
    visibility: visible !important;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100% !important;
    min-width: 0;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 1 !important;
}

.ps-product.md-product-card .ps-product__content.hover,
.ps-product.md-product-card .ps-product__rating,
.ps-product.md-product-card .ps-product__progress-bar {
    display: none !important;
}

.ps-product.md-product-card .ps-product__title {
    position: static !important;
    display: block !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: #2b2f36 !important;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.3 !important;
    text-decoration: none;
    text-transform: none !important;
    overflow-wrap: anywhere;
    white-space: normal !important;
    -webkit-line-clamp: unset !important;
}

.ps-product.md-product-card .ps-product__title-name {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    font-size: inherit !important;
    text-transform: none !important;
    white-space: normal !important;
    -webkit-line-clamp: unset !important;
}

.ps-product.md-product-card .ps-product__title--has-compatibility {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-line-clamp: unset;
}

.ps-product.md-product-card .ps-product__title--has-compatibility .ps-product__title-name {
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
}

.ps-product.md-product-card .ps-product__title:hover {
    color: var(--md-store-primary-dark, #c45f00) !important;
}

.ps-product.md-product-card .ps-product__price-box {
    width: 100%;
    margin: auto 0 0 !important;
    padding-top: 8px;
}

.ps-product.md-product-card .ps-product__price-old {
    display: block;
    margin-bottom: 1px;
    color: #ff7a00;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: line-through;
}

.ps-product.md-product-card .ps-product__price {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 !important;
    color: #1a1a1a !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: -.25px;
}

.ps-product.md-product-card .ps-product__price-off {
    padding: 0;
    background: transparent;
    color: #00a650;
    font-size: 12.5px;
    font-weight: 700;
}

.ps-product.md-product-card .ps-product__installment {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px;
    margin: 5px 0 0;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.3;
}

.ps-product.md-product-card .ps-product__installment strong {
    color: #08783e;
    font-size: 14px;
    font-weight: 800;
}

.ps-product.md-product-card .ps-product__installment-note {
    margin-top: 2px;
    color: #8a8f98;
    font-size: 10px;
    line-height: 1.25;
}

.ps-product.md-product-card .ps-product__vendor {
    margin: 7px 0 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    color: #8a8f98;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

@media (max-width: 767px) {
    /* A altura da vitrine acompanha o maior card, inclusive fora da tela. */
    .owl-stage:has(> .owl-item > .md-product-card) {
        display: flex;
        align-items: stretch;
    }

    .owl-item:has(> .md-product-card) {
        display: flex;
        flex-shrink: 0;
        height: auto;
    }

    .owl-item > .ps-product.md-product-card {
        flex: 1 1 auto;
        width: 100%;
        height: auto !important;
    }

    .ps-product.md-product-card {
        height: 100% !important;
        min-height: 0;
        overflow: visible;
    }

    .ps-product.md-product-card .ps-product__thumbnail,
    .ps-product.md-product-card .ajuste_thumb {
        height: 132px !important;
        min-height: 132px;
        padding: 7px !important;
    }

    .ps-product.md-product-card .ps-product__thumbnail img,
    .ps-product.md-product-card .ajuste_img {
        height: 118px !important;
    }

    .ps-product.md-product-card .ps-product__container {
        display: flex !important;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        height: auto !important;
        overflow: visible !important;
        padding: 0 8px 10px !important;
    }

    .ps-product.md-product-card .ps-product__content:not(.hover) {
        position: static !important;
        display: flex !important;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    .ps-product.md-product-card .ps-product__title {
        display: block !important;
        min-height: calc(1.25em * 3) !important;
        max-height: none !important;
        height: auto !important;
        margin-bottom: 0 !important;
        overflow: visible !important;
        font-size: 14px !important;
        line-height: 1.25 !important;
        overflow-wrap: anywhere;
        white-space: normal !important;
        -webkit-line-clamp: unset !important;
    }

    .ps-product.md-product-card .ps-product__title-name,
    .ps-product.md-product-card .ps-product__title--has-compatibility .ps-product__title-name {
        display: -webkit-box !important;
        -webkit-box-orient: vertical;
        height: auto !important;
        max-height: calc(1.25em * 3) !important;
        overflow: hidden !important;
        overflow-wrap: anywhere;
        white-space: normal !important;
        -webkit-line-clamp: 3 !important;
    }

    .ps-product.md-product-card .ps-product__price-box {
        position: static !important;
        display: block !important;
        clear: both;
        margin: 6px 0 0 !important;
        padding-top: 0;
    }

    .ps-product.md-product-card .ps-product__price {
        font-size: 18px !important;
    }

    .ps-product.md-product-card .ps-product__installment {
        gap: 2px;
        font-size: 11.5px;
    }

    .ps-product.md-product-card .ps-product__installment strong {
        font-size: 12.5px;
    }

    .ps-product.md-product-card .ps-product__installment-note {
        display: block;
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ps-product.md-product-card {
        transition: none;
    }
}


/* ---------------- Galeria do card: setas que aparecem no hover ----------------
   O card carrega UMA imagem; a seta troca a src pelas URLs que vieram no HTML.
   As setas sao <button>, e o clickable-product-cards.js ja ignora clique em button,
   entao trocar de foto nao abre a peca. */
.ps-product__thumbnail[data-card-gallery] {
    position: relative;
}

.md-card-gallery__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: -14px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    color: #333333;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, background-color .15s ease;
}

.md-card-gallery__arrow--prev {
    left: 6px;
}

.md-card-gallery__arrow--next {
    right: 6px;
}

.md-card-gallery__arrow:hover {
    background: #ffffff;
}

.md-card-gallery__contador {
    position: absolute;
    right: 8px;
    bottom: 6px;
    z-index: 2;
    padding: 1px 7px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .55);
    color: #ffffff;
    font-size: 11px;
    line-height: 16px;
    opacity: 0;
    transition: opacity .15s ease;
}

@media (hover: hover) and (pointer: fine) {
    [data-product-card-link]:hover .md-card-gallery__arrow {
        visibility: visible;
        pointer-events: auto;
        opacity: 1;
    }

    [data-product-card-link]:hover .md-card-gallery__contador {
        opacity: 1;
    }
}
