@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
  
  body#index .vybes-home-desktop {
    display: none !important;
  }

  body#index .vybes-home-smartphone {
    margin-top: 0;
  }

  body#index .vybes-home-mobile-entry {
    position: relative;
    z-index: 2;
    margin-top: -18px;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  body#index .vybes-home-mobile-entry__media {
    display: block;
    overflow: hidden;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    text-decoration: none !important;
  }

  body#index .vybes-home-mobile-entry__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10; /* Forza una proporzione armonica e stabile */
    object-fit: cover;
    object-position: center;
  }

  body#index .vybes-home-mobile-entry__hero {
    order: 2;
    margin: 0 10px;
    padding: 24px 18px 20px;
    border: 1px solid #d9d0ff;
    border-radius: 26px;
    background:
      radial-gradient(circle at top right, rgba(117, 92, 255, 0.14), transparent 34%),
      linear-gradient(180deg, #fff8fb 0%, #ffffff 100%);
  }

  body#index .vybes-home-mobile-entry__eyebrow {
    margin: 0 0 10px;
    color: #d9296a;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  body#index .vybes-home-mobile-entry__title {
    margin: 0;
    color: #0d0d0d;
    font-size: 1.72rem;
    font-weight: 700;
    line-height: 1.04;
  }

  body#index .vybes-home-mobile-entry__subtitle {
    margin: 12px 0 0;
    color: #231f1c;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
  }

  body#index .vybes-home-mobile-entry__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  body#index .vybes-home-mobile-entry__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #d9296a;
    border-radius: 999px;
    background: #d9296a;
    color: #fff !important;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 12px 24px rgba(117, 92, 255, 0.2);
  }

  body#index .vybes-home-mobile-entry__button--ghost {
    border-color: #d9d0ff;
    background: #fff;
    color: #231f1c !important;
    box-shadow: none;
  }

  body#index .vybes-home-mobile-entry__button-icon,
  body#index .vybes-home-mobile-entry__button-icon i {
    color: inherit !important;
    font-size: 16px;
    line-height: 1;
  }

  body#index .vybes-home-mobile-entry__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
  }

  body#index .vybes-home-mobile-entry__trust span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid #ead7df;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #231f1c;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
  }

  body#index .vybes-home-mobile-entry__section {
    order: 3;
    margin-top: 20px;
    padding: 0 2px;
  }

  body#index .vybes-home-mobile-entry__section--categories {
    order: 1;
    margin: 0;
    padding: 0;
  }

  body#index .vybes-home-mobile-entry__section-head h2 {
    margin: 0;
    color: #0d0d0d !important;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.2;
  }

  body#index .vybes-home-mobile-entry__section-head p {
    margin: 7px 0 0;
    color: #6a605a !important;
    font-size: 0.8rem;
    line-height: 1.5;
  }

  body#index .vybes-home-mobile-entry__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 8px;
    margin: 0 10px 12px;
  }

  body#index a, 
  body#index button, 
  body#index .vybes-home-mobile-entry__card {
    -webkit-tap-highlight-color: transparent; /* Rimuove il flash grigio di Safari */
  }

  /* Opzionale: aggiungi un feedback di tocco personalizzato e leggero */
  body#index .vybes-home-mobile-entry__card:active {
    opacity: 0.7;
    transition: opacity 0.1s ease;
  }

  body#index .vybes-home-mobile-entry__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #231f1c !important;
    text-align: center;
    text-decoration: none !important;
  }

  body#index .vybes-home-mobile-entry__card-label {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
  }

  body#index .vybes-home-mobile-entry__card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(110px, calc((100vw - 36px) / 3));
    height: min(110px, calc((100vw - 36px) / 3));
    overflow: hidden;
    border: 2px solid #d9297a;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
  }

  body#index .vybes-home-mobile-entry__card-icon img {
    display: block;
    width: fit-content;
    height: -webkit-fill-available;
    transition: transform 180ms ease-out;
  }

  body#index .vybes-home-mobile-entry__card:hover .vybes-home-mobile-entry__card-icon img,
  body#index .vybes-home-mobile-entry__card:focus-visible .vybes-home-mobile-entry__card-icon img {
    transform: scale(1.07);
  }

  body#index .vybes-home-mobile-entry__catalog-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 60px;
    margin: 30px 0px;
    padding: 0 18px;
    border-radius: 10px;
    background: #d9297a;
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
  }

  body#index .vybes-home-mobile-entry__catalog-cta i {
    color: inherit !important;
    font-size: 19px;
    line-height: 1;
  }

  body#index .vybes-home-mobile-deferred {
    content-visibility: auto;
    contain-intrinsic-size: 1px 900px;
  }

  body#index .vybes-home-mobile-entry__stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
  }

  body#index .vybes-home-mobile-entry__quicklink {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid #f3f3f3;
    border-radius: 16px;
    background: linear-gradient(135deg, #fafafa 0%, #f3f3f3 100%);
    color: #231f1c !important;
    text-decoration: none !important;
  }

  body#index .vybes-home-mobile-entry__quicklink span {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
  }

  body#index .vybes-home-mobile-entry__quicklink i {
    color: #d9296a !important;
    font-size: 20px;
    line-height: 1;
  }

  body#index .vybes-home-mobile-entry__quicklink-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #fff;
    border-radius: 12px;
    background: #fff;
  }

  body#index .vybes-home-mobile-entry__quicklink-icon i {
    color: #d9297a !important;
    font-size: 18px;
  }

  body#index #infobox,
  body#index #tptnsubbanner,
  body#index #tptnbotbanner {
    display: none !important;
  }

  body#index .page-home > .tptncarousel.tptnprods,
  body#index .vybes-home-smartphone > .tptncarousel.tptnprods,
  body#index .vybes-home-smartphone > #tptnbrands {
    margin-top: 22px;
    padding: 0 15px;
  }

  body#index .vybes-home-smartphone > .tptncarousel.tptnprods .crsl-title,
  body#index .vybes-home-smartphone > #tptnbrands .crsl-title {
    align-items: flex-end;
    margin-bottom: 10px;
  }

  body#index .vybes-home-smartphone > .tptncarousel.tptnprods .crsl-title h2,
  body#index .vybes-home-smartphone > .tptncarousel.tptnprods .crsl-title h3,
  body#index .vybes-home-smartphone > .tptncarousel.tptnprods .crsl-title h4,
  body#index .vybes-home-smartphone > #tptnbrands .crsl-title h4 {
    font-size: 1.05rem;
  }

  body#index .vybes-home-smartphone > .tptncarousel.tptnprods .crsl-link,
  body#index .vybes-home-smartphone > #tptnbrands .crsl-link {
    display: none;
  }
}

@media (max-width: 1199px) {
  #header .mobile-header {
    position: relative;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #header .mobile-header .mobile-header-top {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 15px 8px !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #header .mobile-header .mobile-header-top > #_mobile_shop-logo.shop-logo {
    flex: 0 0 20% !important;
    max-width: 20% !important;
    min-width: 56px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  #header .mobile-header .mobile-header-top > #_mobile_shop-logo.shop-logo :is(a, picture, img) {
    display: block !important;
    max-width: 100% !important;
  }

  #header .mobile-header .mobile-header-top > #_mobile_shop-logo.shop-logo img {
    max-height: 34px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  #header .mobile-header .mobile-header-top > #_mobile_tptnsearch.tptnsearch {
    display: block !important;
    flex: 1 1 80% !important;
    max-width: 80% !important;
    min-width: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
  }

  #header .mobile-header .mobile-header-top > #_mobile_tptnsearch.tptnsearch #searchbox {
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #header .mobile-header-bottom {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
  }

  #header .mobile-header-bottom > .tptnmobilemenu,
  #header .mobile-header-bottom > .tptnheaderlinks,
  #header .mobile-header-bottom > .user-info,
  #header .mobile-header-bottom > .tptncart {
    flex: 1 1 25%;
    max-width: 25%;
    min-width: 0;
  }

  #header .mobile-header-bottom .m-toggle {
    width: 100%;
    min-height: 58px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 0;
    border: 0;
    background: transparent;
  }

  #header .mobile-header-bottom .m-toggle .material-icons {
    font-size: 22px;
    line-height: 1;
  }

  #header .mobile-header-bottom .m-toggle-title {
    display: block !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    line-height: 1.1;
    text-align: center;
  }

  #header .mobile-header-bottom .tptnheaderlinks {
    padding-left: 0 !important;
  }

  /* Native theme contract: page < overlay (103) < open drawers (104). */
  .tptn-overlay {
    z-index: 103;
  }

  #search_filters_wrapper .vybes-facets {
    border-radius: 0;
  }

  #search_filters_wrapper .block-title {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  #search_filters_wrapper .vybes-facet {
    padding-left: 14px;
    padding-right: 14px;
  }

  #search_filters_wrapper .vybes-facet__toggle {
    padding-top: 14px;
    padding-bottom: 12px;
  }

  #search_filters_wrapper .vybes-facet--compact .vybes-facet__link {
    font-size: 0.8rem;
  }

  #search_filters_wrapper .vybes-facet__more {
    min-height: 38px;
    margin-bottom: 14px;
  }

  .vybes-products-selection .hidden-sm-down .filter-button {
    display: none !important;
  }

  /* Ripristina il corretto allineamento di immagine e testo nella modale del carrello */
  #blockcart-modal .modal-body .divide-right .row.d-flex {
      display: flex !important;
      flex-direction: row !important;
      flex-wrap: nowrap !important;
      align-items: center !important;
      width: 100% !important;
  }

  #blockcart-modal .modal-body .divide-right .col-md-5 {
      flex: 0 0 41.666667% !important;
      max-width: 41.666667% !important;
      width: 41.666667% !important;
      padding-right: 15px !important;
  }

  #blockcart-modal .modal-body .divide-right .col-md-7 {
      flex: 0 0 58.333333% !important;
      max-width: 58.333333% !important;
      width: 58.333333% !important;
      padding-left: 15px !important;
  }

}

@media (max-height: 720px) {
  body#index .vybes-home-mobile-entry {
    padding: 6px 8px 0 8px; /* Compatta lo spazio interno */
  }
  
  body#index .vybes-home-mobile-entry__hero {
    padding: 14px 14px 12px; /* Riduce il padding del box di testo centrale */
  }

  body#index .vybes-home-mobile-entry__title {
    font-size: 1.4rem; /* Rimpicciolisce leggermente il titolo */
  }

  body#index .vybes-home-mobile-entry__card-icon {
    /* Riduce il diametro massimo da 110px a 85px per non farlo tagliare */
    width: min(85px, calc((100vw - 36px) / 3));
    height: min(85px, calc((100vw - 36px) / 3));
  }
  
  body#index .vybes-home-mobile-entry__catalog-cta {
    min-height: 46px; /* Ottimizza lo spessore del pulsante finale */
  }
}

