/**
 * MyP Produto Card Styles
 */

.product-card {
    position: relative;
    overflow: visible; /* Permite que elementos posicionados transbordem */
    z-index: 1; /* Base z-index para o card */
}
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.product-carousel .product-card {
    align-self: flex-start;
    height: auto;
}
.product-card:hover {
    z-index: 1000; /* Aumenta o z-index quando hover */
}

/* Hide second image on mobile and tablet by default */
.product-thumbnail-container img.product-thumbnail-second {
    display: none !important;
}

/* Second image hover effect - desktop only */
@media screen and (min-width: 1025px) {
    .product-thumbnail-container {
        position: relative;
    }

    .product-thumbnail-container img.product-thumbnail-second {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        pointer-events: none;
        margin-top: 0 !important;
        display: block !important;

    }

    .product-card:hover .product-thumbnail-container img.product-thumbnail-second {
        opacity: 1;
    }
}

/* Estilo do material exibido no canto superior esquerdo */
.product-material {
    position: absolute;
    top: 2px;
    left: 5px;
    z-index: 1100;
    font-size: 0.9em;
}

/* Estilo mais específico para as imagens de cores para evitar conflitos */
.woocommerce ul.products li.product .top-color-options img.color-image,
.woocommerce-page ul.products li.product .top-color-options img.color-image {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    object-fit: cover !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.top-color-options .more-colors {
    font-size: 14px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    width: 25px !important;
    height: 25px !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.astra-shop-thumbnail-wrap {
    position: relative;
}
.product-details-inline {
    margin-top: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-top: none;
    border-radius: 0 0 6px 6px;
    display: block;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 2;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: max-height 0.28s ease, opacity 0.18s ease, transform 0.18s ease, padding 0.18s ease;
}

.product-card .price-container,
.product-card .product-price {
    order: 2;
}

.product-card .product-details-inline {
    order: 3;
}
.product-card.no-price .product-details-inline {
    top: calc(100% - 14px);
}
.product-card:hover .product-details-inline {
    max-height: 260px;
    opacity: 1;
    transform: translateY(0);
    padding: 8px 12px;
    pointer-events: auto;
}
.product-details p.detail-text {
    margin: 5px 0;
}
.diameter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.diameter-value {
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
}
.stone-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}
.stone-image {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 2px;
}
/* Título com altura fixa */
.fixed-height-title {
    height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
    margin-bottom: 8px !important;
    min-height: 2.8em;
}
.diameter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 5px;
    justify-content: center;
}
.diameter-item {
    background: #f0f0f0;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.6em;
    text-align: center;
}
.attribute-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: center;
}
.inline-options {
    display: inline-flex;
    gap: 4px;
    flex-wrap: nowrap;
    flex: 1;
    justify-content: center;
}
.divider {
    height: 1px;
    background: #ddd;
    margin: 4px 0;
    width: 100%;
}

.expand-trigger {
    cursor: pointer;
    color: #666;
    padding: 5px;
    font-weight: bold;
}
.expanded-content {
    transition: all 0.3s ease;
}
.detail-text {
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
    min-width: fit-content;
}
.product-details {
    display: none;
}
.zoom-icon {
    display: inline-block;
    color: #666;
    text-decoration: none;
}

.product-card .price-container,
.product-card .product-price {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.product-card .price-container.has-placeholder,
.product-card .product-price.has-placeholder {
    display: flex;
}

@media screen and (max-width: 1024px) {
    .product-details-inline,
    .product-card:hover .product-details-inline {
        display: none !important;
        max-height: 0 !important;
        opacity: 0 !important;
        padding: 0 !important;
        pointer-events: none !important;
        transform: none !important;
    }
}

.product-card .price-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    width: 100%;
    text-align: center;
    font-size: 0.9em;
    color: #1a6a81;
    font-family: "Manrope", Sans-serif;
    font-weight: 600;
}

.product-card .astra-shop-summary-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.woocommerce-js ul.products li.product .price,
.woocommerce-page ul.products li.product .price,
.product-carousel li.product-card .price,
li.product.product-card .price {
    font-family: "Manrope", Sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
}

.woocommerce-loop-product__title {
    font-size: 1em !important;
    line-height: 1.4;
}

.stone-options-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stone-options-row {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 4px;
}

.stone-image {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 2px;
}

/* Estilos específicos para o carrossel de produtos */
.product-carousel .product-card {
    position: relative;
    overflow: visible;
    z-index: 1;
}

.product-carousel .product-card:hover {
    z-index: 1000;
}

.product-carousel .product-card:hover .product-details-inline {
    display: block;
}

.astra-shop-thumbnail-wrap img {
    margin-top: 0;
}

/* Remover os estilos da thumbnail-colors antiga para evitar conflitos */
.thumbnail-colors {
    display: none !important;
}

/* Ajuste para compatibilidade com o carrossel */
.product-carousel .woocommerce-loop-product__title.formatted-title.fixed-height-title {
    height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
    margin-bottom: 8px !important;
    min-height: 2.8em;
}

/* Ajustes para o botão add to cart e quickview no carrossel */
.product-carousel .ast-on-card-button {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.product-carousel .product-card:hover .ast-on-card-button {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Garantir compatibilidade também com botões fora do carrossel */
.ast-on-card-button.ast-quick-view-trigger {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.product-card:hover .ast-on-card-button {
    opacity: 1;
    visibility: visible;
}

/* Título com altura fixa - Estilo padrão para todos os cards */
.woocommerce-loop-product__title.formatted-title,
.fixed-height-title {
    color: #464646;
    font-family: "Manrope", Sans-serif !important;
    letter-spacing: 0.8px;
    font-size: 0.9em !important;
    line-height: 1.4;
    margin-bottom: 8px !important;
    height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
}

/* Corrigir conflito de margin-top nas imagens dos produtos */
.astra-shop-thumbnail-wrap .attachment-woocommerce_thumbnail,
.astra-shop-thumbnail-wrap .wp-post-image {
    margin-top: 20px;
}

/* Garantir que imagens de cor não tenham margin-top */
.top-color-options img.color-image,
.thumbnail-colors img.color-image {
    margin-top: 0 !important;
}

/* Estilos para fitas de material */
.product-material-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(245, 247, 248, 0.96);
    color: #51616b;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.4px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(81, 97, 107, 0.14);
    box-shadow: 0 6px 16px rgba(21, 33, 40, 0.08);
    z-index: 5;
    overflow: visible;
    display: inline-block;
    line-height: 1;
    max-width: calc(100% - 20px);
}

.product-material-ribbon::before {
    content: none;
    display: none;
}

/* Ouro 18k */
.ribbon-gold {
    background: rgba(243, 232, 199, 0.96) !important;
    color: #7a5b19;
    border-color: rgba(179, 145, 79, 0.28);
}

/* ASTM F136 (Titânio) */
.ribbon-silver {
    background: rgba(230, 238, 247, 0.96) !important;
    color: #2d577c !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px;
    border-color: rgba(45, 87, 124, 0.18);
}

/* Aço Cirúrgico */
.ribbon-surgical-steel {
    background: rgba(237, 240, 242, 0.96);
    color: #55626c;
    border-color: rgba(85, 98, 108, 0.15);
}

/* Cobalto Cromo */
.ribbon-cobalt {
    background: rgba(228, 234, 241, 0.96);
    color: #56687e;
    border-color: rgba(86, 104, 126, 0.15);
}

/* Bioplex */
.ribbon-bioplex {
    background: rgba(229, 239, 232, 0.96);
    color: #4f6c5c;
    border-color: rgba(79, 108, 92, 0.15);
}

.product-card .price-container,
.product-card .product-price {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.product-card .price,
.mobile-product-card .price {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.product-card .price.price-regular,
.mobile-product-card .price.price-regular {
    gap: 0;
}

.product-card .current-price,
.product-card .promo-price,
.mobile-product-card .current-price,
.mobile-product-card .promo-price {
    color: #0f6e8c;
    font-weight: 800;
    line-height: 1;
}

.product-card .price-current-row,
.mobile-product-card .price-current-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.product-card .price-compare-row,
.mobile-product-card .price-compare-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #7d8b94;
    font-size: 0.74rem;
    line-height: 1.1;
}

.product-card .price-compare-label,
.mobile-product-card .price-compare-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    font-weight: 700;
    color: #8f9ca3;
}

.product-card .price-discount-badge,
.mobile-product-card .price-discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: #e8f6ee;
    color: #17824a;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1;
}

.product-card .myp-original-price,
.mobile-product-card .myp-original-price {
    color: #a3aeb5 !important;
}

.product-card .myp-original-price del,
.mobile-product-card .myp-original-price del {
    color: #a3aeb5 !important;
    -webkit-text-fill-color: #a3aeb5 !important;
    opacity: 1 !important;
    text-decoration-thickness: 1px;
}

.product-card:has(.ribbon-gold) .promo-price,
.product-card:has(.ribbon-gold) .current-price {
    color: #7a5b19 !important;
}

.product-card:has(.ribbon-silver) .promo-price,
.product-card:has(.ribbon-silver) .current-price {
    color: #2d577c !important;
}

.product-card:has(.ribbon-cobalt) .promo-price,
.product-card:has(.ribbon-cobalt) .current-price {
    color: #56687e !important;
}

.product-card:has(.ribbon-bioplex) .promo-price,
.product-card:has(.ribbon-bioplex) .current-price {
    color: #4f6c5c !important;
}

/* Label "Push Pin" positioned right below the ribbon */
.product-pushpin-label {
    position: absolute;
    top: 36px; /* Slightly below the material ribbon */
    left: 10px;
    color: #000;
    font-weight: 600;
    font-size: 12px;
    padding: 0 16px; /* Align with ribbon text inset */
    z-index: 10;
    pointer-events: none;
}
@media (max-width: 767px) {
.woocommerce[class*="rel-up-columns-"] .site-main div.product .related.products ul.products li.product, .woocommerce-page .site-main ul.products li.product {
    padding-bottom: 0!important;
    }
}