/* ==========================================================
   HEADER.CSS (VALIDO) - stile EGO adattato
   - dropdown normali: dimensioni normali
   - mega menu: full width / centrato
   ========================================================== */

/* fade in dropdown */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dropdown-menu.show{
  animation: fadeIn .18s ease-out;
}

/* ===== Header base ===== */
.header_interno { background:#374651; }
.header_interno .brand img,
.header_interno .header-logo img{
  max-height: 54px;
  width: auto;
  display: block;
}

/* ===== Navbar toggler (burger) ===== */
.header_interno .navbar-toggler{
  border:0;
  padding:0;
  width:44px;
  height:44px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.10);
}
.header_interno .navbar-toggler:focus{ box-shadow:none; }

/* usa l’icona di bootstrap (navbar-light) oppure personalizza qui */
.header_interno .navbar-toggler-icon{
  width: 1.6em;
  height: 1.6em;
}

/* ===== Dropdown base (normali: user menu, ecc) ===== */
.header_interno .dropdown-menu{
  border: 1px solid rgba(0,0,0,.10);
  padding: .5rem 0;
  min-width: 220px;
}
.header_interno .dropdown-item{
  padding: .55rem 1rem;
  font-size: .95rem;
  color: #111;
}
.header_interno .dropdown-item:hover,
.header_interno .dropdown-item:focus{
  background: rgba(37,99,235,.08);
  color:#111;
}

/* ===== Mega menu ===== */
/* IMPORTANT: NON mettere width:100% su .dropdown-menu globale */
.header_interno .nav-item.dropdown.dropdown-mega{ position: static; }

/* Desktop: mega menu centrato e largo */
@media (min-width: 1200px){
  .header_interno .nav-item.dropdown.dropdown-mega > .dropdown-menu{
    width: min(1200px, 95vw);
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: .35rem;
    padding: 12px;
  }
}

/* Tablet/mobile: mega menu full width dentro collapse */
@media (max-width: 1199.98px){
  .header_interno .nav-item.dropdown.dropdown-mega > .dropdown-menu{
    width: 100%;
    left: 0;
    right: 0;
    transform: none;
    margin-top: .25rem;
    box-shadow: none;
  }
}

/* Colonne mega menu */
.header_interno .mega-content h5{
  font-size: 16px;
  font-weight: 800;
  color: #b21f2d;
  margin: 0 0 .65rem 0;
  padding: 0 0 .35rem 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.header_interno .mega-content ul{
  list-style:none;
  padding:0;
  margin:0;
}
.header_interno .mega-content li{ margin: .35rem 0; }
.header_interno .mega-content li a{
  text-decoration:none;
  color:#111;
  font-weight:600;
  font-size: 13px;
  letter-spacing: .3px;
  text-transform: uppercase;

}
.header_interno .mega-content li a:hover{ color:#000; }

/* brand loghi nel mega menu */
.header_interno .mega-content img{
  max-height: 50px;
}

/* ===== Mobile header inside collapse (logo + close) ===== */
.header_interno .btn-chiudi{
  border:0;
  position:absolute;
  top: 5px;
  right: 10px;
  width: 40px;
  z-index: 20;
}
.header_interno .btn-chiudi:focus{ box-shadow:none; }

/* Evita “scroll dentro la navbar” */
.header_interno .navbar-nav{
  overflow: visible !important;
}

    .cart-desktop .qty-badge {
        position: absolute;
        top: -10px;
        right: -16px;
        min-width: 22px;
        height: 22px;
        padding: 0 4px;
        font-size: 0.7rem;
        line-height: 18px;
        text-align: center;
        color: #fff;
        background: #dc3545;
        border-radius: 999px;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
    }
	

/* =========================
   Icone tonde (Carrello / User)
   stile EGO
========================= */

.icon-circle{
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.10); /* cerchio soft */
  color: #fff;                       /* icona bianca */
  transition: all .2s ease;
}

/* hover elegante */
.icon-circle:hover{
  background: rgba(255,255,255,.18);
  transform: translateY(-2px);
}

/* versione alternativa più marcata */
.icon-circle.alt{
  background: #ffffff;
  color: #2c3e50;
}
.icon-circle.alt:hover{
  background: #f3f4f6;
}

/* Mobile: blocco testata dentro collapse */
@media (max-width: 1199.98px){
  .header_interno #navbar-content .d-xl-none{
    position: relative;
    background: #fff !important; /* no grigi pesanti */
    border-bottom: 1px solid rgba(0,0,0,.06);
  }
}

@media only screen and (max-width: 480px) {
  .navbar-default .navbar-nav > li > a {
    color: #fff !important;
    text-decoration-line: none;
    text-transform: capitalize;
    font-size: 15px;
    background: #374651;
    font-weight: 600;
  }
   .navbar-nav > li {
   padding: 5px 0px;

    border-bottom: 1px solid;
  }
.navbar-nav > li {
  margin: 0px !important;
  padding: 0px !important;
}

.header_interno .dropdown-menu{
  border: 0px !important;
  padding:0px;
  min-width: 220px;
}

.header_interno .mega-content li{   border-bottom: 1px solid;}



}


.nav-item.dropdown.dropdown-mega {
  position: static;
}

.nav-item.dropdown .dropdown-menu {
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  width: min(1180px, 96vw);
  margin-top: 0;
  border-radius: 18px;
  background: #fff;
}

.dropdown-menu.show {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.mega-dropdown {
  padding: 0;
}

.mega-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 14px;
  color: #d94b3d;
}

.mega-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-links li {
  margin-bottom: 8px;
}

.mega-links li a {
  display: inline-block;
  text-decoration: none;
  color: #111827;
  font-weight: 600;
  line-height: 1.35;
  transition: color .2s ease, transform .2s ease;
}

.mega-links li a:hover {
  color: #d94b3d;
  transform: translateX(2px);
}

.mega-empty {
  color: #6b7280;
  font-size: .95rem;
}

.mega-brands .col {
  display: flex;
}

.mega-brand-card {
  width: 100%;
  min-height: 96px;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 10px;
  text-decoration: none;
  color: #111827;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.mega-brand-card:hover {
  border-color: #d94b3d;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.mega-brand-card img {
  max-height: 42px;
  width: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.mega-brand-card span {
  font-size: .75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

@media (max-width: 1199.98px) {
  .nav-item.dropdown .dropdown-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    border-radius: 12px;
    margin-top: 10px;
  }

  .mega-title-empty {
    display: none !important;
  }
}





/* =========================================================
   MEGA MENU - LI E LINK OTTIMIZZATI
   ========================================================= */

.header_interno .mega-content h5,
.mega-title {
  font-size: 15px;
  font-weight: 800;
  color: #243242;
  margin: 0 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf1f5;
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* lista */
.header_interno .mega-content ul,
.mega-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* li */
.header_interno .mega-content li,
.mega-links li {
  margin: 0;
  padding: 0;
}

/* link */
.header_interno .mega-content li a,
.mega-links li a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #1f2937;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

/* freccina leggera automatica */
.header_interno .mega-content li a::before,
.mega-links li a::before {
  content: "›";
  margin-right: 10px;
  color: #9aa4b2;
  font-size: 15px;
  font-weight: 700;
  transition: color .18s ease, transform .18s ease;
}

/* hover */
.header_interno .mega-content li a:hover,
.mega-links li a:hover {
  background: #f4f7fa;
  color: #0f7c9b;
  transform: translateX(2px);
}

.header_interno .mega-content li a:hover::before,
.mega-links li a:hover::before {
  color: #0f7c9b;
  transform: translateX(2px);
}

/* colonna mega menu più ordinata */
.header_interno .mega-content .col,
.mega-dropdown .col,
.mega-dropdown .col-lg-3,
.mega-dropdown .col-lg-4,
.mega-dropdown .col-md-6 {
  margin-bottom: 18px;
}

/* contenitore interno colonna */
.header_interno .mega-content .menu-column,
.mega-menu-column {
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  padding: 16px 14px;
  height: 100%;
}

/* dropdown generale più premium */
.nav-item.dropdown .dropdown-menu {
  border: 1px solid #e9eef3;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  padding: 18px;
}

/* se una lista è vuota */
.mega-empty {
  color: #6b7280;
  font-size: .92rem;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed #d8e1ea;
}

/* mobile */
@media (max-width: 1199.98px) {
  .header_interno .mega-content li a,
  .mega-links li a {
    min-height: 38px;
    padding: 9px 10px;
    font-size: 14px;
    border-radius: 8px;
  }

  .header_interno .mega-content h5,
  .mega-title {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .header_interno .mega-content .menu-column,
  .mega-menu-column {
    padding: 12px;
    border-radius: 12px;
  }
}


/* =========================================================
   MEGA MENU NUOVO
   ========================================================= */

.mega-dropdown {
  position: static;
}

.mega-dropdown .dropdown-menu.mega-menu {
  left: 50% !important;
  transform: translateX(-50%);
  width: min(1180px, calc(100vw - 40px));
  border: 1px solid #e6edf3;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  margin-top: 14px;
}

.mega-menu-wrap {
  padding: 24px 26px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

/* colonne */
.mega-menu-column {
  height: 100%;
  background: #ffffff;
  border: 1px solid #edf2f6;
  border-radius: 16px;
  padding: 16px 14px;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}

.mega-menu-column:hover {
  border-color: #dbe7ee;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.mega-menu-highlight {
  background: linear-gradient(180deg, #fafdff 0%, #f4f9fb 100%);
}

/* titoli */
.mega-title {
  margin: 0 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf1f5;
  color: #243242;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* liste */
.mega-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-links li {
  margin: 0;
  padding: 0;
}

.mega-links li + li {
  margin-top: 2px;
}

/* link */
.mega-links li a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.mega-links li a::before {
  content: "›";
  margin-right: 10px;
  color: #9aa4b2;
  font-size: 15px;
  font-weight: 700;
  transition: color .18s ease, transform .18s ease;
}

.mega-links li a:hover {
  background: #f3f8fb;
  color: #0f7c9b;
  transform: translateX(2px);
}

.mega-links li a:hover::before {
  color: #0f7c9b;
  transform: translateX(2px);
}

/* box laterale extra */
.mega-extra-box {
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e4edf3;
}

.mega-extra-label {
  font-size: 12px;
  font-weight: 800;
  color: #0f7c9b;
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: .04em;
}

.mega-extra-text {
  font-size: 13px;
  line-height: 1.45;
  color: #5b6472;
}

/* link top navbar un po' più eleganti */
.header_interno .navbar-nav .nav-link,
.navbar-nav .nav-link {
  padding: .65rem .9rem !important;
  border-radius: 12px;
  font-weight: 600;
  transition: background-color .18s ease, color .18s ease;
}

.header_interno .navbar-nav .nav-link:hover,
.navbar-nav .nav-link:hover {
  background: #f2f6f9;
}

.header_interno .navbar-nav .nav-link.show,
.navbar-nav .nav-link.show {
  background: #eef5f8;
  color: #0f7c9b !important;
}

/* migliora il layout interno */
.mega-menu .row > div {
  display: flex;
}

/* mobile / tablet */
@media (max-width: 1199.98px) {
  .mega-dropdown .dropdown-menu.mega-menu {
    width: calc(100vw - 24px);
    border-radius: 16px;
  }

  .mega-menu-wrap {
    padding: 18px;
  }

  .mega-menu-column {
    padding: 14px 12px;
    border-radius: 14px;
  }

  .mega-title {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .mega-links li a {
    min-height: 38px;
    padding: 8px 9px;
    font-size: 13px;
  }
}

@media (max-width: 991.98px) {
  .mega-dropdown {
    position: relative;
  }

  .mega-dropdown .dropdown-menu.mega-menu {
    position: static !important;
    transform: none !important;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
    border-radius: 14px;
  }

  .mega-menu-wrap {
    padding: 14px;
  }

  .mega-menu .row > div {
    display: block;
  }
}


