:root {
  --theme-palette-color-1: #000000;
  --theme-palette-color-2: #121212;
  --theme-palette-color-3: #222222;
  --theme-palette-color-4: #333333;
  --theme-palette-color-5: #666666;
  --theme-palette-color-6: #cccccc;
  --theme-palette-color-7: #f3f3f3;
  --theme-palette-color-8: #f8f8f8;
}

/*
* ================================================
* SETUP
* ================================================
*/

/* Row */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

/* Colonne base */
[class*="col-"] {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

/* Mobile first - sotto 690px tutto a 100% */
.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

/* Tablet - da 690px */
@media (min-width: 690px) {
  .col-sm-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
  }
  .col-sm-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .col-sm-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-sm-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
  .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-sm-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  .col-sm-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-sm-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
  .col-sm-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
  .col-sm-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
  }
  .col-sm-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Desktop - da 1000px */
@media (min-width: 1000px) {
  .col-md-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
  }
  .col-md-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-md-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-md-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-md-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
  .col-md-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
  .col-md-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
  }
  .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Utility classes essenziali */
.a-center {
  align-items: center;
}
.a-start {
  align-items: flex-start;
}
.a-end {
  align-items: flex-end;
}
.j-btw {
  justify-content: space-between;
}
.j-center {
  justify-content: center;
}

/*
* ================================================
* TIPOGRAFIA
* ================================================
*/

.minimal {
  text-transform: uppercase;
  font-size: 0.825rem;
  letter-spacing: 3px;
}

@media (min-width: 1600px) {
  #header [data-column-set="2"] > div {
    grid-template-columns: 84% 15%;
    justify-content: space-between;
  }
}
@media (max-width: 1600px) {
  #header [data-column-set="2"] > div {
    grid-template-columns: 80% 20%;
    justify-content: space-between;
  }
}
@media (max-width: 1300px) {
  #header [data-column-set="2"] > div {
    grid-template-columns: 78% 20%;
  }
}
@media (max-width: 1200px) {
  #header [data-column-set="2"] > div {
    grid-template-columns: 76% 20%;
  }
}
/* ========================================
   CUSTOM BURGER 
   ======================================== */

.ct-header-trigger svg {
  display: none;
}

.ct-header-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ct-header-trigger::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cline y1='0.5' x2='14' y2='0.5' stroke='currentColor'/%3E%3Cline y1='7' x2='8.90909' y2='7' stroke='currentColor'/%3E%3Cline y1='13.5' x2='14' y2='13.5' stroke='currentColor'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/*
* ================================================
* SEARCH HEADER
* ================================================
*/
.ct-header .ct-search-form {
  flex-direction: row-reverse;
}
.ct-header .ct-search-form input {
  padding: 0;
}
.ct-header .ct-search-form .ct-icon {
  height: 22px;
  width: 22px;
}
.ct-header .ct-search-results {
  box-shadow: none !important;
}

@media (min-width: 690px) {
  #search-modal input {
    --theme-form-font-size: 28px;
  }
}

/*
* ================================================
* SHOP NAVIGATION
* ================================================
*/

.edt-shop-navigation ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.edt-shop-navigation .edt-shop-menu li {
  display: inline-block;
}

.edt-shop-menu > .main-item > .ct-menu-link {
  text-transform: uppercase;
  padding: 1em 1.2em;
  font-size: 0.8rem;
  letter-spacing: 3px;
  --theme-link-initial-color: var(--theme-palette-color-2);
  --theme-link-hover-color: var(--theme-palette-color-2);
}

@media (max-width: 1200px) {
  .edt-shop-menu > .main-item > .ct-menu-link {
    padding: 1em 0.8em;
    font-size: 0.735rem;
  }
}

/* Menu Badge */
.edt-menu-badge {
  padding: 0.3em;
  text-transform: none;
  letter-spacing: 1px;
  background-color: var(--theme-palette-color-3);
  color: var(--theme-palette-color-8);
  font-size: 0.625rem;
  font-weight: 600;
  border-radius: 1px;
  line-height: 1;
  margin-left: 5px;
}

/* Di default tutte le voci hanno opacity 1 */
.edt-shop-menu > .menu-item .ct-menu-link {
  transition: opacity 0.3s ease;
  opacity: 1;
}

/* Quando c'è una voce con megamenu aperto (.is-open) */
.edt-shop-menu:has(.menu-item.is-open)
  > .menu-item:not(.is-open)
  .ct-menu-link {
  opacity: 0.7;
}

/* La voce aperta rimane opacity 1 */
.edt-shop-menu > .menu-item.is-open .ct-menu-link {
  opacity: 1;
}

/* Hover su QUALSIASI voce la riporta a opacity 1 */
.edt-shop-menu > .menu-item:hover .ct-menu-link {
  opacity: 1;
}

/* NUOVO: Hover su voci senza megamenu (effetto generale) */
.edt-shop-menu > .menu-item:not(.has-megamenu):hover .ct-menu-link {
  opacity: 0.8; /* Leggero feedback */
  transition: opacity 0.2s ease;
}

/*
* ================================================
* Megamenu
* ================================================
*/

.edt-shop-navigation .has-submenu {
  position: relative;
}

.edt-megamenu {
  padding-top: 50px !important;
  padding-bottom: 30px !important;
  position: absolute;
  top: 30px;
  left: 0;
  background-color: transparent;
}

@media (min-width: 1000px) {
  .edt-megamenu.single-group .col-md-7,
  .edt-megamenu.brand-only .col-md-7,
  .edt-megamenu.single-group .col-md-5,
  .edt-megamenu.brand-only .col-md-5 {
    max-width: 50%;
  }
}

/* Col left */
.edt-megamenu-masonry {
  position: relative;
  width: 100%;
}

/* Arrow toggle */
.edt-megamenu-toggle {
  display: none;
  position: absolute;
  right: 0;
  top: 2px;
  width: 53px;
  height: 53px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.edt-megamenu-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
  margin: auto;
  transform: rotate(0);
  transition: transform 0.3s ease;
}
.menu-item.is-open .edt-megamenu-toggle svg {
  transform: rotate(90deg);
}

/* Grid title */
@media (min-width: 1000px) {
  .edt-megamenu .col-md-7 {
    position: relative;
    padding-right: 20px;
  }
  .edt-megamenu .col-md-7::before {
    position: absolute;
    content: "";
    top: 0;
    right: 10px;
    height: 100%;
    width: 1px;
    background-color: #e9e9e9;
  }

  .edt-megamenu-title-group {
    display: flex;
    flex-direction: column;
    width: calc(33.333% - 21.33px);
    padding-bottom: 40px;
  }

  .edt-megamenu-title-group.single-group {
    width: calc(50% - 21.33px);
  }

  /* Only brands */
  .edt-megamenu-brands-grid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
}
.edt-megamenu-title {
  font-size: 0.735rem;
  margin-bottom: 25px;
  letter-spacing: 2px;
}

/* Cat item */

.edt-megamenu-title-group li.edt-prd-cat-link:not(:last-child) {
  margin-bottom: 15px;
}
.edt-megamenu-title-group li.edt-prd-cat-link span {
  font-size: 0.925rem;
  color: var(--theme-palette-color-5);
}
.edt-megamenu-title-group li.edt-prd-cat-link:hover span {
  color: var(--theme-palette-color-3);
}

.edt-prd-cat-link img {
  height: 33px;
  width: 33px;
  margin-right: 7px;
}

.edt-image-submenu-wrap {
  display: inline-block;
  width: 100vw;
  padding-right: calc((100vw - var(--theme-normal-container-max-width)) / -2);
}
.edt-image-submenu-wrap img {
  max-height: 250px;
  width: 100%;
  object-fit: cover;
}

@media (min-width: 1000px) {
  /* Only brands */
  .edt-megamenu.brand-only .edt-image-submenu-wrap img {
    min-height: 250px;
  }
}

/* Top brand */
.edt-megamenu-brand {
  margin-top: 30px;
}

/*
* ================================================
* SHOP NAVIGATION TABLET / MOBILE
* ================================================
*/
@media (max-width: 1000px) {
  /* OFFCANVAS */

  #offcanvas .ct-panel-actions {
    padding-top: 17px;
    padding-bottom: 17px;
    padding-inline: 0;
    padding: 17px 23px;
  }

  #offcanvas .ct-panel-heading {
    text-transform: uppercase;
    font-weight: 400;
    font-size: 0.825rem;
    letter-spacing: 3px;
    position: relative;
    left: 3px;
  }

  .ct-panel-content-inner {
    padding: 0 !important;
    overflow-x: hidden;
  }

  .edt-shop-navigation-layer {
    display: none !important;
  }

  /* Shop navigation */
  .ct-header-text,
  .edt-shop-navigation {
    background-color: var(--theme-palette-color-8);
    width: 100%;
    height: auto;
  }

  div[data-row="top"] .ct-header-text {
    background-color: transparent;
    width: auto;
  }

  /* Liste */
  .edt-shop-navigation .edt-shop-menu > li {
    position: relative;
    width: 100%;
    padding: 10px 17px;
  }
  .edt-shop-navigation .edt-shop-menu li {
    display: block;
    width: 100%;
  }
  .edt-shop-navigation .edt-shop-menu > li:not(:last-child) {
    border-bottom: 1px solid var(--theme-palette-color-6);
  }
  .edt-shop-menu > .main-item > .ct-menu-link {
    --theme-link-initial-color: var(--theme-palette-color-2);
    --theme-link-hover-color: var(--theme-palette-color-2);
  }

  /* Megamenu */
  .edt-megamenu {
    position: unset;
    width: 100%;
    height: 0;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    top: 0;
  }
  .main-item.is-open > .edt-megamenu {
    height: auto;
    overflow: visible;
    padding-top: 10px !important;
    padding-bottom: 25px !important;
  }

  /* Arrow button */
  .edt-megamenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .menu-item.has-megamenu .ct-menu-link {
    padding-right: 50px;
  }

  .edt-megamenu .row {
    flex-direction: column-reverse;
  }

  /* Top brand */
  .edt-megamenu-brand {
    display: none;
  }

  /* Image megamenu */
  .edt-image-submenu-wrap {
    padding-right: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-bottom: 25px;
  }
  .edt-image-submenu-wrap img {
    max-height: 180px;
  }

  .edt-megamenu-masonry .edt-megamenu-title-group .edt-megamenu-title {
    margin-bottom: 20px;
  }
  .edt-megamenu-masonry .edt-megamenu-title-group:not(:last-child) {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--theme-palette-color-7);
  }
}

/*Navigation user*/
.edt-shop-user-navigation {
  background-color: var(--theme-palette-color-2);
  padding: 35px 30px;
  color: #ffffff;
}
.edt-user-title {
  font-size: 22px;
  margin-bottom: 5px;
}
.edt-user-text {
  color: var(--theme-palette-color-6);
  font-size: 0.825rem;
  margin-bottom: 20px;
}
.edt-user-button {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  background-color: #ffffff;
  font-size: 0.625rem;
  padding: 0.7em;
  border-radius: 2px;
}
.edt-gravatar {
  height: 30px;
  width: 30px;
  border-radius: 100%;
}
.edt-shop-user-links {
  display: flex;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--theme-palette-color-3);
}
.edt-shop-user-links .col {
  width: 50%;
}
.link-list-title {
  margin-bottom: 15px;
}
.edt-user-menu > li:not(:last-child) {
  margin-bottom: 10px;
}
.edt-user-menu li > a {
  color: var(--theme-palette-color-6);
}
.edt-user-menu li > a:hover {
  color: #ffffff;
}
/*
* ================================================
* SHOP NAVIGATION ANIMATION
* ================================================
*/

.edt-shop-navigation-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: #f9f9f9;
  z-index: 48;
  pointer-events: none;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: height;
  transform: translateZ(0);
  overflow: hidden;
  backface-visibility: hidden;
}

.edt-megamenu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  transition-delay: 0s;
  will-change: opacity, visibility;
  transform: translateZ(0);
  backface-visibility: hidden;
  z-index: 50;
}

/* Megamenu visibile */
.main-item.is-open > .edt-megamenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0.2s;
}

@media (max-width: 1000px) {
  .edt-megamenu {
    opacity: 1;
    transition: none;
  }
}
/* ========================================
   DESKTOP ONLY (>= 1000px)
   ======================================== */

@media (min-width: 1000px) {
  /* Hover states */
  .main-item.has-megamenu:hover > .ct-menu-link {
    opacity: 1;
  }

  /* Megamenu contenuto fade-in */
  .edt-megamenu .edt-megamenu-masonry,
  .edt-megamenu .col-sm-4 {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: opacity, transform;
    transition-delay: 0s;
  }

  .main-item.is-open .edt-megamenu .edt-megamenu-masonry,
  .main-item.is-open .edt-megamenu .col-sm-4 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.25s; /* Dopo che layer è sceso */
  }

  /*User navigation*/
  .edt-shop-user-navigation {
    display: none;
  }
}

/* Chiusura forzata layer quando clicchi link interno */
body.megamenu-force-close .edt-shop-navigation-layer {
  height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: none !important;
}

body.megamenu-force-close .edt-megamenu {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: none !important;
}

body.megamenu-force-close {
  overflow: auto !important;
  position: static !important;
  top: auto !important;
  width: auto !important;
}

/* ========================================
   BANNER ANNUNCI 
   ======================================== */

.edt-banner-annunci {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  color: #ffffff;
  font-size: 0.9rem;
}

/* Icon */
.banner-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.banner-icon svg {
  display: block;
  width: 17px;
  height: 17px;
}

/* Slideshow container*/
.banner-slideshow-container {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  align-items: center;
}

.banner-slide {
  grid-column: 1;
  grid-row: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: opacity;
  transform: translateZ(0);
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.banner-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

/* Text notifica */
.banner-text {
  line-height: 1.4;
}

.banner-text p {
  margin: 0;
  display: inline;
}

.banner-text p + p {
  margin-left: 0.5em;
}

.banner-text a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.banner-text a:hover {
  text-decoration: none;
}

/* Banner accessibilità */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (max-width: 1000px) {
  .banner-icon {
    display: none;
  }

  .edt-banner-annunci {
    justify-content: center;
    padding: 0.6em 0;
  }

  .banner-slide,
  .banner-text p {
    text-align: center;
  }
}
