/* --- RESET & BASICS --- */
:root {
    --ns-primary: #5cb85c; /* Verde NutriPer (simile screenshot) */
    --ns-primary-dark: #4cae4c;
    --ns-accent: #f0ad4e; /* Arancione per focus/convenzioni */
    --ns-text: #333;
    --ns-bg-light: #f9f9f9;
    --ns-border: #e1e1e1;
    --ns-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.ns-shop-grid, .ns-detail-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--ns-text);
}

/* --- VISTA GRID (VETRINA) --- */
.ns-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.ns-grid-card {
    background: #fff;
    border: 1px solid var(--ns-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.ns-grid-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ns-shadow);
    border-color: var(--ns-primary);
}

/* Linea decorativa top card */
.ns-grid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--ns-primary);
    opacity: 0.7;
}

.ns-grid-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 700;
}

.ns-grid-price {
    color: var(--ns-primary);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.ns-grid-excerpt {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.ns-btn-buy {
    display: inline-block;
    background-color: var(--ns-primary);
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 50px; /* Pill shape */
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(92, 184, 92, 0.3);
}

.ns-btn-buy:hover {
    background-color: var(--ns-primary-dark);
    transform: scale(1.02);
}


/* --- VISTA DETTAGLIO (CHECKOUT) --- */
.ns-detail-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ns-back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.ns-back-link:hover {
    color: var(--ns-primary);
}

.ns-detail-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr; 
    gap: 50px;
}

@media (max-width: 900px) {
    .ns-detail-layout {
        grid-template-columns: 1fr; /* Colonna unica su tablet/mobile */
        gap: 30px;
    }
}

/* Colonna Info */
.ns-detail-info h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 25px;
    line-height: 1.2;
}

.ns-content {
    line-height: 1.8;
    color: #444;
    font-size: 1.05rem;
}

/* Colonna Form (Sticky) */
.ns-detail-checkout {
    background: #fff;
    border: 1px solid var(--ns-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 30px;
}

.ns-box-header {
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

.ns-pricing-box {
    text-align: center;
    background: #f0fdf4; /* Verde chiarissimo */
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #dcfce7;
}

.price-display {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--ns-primary);
    display: block;
}

.ns-options {
    background: #fff8e1; /* Giallo chiarissimo */
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #ffe0b2;
    transition: background 0.3s;
}

.ns-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    color: #e65100;
    cursor: pointer;
    font-size: 1rem;
}

.ns-toggle-label input {
    width: 18px;
    height: 18px;
    accent-color: #e65100;
}

/* Campi Form */
.ns-inputs {
    margin-bottom: 25px;
}

.ns-inputs label {
    display: block;
    margin-top: 15px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ns-inputs input, .ns-inputs select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.ns-inputs input:focus, .ns-inputs select:focus {
    outline: none;
    border-color: var(--ns-primary);
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.2);
}

.ns-inputs hr {
    margin: 30px 0;
    border: 0;
    border-top: 1px dashed #ddd;
}

/* Griglia per Nome/Cognome */
.ns-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#paypal-checkout-container {
    margin-top: 30px;
}

.ns-secure-note {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}