/* Responsive navigation, product variants and online-exclusive range. */
body:not(.qsf-homepage) main {
  padding-top: 6.7rem;
}

.qsf-brand,
.qsf-header-actions {
  flex: 0 0 auto;
}

.qsf-nav {
  min-width: 0;
}

.qsf-online-exclusive-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.35rem 0 0.2rem;
  padding: 0.34rem 0.62rem;
  border: 1px solid rgba(138, 101, 0, 0.25);
  border-radius: 999px;
  background: #fff7dc;
  color: #765600;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.qsf-card-variants {
  margin: 0.7rem 0 0.8rem;
}

.qsf-card-variants-head,
.qsf-product-variants-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.qsf-card-variants-head {
  margin-bottom: 0.45rem;
  color: var(--qsf-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qsf-card-variants-head span:last-child {
  overflow: hidden;
  max-width: 58%;
  color: var(--qsf-green);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qsf-card-variant-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.qsf-variant-swatch {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.12rem;
  overflow: hidden;
  border: 1px solid rgba(25, 32, 14, 0.16);
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.qsf-variant-swatch:hover,
.qsf-variant-swatch.is-selected {
  border-color: var(--qsf-gold);
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.qsf-variant-swatch img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.qsf-variant-swatch.is-unavailable::after {
  content: '';
  position: absolute;
  inset: 50% -0.25rem auto;
  height: 1px;
  background: rgba(112, 31, 31, 0.75);
  transform: rotate(-42deg);
}

.qsf-card-variant-more {
  display: grid;
  place-items: center;
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--qsf-cream);
  color: var(--qsf-green);
  font-size: 0.68rem;
  font-weight: 800;
}

.qsf-product-variants {
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--qsf-line);
  border-radius: var(--qsf-radius);
  background: #fffdf8;
}

.qsf-product-variants-head {
  margin-bottom: 0.8rem;
}

.qsf-product-variants-head h2 {
  margin: 0;
  color: var(--qsf-green);
  font-family: Inter, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.qsf-product-variants-head span {
  color: #765600;
  font-size: 0.78rem;
  font-weight: 800;
}

.qsf-product-variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.qsf-product-variant {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  padding: 0.45rem;
  border: 1px solid rgba(25, 32, 14, 0.12);
  border-radius: 6px;
  background: #fff;
}

.qsf-product-variant:hover,
.qsf-product-variant.is-selected {
  border-color: var(--qsf-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.qsf-product-variant img {
  width: 3rem;
  height: 3rem;
  border-radius: 4px;
  object-fit: cover;
}

.qsf-product-variant span,
.qsf-product-variant strong,
.qsf-product-variant small {
  display: block;
  min-width: 0;
}

.qsf-product-variant strong {
  overflow: hidden;
  color: var(--qsf-green);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qsf-product-variant small {
  margin-top: 0.16rem;
  color: var(--qsf-muted);
  font-size: 0.64rem;
  line-height: 1.25;
}

.qsf-product-variant.is-unavailable {
  opacity: 0.62;
}

@media (min-width: 861px) and (max-width: 1560px) {
  .qsf-announcement {
    display: none;
  }

  .qsf-site-header {
    top: var(--qsf-promo-bar-height, 31px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "brand spacer actions"
      "nav nav nav";
    column-gap: 1.25rem;
    row-gap: 0;
    min-height: 8.15rem;
    padding: 0.4rem clamp(1rem, 3vw, 3rem) 0;
  }

  .qsf-site-header.is-scrolled {
    top: 0;
    min-height: 7.75rem;
    padding: 0.3rem clamp(1rem, 3vw, 3rem) 0;
  }

  body:not(.qsf-homepage) main {
    padding-top: 8.15rem;
  }

  .qsf-brand {
    grid-area: brand;
    justify-self: start;
  }

  .qsf-brand img {
    width: 4.3rem;
    height: 4.3rem;
  }

  .qsf-brand span {
    display: grid;
  }

  .qsf-brand strong {
    font-size: clamp(1.25rem, 1.75vw, 1.65rem);
  }

  .qsf-brand small {
    font-size: 0.6rem;
  }

  .qsf-menu-button {
    display: none;
  }

  .qsf-header-actions {
    grid-area: actions;
    justify-self: end;
    gap: clamp(0.8rem, 1.5vw, 1.15rem);
  }

  .qsf-nav {
    position: static;
    grid-area: nav;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(0.65rem, 1.25vw, 1.35rem);
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
  }

  .qsf-nav-item {
    display: inline-block;
    width: auto;
    border: 0;
  }

  .qsf-nav-item > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.15rem;
    padding: 0.8rem 0;
    font-size: clamp(0.56rem, 0.68vw, 0.68rem);
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .qsf-mega-menu {
    top: 100%;
  }
}

@media (max-width: 860px) {
  .qsf-announcement {
    display: none;
  }

  .qsf-site-header {
    top: var(--qsf-promo-bar-height, 31px);
    gap: 0.7rem;
    min-height: 5.5rem;
    padding: 0.5rem clamp(0.8rem, 3vw, 2rem);
  }

  .qsf-site-header.is-scrolled {
    top: 0;
    min-height: 5rem;
  }

  body:not(.qsf-homepage) main {
    padding-top: 5.5rem;
  }

  .qsf-brand span {
    display: none;
  }

  .qsf-brand img {
    width: 4.25rem;
    height: 4.25rem;
  }

  .qsf-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
  }

  .qsf-header-actions {
    gap: clamp(0.75rem, 2vw, 1.1rem);
  }

  .qsf-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100svh - 5rem);
    margin: 0;
    padding: 0.55rem 1rem 1rem;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 2px solid var(--qsf-gold);
    background: var(--qsf-green);
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.28);
  }

  .qsf-nav.is-open {
    display: flex;
  }

  .qsf-nav-item {
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .qsf-nav-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    padding: 1rem 0.5rem;
    font-size: 0.8rem;
  }

  .qsf-has-mega {
    position: relative !important;
  }

  .qsf-mega-menu {
    position: static;
    display: none;
    width: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.24);
    box-shadow: none;
  }

  .qsf-has-mega.is-active .qsf-mega-menu {
    display: block;
  }

  .qsf-has-mega.is-active::after {
    display: none;
  }

  .qsf-mega-shell {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    padding: 1rem 0.65rem 1.25rem;
  }

  .qsf-mega-intro,
  .qsf-mega-feature {
    display: none;
  }

  .qsf-mega-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 0;
  }

  .qsf-mega-links a {
    min-height: 0;
    padding: 0.5rem 0.55rem !important;
  }

  .qsf-mega-links a span {
    display: none;
  }
}

@media (max-width: 700px) {
  .qsf-mega-catalog,
  .qsf-product-variant-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .qsf-menu-button span {
    display: none;
  }

  .qsf-menu-button {
    padding-inline: 0.7rem;
  }

  .qsf-brand img {
    width: 3.8rem;
    height: 3.8rem;
  }
}
