/* ==========================================================================
   Maxisoft Moderno - look piu' attuale su Hummingbird: spazi ampi, angoli arrotondati,
   ombre leggere, font di sistema, colore del marchio (azzurro Maxisoft) con accenti scuri.
   I contenuti (testi, titoli, SEO) sono identici al tema Classico.
   ========================================================================== */

:root {
  --mx-primary: #0a84ff;
  --mx-primary-dark: #0067d1;
  --mx-ink: #14202b;
  --mx-muted: #5b6b79;
  --mx-surface: #ffffff;
  --mx-bg: #f5f8fb;
  --mx-line: #e3eaf1;
  --mx-radius: 14px;
  --mx-shadow: 0 6px 24px rgba(20, 32, 43, .07);
  --mx-shadow-hover: 0 10px 30px rgba(20, 32, 43, .14);
  --mx-footer: #0e1b26;
  --mx-footer-bottom: #0a141c;
  --mx-footer-text: #a6b6c4;

  --bs-primary: var(--mx-primary);
  --bs-primary-rgb: 10, 132, 255;
  --bs-link-color: var(--mx-primary);
  --bs-link-color-rgb: 10, 132, 255;
  --bs-link-hover-color: var(--mx-primary-dark);
  --bs-link-hover-color-rgb: 0, 103, 209;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--mx-ink);
  --bs-body-color-rgb: 20, 32, 43;
  --bs-border-radius: 10px;
}

body { background: var(--mx-bg); color: var(--mx-ink); font-size: 16px; line-height: 1.6; }
h1, h2, h3, h4, .h1, .h2, .h3, .h4 { color: var(--mx-ink); font-weight: 700; letter-spacing: -.01em; }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Pulsanti */
.btn { border-radius: 999px; font-weight: 600; padding: .6rem 1.4rem; transition: transform .15s, box-shadow .15s, background-color .15s; }
.btn-primary { background: var(--mx-primary); border-color: var(--mx-primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--mx-primary-dark); border-color: var(--mx-primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(10, 132, 255, .35); }
.btn-outline-primary { color: var(--mx-primary); border-color: var(--mx-primary); }
.btn-outline-primary:hover { background: var(--mx-primary); color: #fff; }

/* Testata */
.header { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--mx-line); box-shadow: 0 2px 12px rgba(20, 32, 43, .04); }
.header-top { background: var(--mx-ink); color: #fff; font-size: 13px; }
.header-top a { color: #fff; }
.header .logo { max-width: 200px; height: auto; }

/* Schede prodotto */
.product-miniature, .card { border: 1px solid var(--mx-line); border-radius: var(--mx-radius); background: var(--mx-surface); box-shadow: var(--mx-shadow); transition: transform .2s, box-shadow .2s; overflow: hidden; }
.product-miniature:hover { transform: translateY(-4px); box-shadow: var(--mx-shadow-hover); }
.product-miniature .product-miniature__title a, .product-miniature .product-title a { color: var(--mx-ink); font-weight: 600; text-decoration: none; }
.product-miniature .product-price-and-shipping, .price, .product-price { color: var(--mx-primary-dark); font-weight: 700; }

/* Pagina prodotto e contenuti */
.product__card, .page-content, .card-block, #content.page-cms { background: var(--mx-surface); border-radius: var(--mx-radius); }
.page-content.page-cms, .product__card { padding: 1.5rem; box-shadow: var(--mx-shadow); border: 1px solid var(--mx-line); }
.breadcrumb { font-size: 14px; color: var(--mx-muted); }
.form-control, .form-select { border-radius: 10px; border-color: var(--mx-line); padding: .65rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--mx-primary); box-shadow: 0 0 0 .2rem rgba(10, 132, 255, .18); }

/* Piede */
.footer__before { background: var(--mx-surface); border-top: 1px solid var(--mx-line); }
.footer__main { background: var(--mx-footer); color: var(--mx-footer-text); padding: 3rem 0 1.5rem; }
.footer__main a { color: var(--mx-footer-text); }
.footer__main a:hover { color: #fff; }
.footer__main .footer-block__title, .footer__main .footer-block__title a { color: #fff; font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.footer__main p { font-size: 13px; line-height: 1.8; }
.footer-block__list { list-style: none; padding: 0; margin: 0; }
.footer-block__list li { padding: 4px 0; font-size: 14px; }
.footer-certifications img { background: #fff; border-radius: 10px; padding: 6px; max-width: 286px; }
.footer__bottom { background: var(--mx-footer-bottom); color: var(--mx-footer-text); font-size: 13px; padding: 1rem 0; }
.footer__bottom .copyright__payments { max-height: 40px; width: auto; }

/* Selettore del tema (in fondo alla pagina) */
.mx-theme-switch { text-align: center; padding: .6rem 0; font-size: 13px; }
.mx-theme-switch a { color: inherit; opacity: .8; text-decoration: underline; }

/* ---- Home Moderno ---- */
.mxm-hero { padding: 24px 0 8px; }
.mxm-hero__slider { border-radius: 22px; overflow: hidden; box-shadow: var(--mx-shadow-hover); background: #fff; }
.mxm-intro { padding: 28px 0 8px; text-align: center; }
.mxm-intro .home-title { font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; line-height: 1.15; margin: 0 auto; max-width: 900px; background: linear-gradient(90deg, #0a84ff, #5e5ce6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mxm-promo { display: block; height: 100%; border-radius: 22px; overflow: hidden; box-shadow: var(--mx-shadow-hover); background: #0e1b26; transition: transform .2s; }
.mxm-promo:hover { transform: translateY(-4px); }
.mxm-promo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-products .products, .featured-products { margin-top: 12px; }
.featured-products h2, .featured-products .h2 { font-size: 28px; font-weight: 800; }
.mx-slider { container-type: inline-size; position: relative; }
.mx-layers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mx-layer {
  position: absolute;
  left: calc(var(--x) / 770 * 100%);
  top: calc(var(--y) / 450 * 100%);
  margin: 0;
  white-space: nowrap;
  font-family: 'Roboto', Arial, sans-serif;
  font-weight: 900;
  color: var(--c, #fff);
  font-size: calc(var(--s, 25) / 7.7 * 1cqw);
  line-height: calc(60 / 7.7 * 1cqw);
  opacity: 0;
  pointer-events: auto;
}
.carousel-item.active .mx-layer { animation: mxIn var(--t, .5s) cubic-bezier(.19, 1, .22, 1) var(--d, 0s) both; }
@keyframes mxIn { from { opacity: 0; transform: var(--from, none); } to { opacity: 1; transform: none; } }
.mx-lfl { --from: translateX(-60px); }
.mx-lfr { --from: translateX(60px); }
.mx-lfb { --from: translateY(60px); }
.mx-rot { --from: rotate(-60deg) scale(.4); }

.mx-btn {
  display: inline-block;
  background: #fff;
  color: #353535;
  font-weight: 500;
  font-size: calc(11 / 7.7 * 1cqw);
  letter-spacing: calc(2 / 7.7 * 1cqw);
  line-height: calc(25 / 7.7 * 1cqw);
  padding: calc(10 / 7.7 * 1cqw) calc(25 / 7.7 * 1cqw);
  border: 1px solid transparent;
  text-transform: uppercase;
  text-decoration: none;
}
.mx-btn:hover { background: var(--mx-primary); color: #fff; }

/* punti di navigazione rotondi */
.mx-slider .carousel-indicators { margin-bottom: 12px; }
.mx-slider .carousel-indicators [data-bs-target] {
  width: 16px; height: 16px; border-radius: 50%; border: 0; margin: 0 4px; opacity: 1;
  background: rgba(255, 255, 255, .7); box-shadow: 0 0 3px rgba(0, 0, 0, .45);
}
.mx-slider .carousel-indicators .active { background: #4a4a4a; }

/* --------------------------------------------------------------------------
   Home: carosello "I piu venduti" (titolo a sinistra, frecce a destra, 4 schede alla volta)
   -------------------------------------------------------------------------- */
.mx-bestsellers { margin: 10px 0 50px; }
.mx-carousel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.mx-carousel-head .title_block { font-family: var(--mx-font-head); font-size: 24px; font-weight: 500; color: var(--mx-heading); margin: 0; }
.mx-carousel-nav { display: flex; gap: 6px; }
.mx-nav-btn { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--mx-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.mx-nav-btn:hover { background: var(--mx-primary-dark); }

/* Barra scura in alto: tutto chiaro (accesso, carrello, lingua, valuta) */
.header-top, .header-top a, .header-top button, .header-top .header-block__action-btn,
.header-top .header-block__title, .header-top .header-block__icon, .header-top .material-icons,
.header-top .dropdown-toggle, .header-top .btn { color: #fff !important; }
.header-top .header-block__badge { background: var(--mx-primary); color: #fff !important; }
.header-top .header-block__action-btn:hover { opacity: .8; }

/* Ricerca nella testata, a destra del menu */
.mxm-search { display: flex; align-items: center; width: 100%; max-width: 300px; background: var(--mx-bg); border: 1px solid var(--mx-line); border-radius: 999px; padding: 2px 2px 2px 16px; transition: max-width .2s, box-shadow .2s, background .2s; }
.mxm-search:focus-within { max-width: 380px; border-color: var(--mx-primary); box-shadow: 0 0 0 .2rem rgba(10, 132, 255, .15); background: #fff; }
.mxm-search__input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; padding: 7px 0; color: var(--mx-ink); }
.mxm-search__btn { border: 0; background: var(--mx-primary); color: #fff; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; }
.mxm-search__btn:hover { background: var(--mx-primary-dark); }
.mxm-search__btn .material-icons { font-size: 20px; }
@media (min-width: 768px) {
  .header-bottom__row > .mxm-header-search { order: 10; flex: 0 0 auto; width: auto; margin-left: auto; }
  .header-bottom__row > .mxm-header-search .mxm-search { width: 280px; }
}

/* Frecce dello slider: piccole, ai bordi e visibili solo al passaggio del mouse (non coprono i testi) */
.mx-slider .carousel-control-prev, .mx-slider .carousel-control-next {
  width: 36px; height: 36px; top: 50%; bottom: auto; transform: translateY(-50%);
  background: rgba(255, 255, 255, .85); border-radius: 50%; opacity: 0; transition: opacity .2s; z-index: 3;
}
.mx-slider .carousel-control-prev { left: 8px; }
.mx-slider .carousel-control-next { right: 8px; }
.mx-slider:hover .carousel-control-prev, .mx-slider:hover .carousel-control-next { opacity: 1; }
.mx-slider .carousel-control-prev-icon, .mx-slider .carousel-control-next-icon { filter: invert(1); width: 14px; height: 14px; }
@media (hover: none) { .mx-slider .carousel-control-prev, .mx-slider .carousel-control-next { opacity: .85; } }
.mx-layers { z-index: 2; }

/* Testi dello slider: non escono mai dal riquadro, vanno a capo se serve */
.mx-layer { white-space: normal; max-width: calc(100% - (var(--x) / 770 * 100%) - 24px); line-height: 1.15; }

/* Titolo della home su una sola riga (a capo solo su schermi stretti) */
.mxm-intro .home-title { max-width: none; font-size: clamp(18px, 2.7vw, 36px); }
@media (min-width: 768px) { .mxm-intro .home-title { white-space: nowrap; } }

/* Riquadri bianchi delle pagine interne: spazio interno e bordi coerenti */
#content.page-content:not(.page-content--home), .contact-form, .page-not-found, #content.page-cart .cart-grid-body > .card { padding: 1.5rem; border-radius: var(--mx-radius); }
#content.page-content:not(.page-content--home) { box-shadow: var(--mx-shadow); border: 1px solid var(--mx-line); }
.page-content--home { background: transparent; }

/* Carrello: i pulsanti - / + della quantita' restano sulla stessa riga */
.cart-item .input-group, .product-quantity-touchspin, .cart-line-product-actions .input-group { flex-wrap: nowrap; }

/* Telefono: quantita' e pulsante carrello delle schede, fascia newsletter dentro lo schermo */
@media (max-width: 575.98px) {
  .product-miniature .input-group, .product-miniature [class*="quantity"] { flex-wrap: nowrap; }
  .product-miniature .btn { padding: .5rem .8rem; }
  .footer__before .ps-emailsubscription form, .footer__before .input-group, .footer__before .row { max-width: 100%; margin-left: 0; margin-right: 0; }
  .footer__before input[type="email"], .footer__before .form-control { min-width: 0; }
  .footer__before .container, .footer__before .container-md { padding-left: 16px; padding-right: 16px; }
}

/* Albero categorie nella colonna sinistra: riquadro arrotondato, voce corrente in azzurro */
.ps-categorytree .accordion--category { border: 1px solid var(--mx-line); border-radius: var(--mx-radius); padding: 8px 18px; background: #fff; box-shadow: var(--mx-shadow); }
.ps-categorytree .category-tree__item { border: 0; }
.ps-categorytree .category-tree__item + .category-tree__item { border-top: 1px solid var(--mx-line); }
.ps-categorytree .category-tree__item-link { display: block; padding: 12px 0; font-size: 14px; font-weight: 600; color: var(--mx-ink); text-decoration: none; }
.ps-categorytree .category-tree__item.is-current > .category-tree__item-header .category-tree__item-link, .ps-categorytree .category-tree__item-link:hover { color: var(--mx-primary); }

/* "Prodotti visti" nella colonna sinistra */
#left-column .left-block__title, .mx-viewed .left-block__title { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.mx-viewed { margin-top: 28px; }
.mx-viewed__list { list-style: none; margin: 0; padding: 8px 16px; border: 1px solid var(--mx-line); border-radius: var(--mx-radius); background: #fff; box-shadow: var(--mx-shadow); }
.mx-viewed__item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.mx-viewed__item + .mx-viewed__item { border-top: 1px solid var(--mx-line); }
.mx-viewed__image img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; }
.mx-viewed__name { font-size: 13px; line-height: 1.4; color: var(--mx-ink); text-decoration: none; }

/* Telefono: testata su una sola riga (menu, logo, ricerca, account, carrello) */
@media (max-width: 767.98px) {
  .header-bottom__row { flex-wrap: nowrap; align-items: center; }
  .header-bottom__logo { min-width: 0; flex: 1 1 auto; }
  .header .logo { max-width: 130px; }
}

/* Schede prodotto strette (4 per riga): - quantita' + e pulsante carrello restano su una riga */
.product-miniature .input-group, .product-miniature [class*="quantity-button"] { flex-wrap: nowrap; }
.product-miniature .btn { padding-left: .8rem; padding-right: .8rem; }
.product-miniature input[type="number"], .product-miniature .form-control { min-width: 0; }
