/* ============================================================
   Coloring AI EDD — Public Styles
   Layout: Imagem (esq.) | Botões (dir.) + Relacionados (baixo)
   ============================================================ */

/* ── Wrapper geral ─────────────────────────────────────────── */
.cae-page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 60px;
    font-family: inherit;
    color: inherit;
}

/* ── Breadcrumb compacto ───────────────────────────────────── */
.cae-breadcrumb {
    font-size: 11px;
    color: #999;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
}
.cae-breadcrumb a { color: #999; text-decoration: none; }
.cae-breadcrumb a:hover { text-decoration: underline; color: #555; }
.cae-breadcrumb .cae-sep { color: #ccc; }
.cae-breadcrumb-current {
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ── Layout principal ──────────────────────────────────────── */
.cae-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 50px;
}

/* ── Imagem ────────────────────────────────────────────────── */
.cae-product-image {
    /* coluna esquerda */
}

.cae-image-frame {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.cae-main-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.cae-image-placeholder {
    min-height: 300px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 14px;
    border-radius: 6px;
}

/* ── Info / botões (coluna direita) ────────────────────────── */
.cae-product-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cae-product-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 4px;
    color: inherit;
}

.cae-price {
    font-size: 14px;
    font-weight: 300;
    color: #444;
    margin-bottom: 4px;
}

/* ── Botões de acção ───────────────────────────────────────── */
.cae-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Linha com dois botões lado a lado */
.cae-btn-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.cae-btn-row .cae-btn {
    flex: 1;
}

.cae-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s, transform .1s;
    box-sizing: border-box;
    line-height: 1.3;
}

.cae-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
    text-decoration: none;
}

.cae-btn:active { transform: translateY(0); }

/* Verde — Baixar PNG */
.cae-btn-green {
    background: #27ae60;
    color: #fff !important;
}

/* Outline — Imprimir Agora */
.cae-btn-outline {
    background: #fff;
    color: #222 !important;
    border: 2px solid #222;
}

/* Escuro — Ver Coleção */
.cae-btn-dark {
    background: #2c3e50;
    color: #fff !important;
}

/* ── Categoria e descrição ─────────────────────────────────── */
.cae-category-label {
    font-size: 13px;
    color: #666;
    margin: 2px 0 0;
}
.cae-category-label a {
    color: #0073aa;
    text-decoration: none;
}
.cae-category-label a:hover { text-decoration: underline; }

.cae-description {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.65;
    color: #444;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

/* ── Descrição expansível ──────────────────────────────────── */
.cae-description-wrap {
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-top: 8px;
}

.cae-description-preview {
    font-size: 14px;
    line-height: 1.65;
    color: #666;
    font-style: italic;
}

.cae-description-full {
    font-size: 14px;
    line-height: 1.65;
    color: #444;
}

/* Botão de descrição minimalista - Reforçado */
.cae-description-wrap .cae-desc-toggle {
    margin-top: 12px !important;
    background-color: #f1f3f5 !important;
    border: 1px solid #dee2e6 !important;
    color: #495057 !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
    line-height: 1 !important;
    height: auto !important;
    width: auto !important;
}

.cae-description-wrap .cae-desc-toggle:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
    border-color: #ced4da !important;
    text-decoration: none !important;
}

.cae-description-wrap .cae-desc-toggle-label {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* ── Carrossel de Imagens Relacionadas ─────────────────────── */
.cae-carousel-container {
    position: relative;
    margin-top: 20px;
    padding: 0 30px;
    overflow: hidden;
}

.cae-carousel-track-viewport {
    overflow: hidden;
    width: 100%;
}

.cae-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 10px;
}

.cae-carousel-slide {
    flex: 0 0 calc(20% - 8px); /* 5 itens por vez, descontando o gap */
    aspect-ratio: 1 / 1;
    min-width: 0;
}

.cae-carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    border: 1px solid #eee;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.cae-carousel-link:hover {
    transform: scale(1.05);
    border-color: #ccc;
}

.cae-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    color: #333;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.cae-carousel-nav:hover {
    background: #fff;
    border-color: #bbb;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cae-prev { left: 0; }
.cae-next { right: 0; }

@media (max-width: 768px) {
    .cae-carousel-slide { flex: 0 0 calc(33.33% - 7px); } /* 3 itens em tablets */
}

@media (max-width: 480px) {
    .cae-carousel-slide { flex: 0 0 calc(50% - 5px); } /* 2 itens em mobile */
}

/* ── Downloads relacionados ────────────────────────────────── */
.cae-related {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.cae-related-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 20px;
    color: inherit;
}

.cae-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cae-related-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow .15s;
    background-color: #fff;
}

.cae-related-item:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
    text-decoration: none;
}

.cae-related-item img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    display: block;
    background: #f9f9f9;
    padding: 6px;
    box-sizing: border-box;
}

.cae-related-no-img {
    width: 100%;
    height: 180px;
    background: #f0f0f0;
}

.cae-related-item-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    padding: 8px 10px 10px;
    color: #333;
}

/* Relacionados com background-image (Google não indexa estas imagens) */
.cae-related-item--bg {
    height: 200px;
    position: relative;
    justify-content: flex-end;
    background-color: #f0f0f0;
}

/* Span interno que carrega a imagem via background — invisível ao Google */
.cae-related-bg-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
    z-index: 0;
}

.cae-related-item--bg .cae-related-item-title {
    position: relative;
    z-index: 1;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: #fff;
    padding: 20px 8px 8px;
    margin: 0;
    width: 100%;
}

/* ── Responsivo ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .cae-product-layout { grid-template-columns: 1fr; gap: 24px; }
    .cae-related-grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .cae-related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cae-product-title { font-size: 20px; }
    .cae-btn { font-size: 14px; padding: 12px 14px; }
}
