/* =============================================================================
   Yose Product Carousel – Styles
   v1.6.0
   ============================================================================= */

/* Layout geral */
.yose-carousel {
    width: 100%;
}

.yose-carousel__header {
    margin-bottom: 24px;
}

.yose-carousel__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.yose-carousel__description {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #666;
}

/* Slider wrap contém o swiper + botões absolutos */
.yose-carousel__slider-wrap {
    position: relative;
    overflow: hidden; /* Corta qualquer vazamento do Swiper */
}

.yose-carousel__swiper {
    overflow: hidden;
    width: 100%;
}

/* =============================================================================
   Card
   ============================================================================= */

.yose-carousel__card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.yose-carousel__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
}

/* Badge */
.yose-carousel__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #00a983;
    color: #fff;
    pointer-events: none;
}

/* Imagem */
.yose-carousel__img-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

.yose-carousel__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.yose-carousel__card:hover .yose-carousel__img {
    transform: scale(1.05);
}

/* Corpo */
.yose-carousel__card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.yose-carousel__product-name-link {
    text-decoration: none;
    color: inherit;
}

.yose-carousel__product-name-link:hover {
    color: inherit;
}

.yose-carousel__product-name {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a1a;
}

.yose-carousel__product-desc {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.55;
    color: #777;
    flex: 1;
}

.yose-carousel__product-price {
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.yose-carousel__product-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.yose-carousel__product-price del {
    font-size: 13px;
    font-weight: 400;
    color: #aaa;
    margin-right: 6px;
}

.yose-carousel__product-price ins {
    text-decoration: none;
}

/* Botão */
.yose-carousel__btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    background: #00a983;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.2s ease, opacity 0.2s ease;
    margin-top: auto;
}

.yose-carousel__btn:hover {
    opacity: 0.88;
    color: #fff;
}

/* =============================================================================
   Navegação (setas)
   ============================================================================= */

.yose-swiper-btn {
    position: absolute;
    top: 40%; /* Alinha na área da imagem, não no card inteiro */
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #00a983;
    color: #00a983;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    padding: 0;
}

.yose-swiper-btn:hover {
    background: #00a983;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 169, 131, 0.30);
}

.yose-swiper-prev { left: -16px; }
.yose-swiper-next { right: -16px; }

.yose-swiper-btn.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Em mobile as setas ficam dentro do container */
@media (max-width: 768px) {
    .yose-swiper-prev { left: 4px; }
    .yose-swiper-next { right: 4px; }
}

/* =============================================================================
   Paginação (dots)
   ============================================================================= */

.yose-swiper-dots {
    text-align: center;
    margin-top: 16px;
    position: static !important;
}

.yose-swiper-dots .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    opacity: 1;
    margin: 0 4px;
    transition: background 0.2s, width 0.2s;
}

.yose-swiper-dots .swiper-pagination-bullet-active {
    background: #00a983;
    width: 20px;
    border-radius: 4px;
}

/* =============================================================================
   Dois botões + parcelamento  (v1.3)
   ============================================================================= */

/* Grupo de botões: flex row, contido no card */
.yose-carousel__btn-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Ambos os botões dividem o espaço igualmente por padrão */
.yose-carousel__btn--buy,
.yose-carousel__btn--cart {
    flex: 1 1 0;      /* cresce e encolhe igualmente */
    min-width: 0;     /* permite encolher abaixo do conteúdo natural */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: background 0.2s ease, color 0.2s ease,
                opacity 0.2s ease, border-color 0.2s ease;
}

/* Ver produto */
.yose-carousel__btn--buy {
    background: #00a983;
    color: #fff;
    border: 1.5px solid transparent;
}
.yose-carousel__btn--buy:hover {
    opacity: 0.88;
    color: #fff;
}

/* Adicionar ao carrinho */
.yose-carousel__btn--cart {
    background: #fff;
    color: #00a983;
    border: 1.5px solid #00a983;
}
.yose-carousel__btn--cart:hover {
    background: #00a983;
    color: #fff;
    border-color: #00a983;
}

.yose-carousel__btn--cart svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Modo apenas ícone: cart vira tamanho fixo pelo ícone,
   buy já tem flex:1 e ocupa o espaço restante automaticamente */
.yose-carousel__btn--cart-icon-only {
    flex: 0 0 auto;
    min-width: unset;
    width: 40px;
    padding: 10px;
}

.yose-carousel__btn-cart-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Parcelamento */
.yose-carousel__installments {
    font-size: 12px;
    color: #888;
    margin: 0 0 12px;
    line-height: 1.4;
}

.yose-carousel__installments strong {
    font-weight: 700;
    color: inherit;
}
