@charset "UTF-8";
/* =========================================================
   Termoverde - mobile.css  v8 (02/11/2026) - testata antracite, selezioni verde scuro, menu a tendina sottocategorie e marche, scheda prodotto, categorie, carrello, registrazione (privacy in evidenza), accesso, compilazione ordine (orari di consegna nascosti), riepilogo (condizioni prima della tabella), istruzioni bonifico, i tuoi ordini, dettaglio ordine, pagamento con carta, metodo di pagamento
   Da caricare DOPO tv_main_v2695.css.
   Vale solo sotto i 768 px: il desktop resta invariato.
   Richiede: <meta name="viewport" content="width=device-width, initial-scale=1">
   ========================================================= */
@media (max-width: 767px) {

  /* ---------- Base ---------- */
  html, body { min-width: 0 !important; overflow-x: hidden; }
  html { scroll-padding-top: 62px; }                 /* i link #ancora non finiscono sotto la barra fissa */
  body {
    background-size: min(700px, calc((100vw - 24px) * 1.62)) auto;   /* logo + leone sempre interi: lo sfondo si adatta allo schermo */
    background-position: 50% 50px;        /* logo sotto la barra destinazione */
    -webkit-text-size-adjust: 100%;
  }
  #page, #header, #main, #content, #footer {
    width: auto !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
  }
  #page { padding: 0 10px 80px; box-sizing: border-box; }   /* 80px: spazio per la bolla chat */
  img { max-width: 100%; height: auto; }

  /* ---------- Barra destinazione (fissa in alto) ---------- */
  #overbg {                                           /* fondo pieno, non più trasparente */
    height: 54px !important;
    background: linear-gradient(#3a3a3a, #1c1c1c) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
  }
  #products_country_chooser {
    left: 0 !important; right: 0 !important; width: auto !important; height: 54px !important;
    padding: 7px 10px; box-sizing: border-box; z-index: 2001 !important;   /* sopra #overbg (2000) */
  }
  #products_country_chooser .country_select,
  #products_country_chooser form,
  #products_country_chooser label { width: auto !important; height: 100%; }
  #products_country_chooser label {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; line-height: 1.2; font-weight: bold;
    white-space: normal;                              /* "Seleziona la destinazione" su 2 righe */
    color: #fff !important; text-shadow: 0 1px 2px #000;
  }
  #products_country_chooser select {
    flex: 0 0 58%; min-width: 0; height: 40px !important;
    font-size: 17px !important; font-weight: bold; text-align: left !important;
    color: #fff !important; background-color: #2a8844 !important;
    border: 2px solid #aaffdd !important; border-radius: 20px !important;
    padding: 0 34px 0 14px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23ffffff' stroke-width='2.5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 13px center !important;
  }

  /* ---------- Testata ---------- */
  #header { height: auto !important; padding-top: 56px; }
  #site_title a {                      /* area cliccabile del logo */
    position: relative !important; top: 0 !important;
    display: block; height: 70px; width: auto !important;
  }
  #lang_menu {                         /* bandiere: riga propria sotto la ricerca */
    position: static !important; width: auto !important; margin: 0 0 6px !important;
    display: flex; justify-content: center; gap: 6px;
  }
  #lang_menu li { float: none !important; margin: 0; }
  #lang_menu img { width: 28px; height: auto; }
  #welcome_text {                      /* "Salve, Nome." (utente collegato): ha uno stile inline absolute */
    position: static !important; text-align: right; font-size: 13px; margin: 0 4px 4px;
  }
  #gscbox {
    position: static !important; width: auto !important;
    margin: 6px 0 !important;
  }

  /* ---------- Menu principale: tutte le voci visibili, a capo ---------- */
  #main_menu {
    position: static !important; width: auto !important; right: auto !important; height: auto !important;
    display: flex; flex-wrap: wrap; gap: 5px;
    background: none !important; border-radius: 0 !important; padding: 0 !important; margin: 4px 0 !important;
  }
  #main_menu li { float: none !important; flex: 1 1 auto; margin: 0 !important; }
  #main_menu a {
    display: block; text-align: center; padding: 10px 12px !important; font-size: 15px; line-height: 20px;
    white-space: nowrap; border-radius: 18px;
    background: url("/img/tv/bg-button.png") repeat-x 50% 50% / auto 100%;
  }
  #main_menu li.selected a { background: #2f6b22; color: #fff; }

  /* ---------- Menu marche: tutte visibili, a pillole che vanno a capo ---------- */
  #macro_menu {
    width: auto !important; height: auto !important;
    display: flex; flex-wrap: wrap; gap: 5px;
    padding: 6px !important; margin: 6px 0 !important;
  }
  #macro_menu li { float: none !important; flex: 0 0 auto; width: auto !important; }
  #macro_menu a {
    display: block; padding: 7px 10px !important; font-size: 13px !important; line-height: 18px;
    white-space: nowrap; border-radius: 15px;
    background: rgba(255,255,255,.75); border: 1px solid #c9d9b5;
  }
  #macro_menu li.selected a { background: #2f6b22 !important; color: #fff !important; border-color: #2f6b22; }

  /* ---------- Colonna destra: marche e sottocategorie in alto, il resto in fondo ---------- */
  #main { display: flex !important; flex-direction: column; height: auto !important; }
  #toolbox { display: contents !important; }          /* i figli diventano blocchi di #main */
  #toolbox > #side_menu_cat { display: contents !important; }   /* anche le voci del menu laterale */
  #toolbox > #sidebar, #toolbox > #toolbox-bottom { order: 5; margin-top: 20px; }
  #toolbox > #cart { display: none !important; }      /* mini-carrello: su mobile c'è "Carrello" nel menu */
  #toolbox #side_menu_cat > li.nested:not(.current) { display: none !important; }

  /* pagine categoria: [Tutte le marche ▾] (tendina) - [Marca – sottocategorie ▾] (tendina) - prodotti */
  #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested { order: 1; }
  #main:not(:has(.product.page)) > #macro_menu { order: 2; }
  #main:not(:has(.product.page)) #side_menu_cat > li.nested.current { order: 3; }
  #main > #content { order: 4; margin-top: 4px !important; }   /* il desktop ha 48px sopra il contenuto */

  /* schede prodotto: prima il prodotto, poi la tendina sottocategorie,
     poi il riquadro "Tutte le marche" aperto, poi l'elenco della categoria */
  #main:has(.product.page) > #content { display: contents !important; }
  #main:has(.product.page) .product.page { order: 1; }
  #main:has(.product.page) #side_menu_cat > li.nested.current { order: 2; margin-top: 18px !important; }
  #main:has(.product.page) > #macro_menu { order: 3; margin-top: 14px !important; }
  #main:has(.product.page) #products { order: 4; margin-top: 8px !important; }
  #main:has(.product.page) > #macro_menu::before {
    flex: 0 0 100%; padding: 0 4px 2px; font-size: 15px; font-weight: bold;
    color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6);
  }
  html:lang(it) #main:has(.product.page) > #macro_menu::before { content: "Tutte le marche"; }
  html:lang(en) #main:has(.product.page) > #macro_menu::before { content: "All brands"; }
  html:lang(fr) #main:has(.product.page) > #macro_menu::before { content: "Toutes les marques"; }
  html:lang(de) #main:has(.product.page) > #macro_menu::before { content: "Alle Marken"; }
  html:lang(es) #main:has(.product.page) > #macro_menu::before { content: "Todas las marcas"; }

  /* pulsanti a tendina. Usano i checkbox già presenti nel menu laterale:
     - sottocategorie: il checkbox della marca aperta (su mobile "spuntato" = chiuso);
     - marche (solo pagine categoria): il checkbox del gruppo successivo, preso in prestito
       (non spuntato = chiuso); l'etichetta originale è nascosta e sostituita dal testo "Tutte le marche". */
  #toolbox #side_menu_cat > li.nested.current { width: auto !important; height: auto !important; border: 0 !important; margin-bottom: 8px !important; }
  #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested {
    display: block !important; width: auto !important; height: auto !important; border: 0 !important; margin: 4px 0 0 !important;
  }
  #toolbox #side_menu_cat > li.nested.current > label,
  #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested > label {
    display: block !important; position: relative; margin: 0 0 6px !important; padding: 11px 14px !important;
    border-radius: 22px; background: #fff; border: 2px solid #2f6b22;
    color: #2f6b22 !important; font-size: 15px !important; text-align: left !important; text-shadow: none !important;
  }
  #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested > label { font-size: 0 !important; }
  #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested > label::after { font-size: 15px; font-weight: bold; }
  html:lang(it) #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested > label::after { content: "Tutte le marche \0025BE"; }
  html:lang(en) #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested > label::after { content: "All brands \0025BE"; }
  html:lang(fr) #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested > label::after { content: "Toutes les marques \0025BE"; }
  html:lang(de) #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested > label::after { content: "Alle Marken \0025BE"; }
  html:lang(es) #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested > label::after { content: "Todas las marcas \0025BE"; }
  html:lang(it) #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested:has(> input:checked) > label::after { content: "Tutte le marche \0025B4"; }
  html:lang(en) #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested:has(> input:checked) > label::after { content: "All brands \0025B4"; }
  html:lang(fr) #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested:has(> input:checked) > label::after { content: "Toutes les marques \0025B4"; }
  html:lang(de) #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested:has(> input:checked) > label::after { content: "Alle Marken \0025B4"; }
  html:lang(es) #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested:has(> input:checked) > label::after { content: "Todas las marcas \0025B4"; }
  #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested > ul { display: none !important; }
  #main:not(:has(.product.page)) > #macro_menu { display: none !important; }
  #main:not(:has(.product.page)):has(#side_menu_cat > li.nested.current + li.nested > input:checked) > #macro_menu { display: block !important; }

  #toolbox #side_menu_cat > li.nested.current > label::after { font-weight: normal; }
  html:lang(it) #toolbox #side_menu_cat > li.nested.current > label::after { content: " \002013\000020sottocategorie\000020\0025BE"; }
  html:lang(en) #toolbox #side_menu_cat > li.nested.current > label::after { content: " \002013\000020subcategories\000020\0025BE"; }
  html:lang(fr) #toolbox #side_menu_cat > li.nested.current > label::after { content: " \002013\000020sous-cat\0000E9gories\000020\0025BE"; }
  html:lang(de) #toolbox #side_menu_cat > li.nested.current > label::after { content: " \002013\000020Unterkategorien\000020\0025BE"; }
  html:lang(es) #toolbox #side_menu_cat > li.nested.current > label::after { content: " \002013\000020subcategor\0000EDas\000020\0025BE"; }
  #toolbox #side_menu_cat > li.nested.current:has(> input:not(:checked)) > label::after {
    content: " \0025B4" !important;                    /* aperto: solo la freccia in su */
  }
  #toolbox #side_menu_cat > li.nested.current > input:checked ~ ul { display: none !important; }

  /* tendina aperta "classica": una voce per riga, riquadro unito al pulsante, scorre al suo interno */
  #toolbox #side_menu_cat > li.nested.current:has(> input:not(:checked)) > label,
  #main:not(:has(.product.page)) #side_menu_cat > li.nested.current + li.nested:has(> input:checked) > label {
    border-radius: 22px 22px 0 0; margin-bottom: 0 !important;
  }
  #toolbox #side_menu_cat > li.nested.current > input:not(:checked) ~ ul,
  #main:not(:has(.product.page)) > #macro_menu {
    width: auto !important; height: auto !important; max-height: 55vh;
    overflow-y: auto !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    margin: 0 0 10px !important; padding: 0 !important; box-sizing: border-box;
    background: #fff !important; border: 2px solid #2f6b22; border-top: 1px solid #c6d9bf; border-radius: 0 0 14px 14px;
    box-shadow: 0 6px 14px rgba(0,0,0,.25);
  }
  #toolbox #side_menu_cat > li.nested.current > input:not(:checked) ~ ul { display: block !important; }
  #toolbox #side_menu_cat > li.nested.current > ul > li,
  #main:not(:has(.product.page)) > #macro_menu li {
    display: block !important; float: none !important; width: auto !important; height: auto !important;
    margin: 0 !important; border: 0 !important; background: none !important;
  }
  #toolbox #side_menu_cat > li.nested.current > ul > li > a,
  #main:not(:has(.product.page)) > #macro_menu li a {
    display: block !important; padding: 12px 16px !important; font-size: 15px !important; line-height: 20px !important;
    white-space: normal; text-align: left !important;
    border: 0 !important; border-bottom: 1px solid #eee !important; border-radius: 0 !important; background: none !important;
  }
  #toolbox #side_menu_cat > li.nested.current > ul > li.selected > a,
  #main:not(:has(.product.page)) > #macro_menu li.selected a { background: #2f6b22 !important; color: #fff !important; }
  #toolbox #sidebar a { display: block !important; padding: 11px 8px !important; font-size: 15px !important; line-height: 22px !important; height: auto !important; }

  /* ---------- Testi ---------- */
  #content { font-size: 15px; line-height: 1.5; }
  #content p, #content li, #content td, #content span, #content label { font-size: inherit; }
  #content h3.name, #content h3.name a { font-size: 19px; line-height: 1.3; }
  #content h4.desc { font-size: 15px; line-height: 1.4; width: auto !important; }

  /* ---------- Scheda prodotto: ordine dei blocchi ---------- */
  .product.page {
    display: flex; flex-direction: column;
    width: auto !important; height: auto !important;
  }
  .product.page > h3.name   { order: 1; width: auto !important; }
  .product.page > #prod-images {
    order: 2; float: none !important; width: auto !important;
    text-align: center; margin: 8px 0 !important;
  }
  .product.page > h4.desc   { order: 3; }
  .product.page > .sku_code { order: 4; width: auto !important; }
  .product.page > .content  {
    order: 5; display: flex; flex-direction: column;
    width: auto !important; padding: 0 !important;
  }
  .product.page > .content > .shop { order: -1; }   /* prezzo + acquisto subito */

  /* ---------- Blocco prezzo / acquisto ---------- */
  .product.page .shop {
    width: auto !important; height: auto !important;
    margin: 10px 0 16px !important; padding: 12px !important;
    box-sizing: border-box;
    display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px;
  }
  .product.page .shop > .online-price-container { order: 1; flex: 0 0 100%; }
  .product.page .shop > p.more                  { order: 2; flex: 0 0 auto; }
  .product.page .shop > .price-container        { order: 3; flex: 0 0 auto; }
  .product.page .shop > form                    { order: 4; flex: 0 0 100%; }
  .product.page .shop > p.free_shipping         { order: 5; flex: 0 0 100%; }
  .product.page .shop > *,
  .product.page .shop .online-price-container,
  .product.page .shop form {
    position: static !important; width: auto !important;
    left: auto !important; right: auto !important; top: auto !important;
  }
  #content .product.page .shop .price { font-size: 26px; font-weight: bold; }
  #content .product.page .shop .price_label { font-size: 14px; }
  .product.page .shop .online-price-container { margin: 0 0 14px; height: auto !important; }
  .product.page .shop form > div {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  }
  .product.page .shop form label { display: flex; align-items: center; gap: 8px; }
  .product.page .shop input[name="qty"] {
    width: 70px; height: 44px; font-size: 16px; text-align: center;
  }
  .product.page .shop input.button.cart {
    flex: 1 1 100%; height: 50px; font-size: 18px;
  }
  .product.page .legal_info.buttons a.button,
  .product.page .content > .buttons a.button {
    display: inline-block; padding: 10px 14px; font-size: 15px; margin: 4px 4px 4px 0;
  }

  /* ---------- Contenuti della descrizione (tabelle, immagini dei fornitori) ---------- */
  .product.page .content img { max-width: 100% !important; height: auto !important; }
  .product.page .content table {
    display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    width: auto !important; height: auto !important; border-collapse: collapse;
  }
  .product.page .content table td, .product.page .content table th {
    font-size: 14px !important; padding: 6px 8px !important; white-space: normal;
  }
  .product.page .content iframe, .product.page .content video { max-width: 100% !important; }

  /* ---------- Prodotti "su preventivo": campo email + "Richiedi preventivo" ---------- */
  .product.page > .content > form[action*="quotation"] { order: -1; margin: 10px 0 16px !important; }
  form[action*="quotation"] { display: flex !important; flex-wrap: wrap; gap: 10px; width: auto !important; }
  form[action*="quotation"] input[type="email"] {
    flex: 1 1 100%; width: 100% !important; box-sizing: border-box;
    height: 44px !important; font-size: 16px !important; padding: 6px 10px; margin: 0 !important;
  }
  form[action*="quotation"] input[type="submit"] {
    flex: 1 1 100%; width: 100% !important; height: 48px !important; font-size: 17px !important; margin: 0 !important;
  }

  /* ---------- Elenco prodotti (categorie e sotto la scheda): schede ---------- */
  #products { width: auto !important; padding: 0 !important; margin: 0 !important; }
  #products li.prod {
    width: auto !important; height: auto !important;
    display: grid; grid-template-columns: 96px 1fr; column-gap: 12px;
    align-items: start;
    margin: 0 0 14px !important; padding: 12px !important;
    background: rgba(255,255,255,.88) !important; border-radius: 10px;
    box-sizing: border-box;
  }
  #products li.prod > * {
    position: static !important; float: none !important;
    width: auto !important; left: auto !important; right: auto !important;
    top: auto !important; bottom: auto !important; margin: 0 !important;
  }
  #products li.prod > a.img       { grid-column: 1; grid-row: 1 / span 3; }
  #products li.prod > a.img img   { width: 96px; height: auto; float: none !important; }
  #products li.prod > h3.name     { grid-column: 2; }
  #products li.prod > p.desc      { grid-column: 2; margin-top: 4px !important; }
  #products li.prod > p.more      { grid-column: 2; margin-top: 6px !important; }
  /* seconda immagine = inizio di una nuova serie: piccola in alto a destra, solo se esiste
     (il sito nasconde con .js_hidden quelle che non esistono) */
  #products li.prod { position: relative !important; }
  #products li.prod p.desc a.img { display: none !important; }
  #products li.prod p.desc a.img:has(img:not(.js_hidden)) {
    display: block !important; position: absolute !important; top: 12px; right: 12px;
    width: 54px; height: 54px; overflow: hidden;
    background: #fff; border: 1px solid #ddd; border-radius: 6px;
  }
  #products li.prod p.desc a.img img { width: 52px !important; height: auto !important; }
  #products li.prod:has(p.desc a.img img:not(.js_hidden)) > h3.name { padding-right: 62px !important; }
  #products li.prod > .online-price-container { grid-column: 2; height: auto !important; }
  #products li.prod .online-price {                   /* bollino "Prezzo online": nel flusso, non sopra il titolo */
    position: static !important; display: inline-block; transform: scale(.7); transform-origin: left center;
    margin: 2px 0 -6px !important;
  }
  #products li.prod > .details    { display: none !important; }   /* il nome è già il link */
  #products li.prod > form        { grid-column: 1 / -1; margin-top: 10px !important; }
  #content #products li.prod h3.name,
  #content #products li.prod h3.name a { font-size: 16px; line-height: 1.3; }
  #content #products li.prod p.desc { font-size: 14px; line-height: 1.4; }
  #content #products li.prod .price { font-size: 20px; font-weight: bold; }
  #products li.prod form > div { display: flex; align-items: center; gap: 10px; }
  #products li.prod form label {
    display: flex; align-items: center; gap: 6px; white-space: nowrap;
    margin: 0 !important; color: #333; font-size: 14px;
  }
  #products li.prod input[name="qty"] {
    width: 56px; height: 44px; font-size: 16px; text-align: center;
  }
  #products li.prod input.button.cart {
    flex: 1; min-width: 0; height: 44px; font-size: 16px; margin: 0 !important;
  }

  /* ---------- Carrello (/cart/show): tabella -> schede ---------- */
  #content > #cart_country_chooser { display: none; }   /* doppione della barra fissa */
  #cart-table { display: flex !important; flex-direction: column; width: auto !important; border: 0 !important; }
  #cart-table thead { display: none !important; }
  #cart-table tbody { order: 1; display: block; }
  #cart-table tfoot { order: 2; display: block; margin-top: 10px; }
  #cart-table tr, #cart-table th, #cart-table td {
    display: block; width: auto !important; box-sizing: border-box;
  }
  #cart-table tbody tr {
    background: rgba(255,255,255,.92); border-radius: 10px;
    padding: 10px 12px; margin-bottom: 12px;
  }
  #cart-table tbody td {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0 !important; border: 0 !important; border-top: 1px solid #e3e3e3 !important;
    text-align: right !important; font-size: 15px;
  }
  #cart-table tbody td::before { color: #555; text-align: left; padding-right: 10px; }
  #cart-table tbody td.prod {
    border-top: 0 !important; text-align: left !important; gap: 10px; padding-top: 0 !important;
  }
  #cart-table td.prod a { flex: 1; order: 1; font-size: 16px; font-weight: bold; }
  #cart-table td.prod button.delete.x {
    order: 2; float: none !important; flex: 0 0 auto;
    width: 40px !important; height: 40px !important; font-size: 18px; border-radius: 8px;
  }
  #cart-table td button.minus, #cart-table td button.plus {
    width: 44px !important; height: 44px !important; font-size: 22px; border-radius: 8px;
  }
  #cart-table td input.int {
    width: 56px !important; height: 44px !important; font-size: 16px; text-align: center; margin: 0 6px;
  }
  #cart-table tbody td:last-child { font-size: 18px; font-weight: bold; }
  #cart-table tfoot tr {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; background: rgba(255,255,255,.85);
  }
  #cart-table tfoot tr:first-child { border-radius: 10px 10px 0 0; }
  #cart-table tfoot tr:last-child  { border-radius: 0 0 10px 10px; }
  #cart-table tfoot th, #cart-table tfoot td {
    text-align: left !important; padding: 0 !important; border: 0 !important; font-size: 15px;
  }
  #cart-table tfoot th { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  #cart-table tfoot input#coupon { width: 140px !important; height: 40px !important; font-size: 16px; }
  #cart-table tfoot tr.total th, #cart-table tfoot tr.total td { font-size: 19px; font-weight: bold; }

  /* etichette delle righe (carrello e riepilogo ordine), nelle 5 lingue */
  html:lang(it) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(2)::before { content: "Articoli"; }
  html:lang(it) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(3)::before { content: "Unità"; }
  html:lang(it) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(4)::before { content: "Prezzo x unità"; }
  html:lang(it) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(5)::before { content: "Prezzo"; }
  html:lang(it) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(6)::before { content: "IVA"; }
  html:lang(it) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(7)::before { content: "Importo"; }
  html:lang(en) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(2)::before { content: "Packages"; }
  html:lang(en) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(3)::before { content: "Nr of pieces"; }
  html:lang(en) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(4)::before { content: "Unit price"; }
  html:lang(en) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(5)::before { content: "Price"; }
  html:lang(en) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(6)::before { content: "VAT"; }
  html:lang(en) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(7)::before { content: "Amount"; }
  html:lang(fr) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(2)::before { content: "Packs"; }
  html:lang(fr) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(3)::before { content: "Nombre de pièces"; }
  html:lang(fr) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(4)::before { content: "Prix unitaire"; }
  html:lang(fr) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(5)::before { content: "Prix"; }
  html:lang(fr) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(6)::before { content: "TVA"; }
  html:lang(fr) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(7)::before { content: "Montant"; }
  html:lang(de) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(2)::before { content: "Verpackungen"; }
  html:lang(de) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(3)::before { content: "Stückzahl"; }
  html:lang(de) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(4)::before { content: "Einzelpreis"; }
  html:lang(de) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(5)::before { content: "Preis"; }
  html:lang(de) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(6)::before { content: "USt"; }
  html:lang(de) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(7)::before { content: "Betrag"; }
  html:lang(es) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(2)::before { content: "Artículos"; }
  html:lang(es) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(3)::before { content: "Unidad"; }
  html:lang(es) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(4)::before { content: "Precio por unidad"; }
  html:lang(es) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(5)::before { content: "Precio"; }
  html:lang(es) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(6)::before { content: "IVA"; }
  html:lang(es) :is(#cart-table, #order-summary, #order-table) tbody td:nth-child(7)::before { content: "Importe"; }

  /* pulsanti del carrello: "Ordina" grande e per primo */
  #content form > .buttons {
    display: flex; flex-direction: column; gap: 10px; width: auto !important; margin-top: 16px;
  }
  #content form > .buttons .button {
    display: block; width: 100% !important; box-sizing: border-box; text-align: center;
    height: auto !important; padding: 13px !important; font-size: 16px !important; margin: 0 !important;
  }
  #content form > .buttons #btn-submit { order: -1; padding: 16px !important; font-size: 19px !important; font-weight: bold; }
  #content form > .buttons #btn-clear  { order: 2; }

  /* ---------- Riepilogo ordine (/orders/submit) e dettaglio ordine (/orders/show) ---------- */
  #content form:has(#order-summary) { display: flex; flex-direction: column; }
  #content form:has(#order-summary) > .confirm  { order: 1; }   /* condizioni PRIMA della tabella */
  #content form:has(#order-summary) > .buttons  { order: 2; margin-bottom: 16px !important; }
  #content form:has(#order-summary) > #order-summary { order: 3; }
  :is(#order-summary, #order-table) { display: flex !important; flex-direction: column; width: auto !important; border: 0 !important; }
  :is(#order-summary, #order-table) thead { order: 0; } :is(#order-summary, #order-table) tbody { order: 1; } :is(#order-summary, #order-table) tfoot { order: 2; }
  :is(#order-summary, #order-table) thead, :is(#order-summary, #order-table) tbody, :is(#order-summary, #order-table) tfoot,
  :is(#order-summary, #order-table) tr, :is(#order-summary, #order-table) td, :is(#order-summary, #order-table) th {
    display: block; width: auto !important; box-sizing: border-box;
  }
  :is(#order-summary, #order-table) thead tr.summary {
    background: rgba(255,255,255,.92); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px;
  }
  :is(#order-summary, #order-table) thead tr.summary > td { padding: 4px 0 !important; border: 0 !important; font-size: 15px; }
  :is(#order-summary, #order-table) thead tr.summary > td div { width: auto !important; margin-bottom: 8px; }
  :is(#order-summary, #order-table) .payment_method p.notes { font-size: 14px; line-height: 1.45; word-break: break-word; text-align: left !important; }
  :is(#order-summary, #order-table) tbody tr:has(th) { display: none !important; }      /* intestazioni colonne */
  :is(#order-summary, #order-table) tbody tr {
    background: rgba(255,255,255,.92); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px;
  }
  :is(#order-summary, #order-table) tbody td {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0 !important; border: 0 !important; border-top: 1px solid #e3e3e3 !important;
    text-align: right !important; font-size: 15px;
  }
  :is(#order-summary, #order-table) tbody td:first-child { border-top: 0 !important; text-align: left !important; font-weight: bold; font-size: 16px; }
  :is(#order-summary, #order-table) tbody td::before { color: #555; text-align: left; padding-right: 10px; font-weight: normal; }
  :is(#order-summary, #order-table) tbody td:last-child { font-size: 18px; font-weight: bold; }
  :is(#order-summary, #order-table) tfoot { display: flex; flex-direction: column; margin-bottom: 12px; }
  :is(#order-summary, #order-table) tfoot tr {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px;
    padding: 8px 12px; background: rgba(255,255,255,.85);
  }
  :is(#order-summary, #order-table) tfoot tr:first-child { border-radius: 10px 10px 0 0; }
  :is(#order-summary, #order-table) tfoot tr:last-child  { border-radius: 0 0 10px 10px; }
  :is(#order-summary, #order-table) tfoot th { flex: 0 0 100%; text-align: left !important; padding: 0 !important; border: 0 !important; font-size: 15px; }
  :is(#order-summary, #order-table) tfoot td { padding: 0 !important; border: 0 !important; font-size: 14px; }
  :is(#order-summary, #order-table) tfoot td:last-child { font-weight: bold; }
  :is(#order-summary, #order-table) tfoot tr.total td:last-child { font-size: 20px; }
  :is(#order-summary, #order-table) tfoot td:nth-of-type(2)::before { content: "IVA "; color: #555; }
  #order-table thead tr:not(.summary) { border: 0 !important; background: none !important; }   /* riga storico */
  #order-table #history { padding: 0 !important; border: 0 !important; background: none !important; }
  #order-table td.status { text-align: center !important; font-size: 17px !important; }

  #content form > .confirm { width: auto !important; margin: 4px 0 6px; }
  #content form > .confirm label {
    display: flex; align-items: flex-start; gap: 6px; white-space: normal;
    font-size: 15px; line-height: 1.4; padding: 10px 12px;
    background: rgba(255,255,255,.85); border-radius: 10px;
  }
  #content form > .confirm label input { flex: 0 0 auto; margin: 0 4px 0 0 !important; width: 22px; height: 22px; }
  #content form > .buttons #btn-confirm {
    order: -1; padding: 16px !important; font-size: 19px !important; font-weight: bold;
  }

  /* ---------- Elenco "I tuoi ordini" (/orders/mine): righe -> schede ---------- */
  #orders { display: flex !important; flex-direction: column; width: auto !important; border: 0 !important; }
  #orders tbody { order: 1; } #orders tfoot { order: 2; }
  #orders thead { display: none !important; }
  #orders tbody, #orders tfoot, #orders tfoot tr, #orders tfoot th { display: block; width: auto !important; }
  #orders tbody tr {
    position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
    background: rgba(255,255,255,.92); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
  }
  #orders tbody td { display: block; padding: 0 !important; border: 0 !important; font-size: 15px; background: none !important; text-align: left !important; }
  #orders tbody td:nth-child(1) { grid-column: 1; grid-row: 1; font-size: 17px; font-weight: bold; }
  #orders tbody td:nth-child(1)::before { content: "#"; }
  #orders tbody td:nth-child(1) a::after { content: ""; position: absolute; inset: 0; }   /* tutta la scheda apre l'ordine */
  #orders tbody td:nth-child(6) {
    grid-column: 2; grid-row: 1; justify-self: end; align-self: start;
    font-size: 13px; padding: 2px 10px !important; border-radius: 12px !important;
    background: #eef3e6 !important; border: 1px solid #c9d9b5 !important;
  }
  #orders tbody td:nth-child(2) { grid-column: 1; grid-row: 2; }
  #orders tbody td:nth-child(5) { grid-column: 2; grid-row: 2; justify-self: end; font-size: 17px; font-weight: bold; }
  #orders tbody td:nth-child(5)::before { content: "€ "; }
  #orders tbody td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; font-size: 13px; color: #666; }
  #orders tbody td:nth-child(3) { display: none; }                                   /* ultima modifica */
  #orders tfoot th { border: 0 !important; padding: 6px 0 !important; text-align: center !important; }
  #orders .pagination { width: auto !important; font-size: 16px; }
  #orders .pagination a, #orders .pagination strong { display: inline-block; padding: 10px 12px; }

  /* ---------- Moduli (registrazione, accesso, dati ordine) ---------- */
  #content form fieldset {
    width: auto !important; margin: 0 0 14px !important; padding: 10px 12px 14px !important;
    box-sizing: border-box; min-width: 0;
  }
  #content form fieldset legend { font-size: 17px; padding: 0 6px; }
  #content form .field_group {
    width: auto !important; height: auto !important; overflow: visible;
    padding: 4px 0 !important;
  }
  #content form .field {
    float: none !important; width: auto !important; height: auto !important;
    margin: 0 0 12px !important;
  }
  #content form .field label { display: block; font-size: 15px; margin-bottom: 4px; }
  #content form input[type="text"]:not(.int):not(#coupon), #content form input[type="email"],
  #content form input[type="password"], #content form input[type="tel"],
  #content form input[type="number"]:not([name="qty"]), #content form select, #content form textarea {
    width: 100% !important; max-width: 100%; box-sizing: border-box;
    height: 44px; font-size: 16px !important;          /* 16px: niente zoom automatico su iPhone */
    padding: 6px 10px; margin: 0 0 6px !important;
  }
  #content form textarea { height: auto; min-height: 90px; }
  #content form input[type="radio"], #content form input[type="checkbox"] {
    width: 22px; height: 22px; margin: 0 8px 0 0; vertical-align: middle;
  }
  #content form .field_group > label, #content form fieldset > div > label {
    display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; margin-right: 14px;
  }
  #content form fieldset > div > label {             /* privacy / newsletter: testo a capo */
    display: flex; align-items: flex-start; gap: 4px; white-space: normal;
    margin-right: 0; padding: 8px 0; line-height: 1.4;
  }
  #content form fieldset > div > label input { flex: 0 0 auto; margin-top: 0; }
  #content form fieldset p { font-size: 14px; }
  #content form > .buttons button, #content form > .buttons a.button {
    display: block; width: 100% !important; box-sizing: border-box; text-align: center;
    height: auto !important; padding: 13px !important; font-size: 16px !important; margin: 0 !important;
  }
  #content form > .buttons #btn-continue, #content form > .buttons #btn-save,
  #content form > .buttons #btn-next {
    order: -1; padding: 16px !important; font-size: 19px !important; font-weight: bold;
  }
  /* compilazione ordine (/orders/fill): giorni di consegna e metodo di pagamento */
  #order_form fieldset > label { display: inline-flex; align-items: center; min-height: 44px; margin-right: 10px; font-size: 15px; }
  #order_form fieldset > input[type="checkbox"] + label { margin-right: 12px; }
  #order_form fieldset > label select { width: auto !important; margin: 0 6px !important; }
  #pm #total { font-size: 22px; font-weight: bold; margin: 4px 0 8px; }
  #pm ul { margin: 0 !important; padding: 0 !important; list-style: none; }
  #pm ul li { list-style: none; margin: 0 0 8px; height: auto !important; }
  #pm ul li label {
    display: flex !important; align-items: center; gap: 10px; min-height: 48px;
    padding: 6px 12px; box-sizing: border-box; font-size: 16px;
    background: rgba(255,255,255,.85); border: 1px solid #c9d9b5; border-radius: 10px;
  }
  #pm ul li label input[type="radio"] { margin: 0 !important; flex: 0 0 auto; }
  #pm ul li label span { flex: 1; min-width: 0; white-space: normal; }
  #pm ul li label:has(input:checked) { border: 2px solid #2a8844; background: #f1fbe9; }
  #order_form .note, #order_form .note strong { font-size: 13px; line-height: 1.4; }
  #order_form .field .value { font-size: 16px; font-weight: bold; }

  #content > .login { width: auto !important; text-align: center; margin-bottom: 10px; }
  #content > .login a.button {
    display: block; height: auto !important; line-height: 1.3 !important;
    padding: 12px !important; font-size: 17px !important;
  }
  #content > h3 { font-size: 15px; line-height: 1.4; width: auto !important; }

  /* pagina di accesso (/users/login) */
  #content > .join { width: auto !important; text-align: center; margin-bottom: 12px; }
  #content > .join a.button {
    display: block; height: auto !important; line-height: 1.3 !important;
    padding: 12px !important; font-size: 16px !important;
  }
  #loginbox {
    width: auto !important; margin: 0 !important; left: auto !important;
    padding: 10px 12px 14px !important; box-sizing: border-box;
  }
  #loginbox legend { font-size: 17px; }
  #loginbox form, #loginbox .field, #loginbox .buttons {
    width: auto !important; height: auto !important; margin: 0 0 12px !important; float: none !important;
  }
  #loginbox .field label { display: block; font-size: 15px; margin-bottom: 4px; }
  #loginbox input#username, #loginbox input#password {
    width: 100% !important; box-sizing: border-box; height: 44px; font-size: 16px; padding: 6px 10px;
  }
  #loginbox .buttons { display: flex; flex-direction: column; gap: 12px; }
  #loginbox .buttons > label {
    float: none !important; width: auto !important; height: auto !important;
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px;
  }
  #loginbox .buttons > label input { width: 22px; height: 22px; }
  #loginbox .buttons > label a { flex: 0 0 100%; padding: 8px 0; }
  #loginbox .buttons > label br { display: none; }
  #loginbox input#login {
    order: -1; width: 100% !important; height: auto !important;
    padding: 15px !important; font-size: 19px !important; font-weight: bold; margin: 0 !important;
  }

  /* ---------- Conferma ordine: casella condizioni in evidenza ---------- */
  #content form > .confirm label { margin: 0 !important; background: #fff !important; border: 2px solid #b02a10; font-weight: bold; }
  #content form > .confirm label:has(input:checked) { border-color: #2a8844; background: #f1fbe9 !important; }
  :is(#order-summary, #order-table) tfoot td { background: none !important; }
  /* ---------- Registrazione: casella privacy in evidenza ---------- */
  #content form label:has(> input[name="privacy"]) { padding: 12px 14px !important; background: #fff4f1 !important; border: 2px solid #b02a10; border-radius: 10px; align-items: center !important; gap: 10px !important; }
  #content form label:has(> input[name="privacy"]:checked) { border-color: #2f6b22; background: #eef6e9 !important; }
  #content form label > input[name="privacy"] { width: 24px; height: 24px; margin: 0 !important; accent-color: #2f6b22; }
  #content form fieldset > div > label:has(> input:is([name="privacy"],[name="newsletter"])) { margin-left: 0 !important; }


  /* ---------- Paga ordine: scelta del metodo di pagamento ---------- */
  form[action*="payment_method"] ul,
  form[action*="payment_method"] ul li { margin: 0 !important; padding: 0 !important; list-style: none; }
  form[action*="payment_method"] ul { margin-top: 10px !important; }
  form[action*="payment_method"] ul li { margin-bottom: 8px !important; height: auto !important; }
  #content form[action*="payment_method"] ul li label {
    display: flex !important; align-items: center; gap: 10px; min-height: 48px; margin: 0 !important;
    padding: 6px 12px; box-sizing: border-box; font-size: 16px; white-space: normal;
    background: rgba(255,255,255,.85); border: 1px solid #c9d9b5; border-radius: 10px;
  }
  form[action*="payment_method"] ul li label input[type="radio"] { margin: 0 !important; flex: 0 0 auto; }
  form[action*="payment_method"] ul li label:has(input:checked) { border: 2px solid #2a8844; background: #f1fbe9; }
  form[action*="payment_method"] ul li label:has(input:disabled) { opacity: .6; font-size: 14px; }

  /* ---------- Pagamento con carta (SumUp) ---------- */
  #content > h3:has(> a[href*="/orders/show/"]) { font-size: 17px; }
  #content h4.order-total { font-size: 22px; font-weight: bold; margin: 2px 0 10px; }
  #content h4.order-total .label { font-size: 15px; font-weight: normal; }
  #sumup-card fieldset { background: none !important; }
  #sumup-card form button:not([data-testid="apple-pay-button"]) {   /* "Paga" lime come "Conferma ordine" */
    background: #c5e80e !important; color: #138a13 !important; font-weight: bold; border-radius: 10px;
  }

  /* ---------- Piè di pagina ---------- */
  #static_menu a { display: inline-block; padding: 8px 6px; }
}

/* Compilazione ordine: sezione "Orari di consegna" nascosta (telefono e desktop).
   I valori predefiniti (lun-ven, 09-19) vengono comunque inviati con l'ordine. */
#order_form fieldset:has(input[name^="weekmask"]) { display: none !important; }
/* Orari e giorni di consegna nascosti anche nel riepilogo e nel dettaglio ordine */
.delivery_time { display: none !important; }

/* Istruzioni pagamento (es. bonifico): niente corsivo, a capo e TAB rispettati, riquadro (telefono e desktop).
   In gestione lingue: "IBAN:" + TAB + valore per allineare i valori in colonna. */
.payment_method .notes {
  font-style: normal !important; font-size: 15px !important; line-height: 1.5; color: #222;
  white-space: pre-wrap; tab-size: 15ch; overflow-wrap: anywhere;
  background: #fff; border: 1px solid #d6e3cc; border-left: 4px solid #2f6b22; border-radius: 8px;
  padding: 10px 14px !important; margin: 14px 0 6px !important; max-width: 520px; box-sizing: border-box;
}
