/* Estilo para o título centralizado e clicável */
.carousel-header-container {
    text-align: center;
    margin: 20px auto;
}

.carousel-section-title {
    text-align: center;
    width: 100%;
}

.carousel-section-title a {
    color: #464646;
    text-decoration: none;
    transition: color 0.3s ease;
}

.carousel-section-title a:hover {
    color: #048CB5;
    text-decoration: none;
}

/* Garantir que os botões de navegação sejam sempre visíveis */
.carousel-nav {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    transition: background 0.3s ease;
}

.carousel-nav:hover {
    background: #048CB5;
}

        /* New carousel header layout */
       
         .top-color-options {
    position: absolute;
    top: 12px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
}



       .product-carousel .myp-quick-view-button {
align-content: center;
}

.product-card {
    padding: 0!important;
}
.astra-shop-summary-wrap {
    align-items: center;
}
    .product-carousel .woocommerce-loop-product__title.formatted-title.fixed-height-title {
    text-align: center;
    padding: 0 5px;
}
    .stone-image {
    margin-top: 0!important;
}
    .expand-trigger {
    text-align: center;
}

    /* Center the zoom icon and "Ver detalhes" text - scope to carousels only */
    .product-carousel .product-details-inline .zoom-icon {
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 10px auto !important;
        width: 100% !important;
    }
    .product-carousel .product-details-inline {
        margin-top: 83px;
    }
    /* Ensure the icon and text are properly aligned (carousels only) */
    /* Using unicode icon now, so no img-size rules needed */

    .carousel-header-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            padding: 0 54px;
            max-width: 1300px;
            margin-left: auto;
            margin-right: auto;
        }
        
        /* Title styling */
        .carousel-section-title {
            font-size: 1.8em;
            font-weight: 600;
            color: #464646;
            font-family: "Manrope", Sans-serif;
            margin: 0;
            padding: 0;
            flex: 1;
        }
        
        /* Tab navigation styles with improved layout */
        .carousel-tabs {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            flex-wrap: wrap;
            margin: 0;
        }
        
        .carousel-tab {
            padding: 8px 16px;
            border-radius: 6px;
            cursor: pointer;
            color: #464646;
            font-family: "Manrope", Sans-serif;
            font-weight: 500;
            transition: all 0.3s ease;
            background-image: linear-gradient(to right, #dddddd, #f3f3f3, #dddddd);
            font-size: 0.9em;
            border: none;
        }
        


        .carousel-tab.active {
                background-image: linear-gradient(to right, #6eb6cb, #89c6da, #6eb6cb);color: white;
box-shadow: 0 1px 4px rgb(0 0 0 / 19%);
}
        
        .carousel-tab:hover:not(.active) {
                background-image: linear-gradient(to right, #c3e6f1, #e6f9ff, #c3e6f1);
            transform: translateY(-2px);
        }
        
        /* Outer container for positioning navigation buttons outside */
        .carousel-outer-container {
            position: relative;
            margin: 0 auto;
            width: 100%;
            overflow: visible !important;
            padding: 0 50px;
            max-width: 1300px;
            box-sizing: border-box;
        }
        
        /* Inner container for the carousel */
        .carousel-container {
            position: relative;
            width: 100%;
            margin: 0 auto;
            overflow: visible !important;
            display: flex;
            justify-content: center;
        }
        
        /* Streamlined product carousel styles */
        .product-carousel {
            position: relative;
            display: flex;
            gap: 15px;
            list-style: none;
            padding: 0;
            margin: 0 auto;
            width: 100%;
            z-index: 1;
            overflow: visible !important; /* Keep visible for desktop */
            justify-content: center;
        }
        
        .product-card {
            flex: 1 1 calc((100% / 6) - 15px);
            background: #fff;
            border-radius: 6px;
            box-shadow: 0 2px 5px rgb(0 0 0 / 32%);
            padding: 12px;
            position: relative;
            overflow: visible !important;
            z-index: 1;
            transform: translateZ(0);
            display: flex;
            flex-direction: column;
        }
        
        /* Important hover behavior */
        .product-card:hover {
            z-index: 9999;
        }
        .product-card:hover .product-details-inline {
            display: block;
        }
        .product-card:hover .ast-on-card-button {
            opacity: 1;
            visibility: visible;
        }


        
        /* Navigation buttons */
        .carousel-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: #048CB5;
            color: white;
            border: none;
            padding: 10px;
            cursor: pointer;
            z-index: 10;
            font-size: 18px;
            transition: all 0.3s ease;
            opacity: 0;
        }
        
        .carousel-outer-container:hover .carousel-nav {
            opacity: 1;
        }
        

        
        /* Posicionamento correto das setas de navegação */
        #labrets-prev.carousel-nav,
        #argolas-prev.carousel-nav {
            position: absolute;
            left: 0px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 10;
        }

        #labrets-next.carousel-nav,
        #argolas-next.carousel-nav {
            position: absolute;
            right: 0px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 10;
        }
        
        /* Product element styles */
        .product-material {
            position: absolute;
            top: 2px;
            left: 10px;
            z-index: 5;
            font-size: 0.9em;
            display: inline-block;
        }
        
        .woocommerce-loop-product__title {
            font-weight: 500;
            font-size: 1em !important;
            line-height: 1.4;
            margin-bottom: 8px !important;
        }
        
        .price {
            color: #048CB5 !important;
            font-family: "Manrope", Sans-serif;
            font-weight: 700;
            font-size: 1.2em;
        }
        
            /* Ensure price container inside carousels has spacing below */
            .product-carousel .price-container {
                margin-bottom: 10px;
            }
        
        /* Attribute styles - simplified */
        .attribute-row {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 5px 0;
            width: 100%;
            justify-content: center;
        }
        
        .inline-options {
            display: flex;
            gap: 4px;
            flex: 1;
            justify-content: center;
        }
        
        .color-image, .stone-image {
            width: 20px;
            height: 20px;
            border-radius: 50%;
        }
        
        .divider {
            height: 1px;
            background: #ddd;
            margin: 4px 0;
            width: 100%;
        }
        
        .zoom-icon {
            display: inline-block;
            margin-top: 8px;
            color: #666;
            text-decoration: none;
        }
        
        /* Title truncation */
        .truncate-title {
            display: -webkit-box;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
            max-height: 2.8em;  
            line-height: 1.4em;
        }
        
        /* Icon styles */
        .ast-card-action-tooltip { margin-right: 8px; }
        .ahfb-svg-iconset { display: inline-flex; }
        .ast-icon svg {
            width: 20px;
            height: 20px;
            fill: currentColor;
        }
        
        /* Layout fixes for containers */
        .astra-shop-summary-wrap { margin-top: 10px; }
        .astra-shop-summary-wrap {
            display: flex;
            flex-direction: column;
        }

        .astra-shop-summary-wrap:first-of-type {
            flex: 1;
            min-height: 0; /* Allow shrinking */
        }
        
        /* Responsive adjustments (Tablet) - disable carousel and show 4 fixed items starting from the first */
        @media (max-width: 1024px) {
            /* Turn off horizontal scroll behavior */
            .carousel-container {
                overflow: visible !important;
                -webkit-overflow-scrolling: auto;
                scroll-snap-type: none;
            }
            .carousel-container::-webkit-scrollbar { display: none; }

            /* Use grid for exact 4 items per row without shifting */
            .product-carousel {
                display: grid;
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 15px;
                justify-content: initial;
            }

            /* Normalize grid children so the first item is not offset */
            .product-carousel > li {
                margin: 0 !important;
                min-width: 0 !important;
                width: auto !important;
            }

            /* Grid items; flex settings are ignored in grid but keep dimensions tidy */
            .product-card {
                min-width: 0 !important;
                max-width: none !important;
                margin: 0 !important;
            }

            /* Hide nav buttons on tablet (no carousel) */
            .carousel-nav { display: none !important; }

            /* Show only the first 4 products at a time */
            .product-carousel > li:nth-child(n+5) {
                display: none !important;
            }
        }
        
        /* Title classes to match content-product.php with updated styling */
        .woocommerce-loop-product__title.formatted-title.truncate-title {
            color: #464646;
            font-family: "Manrope", Sans-serif !important;
            letter-spacing: 0.8px;
            font-size: 1em !important;
            line-height: 1.4;
            margin-bottom: 8px !important;
            height: 2.8em;
            display: -webkit-box;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* Product image styling */
        .astra-shop-thumbnail-wrap img {
            padding: 0 10px 10px 5px;
            margin-top: 40px;
        }
        
        /* Quick view button repositioning */
        .ast-on-card-button.ast-quick-view-trigger {
            position: absolute;
            top: 15px;
            right: 15px;
            opacity: 0;
            visibility: hidden;
            background-color: rgba(255, 255, 255, 0.9);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.2s ease, visibility 0.2s ease;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            cursor: pointer;
            z-index: 10;
        }

        .product-card:hover .ast-quick-view-trigger {
            opacity: 1;
            visibility: visible;
        }

        /* Hide tooltip text to make the button cleaner */
        .ast-quick-view-trigger .ast-card-action-tooltip {
            display: none;
        }

        /* New styles for color options below image */
        .thumbnail-colors {
            position: absolute;
            top: 5px;
            right: 5px;
            display: flex;
            gap: 4px;
            z-index: 5;
        }

        .thumbnail-colors .color-image {
            width: 15px;
            height: 15px;
            border-radius: 50%;
            padding: 0;
            margin-top: 0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        /* Add styles for category header */
        .category-carousel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1200px;
            margin: 0 auto;
        }

        .category-title {
            font-size: 1.5em;
            font-weight: 600;
            color: #464646;
            font-family: "Manrope", Sans-serif;
        }

        .view-all {
            color: #048CB5;
            text-decoration: none;
            font-weight: 500;
            font-family: "Manrope", Sans-serif;
        }

        .view-all:hover {
            text-decoration: underline;
        }
        
        /* Tab navigation styles */
        .carousel-tabs {
            display: flex;
            justify-content: center;
            margin: 20px auto 15px;
            max-width: 1200px;
            gap: 10px;
            flex-wrap: wrap;
        }
        

        
        .carousel-tab.active {
            color: white;
        }
        

        
        .carousel-section-title {
            font-size: 1.8em;
            font-weight: 600;
            color: #464646;
            font-family: "Manrope", Sans-serif;
            text-align: left;
            margin: 10px auto 10px;
            max-width: 1200px;
        }
        
        /* Responsive product card sizing for different devices */
        .product-card {
            flex: 0 0 calc((100% / 6) - 15px); /* Desktop: 6 products per row */
            min-width: calc((100% / 6) - 15px);
            max-width: calc((100% / 6) - 15px);
        }
        
        /* Responsive adjustments */
        @media (max-width: 1024px) {
            .product-card {
                flex: 0 0 calc((100% / 4) - 15px); /* Tablet: 4 products per row */
                min-width: calc((100% / 4) - 15px);
                max-width: calc((100% / 4) - 15px);
            }
            .carousel-outer-container {
                padding: 0 50px;
            }
                .carousel-nav:last-of-type, button[id$="-next"].carousel-nav {
  right: 8px!important;
}
            .carousel-nav:first-of-type, button[id$="-prev"].carousel-nav {
                left: 8px!important;
            }
        }

        /* Title classes to match content-product.php with updated styling */
        .woocommerce-loop-product__title.formatted-title,
        .woocommerce-loop-product__title.truncate-title,
        .product-carousel .woocommerce-loop-product__title {
            color: #464646;
            font-family: "Manrope", Sans-serif !important;
            letter-spacing: 0.8px;
            font-size: 1em !important;
            line-height: 1.4;
            margin-bottom: 8px !important;
            height: 2.8em;
            display: -webkit-box;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* Product image styling - mais específico para imagens principais */
        .astra-shop-thumbnail-wrap .attachment-woocommerce_thumbnail,
        .astra-shop-thumbnail-wrap .wp-post-image {
            padding: 0 10px 10px 5px;
            margin-top: 20px;
        }

/* Force margin-top for carousel thumbnail container to ensure consistent spacing */
.product-carousel .astra-shop-thumbnail-wrap {
    padding-top: 15px !important;
}
        
        /* Garantir que imagens de cor não tenham margin-top */
        .top-color-options img.color-image,
        .thumbnail-colors img.color-image,
        .color-options img.color-image,
        .product-carousel .top-color-options img,
        .product-carousel .thumbnail-colors img {
            margin-top: 0 !important;
            padding: 0 !important;
        }

        /* Forçar opacidade 0 por padrão para botões no carrossel */
        .product-carousel .ast-on-card-button {
            opacity: 0 !important; 
            visibility: hidden !important;
            transition: opacity 0.2s ease, visibility 0.2s ease;
        }
        
        /* Mostrar apenas no hover */
        .product-carousel .product-card:hover .ast-on-card-button {
            opacity: 1 !important;
            visibility: visible !important;
        }

        /* Hide Astra quick view button in carousels */
        .product-carousel .ast-quick-view-trigger {
            display: none !important;
        }
        
               
        .product-carousel .product-card:hover .myp-quick-view-button {
            opacity: 1 !important;
            visibility: visible !important;
        }
        
        /* Make sure Astra styling doesn\'t affect our button */
        .product-carousel .myp-svg-iconset {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .product-carousel .myp-svg-iconset svg {
            width: 24px;
            height: 24px;
            fill: #333;
        }

       
        
        .product-carousel .product-card:hover .myp-quick-view-button {
            opacity: 1 !important;
            visibility: visible !important;
        }
        
        /* Make sure button is above other elements */
        .product-carousel .astra-shop-thumbnail-wrap {
            position: relative !important;
            overflow: visible !important;
        }
        
        /* SVG icon styling - ensure visibility */
        .product-carousel .myp-svg-iconset svg {
            width: 24px !important;
            height: 24px !important;
            fill: #333 !important;
            display: block !important;
        }
        
        /* Make sure the button is above other content */
        .product-carousel li.product {
            overflow: visible !important;
        }
        
        /* Guarantee z-index for important elements */
        .myp-quick-view-button {
            z-index: 99999 !important;
        }
        
        /* Posicionamento correto das setas de navegação */
        .carousel-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            z-index: 10;
        }
        
        .carousel-nav:first-of-type,
        button[id$="-prev"].carousel-nav {
            left: 0px;
        }

        .carousel-nav:last-of-type,
        button[id$="-next"].carousel-nav {
            right: 0px;
        }
        
        /* Add material ribbon styles for carousels */
        .product-carousel .product-material-ribbon {
            position: absolute;
            top: 10px;
            left: -10px;
            padding: 2px 16px;
            border-top-left-radius: 6px;
            border-bottom-right-radius: 6px;
            box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
            z-index: 5;
            overflow: visible;
            display: inline-block;
        }
        
        .product-carousel .product-material-ribbon::before {
            content: "";
            position: absolute;
            left: 0;
            top: 100%;
            width: 0;
            height: 0;
            border-top: 10px solid #1a1a1a;
            border-left: 10px solid transparent;
            z-index: 4;
            display: block;
            overflow: visible;
        }
        
 
        
        .product-carousel .ribbon-gold::before {
            border-top-color: #b1904f;
        }
        
        /* Use ribbon visual styles from MyP Produto Card plugin to keep consistency */
        

                    .carousel-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(240, 240, 240, 0.9);
            color: #048CB5;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 10;
            font-size: 18px;
            transition: all 0.3s ease;
            opacity: 0;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            padding: 0;
        }
            @media (max-width: 1024px) {
             .product-card {
                    margin: 10px 0!important;
                 }
}

 /* Additional styles for quick view buttons in carousels */
        .product-carousel .myp-quick-view-button {
            display: none !important;
            z-index: 999 !important;
            position: absolute !important;
            top: 32px !important; /* Make sure this matches the value above */
            right: 10px !important;
            width: 40px !important;
            height: 40px !important;
            background-color: rgba(255, 255, 255, 0.8) !important;
            border-radius: 50% !important;
            opacity: 0 !important;
            transition: opacity 0.3s ease !important;
        }
        
        .product-carousel li.product:hover .myp-quick-view-button {
            opacity: 1 !important;
        }
        
        /* Make sure the button is visible over other elements */
        .product-carousel .astra-shop-thumbnail-wrap {
            overflow: visible !important;
            position: relative !important;
        }
        
        .product-carousel .error-message,
        .product-carousel .error {
            width: 100%;
            padding: 20px;
            background-color: #fff3f3;
            border: 1px solid #ffcaca;
            color: #d8000c;
            border-radius: 6px;
            text-align: center;
            font-family: "Manrope", Sans-serif;
            margin: 20px 0;
        }

        /* Estilos para o título clicável e link "Ver Todos" */
        .carousel-header-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .carousel-section-title {
            margin: 0;
            padding: 0;
            flex: 1;
        }
        
        .category-title-link {
            color: #3a819b!important; /* match .view-all color */
            text-decoration: none;
            font-weight: 500;
            font-family: "Manrope", Sans-serif;
            transition: color 0.3s ease;
        }

        .category-title-link:hover {
            color: #048CB5; /* keep same color on hover, underline handled below */
            text-decoration: underline;
        }
        
        .carousel-view-all {
            color: #1d5c73;
            text-decoration: none;
            font-family: "Manrope", Sans-serif;
            font-weight: 500;
            font-size: 0.9em;
            transition: color 0.3s ease;
        }
        
        .carousel-view-all:hover {
            color: #048CB5;
            text-decoration: underline;
        }

/* =====================
   Skeleton placeholders
   ===================== */
/* Ensure skeletons occupy exactly the same space as real cards */
.product-carousel .product-card.skeleton {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgb(0 0 0 / 32%);
    position: relative;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.product-carousel .product-card.skeleton .astra-shop-thumbnail-wrap {
    padding: 0 10px 10px 5px;
    margin-top: 20px; /* matches product image spacing */
}

.product-carousel .product-card.skeleton .skeleton-thumb {
    width: 100%;
    aspect-ratio: 1 / 1; /* square like product images */
    border-radius: 6px;
    background: linear-gradient(90deg, #ececec 25%, #f5f5f5 37%, #ececec 63%);
    background-size: 400% 100%;
    animation: mp-skeleton-shimmer 1.25s ease-in-out infinite;
}

.product-carousel .product-card.skeleton .thumbnail-colors.skeleton-chips {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 4px;
}

.product-carousel .product-card.skeleton .skeleton-chip {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #e9e9e9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-carousel .product-card.skeleton .astra-shop-summary-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-carousel .product-card.skeleton .woocommerce-loop-product__title {
    height: 2.8em; /* matches title clamp height */
    margin: 8px 0 !important;
}

.product-carousel .product-card.skeleton .skeleton-line {
    display: block;
    height: 12px;
    border-radius: 4px;
    margin: 6px 0;
    background: linear-gradient(90deg, #ececec 25%, #f5f5f5 37%, #ececec 63%);
    background-size: 400% 100%;
    animation: mp-skeleton-shimmer 1.25s ease-in-out infinite;
}

.product-carousel .product-card.skeleton .skeleton-line.long { width: 90%; }
.product-carousel .product-card.skeleton .skeleton-line.short { width: 60%; }

.product-carousel .product-card.skeleton .product-details-inline {
    margin-top: 83px; /* matches real products for alignment */
}

.product-carousel .product-card.skeleton .skeleton-details {
    height: 40px;
    border-radius: 6px;
    background: linear-gradient(90deg, #ececec 25%, #f5f5f5 37%, #ececec 63%);
    background-size: 400% 100%;
    animation: mp-skeleton-shimmer 1.25s ease-in-out infinite;
}

.product-carousel .product-card.skeleton .price-container {
    margin-top: 10px;
}

.product-carousel .product-card.skeleton .skeleton-price {
    display: block;
    width: 40%;
    height: 18px;
    border-radius: 6px;
    background: linear-gradient(90deg, #ececec 25%, #f5f5f5 37%, #ececec 63%);
    background-size: 400% 100%;
    animation: mp-skeleton-shimmer 1.25s ease-in-out infinite;
}   

@keyframes mp-skeleton-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: 0 0; }
}