/* mc_cover v6.0 — Cover Wall
   Loaded ONLY on /cover pages (hookDisplayHeader scoped) */

/* ── Kill PS chrome ───────────────────────────────────────────────── */
#header            { display: none !important; }
#footer            { display: none !important; }
.breadcrumb        { display: none !important; }
#notifications     { display: none !important; }
#left-column       { display: none !important; }
#right-column      { display: none !important; }
#content-wrapper   { width: 100% !important; max-width: 100% !important;
                     flex: 0 0 100% !important; padding: 0 !important; margin: 0 !important; }
#wrapper           { padding-top: 0 !important; }
.page-content > .page-header { display: none !important; }

/* ── Topbar ───────────────────────────────────────────────────────── */
.mc-topbar {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  background: #111 !important; color: #fff !important;
  padding: 0 24px; height: 50px;
  margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%);
  width: 100vw;
}
#mc-wall .mc-topbar a.mc-topbar-logo,
#mc-wall .mc-topbar a.mc-topbar-logo:link,
#mc-wall .mc-topbar a.mc-topbar-logo:visited,
#mc-wall .mc-topbar a.mc-topbar-logo:hover {
  font-size: 0.95rem; font-weight: 600; color: #fff !important;
  text-decoration: none !important; letter-spacing: 0.12em; text-transform: uppercase;
}
.mc-topbar-nav {
  display: flex; align-items: center; gap: 20px;
}
#mc-wall .mc-topbar .mc-topbar-link,
#mc-wall .mc-topbar .mc-topbar-link:link,
#mc-wall .mc-topbar .mc-topbar-link:visited,
#mc-wall .mc-topbar a.mc-topbar-link {
  font-size: 0.8rem; color: rgba(255,255,255,0.75) !important;
  text-decoration: none !important; background: none; border: none;
  cursor: pointer; letter-spacing: 0.04em;
  padding: 0; font-family: inherit;
  transition: color 0.15s;
}
#mc-wall .mc-topbar .mc-topbar-link:hover,
#mc-wall .mc-topbar a.mc-topbar-link:hover { color: #fff !important; }

/* ── Trust bar ────────────────────────────────────────────────────── */
.mc-trustbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 16px;
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
  font-size: 0.75rem;
  color: #666;
  letter-spacing: 0.03em;
  margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%);
  width: 100vw;
}
.mc-trustbar-item { white-space: nowrap; }
.mc-trustbar-sep { color: #ccc; }

/* ── Hero (landing only) ─────────────────────────────────────────── */
.mc-hero {
  padding: 24px 40px 16px;
  max-width: 1400px;
  margin: 0 auto;
}
.mc-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.mc-hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Phone search bar ─────────────────────────────────────────────── */
.mc-phone-search {
  position: relative;
  width: 420px;
  flex-shrink: 0;
}
.mc-phone-search-input {
  width: 100%; box-sizing: border-box;
  height: 44px;
  padding: 0 20px;
  border: 1px solid #d5d5d5; border-radius: 28px;
  font-size: 0.9rem; color: #222;
  background: #f8f8f8;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}
.mc-phone-search-input:focus {
  outline: none;
  background: #fff;
  border-color: #999;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.mc-phone-search-input::placeholder { color: #b0b0b0; }

/* ── Phone dropdown ───────────────────────────────────────────────── */
.mc-phone-dropdown {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff;
  border: 1px solid #d5d5d5; border-top: none;
  border-radius: 0 0 14px 14px;
  max-height: 320px; overflow-y: auto;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.mc-dd-open .mc-phone-dropdown { display: block; }
.mc-dd-open .mc-phone-search-input {
  border-radius: 28px 28px 0 0;
  border-bottom-color: #e8e8e8;
  background: #fff;
}
.mc-dd-brand {
  padding: 8px 16px 4px;
  font-size: 0.7rem; font-weight: 600;
  color: #999; text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}
.mc-dd-opt {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  font-size: 0.85rem; color: #222;
  cursor: pointer; transition: background 0.1s;
  text-align: left;
}
.mc-dd-opt:hover,
.mc-dd-opt--focus { background: #f5f5f5; }
.mc-dd-cnt {
  font-size: 0.72rem; color: #aaa;
  min-width: 24px; text-align: right;
}
.mc-dd-empty {
  padding: 20px 16px;
  font-size: 0.85rem; color: #999;
  text-align: center;
}

/* ── Brand row ────────────────────────────────────────────────────── */
.mc-brand-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 40px 6px;
  max-width: 1400px;
  margin: 0 auto;
}
#mc-wall .mc-brand-btn {
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #555;
  background: #f6f6f6;
  border: 1px solid transparent;
  border-radius: 24px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  letter-spacing: 0.01em;
}
#mc-wall .mc-brand-btn:hover {
  color: #222;
  background: #ececec;
}
#mc-wall .mc-brand-btn.mc-brand-btn--active {
  color: #111;
  background: #fff;
  border-color: #222;
  font-weight: 700;
}
.mc-brand-count {
  font-size: 0.7rem;
  font-weight: 400;
  color: #999;
  margin-left: 2px;
}

/* ── Family selector (Apple: iPhone / AirPods) ───────────────────── */
.mc-family-row {
  display: none;
  justify-content: center;
  padding: 14px 40px 6px;
  max-width: 1400px;
  margin: 0 auto;
}
.mc-family-row--visible { display: flex; }
.mc-family-list {
  display: flex;
  gap: 14px;
  justify-content: center;
}
#mc-wall .mc-family-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #444;
  background: #f6f6f6;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}
#mc-wall .mc-family-btn:hover {
  color: #222;
  background: #eee;
  transform: translateY(-2px);
}
#mc-wall .mc-family-btn.mc-family-btn--active {
  color: #111;
  background: #fff;
  border-color: #222;
}
.mc-family-icon { font-size: 1.3rem; }
.mc-family-label { letter-spacing: 0.01em; }

/* ── AirPods placeholder ─────────────────────────────────────────── */
.mc-airpods-soon {
  text-align: center;
  padding: 32px 20px;
  font-size: 0.9rem;
  color: #888;
  background: #f9f9f9;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Model row ────────────────────────────────────────────────────── */
.mc-model-row {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 14px 40px 10px;
  max-width: 1400px;
  margin: 0 auto;
}
.mc-model-row--visible {
  display: flex;
}
.mc-model-list {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  row-gap: 10px;
}
/* Hide overflow items — show on expand */
#mc-wall .mc-model-btn.mc-model-btn--overflow {
  display: none !important;
}
#mc-wall .mc-model-row--expanded .mc-model-btn.mc-model-btn--overflow {
  display: inline-flex !important;
}
#mc-wall .mc-model-btn,
#mc-wall .mc-model-btn:link,
#mc-wall .mc-model-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #444 !important;
  background: #f4f4f4;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  text-decoration: none !important;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
#mc-wall .mc-model-btn:hover {
  background: #222;
  border-color: #222;
  color: #fff !important;
}

/* ── "Mostra tutti" toggle ────────────────────────────────────────── */
.mc-model-toggle {
  margin-top: 14px;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #888;
  background: none;
  border: 1px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
  transition: color 0.2s, border-color 0.2s;
}
.mc-model-toggle:hover { color: #222; border-color: #999; }

/* ── Vetrina manuale (landing) ──────────────────────────────────────── */
.mc-vetrina {
  padding: 30px 0 40px;
  max-width: 1600px;
  margin: 0 auto;
}
.mc-vetrina-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 2px;
  padding: 0 16px;
}
.mc-vetrina-sub {
  font-size: 0.82rem;
  color: #999;
  margin: 0 0 18px;
  padding: 0 16px;
}
.mc-vetrina-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 0 40px;
}
#mc-wall .mc-vetrina-card,
#mc-wall .mc-vetrina-card:link,
#mc-wall .mc-vetrina-card:visited {
  display: block;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
@media (hover: hover) {
  #mc-wall .mc-vetrina-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.13);
  }
}
.mc-vetrina-img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f8f8f8;
}
.mc-vetrina-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.mc-vetrina-info {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mc-vetrina-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #222;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mc-vetrina-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.01em;
}

/* ── Vetrina placeholder ─────────────────────────────────────────────── */
.mc-vetrina-empty {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  font-size: 0.92rem;
  line-height: 1.6;
}
.mc-vetrina-empty p { margin: 0 0 8px; }

/* ── Top section (phone mode: title + search) ─────────────────────── */
.mc-top {
  padding: 20px 24px 12px;
  max-width: none;
  margin: 0;
}
.mc-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.mc-top-info { flex-shrink: 0; }
.mc-top-title {
  font-size: 1.4rem; font-weight: 600; margin: 0 0 2px;
  color: #111; letter-spacing: -0.01em;
}
.mc-top-title span { font-weight: 700; }
.mc-top-sub {
  font-size: 0.82rem; color: #777; margin: 0;
}
#mc-wall .mc-top-change,
#mc-wall .mc-top-change:link,
#mc-wall .mc-top-change:visited {
  color: #111 !important; text-decoration: underline !important;
  font-weight: 500; margin-left: 8px;
}
.mc-phone-search--top { width: 320px; flex-shrink: 0; }

/* ── Intro SEO per modello (mc_phone_seo) ───────────────────────── */
.mc-phone-intro {
  max-width: 680px;
  margin: 0 0 20px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #555;
}

/* ── Pill bar (fascia 3+4) ───────────────────────────────────────── */
.mc-pill-bar {
  position: sticky; top: 50px; z-index: 190;
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  padding: 10px 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid #e5e5e5;
  scrollbar-width: none;
}
.mc-pill-bar::-webkit-scrollbar { display: none; }

#mc-wall .mc-pill {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 18px;
  font-size: 0.82rem; font-weight: 500; font-family: inherit;
  color: #555; background: #f4f4f4;
  border: 1px solid #e0e0e0; border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
#mc-wall .mc-pill:hover {
  background: #eaeaea; color: #222;
}
#mc-wall .mc-pill.mc-pill--active {
  background: #111; color: #fff;
  border-color: #111;
}
.mc-pill-count {
  font-size: 0.7rem; font-weight: 600;
  background: rgba(0,0,0,0.08); color: inherit;
  padding: 1px 7px; border-radius: 10px;
}
#mc-wall .mc-pill.mc-pill--active .mc-pill-count {
  background: rgba(255,255,255,0.2);
}

/* ── Section count (inline) ──────────────────────────────────────── */
.mc-section-count {
  font-weight: 400; font-size: 0.85rem; color: #999;
}

/* ── "Mostra altre cover" button ─────────────────────────────────── */
.mc-show-more {
  display: block;
  width: 100%;
  padding: 14px 20px;
  margin: 0;
  font-size: 0.85rem; font-weight: 600; font-family: inherit;
  color: #111; background: #f5f5f5;
  border: none; border-top: 1px solid #e8e8e8;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
  letter-spacing: 0.02em;
}
.mc-show-more:hover { background: #eaeaea; }
.mc-show-more:disabled {
  opacity: 0.5; cursor: default;
}

/* ── Wall section (group) ────────────────────────────────────────── */
.mc-wall-section {
  margin-bottom: 32px;
}
.mc-wall-section:last-child {
  margin-bottom: 0;
}
.mc-wall-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 18px 24px 10px;
  margin: 0;
  border-bottom: 1px solid #e5e5e5;
}

/* ── Cover wall grid — edge to edge ──────────────────────────────── */
.mc-wall-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 0;
  margin: 0;
}

/* ── Cover item (wall mode) ──────────────────────────────────────── */
#mc-wall .mc-wall-item {
  display: block;
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e8e8e8;
  border-radius: 0;
  text-decoration: none;
  transition: transform 0.25s ease;
}
.mc-wall-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
@media (hover: hover) {
  .mc-wall-item:hover {
    transform: scale(1.03);
    z-index: 2;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  }
}

/* Placeholder */
.mc-wall-item-ph {
  width: 100%; height: 100%; background: #f0f0f0;
}

/* ── Card overlay: prezzo sempre visibile, nome su hover ─────────── */
#mc-wall .mc-wall-item .mc-wall-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.50) 0%, rgba(0,0,0,0) 100%);
  opacity: 1;
  pointer-events: none;
  z-index: 5;
  box-sizing: border-box;
  transition: background 0.25s ease;
}
#mc-wall .mc-wall-item .mc-wall-overlay-name {
  font-size: 0.72rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
#mc-wall .mc-wall-item .mc-wall-overlay-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  margin-top: 3px;
  text-decoration: none;
  letter-spacing: 0.01em;
  text-align: right;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
@media (hover: hover) {
  #mc-wall .mc-wall-item:hover .mc-wall-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);
  }
  #mc-wall .mc-wall-item:hover .mc-wall-overlay-name {
    opacity: 1;
  }
  #mc-wall .mc-wall-item:hover .mc-wall-overlay-price {
    text-align: left;
  }
}

/* ── Mobile overlay ──────────────────────────────────────────────── */
@media (hover: none) {
  #mc-wall .mc-wall-item .mc-wall-overlay {
    padding: 16px 6px 6px;
    background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 100%);
  }
  #mc-wall .mc-wall-item .mc-wall-overlay-name { display: none; }
  #mc-wall .mc-wall-item .mc-wall-overlay-price {
    font-size: 0.7rem;
    text-align: right;
  }
}

/* ── SEO pagination nav (crawlable HTML links) ──────────────────── */
.mc-seo-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; flex-wrap: wrap;
  padding: 24px 16px 32px;
}
#mc-wall .mc-seo-page,
#mc-wall .mc-seo-page:link,
#mc-wall .mc-seo-page:visited {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  font-size: 0.82rem; font-weight: 500; font-family: inherit;
  color: #555 !important; background: #f4f4f4;
  border: 1px solid #e0e0e0; border-radius: 6px;
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s;
}
#mc-wall .mc-seo-page:hover {
  background: #222; color: #fff !important; border-color: #222;
}
.mc-seo-page--current {
  background: #111 !important; color: #fff !important;
  border-color: #111 !important; font-weight: 700 !important;
  cursor: default;
}
.mc-seo-page--arrow {
  padding: 0 14px !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.02em;
}
.mc-seo-ellipsis {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 36px;
  font-size: 0.85rem; color: #999;
  user-select: none;
}

/* ── Empty state ──────────────────────────────────────────────────── */
.mc-wall-empty {
  text-align: center; padding: 60px 20px;
  color: #666; font-size: 0.95rem;
}
.mc-wall-empty p { margin: 0 0 16px; }
.mc-wall-empty-btn {
  display: inline-block;
  padding: 10px 24px; background: #111; color: #fff;
  text-decoration: none; font-size: 0.82rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 4px;
  transition: opacity 0.15s;
}
.mc-wall-empty-btn:hover { opacity: 0.85; color: #fff; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .mc-topbar { padding: 0 10px; }
  .mc-topbar-nav { gap: 12px; }
  .mc-topbar-link { font-size: 0.72rem; }
  .mc-trustbar { font-size: 0.68rem; gap: 6px; padding: 6px 10px; }
  .mc-hero { padding: 20px 14px 12px; }
  .mc-hero-row { flex-direction: column; gap: 12px; text-align: center; }
  .mc-hero-title { font-size: 1.3rem; white-space: normal; }
  .mc-phone-search { width: 100%; }
  .mc-phone-search-input { height: 42px; font-size: 0.88rem; }
  #mc-wall .mc-brand-btn { font-size: 0.88rem; padding: 8px 16px; }
  .mc-brand-row { gap: 6px; padding: 0 12px 6px; }
  .mc-family-row { padding: 10px 12px 6px; }
  .mc-family-list { gap: 10px; }
  #mc-wall .mc-family-btn { padding: 12px 22px; font-size: 0.88rem; }
  #mc-wall .mc-model-btn,
  #mc-wall .mc-model-btn:link { padding: 0 14px; font-size: 0.82rem; height: 36px; }
  .mc-model-row { padding: 10px 12px 8px; }
  .mc-model-list { gap: 6px; row-gap: 8px; }
  .mc-top { padding: 16px 14px 10px; }
  .mc-top-row { flex-direction: column; gap: 10px; text-align: center; }
  .mc-top-title { font-size: 1.15rem; }
  .mc-phone-search--top { width: 100%; }
  .mc-top { padding: 12px 10px 4px; }
  .mc-top-title { font-size: 1rem; }
  .mc-pill-bar { top: 50px; padding: 8px 10px; gap: 6px; }
  #mc-wall .mc-pill { padding: 6px 14px; font-size: 0.78rem; }
  .mc-show-more { padding: 12px 14px; font-size: 0.82rem; }
  .mc-seo-pagination { padding: 18px 10px 24px; gap: 3px; }
  #mc-wall .mc-seo-page { min-width: 32px; height: 32px; font-size: 0.78rem; }
  .mc-seo-page--arrow { font-size: 0.72rem !important; padding: 0 10px !important; }
  .mc-wall-section { margin-bottom: 24px; }
  .mc-wall-section-title { font-size: 0.85rem; padding: 14px 10px 8px; }
  .mc-wall-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin: 0;
  }
  .mc-top { padding: 16px 14px 10px; }
  .mc-vetrina { padding: 20px 0 30px; }
  .mc-vetrina-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px;
  }
  .mc-vetrina-info { padding: 8px 10px 12px; }
  .mc-vetrina-name { font-size: 0.78rem; }
  .mc-vetrina-price { font-size: 0.88rem; }
}

@media (max-width: 900px) and (min-width: 641px) {
  .mc-wall-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  .mc-vetrina-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* ── Reduced motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mc-wall-item { transition: none; }
}
