/* ============================================================
   QuiQuoQua · Listing categoria mobile
   Head · Editorial hero · Filter bar sticky · Chip attivi · Grid
   Bottom sheet (filtri + ordina)
   ============================================================ */

/* =============== LISTING HEAD =============== */
.qq-listing-head {
  padding: var(--qq-space-4) var(--qq-container-x) var(--qq-space-3);
}

.qq-listing-head__crumbs {
  font-family: var(--qq-font-sans);
  font-size: 11px;
  font-weight: var(--qq-fw-semi);
  letter-spacing: var(--qq-ls-kicker);
  text-transform: uppercase;
  color: var(--qq-muted);
  margin-bottom: 8px;
}

.qq-listing-head__crumbs a { color: var(--qq-muted); text-decoration: none; }
.qq-listing-head__crumbs a:hover { color: var(--qq-ink); }
.qq-listing-head__crumbs .qq-breadcrumb__sep { margin: 0 6px; opacity: 0.6; }

.qq-listing-head__title {
  font-family: var(--qq-font-serif);
  font-size: 32px;
  line-height: 1.05;
  font-weight: var(--qq-fw-regular);
  color: var(--qq-ink);
  margin: 0 0 4px;
  letter-spacing: var(--qq-ls-tight);
}
.qq-listing-head__title em { font-style: italic; }

.qq-listing-head__count {
  font-family: var(--qq-font-sans);
  font-size: 12px;
  color: var(--qq-muted);
}

/* =============== ACCOUNT HEAD + NAV (profilo / ordini / wishlist) =============== */
.qq-account-head {
  padding-bottom: var(--qq-space-2);
}

.qq-account-head__sub {
  font-family: var(--qq-font-sans);
  font-size: var(--qq-fs-small);
  color: var(--qq-muted);
  line-height: var(--qq-lh-body);
  margin-top: 4px;
}

.qq-account-nav {
  display: flex;
  gap: 8px;
  padding: 0 var(--qq-container-x) var(--qq-space-4);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.qq-account-nav::-webkit-scrollbar { display: none; }

.qq-account-nav__item {
  flex: 0 0 auto;
}

.qq-account-nav__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--qq-canary);
  display: inline-block;
  flex: 0 0 6px;
}

@media (min-width: 768px) {
  .qq-account-nav {
    padding-bottom: var(--qq-space-6);
    gap: 10px;
  }
}

/* =============== EDITORIAL HERO (banner categoria) =============== */
.qq-editorial-hero {
  margin: 0 var(--qq-container-x) var(--qq-space-4);
  padding: var(--qq-space-5) var(--qq-space-5);
  border-radius: var(--qq-radius-sm);
  background: linear-gradient(90deg, var(--qq-blush) 0%, var(--qq-cream-warm) 100%);
  min-height: 100px;
  display: flex;
  align-items: center;
}

.qq-editorial-hero__text {
  font-family: var(--qq-font-serif);
  font-size: 18px;
  line-height: 1.2;
  color: var(--qq-ink);
  max-width: 26ch;
  margin: 0;
}
.qq-editorial-hero__text em { font-style: italic; }

/* =============== FILTER BAR STICKY =============== */
.qq-filter-bar {
  position: sticky;
  top: var(--qq-header-h);
  z-index: var(--qq-z-sticky);
  background: var(--qq-cream);
  border-top: 1px solid var(--qq-line);
  border-bottom: 1px solid var(--qq-line);
  display: flex;
  gap: 8px;
  padding: 10px var(--qq-container-x);
  overflow-x: auto;
  scrollbar-width: none;
}
.qq-filter-bar::-webkit-scrollbar { display: none; }

.qq-filter-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--qq-font-sans);
  font-size: 13px;
  font-weight: var(--qq-fw-semi);
  padding: 8px 14px;
  border: 1px solid var(--qq-ink);
  border-radius: var(--qq-radius-pill);
  background: transparent;
  color: var(--qq-ink);
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
}
.qq-filter-bar__btn:hover { background: var(--qq-sand); }

.qq-filter-bar__btn--fill {
  background: var(--qq-ink);
  color: var(--qq-white);
}
.qq-filter-bar__btn--fill:hover { background: var(--qq-ink); }

.qq-filter-bar__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--qq-canary);
  color: var(--qq-ink);
  font-size: 10px;
  font-weight: var(--qq-fw-bold);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--qq-radius-pill);
  margin-left: 2px;
}

/* =============== ACTIVE CHIPS =============== */
.qq-active-chips {
  display: flex;
  gap: 8px;
  padding: 10px var(--qq-container-x);
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: wrap;
}
.qq-active-chips::-webkit-scrollbar { display: none; }

.qq-active-chips__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--qq-font-sans);
  font-size: 12px;
  font-weight: var(--qq-fw-semi);
  padding: 6px 12px;
  background: var(--qq-sand);
  border-radius: var(--qq-radius-pill);
  border: 0;
  color: var(--qq-ink);
  cursor: pointer;
  text-decoration: none;
}
.qq-active-chips__item::after {
  content: "×";
  font-weight: var(--qq-fw-bold);
  font-size: 14px;
  line-height: 1;
}
.qq-active-chips__item:hover { background: var(--qq-cream-warm); }

/* =============== PRODUCT GRID =============== */
.qq-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: var(--qq-space-3) var(--qq-container-x) var(--qq-space-8);
}

@media (min-width: 768px) {
  .qq-product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (min-width: 1200px) {
  .qq-product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

.qq-load-more {
  display: flex;
  justify-content: center;
  padding: var(--qq-space-3) var(--qq-container-x) var(--qq-space-9);
}

.qq-empty-state {
  text-align: center;
  padding: var(--qq-space-9) var(--qq-container-x);
}
.qq-empty-state h3 {
  font-family: var(--qq-font-serif);
  font-size: 22px;
  font-weight: var(--qq-fw-medium);
  margin: 0 0 8px;
}
.qq-empty-state p { color: var(--qq-muted); font-size: 14px; margin: 0 0 16px; }

/* =============== BOTTOM SHEET (filtri + ordina) =============== */
.qq-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--qq-z-sheet);
  visibility: hidden;
  pointer-events: none;
}
.qq-sheet.is-open { visibility: visible; pointer-events: auto; }

.qq-sheet__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  opacity: 0;
  transition: opacity var(--qq-t-base);
}
.qq-sheet.is-open .qq-sheet__overlay { opacity: 1; }

.qq-sheet__panel {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  max-height: 85vh;
  background: var(--qq-cream);
  border-radius: var(--qq-radius-lg) var(--qq-radius-lg) 0 0;
  transform: translateY(100%);
  transition: transform var(--qq-t-slow);
  display: flex;
  flex-direction: column;
}
.qq-sheet.is-open .qq-sheet__panel { transform: translateY(0); }

.qq-sheet__handle {
  width: 40px;
  height: 4px;
  background: var(--qq-line);
  border-radius: 2px;
  margin: 12px auto 0;
}

.qq-sheet__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--qq-space-4) var(--qq-container-x) var(--qq-space-3);
  border-bottom: 1px solid var(--qq-line);
}

.qq-sheet__title {
  font-family: var(--qq-font-serif);
  font-size: 20px;
  font-weight: var(--qq-fw-medium);
  margin: 0;
}

.qq-sheet__close {
  border: 0;
  background: transparent;
  font-size: 20px;
  color: var(--qq-ink);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--qq-radius-xs);
}

.qq-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--qq-space-4) var(--qq-container-x);
}

.qq-sheet__foot {
  padding: var(--qq-space-3) var(--qq-container-x);
  border-top: 1px solid var(--qq-line);
  display: flex;
  gap: 10px;
  background: var(--qq-cream);
}

.qq-sheet__foot .qq-btn { flex: 1; }

/* Sort item */
.qq-sort-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--qq-line);
  font-family: var(--qq-font-sans);
  font-size: 15px;
  color: var(--qq-ink);
  cursor: pointer;
}
.qq-sort-item.is-active { font-weight: var(--qq-fw-bold); }
.qq-sort-item.is-active::after {
  content: "✓";
  color: var(--qq-canary);
  font-weight: var(--qq-fw-bold);
  font-size: 16px;
}

/* =============== LISTING SEO (blocco editoriale fondo pagina) =============== */
/* Occupa la full-width del .qq-page-listing (che non ha padding orizzontale
   sul wrapper: sono i figli come .qq-listing-head ad applicarlo).
   Background cream-warm per staccare dalla grid prodotti + hairline top/bottom. */
.qq-listing-seo {
  margin-top: var(--qq-space-9);
  padding: var(--qq-space-8) var(--qq-container-x);
  background: var(--qq-cream-warm);
  border-top: 1px solid var(--qq-line);
  border-bottom: 1px solid var(--qq-line);
}

.qq-listing-seo__inner {
  max-width: 640px;
  margin: 0 auto;
}

.qq-listing-seo__kicker {
  font-family: var(--qq-font-sans);
  font-size: var(--qq-fs-kicker);
  font-weight: var(--qq-fw-bold);
  letter-spacing: var(--qq-ls-kicker);
  text-transform: uppercase;
  color: var(--qq-muted);
  margin-bottom: var(--qq-space-2);
}

.qq-listing-seo__title {
  font-family: var(--qq-font-serif);
  font-size: var(--qq-fs-h2);
  line-height: var(--qq-lh-heading);
  font-weight: var(--qq-fw-medium);
  color: var(--qq-ink);
  letter-spacing: var(--qq-ls-tight);
  margin: 0 0 var(--qq-space-4);
}

.qq-listing-seo__body {
  font-family: var(--qq-font-sans);
  font-size: var(--qq-fs-body);
  line-height: var(--qq-lh-body);
  color: var(--qq-ink-soft);
}
.qq-listing-seo__body p { margin: 0 0 var(--qq-space-4); }
.qq-listing-seo__body p:last-child { margin-bottom: 0; }
.qq-listing-seo__body strong {
  color: var(--qq-ink);
  font-weight: var(--qq-fw-semi);
}
.qq-listing-seo__body a {
  color: var(--qq-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 768px) {
  .qq-listing-seo {
    margin-top: var(--qq-space-10);
    padding: var(--qq-space-9) var(--qq-container-x);
  }
  .qq-listing-seo__title { margin-bottom: var(--qq-space-5); }
}
