/*
 * Area Trade - il catalogo per i clienti.
 * Un foglio solo, al posto di Bootstrap + tema Avada + FontAwesome + font Google:
 * qui c'e' quello che le pagine usano, e niente altro.
 */
:root {
    --blu: #1D4662;
    --blu-chiaro: #2c6a93;
    --testo: #2b2b2b;
    --tenue: #747474;
    --linea: #e1e1e1;
    --fondo: #f6f7f8;
    --oro: #E2CC5F;
    --ok: #1e7a3c;
    --ko: #b3261e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--testo);
    background: #fff;
    display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blu); }
h1, h2, h3 { color: var(--blu); line-height: 1.2; }

.riga { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* --- Testata e menu ------------------------------------------------------ */
.testata { border-bottom: 1px solid var(--linea); }
.testata .riga { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.logo img { height: 56px; width: auto; }
.menu { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.menu > a, .menu summary {
    display: block; padding: 8px 12px; cursor: pointer; list-style: none;
    font-weight: 600; font-size: 14px; letter-spacing: .03em;
    color: var(--testo); text-decoration: none; border-bottom: 2px solid transparent;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " \25BE"; font-size: 11px; }
.menu > a:hover, .menu summary:hover, .menu .on { color: var(--blu); border-bottom-color: var(--blu); }
.tendina { position: relative; }
.tendina .voci {
    position: absolute; right: 0; top: 100%; z-index: 10; min-width: 200px;
    background: #fff; border: 1px solid var(--linea); box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.tendina .voci a, .tendina .voci button {
    display: block; width: 100%; padding: 10px 14px; text-align: left;
    color: var(--testo); text-decoration: none; font: inherit; font-size: 14px;
    background: none; border: 0; cursor: pointer;
}
.tendina .voci a:hover, .tendina .voci button:hover { background: var(--fondo); color: var(--blu); }
.utente summary { font-weight: 400; color: var(--tenue); }

/* --- Home ---------------------------------------------------------------- */
.apertura { width: 100%; }
.marchi { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; padding-top: 32px; padding-bottom: 48px; }
.marchio ul { list-style: none; padding: 0; margin: 16px 0 0; }
.marchio li { margin: 6px 0; }
.marchio a { font-weight: 600; letter-spacing: .04em; text-decoration: none; }
.marchio a:hover { text-decoration: underline; }

/* --- Pagina di una linea ------------------------------------------------- */
.titolo { background: var(--fondo) center / cover no-repeat; padding: 40px 0; margin-bottom: 32px; }
.titolo .riga { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.titolo h1 { margin: 0; font-size: 28px; }
.briciole { font-size: 14px; color: var(--tenue); }
.prodotti { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding-bottom: 48px; }
.prodotto { border: 2px solid #d2d3d4; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.prodotto img { margin: 0 auto; max-height: 260px; width: auto; }
.prodotto h2 { font-size: 17px; text-transform: uppercase; text-align: center; margin: 8px 0; min-height: 3.6em; }
.scarica { display: block; padding: 8px 0; border-top: 1px solid var(--linea); text-decoration: none; }
.scarica:hover { text-decoration: underline; }
.scarica small { color: var(--tenue); }
.vuoto { color: var(--tenue); padding-bottom: 48px; }

/* --- Moduli -------------------------------------------------------------- */
.modulo { display: flex; flex-direction: column; gap: 16px; padding-bottom: 48px; }
.campi.due { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.campo label, .scelta-prodotti legend { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.obbl { color: var(--ko); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
    width: 100%; padding: 10px 12px; font: inherit; color: inherit;
    border: 1px solid #c4c4c4; border-radius: 4px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blu-chiaro); outline-offset: 1px; border-color: var(--blu-chiaro); }
.errore input, .errore textarea, .scelta-prodotti.errore { border-color: var(--ko); }
.msg-errore { color: var(--ko); font-size: 14px; margin: 4px 0 0; }
.aiuto { color: var(--tenue); font-size: 13px; margin: 4px 0 0; }
.spunta { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.bottone {
    display: inline-block; padding: 11px 24px; border: 0; border-radius: 4px; cursor: pointer;
    background: var(--blu); color: #fff; font: inherit; font-weight: 600; text-align: center; text-decoration: none;
}
.bottone:hover { background: var(--blu-chiaro); }
.bottone.secondario { background: #fff; color: var(--blu); border: 1px solid var(--blu); width: 100%; }
.bottone.secondario:hover { background: var(--fondo); }
.modulo > .bottone { align-self: flex-start; }
.link { margin: 0; font-size: 14px; text-align: center; }

/* --- Pagine di accesso: una card centrata, come in gecomaga --------------- */
.pagina-accesso { background: var(--fondo); }
.pagina-accesso main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px; }
.accesso {
    width: 100%; max-width: 400px; padding: 32px; background: #fff;
    border: 1px solid var(--linea); border-top: 3px solid var(--oro);
    box-shadow: 0 3px 7px rgba(0,0,0,.13), 0 1px 2px rgba(0,0,0,.1);
}
.accesso-logo { height: 44px; width: auto; margin-bottom: 24px; }
.accesso h1 { margin: 0 0 24px; font-size: 22px; font-weight: 600; }
.accesso h1:has(+ .sotto) { margin-bottom: 4px; }
.accesso .sotto { margin: 0 0 24px; font-size: 14px; color: var(--tenue); }
.accesso .avviso { margin: 0 0 16px; font-size: 14px; }
.accesso .modulo { padding-bottom: 0; }
.accesso .modulo > .bottone { align-self: stretch; }
.accesso.sviluppo { border-top-color: #c19c00; padding: 16px 32px 24px; }
.accesso.sviluppo p { margin: 0 0 12px; font-size: 14px; }
.bottone-entra {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 44px; border: 1px solid #8a8886; border-radius: 4px;
    background: #fff; color: var(--testo); font-weight: 600; font-size: 15px; text-decoration: none;
}
.bottone-entra:hover { background: var(--fondo); }
.oppure { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--tenue); font-size: 13px; }
.oppure::before, .oppure::after { content: ""; flex: 1; border-top: 1px solid var(--linea); }
.nota { margin: 24px 0 0; font-size: 13px; color: var(--tenue); text-align: center; }

.scelta-prodotti { border: 1px solid #c4c4c4; border-radius: 4px; padding: 12px 16px; margin: 0; }
.scelta-prodotti legend { padding: 0 4px; }
.scelta-prodotti legend small { font-weight: 400; color: var(--tenue); }
.scelta-prodotti .elenco { max-height: 340px; overflow: auto; margin-top: 12px; }
.scelta-prodotti h3 { font-size: 14px; margin: 12px 0 4px; }
.scelta-prodotti label { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; font-size: 14px; cursor: pointer; }
.scelta-prodotti label input { margin-top: 4px; }
[hidden] { display: none !important; }

.avviso { margin: 16px 0 0; padding: 12px 16px; border-left: 4px solid; }
.avviso.ok { background: #e8f4ec; border-color: var(--ok); color: var(--ok); }
.avviso.ko { background: #fde7e9; border-color: var(--ko); color: var(--ko); }

/* --- Piede --------------------------------------------------------------- */
.piede { background: var(--blu); color: #fff; font-size: 14px; }
.piede .riga { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.piede .destra { align-self: flex-end; opacity: .85; }
