/* Kill the site navbar's hover megamenu on this page — its full-screen
   .submenu-overlay opens on mouseenter and covers the configurator. */
body.configuratore-page .submenu-overlay { display: none !important; }
body.configuratore-page .main-menu__core-button[submenu] { pointer-events: none; }

.configuratore {
  /* Near full-width with ~60px side gutters, like live (no narrow cap). */
  padding: 96px 60px 80px;
  max-width: 1680px;
  margin: 0 auto;
  font-family: "Helvetica", "Helvetica Neue", Arial, sans-serif;
  color: #111;
}
.configuratore__title {
  font-family: "DIN Next LT Pro", "Helvetica", sans-serif;
  font-weight: 300;            /* live: light */
  font-size: 3.5rem;           /* live: ~60px */
  line-height: 1.05;
  margin: 0 0 20px;
}

/* Vetrine Orizzontali / Verticali switch (clones the live big-DIN tabs) */
.configuratore__tabs {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 44px;
}
.configuratore__tab {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: "DIN Next LT Pro", "Helvetica", sans-serif;
  font-weight: 300;
  font-size: 1.7rem;           /* live: large DIN */
  letter-spacing: 0.01em;
  color: #b9b9b6;
  white-space: nowrap;
  transition: color .15s;
}
.configuratore__tab:hover { color: #8a8a86; }
.configuratore__tab.is-active { color: #D09882; }
.configuratore__tab-sep {
  font-family: "DIN Next LT Pro", "Helvetica", sans-serif;
  font-weight: 300;
  font-size: 1.7rem;
  color: #b9b9b6;
  user-select: none;
}

.configuratore__grid {
  display: grid;
  /* 4-up (w-1/4) with padding between; equal-height cards via the 4/3 box. */
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 30px;
}
@media (max-width: 1100px) {
  .configuratore__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .configuratore__grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .configuratore { padding: 88px 24px 64px; }
}
@media (max-width: 460px) {
  .configuratore__grid { grid-template-columns: 1fr; }
}

.ada-card { cursor: pointer; }
.ada-card[hidden] { display: none; }
/* Fixed ~4/3 render box (≈450x340 on a full card), like live. */
.ada-card__media {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
/* object-fit:fill stretches the render to fill the whole box — no letterbox,
   matches live exactly. */
.ada-card__media img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  transition: transform .35s ease;
}
.ada-card:hover .ada-card__media img { transform: scale(1.03); }
.ada-card__name {
  margin-top: 16px;
  font-family: "DIN Next LT Pro", "Helvetica", sans-serif;  /* live: DIN */
  font-weight: 300;
  font-size: 1.35rem;          /* live: ~24px */
  color: #111;
}

/* Saved configurations (authenticated users) */
.saved-configs { margin-top: 60px; }
.saved-configs__grid { margin-top: 20px; }

.saved-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.saved-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.saved-card__media {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f6f6f6;
}
.saved-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.saved-card__body {
  padding: 14px 16px 8px;
  flex: 1;
}

.saved-card__name {
  font-family: "DIN Next LT Pro", "Helvetica", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: #111;
  margin-bottom: 4px;
}

.saved-card__product {
  font-size: 0.85rem;
  color: #D09882;
  margin-bottom: 2px;
}

.saved-card__ref {
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 2px;
}

.saved-card__date {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 6px;
}

.saved-card__actions {
  display: flex;
  gap: 8px;
  padding: 8px 16px 14px;
}

.ada-card__actions { display: flex; gap: 10px; margin-top: 12px; }
.ada-card__btn {
  border: 0; background: #111; color: #fff; padding: 9px 14px;
  cursor: pointer; font-size: 0.78rem; letter-spacing: 0.05em;
  text-transform: uppercase; border-radius: 4px;
}
.ada-card__btn:hover { background: #D09882; }
.ada-card__btn--ghost { background: transparent; color: #111; border: 1px solid #111; }
.ada-card__btn--ghost:hover { background: #111; color: #fff; }

/* In-page configurator host: swaps in place of the grid (no iframe). */
#adabe-stage {
  display: none;
  position: relative;
  width: 100%;
  height: calc(100vh - 80px);
  min-height: 600px;
  background: #f3f3f2;
}
#adabe-stage.is-active { display: block; }
/* While the engine runs: full viewport, no site chrome. */
body.adabe-running #adabe-stage { height: 100vh; min-height: 0; }
body.adabe-running .main-menu,
body.adabe-running .menu-mobile,
body.adabe-running #site-footer,
body.adabe-running footer { display: none !important; }
/* Isola ADabe dall'ereditarietà CSS del sito — ADabe ha il suo themeing. */
#adabe-container {
  all: initial;
  position: relative;
  width: 100%;
  height: 100%;
}

#adabe-toast {
  position: absolute; top: 18px; left: 50%;
  transform: translateX(-50%) translateY(-12px); z-index: 9999;
  background: #111; color: #fff; padding: 12px 20px; font-size: 0.85rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
#adabe-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
#adabe-toast.is-error { background: #b3261e; }
