/**
 * MAJ COMMERCE — service / product landings, MOBILE ONLY (≤768px).
 * Desktop is unchanged; all rules are inside the media query below.
 */

@media (max-width: 768px) {
  /* ---- Shared: calmer motion & noise ---- */
  body.page-pvc .reveal,
  body.page-roletne .reveal,
  body.page-metalni .reveal,
  body.page-panelne .panel-reveal {
    transition-duration: 0.2s !important;
    transition-delay: 0ms !important;
  }

  body.page-pvc .cursor-glow,
  body.page-roletne .cursor-glow,
  body.page-metalni .cursor-glow,
  body.page-panelne .cursor-glow,
  body.page-plast .cursor-glow {
    display: none !important;
  }

  body.page-pvc .scroll-progress,
  body.page-roletne .scroll-progress,
  body.page-metalni .scroll-progress,
  body.page-panelne .scroll-progress,
  body.page-plast .scroll-progress {
    opacity: 0.35;
    height: 2px;
  }

  /* Readable copy */
  body.page-pvc main,
  body.page-roletne main,
  body.page-metalni main,
  body.page-panelne main,
  body.page-plast main {
    line-height: 1.65;
  }

  body.page-pvc main p,
  body.page-roletne main p,
  body.page-metalni main p,
  body.page-panelne main p,
  body.page-plast main p {
    line-height: 1.65;
    margin-bottom: 0.85rem;
  }

  body.page-pvc main .container,
  body.page-roletne main .container,
  body.page-metalni main .container,
  body.page-plast main .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.page-panelne main .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Softer elevation on phones */
  body.page-pvc .pvc-benefit-card,
  body.page-pvc .pvc-product-tile,
  body.page-metalni .metal-card,
  body.page-plast .plast-benefit,
  body.page-plast .plast-step {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
  }

  /* ---- PVC + ALU — hero ispod headera, dovoljno visoko, CTA centrirano ---- */
  body.page-pvc .pvc-hero {
    margin-top: calc(-1 * var(--header-h)) !important;
    min-height: min(74vh, 680px) !important;
    max-height: none !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    padding: calc(var(--header-h) + 1rem) max(1.15rem, env(safe-area-inset-left)) 2.25rem
      max(1.15rem, env(safe-area-inset-right)) !important;
  }

  body.page-pvc .pvc-hero__inner {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  body.page-pvc .pvc-hero__kicker,
  body.page-pvc .pvc-hero__title,
  body.page-pvc .pvc-hero__headline,
  body.page-pvc .pvc-hero__sub {
    margin-left: auto;
    margin-right: auto;
    text-align: center !important;
  }

  body.page-pvc .pvc-hero__title {
    font-size: clamp(1.5rem, 6vw, 2.05rem) !important;
    max-width: 22ch !important;
  }

  body.page-pvc .pvc-hero__headline {
    font-size: 1rem !important;
    max-width: 40ch !important;
  }

  body.page-pvc .pvc-hero__sub {
    font-size: 0.92rem !important;
    max-width: none !important;
  }

  body.page-pvc .pvc-hero__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    align-self: center !important;
    width: 100%;
    max-width: 20rem;
    margin-left: auto !important;
    margin-right: auto !important;
    gap: 0.65rem !important;
  }

  body.page-pvc .pvc-hero__actions .btn {
    width: 100% !important;
    justify-content: center;
  }

  body.page-pvc .pvc-hero__grain,
  body.page-pvc .pvc-hero__accent-line,
  body.page-pvc .pvc-hero__window-deco {
    display: none !important;
  }

  body.page-pvc .pvc-window-showcase__mesh,
  body.page-pvc .pvc-window-showcase__glow {
    display: none !important;
  }

  body.page-pvc .pvc-window-showcase {
    padding: 40px 0 !important;
  }

  body.page-pvc .pvc-window-showcase__hint {
    display: none !important;
  }

  body.page-pvc .pvc-window-showcase__grid .pvc-window:nth-child(n + 3) {
    display: none !important;
  }

  body.page-pvc .section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  body.page-pvc .pvc-benefits__track .pvc-benefit-card:nth-child(n + 4) {
    display: none !important;
  }

  body.page-pvc .pvc-benefits__dots {
    margin-top: 0.75rem;
  }

  body.page-pvc .pvc-products__intro {
    display: none !important;
  }

  body.page-pvc .pvc-products__grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  body.page-pvc .pvc-products__grid .pvc-product-tile:nth-child(n + 4) {
    display: none !important;
  }

  body.page-pvc .pvc-quality__grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  body.page-pvc .pvc-quality__visual img {
    width: 100%;
    border-radius: 12px;
  }

  body.page-pvc .stats-band__grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  body.page-pvc .cta-final__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  body.page-pvc .cta-final__actions .btn {
    width: 100% !important;
    justify-content: center;
  }

  body.page-pvc .cta-final__meta {
    font-size: 0.85rem;
    opacity: 0.85;
  }

  /* Secondary copy on mobile */
  body.page-pvc .section-sub--center {
    font-size: 0.92rem !important;
    max-width: 36ch;
    margin-left: auto;
    margin-right: auto;
  }

  /* ---- Roletne + Garažna: hero — slika full-bleed preko cijelog heroja, tekst u overlayu ---- */
  body.page-roletne .roletne-hero {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    min-height: min(88vh, 780px) !important;
    max-height: none !important;
    padding-bottom: 0 !important;
  }

  body.page-roletne .roletne-hero::before {
    background:
      linear-gradient(
        180deg,
        rgba(8, 14, 22, 0.92) 0%,
        rgba(8, 14, 22, 0.55) 42%,
        rgba(8, 14, 22, 0.72) 100%
      ),
      radial-gradient(90% 60% at 50% 100%, rgba(0, 0, 0, 0.35), transparent 55%) !important;
    z-index: 2 !important;
  }

  body.page-roletne .roletne-hero__content {
    position: relative !important;
    z-index: 3 !important;
    flex: 1 1 auto !important;
    max-width: 100% !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 1.35rem max(1.15rem, env(safe-area-inset-left)) 1.5rem max(1.15rem, env(safe-area-inset-right)) !important;
    min-height: min(52vh, 420px) !important;
  }

  body.page-roletne .roletne-hero__tag {
    justify-content: center;
  }

  body.page-roletne .roletne-hero__title {
    font-size: clamp(1.5rem, 6vw, 2.05rem) !important;
  }

  body.page-roletne .roletne-hero__lead {
    font-size: 0.95rem !important;
    max-width: none !important;
    margin-left: auto;
    margin-right: auto;
  }

  body.page-roletne .roletne-hero__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    align-self: center !important;
    width: 100%;
    max-width: 20rem;
    margin-left: auto !important;
    margin-right: auto !important;
    gap: 0.65rem !important;
  }

  body.page-roletne .roletne-hero__actions .btn {
    width: 100% !important;
    justify-content: center;
  }

  body.page-roletne .roletne-hero__visual {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    flex: unset !important;
    padding: 0 !important;
  }

  body.page-roletne .roletne-hero__frame {
    position: absolute !important;
    inset: 0 !important;
    border-radius: 0 !important;
    overflow: hidden;
  }

  body.page-roletne .roletne-hero__bg {
    min-height: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center center !important;
  }

  body.page-roletne .roletne-hero__badge {
    display: none !important;
  }

  body.page-roletne .roletne-facts {
    margin-top: 0 !important;
    padding-top: 1.25rem !important;
    padding-bottom: 1.5rem !important;
    z-index: 4 !important;
  }

  body.page-roletne .roletne-facts__inner {
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 1rem 16px !important;
    border-radius: var(--radius) !important;
  }

  body.page-roletne .roletne-bento__grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  body.page-roletne .roletne-bento__cell--img img {
    border-radius: 12px;
    width: 100%;
  }

  body.page-roletne .roletne-types__grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  body.page-roletne .roletne-types__grid .roletne-type-card:nth-child(n + 4) {
    display: none !important;
  }

  body.page-roletne .roletne-detail__grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  body.page-roletne .roletne-detail__visual img {
    border-radius: 12px;
    width: 100%;
  }

  body.page-roletne .section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  body.page-roletne .stats-band__grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  body.page-roletne .roletne-cta .cta-final__actions,
  body.page-roletne .cta-final__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  body.page-roletne .roletne-cta .cta-final__actions .btn,
  body.page-roletne .cta-final__actions .btn {
    width: 100% !important;
    justify-content: center;
  }

  /* ---- Metal (hero već ima margin-top + padding-top za header) ---- */
  body.page-metalni .metal-hero {
    min-height: min(74vh, 680px) !important;
    max-height: none !important;
    align-items: flex-end !important;
    padding-bottom: 2rem !important;
  }

  body.page-metalni .metal-hero__grain {
    opacity: 0.05 !important;
  }

  body.page-metalni .metal-hero__bg {
    animation: none !important;
    transform: none !important;
  }

  body.page-metalni .metal-hero__inner {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.page-metalni .metal-hero__title {
    font-size: clamp(1.5rem, 6vw, 2.05rem) !important;
    max-width: none !important;
  }

  body.page-metalni .metal-hero__lead {
    font-size: 0.95rem !important;
    max-width: none !important;
    margin-left: auto;
    margin-right: auto;
  }

  body.page-metalni .metal-hero__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    max-width: 20rem !important;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    gap: 0.65rem !important;
    justify-content: center !important;
  }

  body.page-metalni .metal-hero__actions .btn {
    width: 100% !important;
    justify-content: center;
  }

  body.page-metalni .metal-offer__grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  body.page-metalni .metal-offer__grid .metal-card:nth-child(n + 4) {
    display: none !important;
  }

  body.page-metalni .metal-usecases__row {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  body.page-metalni .metal-usecases .metal-use:nth-child(n + 4) {
    display: none !important;
  }

  body.page-metalni .metal-quality__grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  body.page-metalni .metal-quality__visual img {
    border-radius: 12px;
    width: 100%;
  }

  body.page-metalni .metal-trust__grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  body.page-metalni .section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  body.page-metalni .metal-cta__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  body.page-metalni .metal-cta__actions .btn {
    width: 100% !important;
    justify-content: center;
  }

  /* ---- Panelne + žičana — tekst ispod fiksiranog headera ---- */
  body.page-panelne .panel-hero {
    min-height: min(74vh, 680px) !important;
    max-height: none !important;
  }

  body.page-panelne .panel-hero__inner {
    min-height: min(74vh, 680px) !important;
    align-items: flex-end !important;
    padding: calc(var(--header-h) + 1rem) 0 2rem !important;
    box-sizing: border-box;
  }

  body.page-panelne .panel-hero__content {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    max-width: 100% !important;
  }

  body.page-panelne .panel-hero__title {
    font-size: clamp(1.5rem, 6vw, 2.05rem) !important;
  }

  body.page-panelne .panel-hero__lead {
    font-size: 0.95rem !important;
    max-width: none !important;
    margin-left: auto;
    margin-right: auto;
  }

  body.page-panelne .panel-hero__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    max-width: 20rem !important;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.page-panelne .panel-hero__actions .btn {
    width: 100% !important;
    justify-content: center;
  }

  body.page-panelne .panel-section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  body.page-panelne .panel-types {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  body.page-panelne .panel-type-card__visual img {
    border-radius: 12px;
    width: 100%;
  }

  body.page-panelne .panel-use-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  body.page-panelne .panel-use-grid .panel-use:nth-child(n + 4) {
    display: none !important;
  }

  body.page-panelne .panel-use-strip {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  body.page-panelne .panel-use-strip__item:nth-child(n + 4) {
    display: none !important;
  }

  body.page-panelne .panel-colors {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  body.page-panelne .panel-quality {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  body.page-panelne .panel-quality__visual img {
    border-radius: 12px;
    width: 100%;
  }

  body.page-panelne .panel-gallery__grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  body.page-panelne .panel-gallery__item:nth-child(n + 4) {
    display: none !important;
  }

  body.page-panelne .panel-gallery__item img {
    border-radius: 12px;
    width: 100%;
  }

  body.page-panelne .panel-cta__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  body.page-panelne .panel-cta__actions .btn {
    width: 100% !important;
    justify-content: center;
  }

  body.page-panelne .panel-trust__grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  /* ---- Plastifikacija + zaštita (plast-hero već kompenzuje header u plastifikacija.css) ---- */
  body.page-plast .plast-hero {
    min-height: min(74vh, 680px) !important;
    max-height: none !important;
    align-items: flex-end !important;
  }

  body.page-plast .plast-hero__inner {
    padding: 1rem 0 2.25rem !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  body.page-plast .plast-hero__crumb {
    align-self: flex-start;
    width: 100%;
    text-align: left;
  }

  body.page-plast .plast-hero__title {
    font-size: clamp(1.5rem, 6vw, 2.05rem) !important;
  }

  body.page-plast .plast-hero__sub {
    font-size: 0.95rem !important;
    margin-bottom: 1rem !important;
    max-width: none !important;
  }

  body.page-plast .plast-hero .btn {
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  body.page-plast .plast-intro {
    padding: 40px 0 !important;
  }

  body.page-plast .plast-intro__grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  body.page-plast .plast-intro__figure img {
    border-radius: 12px;
    width: 100%;
  }

  body.page-plast .plast-intro__text + .plast-intro__text {
    display: none !important;
  }

  body.page-plast .plast-process__steps {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  body.page-plast .plast-process .plast-step:nth-child(n + 4) {
    display: none !important;
  }

  body.page-plast .plast-benefits__grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  body.page-plast .plast-benefits__grid .plast-benefit:nth-child(n + 4) {
    display: none !important;
  }

  body.page-plast .plast-gallery__grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  body.page-plast .plast-gallery__cell:nth-child(n + 2) {
    display: none !important;
  }

  body.page-plast .plast-gallery__cell img {
    border-radius: 12px;
    width: 100%;
  }

  body.page-plast .plast-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  body.page-plast .plast-cta .btn {
    width: 100% !important;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  body.page-plast .plast-section-head__sub {
    font-size: 0.92rem !important;
  }

  body.page-plast .plast-process,
  body.page-plast .plast-benefits,
  body.page-plast .plast-gallery {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  /* ---- Collapsible “Povezano” (details) ---- */
  details.svc-mobile-details--seo {
    border: 0;
    margin: 0;
    padding: 0;
  }

  details.svc-mobile-details--seo > summary.svc-mobile-details__sum {
    list-style: none;
    cursor: pointer;
    padding: 12px 16px;
    margin: 0 0 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  details.svc-mobile-details--seo > summary.svc-mobile-details__sum::-webkit-details-marker {
    display: none;
  }

  details.svc-mobile-details--seo[open] > summary.svc-mobile-details__sum {
    margin-bottom: 12px;
    border-radius: 10px 10px 0 0;
  }

  details.svc-mobile-details--seo .container {
    padding-top: 4px;
  }

  .svc-mobile-details--seo .seo-related__title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* Desktop: native details look like a flat section (summary hidden) */
@media (min-width: 769px) {
  details.svc-mobile-details--seo {
    display: block;
    border: 0;
  }

  details.svc-mobile-details--seo > summary.svc-mobile-details__sum {
    display: none !important;
  }

  details.svc-mobile-details--seo > .container {
    padding-top: 0;
  }

  .svc-mobile-details--seo .seo-related__title {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: initial !important;
    clip: auto !important;
    overflow: visible !important;
  }
}
