/* ===========================================================
   CSS FINAL – VISERPLACE – CAPAS DE EBOOK PREMIUM 3D (OTIMIZADO)
   Proporção de livro real 2:3 + efeito 3D + brilho + padronização 400px
   =========================================================== */

/* ===== BASE GERAL PARA TODAS AS CAPAS ===== */
.item .item-header,
.items .item .item-header,
.section .tab-content .item .item-header {
    position: relative;
    overflow: hidden;

    /* 🔹 Mantém formato de livro com proporção realista */
    aspect-ratio: 2 / 3 !important;

    /* 🔹 Largura e altura automáticas e proporcionais */
    width: 100% !important;
    max-width: 340px !important;
    height: auto !important;

    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    perspective: 1000px; /* Ativa 3D */
}

/* Garante que a imagem dentro da capa mantenha o formato */
.item .item-header img,
.items .item .item-header img,
.section .tab-content .item .item-header img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    border-radius: 8px;
}




/* Garante que o link ocupa o container todo */
.item .item-header > a {
    display: block;
    height: 100%;
}

/* ===== IMAGENS DAS CAPAS ===== */
.item .item-header img,
.items .item .item-header img,
.section .tab-content .item .item-header img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 8px;
    transform-origin: left center;
    transform: translateZ(0) rotateY(0deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* ===== EFEITO 3D + SOMBRA NO HOVER ===== */
.item .item-header:hover,
.section .tab-content .item .item-header:hover {
    transform: scale(1.03);
    box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}

.item .item-header:hover img,
.section .tab-content .item:hover .item-header img {
    transform: translateZ(40px) rotateY(-6deg);
}

/* ===== BRILHO LAMINADO ===== */
.item .item-header::before,
.section .tab-content .item .item-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.02) 60%);
    transform: skewX(-25deg);
    transition: left 0.8s ease-in-out;
    pointer-events: none;
}

.item .item-header:hover::before,
.section .tab-content .item:hover .item-header::before {
    left: 120%;
}

/* ===== LOM BADA SIMULADA ===== */
.item .item-header::after,
.section .tab-content .item .item-header::after {
    content: "";
    position: absolute;
    top: 0;
    right: -12px;
    width: 12px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.08), rgba(0,0,0,0.25));
    border-radius: 0 8px 8px 0;
    filter: blur(2px);
}

/* ===== RESET CONTRA CONFLITOS DO TEMA ===== */
.item img,
.items img,
.grid-items img,
.search-items img {
    max-height: none !important;
    height: 100% !important;
}

/* ===== ANIMAÇÃO FLUTUANTE NOS ÚLTIMOS ITENS ===== */
.section .custom-tabs ~ .tab-content .item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
}

.section .custom-tabs ~ .tab-content .item:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.18);
}

/* 🎯 Centraliza somente título, subtítulo e conteúdo descritivo dos cards */
.item-box .item-info,
.product-card .item-info,
.card .item-info {
    text-align: center !important;
}

/* 🔹 Mantém preço, carrinho e visualização alinhados ao lado original */
.item-box .item-actions,
.product-card .item-actions,
.card .item-actions,
.item-box .price,
.product-card .price,
.card .price {
    text-align: right !important;
}

/* ✅ Títulos e subtítulos centralizados */
.item-title,
.item-title + div {
    text-align: center !important;
    width: 100%;
    display: block;
}

/* 🖼️ Animação suave ao passar o mouse sobre a imagem */
.single-item .item-preview img,
.product-page .item-preview img,
.item-details .item-preview img {
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
}

.single-item .item-preview img:hover,
.product-page .item-preview img:hover,
.item-details .item-preview img:hover {
    transform: scale(1.04); /* Zoom elegante (não exagerado) */
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12); /* Sombra premium */
}

/* ===========================================================
   🖼️ Ajuste de Largura das Capas dos eBooks (versão 3 por linha)
   =========================================================== */

.item .item-header,
.items .item .item-header,
.section .tab-content .item .item-header {
    max-width: 300px !important;  /* 🔹 Aumenta largura total da capa */
    height: 440px !important;     /* 🔹 Mantém proporção 2:3 */
    aspect-ratio: 2 / 2 !important;
}

/* 🔧 Centraliza visualmente as capas dentro das colunas */
.items .item {
    display: flex;
    justify-content: center;
}
