﻿/* =========================
   CATALOG HEADER
========================= */
.prodotto-header {
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
}

.prodotto-header-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: center;
    position: relative;
    padding: 18px 16px 20px;
    background: #fafafa;
    overflow: hidden;
    /* centrato mobile */
    text-align: center;
    justify-items: center;
}

.prodotto-header-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.prodotto-title {
    margin: 0 0 10px;
    font-size: 1.9rem;
    line-height: 1.15;
    font-weight: 700;
    color: #111;
}

.prodotto-brand-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.94rem;
    line-height: 1.4;
    color: #444;
}

.prodotto-brand-rating-star {
    font-size: 1rem;
    line-height: 1;
}

.prodotto-brand-rating-value {
    font-weight: 700;
    color: #111;
}

.prodotto-brand-rating-text,
.prodotto-brand-rating-count,
.prodotto-brand-rating-sep {
    color: #666;
}

.prodotto-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #666;
}

.prodotto-count {
    font-weight: 500;
    color: #111;
}

.prodotto-meta-sep {
    color: #ccc;
}

.prodotto-active-inline {
    color: #666;
}

.prodotto-description {
    max-width: 720px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
}

.prodotto-brand-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    min-width: 120px;
    max-width: 180px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 14px;
}

.prodotto-brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 48px;
}

/* =========================
   TABLET
========================= */
@media (min-width: 768px) {
    .prodotto-header-main {
        padding: 20px 24px 24px;
        gap: 22px;
        text-align: center;
        justify-items: center;
    }

    .prodotto-header-content {
        align-items: center;
    }

    .prodotto-title {
        font-size: 2.2rem;
    }

    .prodotto-brand-rating {
        font-size: 0.96rem;
    }

    .prodotto-meta {
        font-size: 0.92rem;
    }

    .prodotto-brand-logo-box {
        min-width: 130px;
        max-width: 190px;
        padding: 15px 18px;
    }

    .prodotto-brand-logo {
        max-height: 52px;
    }
}

/* =========================
   DESKTOP
========================= */
@media (min-width: 1200px) {
    .prodotto-header-main {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 24px;
        padding: 18px 1em 24px;
        /* torna layout classico */
        text-align: left;
        justify-items: stretch;
    }

    .prodotto-header-content {
        align-items: flex-start;
    }

    .prodotto-title {
        font-size: 2.2rem;
    }

    .prodotto-brand-rating {
        justify-content: flex-start;
        font-size: 15px;
    }

    .prodotto-brand-rating-star {
        font-size: 16px;
    }

    .prodotto-meta {
        justify-content: flex-start;
        font-size: 14px;
    }

    .prodotto-description {
        text-align: left;
    }

    .prodotto-brand-logo-box {
        margin: 0;
        min-width: 140px;
        max-width: 200px;
        padding: 16px 20px;
    }

    .prodotto-brand-logo {
        max-height: 56px;
    }
}
/* =========================
   PRODUCT TABS
========================= */

.product-tabs {
    margin-top: 32px;
}

.product-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #ddd;
}

.product-tab-btn {
    position: relative;
    padding: 14px 20px;
    border: 0;
    background: transparent;
    color: #555;
    font: inherit;
    font-weight: 600;
    font-size: 1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease;
}

@media (max-width: 450px) {
    .product-tab-btn {
        width: 100%;
    }
}

.product-tab-btn:hover {
    color: #111;
}

.product-tab-btn::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #111;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.product-tab-btn.is-active {
    color: #111;
}

    .product-tab-btn.is-active::after {
        transform: scaleX(1);
    }

.product-tabs-content {
    padding-top: 22px;
}

.product-tab-panel {
    display: none;
}

    .product-tab-panel.is-active {
        display: block;
    }

/* =========================
   PRODUCT REVIEWS
========================= */

.product-reviews {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 20px;
}

.product-spare-parts {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 20px;
}

    .product-spare-parts > .modellist {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

.product-reviews-top {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-reviews-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-reviews-average {
    font-size: 2.2em;
    line-height: 1;
    font-weight: 600;
    color: #111;
}

.product-reviews-stars {
    font-size: 1.4em;
    line-height: 1;
    color: #e7a84b;
    letter-spacing: 2px;
}

    .product-reviews-stars .star {
        color: #ddd;
    }

        .product-reviews-stars .star.full {
            color: #e7a84b;
        }

.product-reviews-count {
    font-size: 0.9em;
    color: #555;
}

.product-reviews-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-reviews-breakdown-row {
    display: grid;
    grid-template-columns: 20px 20px 1fr 50px;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.rating-star {
    color: #e7a84b;
}

.rating-bar {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: #eee;
    overflow: hidden;
}

.rating-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    background: #e7a84b;
    border-radius: 999px;
}

.rating-percent {
    text-align: right;
    color: #222;
}

.product-reviews-action {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.product-reviews-list-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #111;
}

.product-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-review-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.product-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-review-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f2f2f2;
    font-weight: 600;
    color: #444;
    flex: 0 0 48px;
    overflow: hidden;
}

    .product-review-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .product-review-avatar.is-staff {
        background: #fff;
        border: 1px solid #ddd;
    }

.product-review-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-review-title {
    font-size: 1em;
    font-weight: 600;
    color: #111;
}

.product-review-date {
    font-size: 0.85em;
    color: #888;
}

.product-review-text {
    font-size: 0.95em;
    line-height: 1.6;
    color: #222;
}

.product-review-details {
    font-size: 0.85em;
    color: #555;
}

.review-item--staff {
    background: #fff8e6;
    border-left: 4px solid #f2c94c;
    padding-left: 16px;
    margin-left: 0;
}

/* =========================
   TABLET
========================= */

@media (min-width: 768px) {

    .product-tab-btn {
        padding: 14px 28px;
        font-size: 1.1em;
    }

    .product-spare-parts > .modellist {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-reviews-top {
        display: grid;
        grid-template-columns: 200px 1fr;
        gap: 32px;
    }

    .product-reviews-action {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .product-reviews-average {
        font-size: 3em;
    }

    .product-reviews-stars {
        font-size: 1.6em;
    }

    .review-item--staff {
        margin-left: 30px;
    }
}

/* =========================
   DESKTOP
========================= */
@media (min-width: 1200px) {

    .product-tab-btn {
        padding: 14px 32px;
        font-size: 1.3em;
    }

    .product-reviews {
        margin: 20px 50px 0 50px;
    }

    .product-spare-parts > .modellist {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .product-reviews-top {
        grid-template-columns: 220px 1fr 220px;
    }

    .product-reviews-action {
        grid-column: auto;
        justify-content: flex-end;
    }

    .product-reviews-average {
        font-size: 4em;
    }

    .product-reviews-stars {
        font-size: 1.8em;
    }

    .product-review-text {
        font-size: 1em;
    }

    .review-item--staff {
        margin-left: 40px;
    }
}

@media (min-width: 1439px) {
    .product-tabs {
        padding-right: 0px;
        padding-left: 0px;
    }
}
