/* Scoped additions: the theme and existing catalog filters remain intact. */
.hero__slide.shangu-hero-previous { opacity: 1; visibility: visible; }
.hero__slide.is-active.shangu-hero-pending { opacity: 0; visibility: hidden; }
.hero__slide.is-active { z-index: 1; }
.hero__slide.shangu-hero-previous { z-index: 0; }
.hero__slide img[data-shangu-deferred] { visibility: hidden; }
.hero__slide img.shangu-image-failed { visibility: hidden; }
.project .shangu-project-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project .shangu-project-image[data-shangu-deferred] { visibility: hidden; }

@media (max-width: 760px) {
  /* Put the message and action near the top, above first-visit consent UI. */
  .hero { height: clamp(380px, 68svh, 600px); min-height: 380px; }
  .hero__content { top: 32px; bottom: auto; }
  .hero__title { font-size: clamp(36px, 10vw, 44px); line-height: 1.04; }
  .hero__text { margin: 12px 0 20px; max-width: 32ch; font-size: 16px; line-height: 1.45; }
  .hero__controls { bottom: 24px; }
  .hero__controls { gap: 14px; }
  .hero__count { white-space: nowrap; font-size: 12px; }
  .hero__dots { gap: 6px; }
  .hero__dots button { width: 24px; }
  .hero__dots button.is-active { width: 36px; }
  .hero__pause { padding-inline: 10px; }

  .cookie-banner {
    padding: 14px 16px max(14px, env(safe-area-inset-bottom));
    max-height: 60svh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .cookie-banner h2 { margin-bottom: 6px; font-size: 16px; line-height: 1.25; }
  .cookie-banner p { font-size: 12px; line-height: 1.45; }
  .cookie-banner__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 10px;
    align-items: stretch;
  }
  .cookie-banner__actions > .btn,
  .cookie-banner__actions > [data-cookie-settings] {
    width: auto;
    height: auto;
    min-height: 44px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
  }
  .cookie-banner__actions > [data-cookie-accept],
  .cookie-banner__actions > [data-cookie-reject] {
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
  }
  .cookie-banner__actions > [data-cookie-accept]:hover,
  .cookie-banner__actions > [data-cookie-reject]:hover { background: var(--soft); }
  .cookie-banner__actions > [data-cookie-settings] { padding-inline: 4px; }
  body.cookie-visible { padding-bottom: var(--shangu-cookie-height, 180px); }
  body.cookie-visible .pd-bar { bottom: var(--shangu-cookie-height, 180px); }
  /* Short phones still expose the slider controls above the compact notice. */
  body.cookie-visible .hero__controls {
    bottom: max(24px, calc(min(var(--shangu-cookie-height, 180px), 180px) + clamp(380px, 68svh, 600px) + var(--header-h) + 16px - 100svh));
  }
}

@media (max-width: 360px), (max-height: 620px) and (max-width: 760px) {
  .hero__content { top: 24px; }
  .hero__text { font-size: 15px; line-height: 1.4; }
}
