/* ==========================================================
   VETRINA DI UN SET (retail, pubblica, grossisti)
   ========================================================== */

.sc-page {
    padding-top: clamp(1rem, 2.5vw, 1.75rem);
}

.cg-crumbs {
    margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

/* ---------- Il set: foto a sinistra, acquisto a destra ---------- */
.sc-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 5vw, 4.5rem);
    align-items: start;
}

.sc-hero__media {
    aspect-ratio: 1 / 1;
    border-radius: clamp(20px, 3vw, 28px);
}

.sc-hero__info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: clamp(0rem, 2vw, 1.5rem);
}

.sc-hero__info h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 400;
    line-height: 1.05;
}

.sc-hero__desc {
    color: var(--moss);
    font-size: 1.05rem;
    line-height: 1.7;
}

.sc-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.6rem;
    padding: 0.25rem 0 0.25rem;
}

.sc-price__value {
    font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.sc-price small {
    color: var(--moss);
    font-size: 0.85rem;
}

/* Condizioni grossisti (minimo d'ordine, sconti) */
.sc-terms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.sc-terms__label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--moss);
    margin-right: 0.2rem;
}

.sc-terms .r-pill { white-space: normal; }

/* ---------- Form d'acquisto ---------- */
.sc-buy {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.sc-buy__label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--moss);
}

.sc-buy__row {
    display: flex;
    gap: 0.75rem;
}

.sc-buy__row .btn-add-cart {
    flex: 1;
}

.btn-add-cart:disabled {
    background: var(--line-strong);
    color: var(--moss);
    cursor: not-allowed;
}

.sc-login {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.sc-login a:not(.r-btn) {
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

/* Selettore quantita' (bottoni + campo): struttura letta da changeQty() */
.quantity-wrapper {
    display: inline-flex;
    align-items: center;
    height: 48px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line-strong);
    flex-shrink: 0;
}

.qty-btn {
    width: 44px;
    height: 48px;
    border: 0;
    background: transparent;
    color: var(--ink);
    border-radius: var(--radius-pill);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.qty-btn:hover { background: var(--sage); }
.qty-btn .r-icon { width: 18px; height: 18px; }

.quantity-wrapper input[type="number"] {
    width: 3.2rem;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-wrapper input::-webkit-outer-spin-button,
.quantity-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---------- Riquadro fiducia (spedizione, pagamento) ---------- */
.sc-trust {
    list-style: none;
    background: var(--sage);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.sc-trust li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--moss);
}

.sc-trust strong { color: var(--ink); }
.sc-trust .r-icon { color: var(--forest); margin-top: 1px; }

/* ---------- Messaggi (esito carrello, vetrina vuota) ---------- */
.sc-flash { margin-bottom: 1.25rem; }

.sc-empty-box,
.showcase-empty {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 0 var(--line);
    padding: clamp(2rem, 5vw, 3rem) 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    color: var(--moss);
}

.sc-empty-box img { opacity: 0.5; }
.showcase-empty p { max-width: 60ch; }

/* ---------- Cosa include ---------- */
.sc-included {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.25rem);
    padding-top: clamp(3rem, 7vw, 5rem);
}

.sc-included__intro {
    color: var(--moss);
    max-width: 44ch;
    line-height: 1.6;
}

.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.sc-item {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 1px 0 var(--line);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sc-item__media {
    aspect-ratio: 4 / 3;
}

.sc-item__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.25rem 1.3rem;
    flex: 1;
}

.sc-item__body h3 {
    font-size: 1.3rem;
    line-height: 1.2;
}

.sc-item__desc {
    color: var(--moss);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* Composizione (INCI) chiusa di default: e' lunga e interessa a pochi */
.sc-item__inci {
    border-top: 1px solid var(--line);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

.sc-item__inci summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 36px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--forest);
}

.sc-item__inci summary::-webkit-details-marker { display: none; }
.sc-item__inci summary .r-icon { width: 16px; height: 16px; transition: transform 0.2s ease; }
.sc-item__inci[open] summary .r-icon { transform: rotate(180deg); }

.sc-item__inci p {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--moss);
    overflow-wrap: anywhere;
}

/* Acquisto del singolo componente (solo grossisti, se il catalogo lo consente) */
.sc-item__buy {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sc-item__buy .r-price { font-size: 1.05rem; }

.sc-item__buy form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sc-item__buy .quantity-wrapper { height: 40px; }
.sc-item__buy .qty-btn { width: 36px; height: 40px; }
.sc-item__buy .quantity-wrapper input[type="number"] { width: 2.6rem; }
.sc-item__buy .btn-add-cart { flex: 1 1 auto; white-space: normal; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .sc-hero { grid-template-columns: minmax(0, 1fr); }
    .sc-hero__media { aspect-ratio: 4 / 3; }
    .sc-hero__info { padding-top: 0; }
}

/* Su telefono i componenti diventano righe: foto piccola a sinistra */
@media (max-width: 560px) {
    .sc-item {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
    }
    .sc-item__media { aspect-ratio: auto; min-height: 100%; }
    .sc-item__media .r-media__wm { width: 50%; }
    .sc-item__body { padding: 0.9rem 1rem; }
    .sc-item__body h3 { font-size: 1.15rem; }
    .sc-item__buy { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
    .sc-buy__row { flex-direction: column; }
    .sc-buy__row .quantity-wrapper { justify-content: space-between; }
}
