/* =============================================
   Somewhere Tours – stili del sito dinamico
   (in aggiunta a custom.css, che resta quello del mockup approvato)
   ============================================= */

/* ---------- Attributo hidden sempre rispettato ---------- */
[hidden] { display: none !important; }

/* =============================================
   Header
   ============================================= */

/* Contatore carrello sull'icona dell'header */
.header-cart-icon {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--border-color);
  color: var(--title-color); font-size: 18px;
}
.sw-cart-count-header {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--theme-color); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
  border-radius: 9px;
}

/* Su mobile: carrello accanto all'hamburger (nel mockup l'icona spariva sotto i 1200px) */
.sw-mobile-actions { align-items: center; gap: 12px; }
.sw-mobile-actions .header-cart-icon { width: 44px; height: 44px; background: #fff; }
@media (max-width: 575px) {
  .sw-hide-xs { display: none; }
}

/* Mega-menu tour: una colonna per categoria, largo quanto il contenitore dell'header */
.header-layout1 .menu-area .th-container { position: relative; }
.header-layout1 .main-menu,
.main-menu > ul > li.sw-mega { position: static; }
.main-menu ul.sub-menu.sw-mega-menu {
  left: 15px; right: 15px;
  width: auto; min-width: 0; max-width: none;
  transform: scaleY(0);
  padding: 28px 8px 22px;
  display: flex;
  flex-direction: row;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,0.13);
  border-radius: 8px;
  z-index: 999;
}
.main-menu ul li:hover ul.sub-menu.sw-mega-menu { transform: scaleY(1); }
.main-menu ul.sub-menu.sw-mega-menu > li.mega-menu-col { flex: 1 1 0; min-width: 0; padding: 0 16px; }
.main-menu .sw-mega-menu a.mega-menu-title { line-height: 1.35; }
.main-menu .sw-mega-menu a.mega-menu-title:before,
.main-menu .sw-mega-menu a.mega-menu-all:before { display: none; }
.main-menu .sw-mega-menu a.mega-menu-title:hover { color: var(--theme-color2); padding-left: 0; }

/* =============================================
   Pannello laterale del carrello
   ============================================= */
.sidemenu-wrapper .sidemenu-content.sw-cart-panel {
  display: flex; flex-direction: column;
  height: 100%; max-width: 100%;
  padding: 0; overflow: hidden;
}
.sw-cart-head {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.sw-cart-head h4 { margin: 0; font-size: 18px; font-family: var(--title-font); }
.sw-cart-head h4 > i { color: var(--theme-color); }
.sw-cart-panel .closeButton.sideMenuCls {
  position: static; width: 34px; height: 34px; line-height: 30px; font-size: 16px; flex: 0 0 auto;
}
.sw-cart-count-panel {
  display: inline-block; margin-left: 6px; vertical-align: middle;
  background: var(--theme-color); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
}
.sw-cart-body { flex: 1 1 auto; overflow-y: auto; padding: 18px 24px; }
.sw-cart-loading { text-align: center; padding: 40px 0; color: #bbb; font-size: 24px; }
.sw-cart-empty { text-align: center; padding: 40px 0; color: #999; }
.sw-cart-empty i { display: block; opacity: .3; margin-bottom: 16px; }
.sw-cart-empty p { margin: 0; font-size: 14px; }

.sw-cart-item {
  position: relative;
  display: flex; gap: 12px;
  border: 1px solid var(--border-color); border-radius: 10px;
  padding: 12px 36px 12px 12px; margin-bottom: 12px;
  transition: opacity .2s;
}
.sw-cart-item.is-removing { opacity: .45; pointer-events: none; }
.sw-cart-item.has-error { border-color: #d9534f; background: #fdf3f3; }
.sw-cart-img { flex: 0 0 72px; }
.sw-cart-img img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.sw-cart-info { flex: 1 1 auto; min-width: 0; }
.sw-cart-title { margin: 0 0 4px; font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--title-color); }
.sw-cart-title a { color: inherit; }
.sw-cart-title a:hover { color: var(--theme-color); }
.sw-cart-meta { margin: 0 0 2px; font-size: 13px; color: var(--body-color); }
.sw-cart-meta i { width: 16px; color: var(--theme-color); }
.sw-cart-tickets { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; color: var(--body-color); }
.sw-cart-tickets li { display: flex; justify-content: space-between; gap: 8px; }
.sw-cart-item-error { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: #c0392b; }
.sw-cart-item-total { margin: 6px 0 0; font-weight: 700; font-size: 15px; color: var(--theme-color); text-align: right; }
.sw-cart-rm {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border: none; border-radius: 50%;
  background: none; color: #999; font-size: 15px; cursor: pointer;
}
.sw-cart-rm:hover { background: #f3eeee; color: var(--theme-color); }

.sw-cart-foot { padding: 18px 24px 20px; border-top: 1px solid var(--border-color); background: #fff; }
.sw-cart-errore {
  font-size: 13px; color: #c0392b; background: #fdf3f3; border-radius: 8px;
  padding: 8px 10px; margin-bottom: 12px;
}
.sw-cart-subtotal {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; color: var(--body-color); margin-bottom: 6px;
}
.sw-cart-subtotal strong { font-size: 18px; color: var(--title-color); }
.sw-cart-note { font-size: 12px; color: #999; margin-bottom: 14px; }
.sw-cart-foot .th-btn { display: block; width: 100%; text-align: center; margin-bottom: 8px; }
.sw-cart-foot .th-btn.disabled { opacity: .45; cursor: not-allowed; }
.sw-cart-link {
  display: block; text-align: center; font-size: 14px; font-weight: 600;
  color: var(--title-color); padding: 8px; margin-bottom: 6px;
}
.sw-cart-link:hover { color: var(--theme-color); }
.sw-cart-continua {
  width: 100%; background: none; cursor: pointer;
  border: 1px solid var(--border-color); border-radius: 8px;
  padding: 10px; font-size: 13px; color: var(--body-color);
}
@media (max-width: 480px) {
  .sidemenu-wrapper .sidemenu-content.sw-cart-panel { width: 100%; }
}

/* =============================================
   Home
   ============================================= */

/* Hero: immagine (quando il tour non ha video) come il video del mockup */
.hero-1 .hero-inner .sw-hero-media,
.hero-1 .hero-inner picture.sw-hero-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-1 .hero-inner video.sw-hero-media { background: #1a1a2e; }

/* Pulsante colonna sonora (da propadyn2026): parte solo al clic */
.hero-1 { position: relative; }
.sw-sound {
  /* In ALTO a destra: l'hero è alto almeno 100vh e parte sotto l'header, quindi il suo
     fondo cade fuori schermo e con esso il pulsante (successo il 30-09-2026 su un
     portatile: musica "muta" perché il pulsante non si vedeva). La cima si vede sempre. */
  position: absolute; right: 40px; top: 28px; z-index: 9;
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px;
  color: #fff; cursor: pointer; border-radius: 22px;
  background: rgba(15,15,20,0.35); border: 1px solid rgba(255,255,255,0.3);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background .2s, border-color .2s, gap .3s;
}
.sw-sound:hover, .sw-sound:focus-visible { background: var(--theme-color); border-color: var(--theme-color); }
.sw-sound:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sw-sound-ico {
  width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.sw-sound-ico path:first-child { fill: currentColor; stroke: none; }
.sw-sound .sw-sound-playing, .sw-sound.is-on .sw-sound-muted { display: none; }
.sw-sound.is-on .sw-sound-playing { display: block; }
.sw-sound-txt {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; max-width: 200px;
  transition: max-width .4s ease, opacity .3s ease;
}
/* dopo qualche secondo resta solo l'icona; il testo torna al passaggio del mouse */
.sw-sound.compact:not(:hover):not(:focus-visible) { gap: 0; padding: 0 11px; }
.sw-sound.compact:not(:hover):not(:focus-visible) .sw-sound-txt { max-width: 0; opacity: 0; }
@media (max-width: 767px) {
  .sw-sound { right: 16px; top: 16px; height: 40px; padding: 0 12px; }
}

/* Card tour: badge e prezzo */
.sw-tour-card .box-img { position: relative; }
.sw-tour-card .sw-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 4px 12px; border-radius: 20px;
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.sw-tour-card .sw-card-price { margin: -6px 0 10px; font-size: 14px; color: var(--body-color); }
.sw-tour-card .sw-card-price strong { color: var(--theme-color); font-size: 16px; }
.sw-tour-card .sw-img-vuota { object-fit: contain !important; padding: 25%; background: var(--smoke-color); }

/* Esplora: con 8 voci su desktop i titoli vanno a capo invece di uscire */
@media (min-width: 768px) {
  .sw-esplora { gap: 16px; }
  .sw-esplora .destination-list-wrap:not(.active) .destination-content .box-title { font-size: 18px; line-height: 1.25; }
  .sw-esplora .destination-list-wrap:not(.active) .destination-subtitle { display: none; }
}
.sw-esplora .destination-list { background-color: var(--theme-color2); }

/* About: il testo può arrivare dal CMS (paragrafi senza classi) */
.sw-about-testo { margin-bottom: 30px; }
.sw-about-testo p:last-child { margin-bottom: 0; }

/* =============================================
   Footer
   ============================================= */
.sw-legali a { color: inherit; }
.sw-legali a:hover { text-decoration: underline !important; }
.sw-legali span { margin: 0 8px; opacity: .6; }

/* Mega-menu: voci più compatte e titoli dei tour come scritti nel CMS (niente Maiuscole Su Ogni Parola) */
.main-menu ul.sub-menu.sw-mega-menu .mega-menu-col ul li a {
  font-size: 14px; line-height: 1.4; padding: 5px 0; text-transform: none;
}
.main-menu ul.sub-menu.sw-mega-menu a.mega-menu-title { text-transform: uppercase; }

/* =============================================
   Mega-menu dei tour (02-10-2026): ricerca + schede + griglia di tutti i tour.
   Sostituisce le colonne con 6 tour per categoria (le regole .mega-menu-col sopra non servono più).
   ============================================= */
.main-menu ul.sub-menu.sw-mega-menu { padding: 0; display: block; border-bottom: 0; border-radius: 14px; overflow: hidden; }
/* resta aperto mentre si scrive nella ricerca (il mouse può uscire dal pannello) */
.main-menu ul li.sw-mega:focus-within > ul.sub-menu.sw-mega-menu { visibility: visible; opacity: 1; transform: scaleY(1); z-index: 9; }
.main-menu ul.sub-menu.sw-mega-menu > li.sw-tm { padding: 0; display: block; background: #fff; }
.sw-tm a::before { display: none !important; }
.sw-tm-top {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px;
  background: var(--theme-color2, #1a1a2e);
}
.sw-tm-cerca {
  flex: 1; display: flex; align-items: center; gap: 10px; margin: 0;
  background: #fff; border-radius: 30px; padding: 0 18px; height: 48px;
}
.sw-tm-cerca i { color: var(--theme-color); font-size: 16px; }
.sw-tm-cerca input {
  flex: 1; border: 0; outline: 0; background: none; height: 46px; padding: 0; min-width: 0;
  font-size: 15px; color: var(--title-color);
}
.sw-tm-cerca:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.main-menu .sw-tm a.sw-tm-cal { color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; text-transform: none; }
.main-menu .sw-tm a.sw-tm-cal:hover { color: #ffc233; }
.sw-tm-corpo { display: grid; grid-template-columns: 250px 1fr; min-height: 380px; }
.sw-tm-schede { background: var(--smoke-color, #f6f3ef); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.main-menu .sw-tm a.sw-tm-scheda {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: 10px; font-size: 15px; line-height: 1.3; font-weight: 600;
  color: var(--title-color); text-transform: none;
}
.sw-tm-scheda em {
  font-style: normal; font-size: 12px; font-weight: 700; min-width: 30px; text-align: center;
  padding: 2px 8px; border-radius: 20px; background: #fff; color: var(--body-color);
}
.sw-tm-scheda i { color: var(--theme-color); }
.main-menu .sw-tm a.sw-tm-scheda:hover { background: #fff; color: var(--theme-color); }
.main-menu .sw-tm a.sw-tm-scheda.attiva { background: var(--theme-color); color: #fff; }
.sw-tm-scheda.attiva em { background: rgba(255, 255, 255, .22); color: #fff; }
.sw-tm-scheda.attiva i { color: #fff; }
.sw-tm-griglia { padding: 18px 22px 16px; max-height: min(460px, calc(100vh - 260px)); overflow-y: auto; overscroll-behavior: contain; }
.sw-tm-carte { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
@media (min-width: 1600px) { .sw-tm-carte { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.main-menu .sw-tm a.sw-tm-carta {
  display: flex; align-items: center; gap: 12px; padding: 7px; border-radius: 10px;
  font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--title-color); text-transform: none;
  transition: background .2s;
}
.main-menu .sw-tm a.sw-tm-carta:hover, .main-menu .sw-tm a.sw-tm-carta:focus-visible { background: var(--smoke-color, #f6f3ef); color: var(--theme-color); }
.sw-tm-carta img, .sw-tm-carta .sw-tm-noimg {
  width: 72px; height: 52px; flex: none; border-radius: 8px; object-fit: cover; background: #e9e4dd;
}
.sw-tm-carta .sw-tm-noimg { display: flex; align-items: center; justify-content: center; color: #b9b1a6; }
.sw-tm-carta span { display: flex; flex-direction: column; min-width: 0; }
.sw-tm-carta b { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sw-tm-carta small { font-size: 12px; font-weight: 500; color: #8a8378; margin-top: 2px; }
.sw-tm-carta small.quando { color: var(--theme-color); font-weight: 700; }
.sw-tm-piede { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-color, #ece6de); font-size: 14px; }
.main-menu .sw-tm .sw-tm-piede a { font-weight: 700; color: var(--theme-color); text-transform: none; line-height: 1.4; }
.sw-tm-vuoto { padding: 30px 6px; color: var(--body-color); font-size: 15px; }
.main-menu .sw-tm .sw-tm-vuoto a { color: var(--theme-color); font-weight: 600; text-transform: none; }

/* Menu mobile: ricerca in cima al sottomenu dei tour */
.th-mobile-menu .sw-tm-mobile { padding: 8px 0 10px; border-bottom: 0 !important; }
.th-mobile-menu .sw-tm-mobile .sw-tm-cerca { background: var(--smoke-color, #f6f3ef); height: 44px; padding: 0 14px; }
.th-mobile-menu .sw-tm-mobile .sw-tm-cerca input { height: 42px; font-size: 16px; }   /* 16px: niente zoom su iOS */
.sw-tm-risultati:empty { display: none; }
.sw-tm-risultati { margin-top: 8px; text-align: left; }
.th-mobile-menu .sw-tm-risultati a.sw-tm-carta { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; line-height: 1.3; }
.th-mobile-menu .sw-tm-risultati a.sw-tm-carta::before { display: none; }
.th-mobile-menu .sw-tm-risultati .sw-tm-vuoto { padding: 10px 0; font-size: 14px; }
