/* Campaign banners (meko/design/campaigns/BANNER-SYSTEM.md; this file is that system's banners.css, taken
   into the shop on 2026-11-14). The data is config/campaigns.yml, the markup app/views/storefront/campaigns.
   Hover rules carry .banner in front: the layout's html:root a:hover would otherwise win and paint the
   button's text in the button's own colour. */
.banner {
  --b-radius: var(--radius, 12px);          /* panels, tiles: the shop's radius */
  --b-radius-control: 8px;                  /* buttons and chips, as the shop's buttons */
  --b-pad: 44px;                            /* hero panel padding, as .hero */
  --b-gap: 16px;                            /* between tiles and cards, as .product-list */
  --b-headline: 3rem;                       /* hero headline, as .hero h1 */
  --b-headline-strip: 1.75rem;
  --b-subline: 18px;
  --b-tile-img: 240px;                      /* product picture box in a tile */
  font-family: var(--font, Inter, system-ui, sans-serif);
  color: var(--c-ink, #1f2a22);
  box-sizing: border-box;
}
.banner *, .banner *::before, .banner *::after { box-sizing: border-box; }
.banner p { margin: 0; }
.banner img { display: block; max-width: 100%; }

/* Slots shared by every layout */
.banner-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-accent, #486142); }
.banner-badge svg { width: 20px; height: 20px; flex: none; }
.banner-headline { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; color: var(--c-ink, #1f2a22); }
.banner-subline { font-size: var(--b-subline); line-height: 1.5; max-width: 42ch; }
.banner-note { font-size: 15px; color: var(--c-ink-muted, #5a665d); }
.banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.banner-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--b-radius-control); background: var(--c-accent, #486142); color: #fff; font-weight: 700; text-decoration: none; }
.banner .banner-cta:hover { background: var(--c-accent-hover, #3a5035); color: #fff; }
.banner-cta--secondary { background: var(--c-ground, #fff); color: var(--c-accent, #486142); border: 1.5px solid var(--c-accent, #486142); }
.banner .banner-cta--secondary:hover { background: var(--c-surface, #f1f3ef); color: var(--c-accent-hover, #3a5035); }
.banner-cta svg { width: 20px; height: 20px; flex: none; }
.banner-link { font-weight: 600; color: var(--c-accent, #486142); text-underline-offset: var(--underline-offset, 0.26em); }

/* A product tile or card: picture, name, availability (dot + word), price. Always a link. */
.banner-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 18px; border-radius: var(--b-radius); background: var(--c-ground, #fff); color: var(--c-ink, #1f2a22); text-decoration: none; }
.banner-tile img { width: 100%; height: var(--b-tile-img); object-fit: contain; }
.banner-tile-name { font-size: 20px; font-weight: 700; margin-top: 6px; }
.banner-tile--product { border: 1px solid var(--c-line, #e3e7e1); padding: 12px 14px 16px; }
.banner-tile--product .banner-tile-name { font-size: 15px; font-weight: 600; line-height: 1.35; min-height: 40px; }
.banner-tile-brand { font-size: 13px; color: var(--c-ink-muted, #5a665d); }
.banner-tile:hover .banner-tile-name { text-decoration: underline; }
.banner-stock { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--c-ink, #1f2a22); }
.banner-stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent, #486142); flex: none; }
.banner-price { font-size: 18px; font-weight: 700; font-feature-settings: "tnum" 1; white-space: nowrap; }
.banner-tile:not(.banner-tile--product) .banner-price { font-size: 15px; font-weight: 600; }

/* 1. Hero: home page, top. Text left, one media slot right (product tiles, or a picture flush right). */
.banner--hero { display: flex; align-items: center; gap: 48px; min-height: 420px; padding: var(--b-pad) var(--b-pad) var(--b-pad) 52px; border-radius: var(--b-radius); background: var(--c-surface, #f1f3ef); }
.banner--hero .banner-text { flex: 1 1 0; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.banner--hero .banner-headline { font-size: var(--b-headline); max-width: 14ch; }
.banner--hero .banner-actions { margin-top: 6px; }
.banner--hero .banner-media { flex: 0 0 600px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--b-gap); }
.banner--hero .banner-picture { flex: 0 0 56%; align-self: stretch; margin: calc(-1 * var(--b-pad)) calc(-1 * var(--b-pad)) calc(-1 * var(--b-pad)) 0; }
.banner--hero .banner-picture img { width: 100%; height: 100%; object-fit: cover; border-radius: 0 var(--b-radius) var(--b-radius) 0; -webkit-mask-image: linear-gradient(to right, transparent, #000 18%); mask-image: linear-gradient(to right, transparent, #000 18%); }

/* 2. Strip: a home-page section. Title and category links in one row, then a panel and up to four product
   cards. On a phone the links move under the cards (grid areas), so the panel follows the title. */
.banner--strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title links" "body body"; align-items: baseline; column-gap: 24px; }
.banner--strip .banner-title { grid-area: title; margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.banner--strip .banner-links { grid-area: links; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.banner--strip .banner-body { grid-area: body; }
.banner--strip .banner-links a { color: var(--c-ink, #1f2a22); text-underline-offset: var(--underline-offset, 0.26em); }
.banner--strip .banner-body { margin-top: 16px; display: flex; gap: var(--b-gap); align-items: stretch; }
.banner--strip .banner-panel { flex: 0 0 340px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 32px 28px; border-radius: var(--b-radius); background: var(--c-surface, #f1f3ef); }
.banner--strip .banner-panel svg.banner-mark { width: 32px; height: 32px; color: var(--c-accent, #486142); }
.banner--strip .banner-headline { font-size: var(--b-headline-strip); line-height: 1.15; }
.banner--strip .banner-subline { font-size: 16px; }
.banner--strip .banner-panel .banner-cta { margin-top: auto; }
.banner--strip .banner-products { flex: 1 1 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--b-gap); }
.banner--strip .banner-products > li { display: flex; }
.banner--strip .banner-products .banner-tile { flex: 1; }

/* 3. Department variant: one bordered row above a category listing (under the title band). */
.banner--dept { display: flex; align-items: center; gap: 20px; padding: 14px 20px 14px 14px; border: 1.5px solid var(--c-accent, #486142); border-radius: var(--b-radius); background: var(--c-ground, #fff); }
.banner--dept .banner-thumb { width: 84px; height: 84px; object-fit: contain; flex: none; }
.banner--dept .banner-text { flex: 1 1 0; display: flex; flex-direction: column; gap: 2px; }
.banner--dept .banner-headline { display: flex; align-items: center; gap: 8px; font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; }
.banner--dept .banner-headline svg { width: 20px; height: 20px; flex: none; color: var(--c-accent, #486142); }
.banner--dept .banner-subline { font-size: 15px; color: var(--c-ink-muted, #5a665d); max-width: none; }
.banner-chips { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.banner-chip { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--c-control, #8a948c); border-radius: 999px; color: var(--c-ink, #1f2a22); font-size: 15px; font-weight: 600; text-decoration: none; }
.banner .banner-chip:hover { background: var(--c-tint, #e4ece0); color: var(--c-ink, #1f2a22); }
.banner-chip .count { font-weight: 400; color: var(--c-ink-muted, #5a665d); font-feature-settings: "tnum" 1; }
.banner-chip--cta { border-color: var(--c-accent, #486142); background: var(--c-accent, #486142); color: #fff; }
.banner-chip--cta .count { color: #fff; opacity: 0.85; }
.banner .banner-chip--cta:hover { background: var(--c-accent-hover, #3a5035); color: #fff; }

/* 4. Tiles: a row of two or three promo tiles under the home hero (Reed, 2026-11-14: "Yes, tiles", instead
   of a slider). Each tile is one link: title, a line, the live count and lowest price, a product picture.
   Nothing moves by itself; on a phone the tiles stack. */
.banner--tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--b-gap); }
/* Four tiles sit two by two: four in a row leave each title a narrow column. */
.banner--tiles:has(> .banner-promo:nth-child(4)) { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.banner-promo { display: flex; align-items: center; gap: 16px; min-height: 140px; padding: 16px 16px 16px 20px; border-radius: var(--b-radius); background: var(--c-surface, #f1f3ef); color: var(--c-ink, #1f2a22); text-decoration: none; }
.banner-promo-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.banner-promo-title { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 18px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.banner-promo-title svg { width: 18px; height: 18px; flex: none; color: var(--c-accent, #486142); }
.banner-promo-line { font-size: 14px; line-height: 1.4; color: var(--c-ink-muted, #5a665d); }
.banner-promo .banner-price { font-size: 15px; font-weight: 600; }
.banner-promo-media { flex: none; width: 112px; height: 112px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--b-radius-control); background: var(--c-ground, #fff); }
.banner-promo-media img { width: 100%; height: 100%; object-fit: contain; }
.banner-promo:hover .banner-promo-title { text-decoration: underline; text-underline-offset: var(--underline-offset, 0.26em); }
.banner .banner-promo:hover { color: var(--c-ink, #1f2a22); }

/* Between a phone and a wide screen (768 to 1199 px) the hero's text would be left a column narrower than its
   own words beside the 600 px of tiles (Reed, 2026-11-16: "Hank / ooki" at 950 px), so the tiles go under the
   text, and the category row lets its shortcuts wrap under the fact. */
@media (min-width: 768px) and (max-width: 1199px) {
  .banner { --b-headline: clamp(2rem, 4.4vw, 2.75rem); }
  .banner--hero { flex-direction: column; align-items: stretch; gap: 28px; min-height: 0; padding: 40px var(--b-pad); }
  .banner--hero .banner-text { flex: none; }
  .banner--hero .banner-headline { max-width: 22ch; }
  .banner--hero .banner-media { flex: none; }
  .banner--hero .banner-picture { flex: none; margin: 0 calc(-1 * var(--b-pad)) -40px; }
  .banner--hero .banner-picture img { height: 220px; border-radius: 0 0 var(--b-radius) var(--b-radius); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%); mask-image: linear-gradient(to bottom, transparent, #000 22%); }
  .banner--strip .banner-body { flex-direction: column; }
  .banner--strip .banner-panel { flex: none; }
  .banner--strip .banner-panel .banner-cta { margin-top: 4px; }
  .banner--dept { flex-wrap: wrap; }
  .banner--dept .banner-text { flex: 1 1 320px; }
  .banner-chips { flex: 1 1 100%; }
}

/* Phone */
@media (max-width: 767px) {
  .banner--tiles, .banner--tiles:has(> .banner-promo:nth-child(4)) { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .banner-promo { min-height: 0; padding: 12px 12px 12px 16px; }
  .banner-promo-media { width: 88px; height: 88px; }
  .banner { --b-pad: 20px; --b-headline: 1.75rem; --b-headline-strip: 1.5rem; --b-subline: 16px; --b-tile-img: 130px; }
  .banner--hero { display: flex; flex-direction: column; align-items: stretch; gap: 14px; min-height: 0; padding: 24px var(--b-pad) var(--b-pad); }
  .banner--hero .banner-text { gap: 12px; }
  .banner--hero .banner-headline { max-width: none; }
  .banner--hero .banner-note { font-size: 14px; }
  .banner--hero .banner-media { flex: none; gap: 10px; }
  .banner--hero .banner-actions { flex-direction: column; align-items: stretch; gap: 4px; margin-top: 4px; }
  .banner-price .unit { display: none; }   /* "/ tk" does not fit a 375 px tile; the product page says it */
  .banner--hero .banner-cta { width: 100%; }
  .banner--hero .banner-link { align-self: center; min-height: 44px; display: inline-flex; align-items: center; }
  .banner--hero .banner-picture { margin: 0 calc(-1 * var(--b-pad)) calc(-1 * var(--b-pad)); }
  .banner--hero .banner-picture img { height: 140px; border-radius: 0 0 var(--b-radius) var(--b-radius); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%); mask-image: linear-gradient(to bottom, transparent, #000 22%); }
  .banner-tile { padding: 10px 10px 12px; gap: 4px; }
  .banner-tile-name { font-size: 16px; margin-top: 0; }
  .banner--strip { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "body" "links"; }
  .banner--strip .banner-title { font-size: 20px; }
  .banner--strip .banner-links { margin-top: 16px; flex-direction: column; gap: 8px; }
  .banner--strip .banner-links a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; border: 1px solid var(--c-line, #e3e7e1); border-radius: var(--b-radius); text-decoration: none; font-weight: 500; }
  .banner--strip .banner-links a:first-child { border: 1.5px solid var(--c-accent, #486142); font-weight: 600; }
  .banner--strip .banner-body { flex-direction: column; margin-top: 12px; }
  .banner--strip .banner-products { flex: none; }
  .banner--strip .banner-panel { flex: none; padding: 22px 20px 20px; gap: 12px; }
  .banner--strip .banner-panel .banner-cta { display: none; }   /* on a phone the links below take its place */
  .banner--strip .banner-products { display: flex; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; gap: 10px; }
  .banner--strip .banner-products > li { flex: 0 0 150px; }
  .banner--strip .banner-tile--product .banner-tile-name { font-size: 14px; min-height: 54px; }
  .banner--strip .banner-price { font-size: 16px; }
  .banner--dept { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .banner--dept .banner-thumb { width: 64px; height: 64px; }
  .banner--dept .banner-headline { font-size: 16px; }
  .banner--dept .banner-headline svg { display: none; }
  .banner--dept .banner-subline { font-size: 14px; }
  .banner-chips { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .banner-chip { border-radius: var(--b-radius); min-height: 48px; padding: 0 14px; }
  .banner-chip--cta { grid-column: 1 / -1; order: -1; }
}

/* The narrowest phones: a hero tile is about 120 px wide, and "Lamellrehvid" at 16 px is wider than that. */
@media (max-width: 359px) { .banner--hero .banner-tile-name { font-size: 14px; } }

/* Where the shop places them. */
.home-campaign { margin-top: 18px; }
.category-campaign { margin: 0 0 20px; }
.home-campaign-tiles { margin-top: 16px; }
