/* Container principal do carrossel */
.woocommerce-custom-carousel-container {
    position: relative;
    overflow: hidden; /* Keeps arrows/dots contained if they overflow due to custom positioning */
    padding: 20px 0; /* Vertical padding for aesthetics */
    margin: 0 auto;
    max-width: 100%;
}

/* Wrapper dos itens do carrossel - será animado */
.woocommerce-custom-carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    padding-bottom: 30px; /* Default space for dots, can be overridden by Elementor controls */
    /* Negative margins for spacing are applied by Elementor's item_spacing control */
}

/* Item individual do carrossel */
.woocommerce-custom-carousel-item {
    flex-shrink: 0; /* Impede que os itens encolham */
    /* width: is set by JavaScript */
    box-sizing: border-box;
    padding: 10px; /* Internal padding of the item card */
    text-align: center; /* Default text alignment, can be overridden by Elementor control */
    border: 1px solid #eee; /* Default border, can be overridden */
    /* margin for item spacing is applied by Elementor's item_spacing control, removing static margin here */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: #fff; /* Default background, can be overridden */
    /* border-radius and box-shadow can be applied by Elementor controls */
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.woocommerce-custom-carousel-item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
    /* border-radius for image can be applied by Elementor controls */
}

/* Title */
.woocommerce-custom-carousel-item .product-title-text { /* Matched class from JS */
    font-size: 1.2em; /* Default, can be overridden */
    margin-bottom: 5px; /* Default, can be overridden */
    line-height: 1.3;
    /* color and typography can be applied by Elementor controls */
}

.woocommerce-custom-carousel-item .product-title-text a {
    text-decoration: none;
    color: inherit; /* Inherit color from h3, Elementor controls will target h3 */
    transition: color 0.3s ease;
}

/* Price */
.woocommerce-custom-carousel-item .price {
    font-size: 1.1em; /* Default, can be overridden */
    font-weight: bold; /* Default, can be overridden */
    margin-bottom: 15px; /* Default, can be overridden */
    /* color and typography can be applied by Elementor controls */
    transition: color 0.3s ease;
}
.woocommerce-custom-carousel-item .price del {
    font-weight: normal;
    opacity: 0.7;
    margin-right: 5px;
}
.woocommerce-custom-carousel-item .price ins {
    text-decoration: none;
}


/* Descrição Curta */
.woocommerce-custom-carousel-item .short-description {
    font-size: 0.9em; /* Default, can be overridden */
    color: #666; /* Default, can be overridden */
    margin-top: 5px; /* Default, can be overridden */
    margin-bottom: 10px; /* Default, can be overridden */
    max-height: 60px; /* Limita a altura para evitar blocos muito grandes (approx 3 lines for 0.9em font) */
    overflow: hidden; /* Esconde o excesso */
    text-overflow: ellipsis; /* Adiciona reticências se o texto for muito longo */
    /* The -webkit-box solution is good for multiline ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limita a 3 linhas, adjust as needed */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    /* typography can be applied by Elementor controls */
}

/* Botão "Adicionar ao carrinho" - estilos gerais */
.woocommerce-custom-carousel-item .add-to-cart-button {
    /* color, background-color, padding, border, border-radius, typography are set by Elementor controls */
    text-decoration: none;
    transition: opacity 0.3s ease-in-out, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    display: inline-block; /* Changed from block to allow natural width or controlled by padding */
    width: auto; /* Allow natural width based on text and padding */
    max-width: 100%; /* Ensure it doesn't overflow item padding */
    margin-top: auto; /* Pushes button to the bottom if item is flex column */
    font-size: 0.9em; /* Default, can be overridden */
    text-align: center;
}

/* Button visibility based on container class set by JS */
/* Esconder por padrão (hover) - Updated class name */
.woocommerce-custom-carousel-container.button-on-hover .woocommerce-custom-carousel-item .add-to-cart-button {
    opacity: 0;
    visibility: hidden; /* Better for accessibility and layout */
}

/* Mostrar no hover - Updated class name */
.woocommerce-custom-carousel-container.button-on-hover .woocommerce-custom-carousel-item:hover .add-to-cart-button {
    opacity: 1;
    visibility: visible;
}

/* Sempre visível (static) - Updated class name */
.woocommerce-custom-carousel-container.button-always-visible .woocommerce-custom-carousel-item .add-to-cart-button {
    opacity: 1;
    visibility: visible;
}
/* If button_display_type is 'hidden', the JS does not render the button, so no CSS rule is needed here. */


/* Setas de navegação */
.carousel-prev-btn,
.carousel-next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /* color, background-color, padding, font-size, border-radius are set by Elementor controls */
    border: none; /* Default, Elementor can add border */
    cursor: pointer;
    z-index: 10;
    line-height: 1; /* Helps align icons if they are font icons */
    display: flex; /* For centering icon inside */
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.carousel-prev-btn i, .carousel-prev-btn svg,
.carousel-next-btn i, .carousel-next-btn svg {
    display: block; /* Ensure icons behave predictably */
}


.carousel-prev-btn {
    left: 10px; /* Default, can be adjusted or made responsive */
}

.carousel-next-btn {
    right: 10px; /* Default, can be adjusted or made responsive */
}

/* Dots de navegação */
.carousel-dots {
    text-align: center;
    margin-top: 15px; /* Default, can be controlled by Elementor */
    position: absolute;
    bottom: 5px; /* Positions dots at the bottom of the container */
    left: 0;
    right: 0;
    z-index: 5; /* Below arrows if they overlap */
    /* margin for the container can be applied by Elementor controls */
}

.dot { /* Updated class name to match JS output */
    display: inline-block;
    /* width, height, background-color, border-radius are set by Elementor controls */
    margin: 0 5px; /* Default spacing between dots, can be controlled by Elementor */
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Responsividade (larguras e items per view são ajustadas pelo JS com base nos breakpoints do Elementor) */
/* Media queries in this file are mostly for fallbacks or adjustments not handled by JS item width calculations */

/* Example: Adjust arrow/dot positions or sizes for smaller screens if needed */
@media (max-width: 767px) { /* Mobile */
    .carousel-prev-btn,
    .carousel-next-btn {
        /* Example: reduce padding or size for mobile if Elementor controls aren't sufficient */
        padding: 8px 12px;
        font-size: 1.2em;
    }

    .carousel-dots {
        margin-top: 10px; /* Slightly less margin on mobile */
        bottom: 2px;
    }

    .dot { /* Updated class name */
        /* Example: smaller dots on mobile if needed */
        width: 8px;
        height: 8px;
    }
    .woocommerce-custom-carousel-item .short-description {
     -webkit-line-clamp: 2; /* Show fewer lines on mobile */
     line-clamp: 2;
      max-height: 40px; /* Adjust max-height accordingly */
    }
}
/* carrosselpro-style.css */

/* Estilos para o dot padrão */
.woocommerce-custom-carousel-container .carousel-dots .dot {
    display: inline-block;
    background-color: #ccc; /* Cor padrão do dot inativo */
    border-radius: 50%;
    cursor: pointer;
    margin: 0 5px; /* Espaçamento entre os dots */
    transition: all 0.3s ease; /* Transição suave para mudanças de tamanho/cor */
    /* Tamanho padrão, pode ser sobrescrito pelos controles do Elementor */
    width: 8px; 
    height: 8px;
}

/* Estilos para o dot ativo e ao passar o mouse */
.woocommerce-custom-carousel-container .carousel-dots .dot.active,
.woocommerce-custom-carousel-container .carousel-dots .dot:hover {
    background-color: #333; /* Cor do dot ativo/hover */
    transform: scale(1.4); /* Torna o dot 40% maior */
}