/* Alla produkter */
.ap-hero { height: clamp(140px, 25vw, 400px); background: #6b6b6b center / cover no-repeat; display: flex; align-items: flex-end; justify-content: center; padding: 0 16px 48px; }
.ap-hero h1 { color: #fff; font-size: clamp(20px, 2.6vw, 36px); font-weight: 700; text-align: center; margin: 0; text-shadow: 0 2px 6px rgba(0,0,0,0.35); }

.ap-sok { display: flex; justify-content: center; margin: 64px 16px 24px; }
.ap-sok label { position: relative; width: 100%; max-width: 32rem; display: block; }
.ap-sok svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; }
.ap-sok input { width: 100%; padding: 9px 40px; border: 1px solid #d1d5db; font-size: 16px; background: #fff; }
.ap-sok input:focus { outline: none; border-color: #000; box-shadow: 0 0 0 1px #000; }

.ap-traffar { text-align: center; color: #6b7280; margin: 0 16px 8px; font-size: 14px; }
.ap-traffar a, .ap-tomt a { color: #000; text-decoration: underline; }
.ap-tomt { text-align: center; color: #6b7280; padding: 64px 16px; margin: 0; }

.ap-galler { display: grid; grid-template-columns: repeat(4, 250px); gap: 24px; justify-content: center; margin: 40px auto; padding: 0 16px; }
.ap-kort { position: relative; width: 250px; height: 420px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s; background: #fff; }
  .ap-kort:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
  .ap-lank { display: flex; flex-direction: column; height: 100%; color: inherit; }
  .ap-bild { height: 290px; margin: -16px -16px 0; display: flex; align-items: center; justify-content: center; background: #f9fafb; overflow: hidden; }
  .ap-bild { position: relative; }
  .ap-bild img { width: 100%; height: 100%; object-fit: cover; }
  /* Hover: bild 2 tonar in över huvudbilden, med en lätt inzoomning. Bara på enheter med mus. */
  .ap-bild img.alt { position: absolute; inset: 0; opacity: 0; }
  @media (hover: hover) and (pointer: fine) {
    .ap-bild img { transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1), opacity 0.4s ease; }
    .ap-kort:hover .ap-bild img { transform: scale(1.035); }
    .ap-kort:hover .ap-bild.har-alt img.alt { opacity: 1; }
  }
  @media (prefers-reduced-motion: reduce) {
    .ap-bild img { transition: opacity 0.2s ease !important; transform: none !important; }
  }
  .ap-bild span { font-size: 56px; color: #d1d5db; }
  .ap-text { margin-top: auto; text-align: center; }
  .ap-text h3 { font-size: 16px; font-weight: 500; color: #1f2937; line-height: 1.25; min-height: 48px; margin: 8px 0 4px; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .ap-pris { font-size: 12px; color: #4b5563; margin-bottom: 8px; }
    .ap-pris s { color: #9ca3af; margin-left: 4px; }
    .ap-zoom { position: absolute; top: 8px; left: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: none; background: #fff;
      color: #374151; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; }
      .ap-zoom:hover { background: #f3f4f6; }

      .ap-sidor { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 32px 16px 40px; flex-wrap: wrap; }
      .ap-sidor a, .ap-sidor span { min-width: 34px; text-align: center; padding: 4px 12px; border: 1px solid #d1d5db; color: #111; }
      .ap-sidor a:hover { background: #e5e7eb; }
      .ap-sidor .aktiv, .ap-sidor .pil { background: #000; color: #fff; border-color: #000; }
      .ap-sidor .pil:hover { background: #333; }
      .ap-sidor .pil.av { background: #9ca3af; border-color: #9ca3af; }
      .ap-sidor .glapp { border: none; color: #6b7280; padding: 4px 4px; min-width: 0; }

      dialog.ap-ljus { padding: 0; border: none; background: #fff; max-width: min(900px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
      dialog.ap-ljus::backdrop { background: rgba(0,0,0,0.7); }
      dialog.ap-ljus img { display: block; max-width: 100%; max-height: calc(100dvh - 24px); object-fit: contain; }
      dialog.ap-ljus .stang { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: none; background: #fff;
        box-shadow: 0 1px 6px rgba(0,0,0,0.25); font-size: 18px; cursor: pointer; }

        @media (max-width: 1159px) { .ap-galler { grid-template-columns: repeat(3, 250px); } }
        @media (max-width: 879px)  { .ap-galler { grid-template-columns: repeat(2, 250px); } }
        @media (max-width: 599px)  {
          .ap-hero { padding-bottom: 20px; }
          .ap-sok { margin-top: 32px; }
          .ap-galler { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 12px; margin: 24px auto; }
          .ap-kort { width: auto; height: auto; padding: 10px; }
          .ap-bild { height: 200px; margin: -10px -10px 0; }
          .ap-text h3 { font-size: 14px; min-height: 0; }
        }

        #produkter[aria-busy="true"] { opacity: 0.55; transition: opacity 0.15s; }
