/*
 * Asortyment pages (the hub and 12 categories moved from WordPress), loaded only by
 * templates/pages/asortyment/*. Mobile-first, in the visual language of home.html /
 * bigger.html: Schibsted Grotesk headings, Hanken Grotesk body, warm ink and cream, red CTAs.
 * Scrolling strips scroll inside themselves, so the page never scrolls sideways. No JS.
 */

/* --- Page shell --- */
.as-page { max-width: 1120px; margin: 0 auto; padding: 34px clamp(20px, 4vw, 48px) 0; }
/* :where() keeps these at element specificity, so any class below can override them. */
:where(.as-page) img { display: block; max-width: 100%; height: auto; }
/* In-page jumps (cards -> details, "back" link) must clear the 74px sticky header. */
:where(.as-page) [id] { scroll-margin-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.as-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- Breadcrumb (same look as the store pages) --- */
.biga-crumb { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: #8A8174; margin-bottom: 18px; }
.biga-crumb a { color: #8A8174; text-decoration: none; }
.biga-crumb a:hover { color: var(--ink); }
.biga-crumb [aria-current] { color: var(--ink); }

/* --- Page header --- */
.as-head hgroup { margin: 0; }
.as-head h1 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(36px, 6vw, 58px); line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; color: var(--ink); margin: 0; }
.as-lead { font-size: clamp(17px, 2.2vw, 20px); font-weight: 600; line-height: 1.4; color: #F26A54; margin: 12px 0 0; }

/* --- Block rhythm + section headings --- */
.as-block { margin-top: clamp(44px, 7vw, 76px); }
.as-block h2 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(26px, 4vw, 38px); line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; color: var(--ink); margin: 0 0 18px; }
.as-hgroup { margin: 0 0 20px; }
.as-hgroup h2 { margin: 0; }
.as-tagline { font-size: 16px; font-weight: 600; color: #F26A54; margin: 8px 0 0; }
.as-tagline--solo { margin: 0 0 16px; }
.as-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #F26A54; margin: 0 0 10px; }

/* --- Long-form copy from the data (validated: p, ul, ol, li, strong, em, br, h3, h4, a) --- */
.as-prose { font-size: 16px; line-height: 1.75; color: var(--muted); max-width: 72ch; }
.as-prose p { margin: 0 0 16px; }
.as-prose > :first-child { margin-top: 0; }
.as-prose > :last-child { margin-bottom: 0; }
.as-prose strong { color: var(--ink); font-weight: 700; }
.as-prose h3 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.2; letter-spacing: -.02em; color: var(--ink); margin: 32px 0 12px; }
.as-prose h4 { font-family: var(--font-heading); font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--ink); margin: 24px 0 8px; }
.as-prose ul, .as-prose ol { margin: 0 0 16px; padding-left: 22px; }
.as-prose li { margin: 0 0 6px; }
.as-prose li::marker { color: var(--brand-red); }
.as-prose a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid #C2772E; transition: color .2s; }
.as-prose a:hover { color: var(--brand-red); }

/* --- Buttons and small links --- */
.as-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; text-decoration: none; background: var(--brand-red); color: var(--cream-2); padding: 14px 28px; border-radius: 100px; font-size: 15.5px; font-weight: 600; transition: background .25s; }
.as-btn:hover { background: var(--brand-red-hover); color: var(--cream-2); }
.as-btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); padding: 12px 22px; font-size: 14.5px; margin-top: 18px; }
.as-btn--ghost:hover { background: #F1EBE1; color: var(--ink); }
.as-more, .as-back a { font-size: 14.5px; font-weight: 600; color: var(--brand-red); text-decoration: none; }
.as-more:hover, .as-back a:hover { color: var(--brand-red-hover); }
.as-back { margin: 0; }

/* --- Text block: the intro puts its first image beside the copy on wide screens --- */
.as-intro { display: grid; gap: 24px; }
.as-intro-media img { width: 100%; max-height: min(72vh, 640px); object-fit: cover; border-radius: 22px; background: var(--sand); }
@media (min-width: 900px) {
  .as-intro--media { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
}

/* Horizontal photo strip: native scroll-snap, focusable for keyboard scrolling. */
.as-strip { display: flex; gap: 14px; margin-top: 20px; padding: 4px 2px 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.as-strip img { flex: 0 0 auto; width: clamp(180px, 42vw, 280px); scroll-snap-align: start; border-radius: 16px; background: var(--sand); }

/* --- Shared list reset for the grids --- */
.as-cards-grid, .as-tiles, .as-benefits-grid, .as-recent-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }

/* --- Cards (jump links to the details) and category tiles --- */
.as-cards-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.as-card, .as-tile { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 4px 16px rgba(28, 24, 20, .04); transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; }
.as-card:hover, .as-tile:hover { color: inherit; transform: translateY(-4px); box-shadow: 0 16px 36px rgba(28, 24, 20, .10); }
.as-card img, .as-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--sand); }
.as-card-body, .as-tile-body { display: flex; flex-direction: column; flex: 1; gap: 4px; padding: 16px 18px 18px; }
.as-card-label, .as-tile-label { font-family: var(--font-heading); font-weight: 600; font-size: 18px; line-height: 1.2; color: var(--ink); }
.as-tile-sub { font-size: 13.5px; line-height: 1.45; color: #7A7268; }
.as-card-cta, .as-tile-cta { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--brand-red); }

/* --- Benefits --- */
.as-benefits-grid { grid-template-columns: 1fr; }
.as-benefit { background: #F6EFE3; border: 1px solid #ECE2D2; border-radius: 20px; padding: 26px 24px; }
.as-benefit .as-benefit-icon { width: 64px; height: 64px; object-fit: contain; margin-bottom: 14px; }
.as-benefit h3 { font-family: var(--font-heading); font-weight: 600; font-size: 19px; line-height: 1.25; color: var(--ink); margin: 0 0 8px; }
.as-benefit p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
@media (min-width: 760px) { .as-benefits-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --- Gallery --- */
.as-gallery-grid { display: grid; gap: 16px; align-items: start; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.as-figure { margin: 0; }
.as-figure img { width: 100%; border-radius: 16px; background: var(--sand); }
.as-figure figcaption { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: #7A7268; }

/* --- Details (targets of the cards) --- */
.as-details { display: grid; gap: clamp(32px, 5vw, 48px); }
.as-detail { padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--line); }
.as-block .as-detail h2 { font-size: clamp(24px, 3.4vw, 32px); }

/* --- Other categories grid --- */
.as-others { background: #F6EFE3; border: 1px solid #ECE2D2; border-radius: 26px; padding: clamp(24px, 5vw, 44px); }
.as-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.as-tile img { aspect-ratio: 1; }
.as-tile-body { padding: 12px 14px 14px; }
.as-tile-label { font-size: 16px; }
@media (min-width: 640px) { .as-tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }

/* --- Hub: intro with a 2x2 photo mosaic --- */
.as-hub-intro { display: grid; gap: 28px; }
.as-hub-intro .as-prose { font-size: 17px; }
.as-mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.as-mosaic img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; background: var(--sand); }
@media (min-width: 900px) { .as-hub-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; } }

/* --- Hub: "Ostatnio dodane" --- */
.as-recent-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.as-recent-item { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.as-recent-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--sand); }
.as-recent-item h3 { font-family: var(--font-heading); font-weight: 600; font-size: 20px; line-height: 1.2; color: var(--ink); margin: 18px 20px 8px; }
.as-recent-item .as-prose { margin: 0 20px; font-size: 15px; }
.as-recent-item .as-more { margin: auto 20px 20px; padding-top: 12px; }

/* --- Hub: category teasers, photos and copy alternating sides on wide screens --- */
.as-hub-cat-list { display: grid; gap: clamp(40px, 6vw, 64px); }
.as-hub-cat { display: grid; gap: 22px; }
.as-hub-cat-media { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.as-hub-cat-media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: var(--sand); }
.as-hub-cat h3 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(22px, 3vw, 28px); line-height: 1.15; letter-spacing: -.02em; color: var(--ink); margin: 0 0 12px; }
@media (min-width: 900px) {
  .as-hub-cat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
  .as-hub-cat:nth-child(even) .as-hub-cat-media { order: 2; }
}
