/* =========================================================
   Componente: Produto — Card e Review
   ========================================================= */

/* ── Card de produto (listing) ──────────────────────────── */
.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition:
        box-shadow var(--transition-base),
        transform var(--transition-base);
}

.product-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
}

/* Badge de destaque */
.product-card__badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--color-gold);
    color: #1a1000;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: var(--font-bold);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Thumbnail */
.product-card__thumb {
    display: block;
    background: var(--color-bg-alt);
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.product-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--space-4);
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card__img {
    transform: scale(1.06);
}

.product-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* Nota sobreposta */
.product-card__score {
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: var(--font-extrabold);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-card__score.score--excellent { background: var(--score-excellent); }
.product-card__score.score--good      { background: var(--score-good); }
.product-card__score.score--average   { background: var(--score-average); }
.product-card__score.score--poor      { background: var(--score-poor); }

/* Corpo */
.product-card__body {
    padding: var(--space-4) var(--space-5);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.product-card__brand {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
}

.product-card__title {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    line-height: var(--leading-snug);
}

.product-card__title a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.product-card__title a:hover { color: var(--color-accent); }

.product-card__rating {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.product-card__rating-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-weight: var(--font-medium);
}

.product-card__excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Footer */
.product-card__footer {
    padding: var(--space-3) var(--space-5) var(--space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.product-card__price {
    font-size: var(--text-xl);
    font-weight: var(--font-extrabold);
    color: var(--color-primary);
}

/* ── Grid de produtos ───────────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-6);
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
}

@media (max-width: 420px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Review de produto (página única) ───────────────────── */
.product-review {
    min-width: 0;
}

.product-review__header {
    margin-bottom: var(--space-8);
}

.product-review__title {
    font-size: var(--text-4xl);
    line-height: var(--leading-tight);
    margin-block: var(--space-4) var(--space-6);
}

/* Hero: score + preço lado a lado */
.product-review__hero-data {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    flex-wrap: wrap;
    padding: var(--space-8);
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    margin: var(--space-6) 0 var(--space-10);
}

@media (max-width: 768px) {
    .product-review__hero-data {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-6);
        padding: var(--space-6);
    }
}

/* Círculo de nota (hero) - Visual Premium */
.product-score-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    min-width: 120px;
}

.product-score-hero__circle {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.product-score-hero__svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.product-score-hero__track {
    stroke: var(--color-border);
    stroke-opacity: 0.3;
}

.product-score-hero__fill {
    stroke: var(--score-color, var(--color-primary));
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
}

.product-score-hero__value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
    font-family: var(--font-heading);
}

.product-score-hero__label {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--score-color, var(--color-text-muted));
}

/* Cores dinâmicas por nota */
.score-high { --score-color: #22c55e; }    /* Verde */
.score-medium { --score-color: #eab308; }  /* Amarelo/Ouro */
.score-low { --score-color: #ef4444; }     /* Vermelho */
.score--average   .product-score-hero__fill { stroke: var(--score-average); }
.score--poor      .product-score-hero__fill { stroke: var(--score-poor); }

/* Buy box */
.product-buy-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 250px;
    padding-left: var(--space-8);
    border-left: 1px solid var(--color-border);
}

@media (max-width: 768px) {
    .product-buy-box {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--color-border);
        padding-top: var(--space-6);
        width: 100%;
    }
}

.product-buy-box__price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: var(--space-3);
}

.product-buy-box__label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: var(--font-semibold);
}

.product-buy-box__value {
    font-size: var(--text-3xl);
    font-weight: var(--font-extrabold);
    color: var(--color-primary);
    font-family: var(--font-display);
}

.product-buy-box__disclaimer {
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-light);
}

/* Leia Também (Sidebar) */
.read-also-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}

.read-also-item:last-child {
    border-bottom: none;
}

.read-also-item__thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.read-also-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.read-also-item__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.read-also-item__title {
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-also-item__title:hover {
    color: var(--color-primary);
}

.read-also-item__meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.read-also-item__score {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--score-color, var(--color-primary));
    color: white;
}

.read-also-item__price {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* Imagem do produto */
.product-review__image {
    margin-bottom: var(--space-8);
    text-align: center;
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    border: 1px solid var(--color-border);
}

.product-review__image img {
    max-height: 400px;
    object-fit: contain;
    margin-inline: auto;
}

/* Veredicto rápido */
.product-verdict {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    padding: var(--space-5) var(--space-6);
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid var(--color-gold);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-8);
}

.product-verdict__icon { font-size: 1.5rem; flex-shrink: 0; }

.product-verdict strong {
    display: block;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: var(--space-1);
}

.product-verdict p {
    font-size: var(--text-base);
    color: var(--color-text-sec);
    line-height: var(--leading-normal);
}

/* Tabela de specs */
.product-specs { margin-block: var(--space-10); }

.product-specs__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--color-border);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.specs-table th,
.specs-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.specs-table th {
    width: 40%;
    font-weight: var(--font-semibold);
    color: var(--color-text-sec);
    background: var(--color-bg-alt);
}

.specs-table td { color: var(--color-text); }

.specs-table tr:last-child th,
.specs-table tr:last-child td { border-bottom: none; }

.specs-table tr:hover td,
.specs-table tr:hover th { background: var(--color-bg-alt); }

/* CTA de compra no final do review */
.product-review__buy-cta {
    text-align: center;
    padding: var(--space-8);
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    margin-top: var(--space-10);
}

/* Badge de produto no header */
.product-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

.product-badge--header {
    background: var(--color-gold-light);
    color: #92400e;
}

/* ── Seção de produtos relacionados ─────────────────────── */
.related-products {
    background: var(--color-bg-alt);
    padding-block: var(--space-12);
    margin-top: var(--space-12);
    border-top: 1px solid var(--color-border);
}
