/* The Geekomat ad (js/promo.js), on every page. On purpose NOT in this site's
   look (DESIGN.md "Geekomat ad"): Geekomat's own green, black and Inter 800, so
   it reads as another site's banner and gets noticed. Two themes are shown at
   random to see which works better:
     .gk-svijetla  lime-tinted panel, lime border, lime marker behind the key
                   words, black button with a lime arrow
     .gk-tamna     near-black panel, green words, green button
   Three formats share one markup (picture, logo, title, text, button, link),
   placed by grid areas:
     .gk-banner  home page, under the categories: picture left, text right
     .gk-strip   lists (after the 4th row) and the configurator
     .gk-card    product page, under the price box
   Under 1020px a card becomes a strip (its column is the full width there);
   under 640px every format is the same compact card. */

.gk {
  position: relative; display: grid; overflow: hidden; border: 2px solid var(--gk-line); border-radius: 14px;
  background: var(--gk-bg); color: var(--gk-ink); font-family: "Inter", system-ui, sans-serif;
}
/* "Oglas" in the top right corner of every format, on its own small panel so
   it stays readable over the card's photo. */
.gk-tag {
  position: absolute; top: 8px; right: 8px; padding: 3px 7px; border-radius: 5px;
  background: var(--gk-bg); color: var(--gk-ink-2); font: 600 11px/1 "Inter", system-ui, sans-serif;
  letter-spacing: .02em; pointer-events: none;
}
.gk-svijetla {
  --gk-bg: #F3FFE9; --gk-line: #9CFF5C; --gk-ink: #0a0a0a; --gk-ink-2: #3B4634;
  --gk-cta-bg: #0a0a0a; --gk-cta-hover: #2b2b2b; --gk-cta-ink: #FFFFFF; --gk-arrow: #9CFF5C;
  --gk-gift: #2F7A0A; --gk-label: #0a0a0a;
}
.gk-tamna {
  --gk-bg: #0a0a0a; --gk-line: #0a0a0a; --gk-ink: #FFFFFF; --gk-ink-2: rgb(255 255 255 / .75);
  --gk-cta-bg: #7ad940; --gk-cta-hover: #9CFF5C; --gk-cta-ink: #0a0a0a; --gk-arrow: #0a0a0a;
  --gk-gift: #9CFF5C; --gk-label: #9CFF5C;
}
.gk-svijetla .gk-mark {
  padding: 0 .18em; border-radius: 6px; background: #9CFF5C;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.gk-tamna .gk-mark { color: #7ad940; }

.gk-img { grid-area: img; display: block; min-width: 0; }
.gk-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gk-logo { grid-area: logo; justify-self: start; display: block; width: auto; height: 30px; }
.gk-title {
  grid-area: title; margin: 0; color: var(--gk-ink); overflow-wrap: anywhere;
  font: 800 clamp(22px, 2.4vw, 28px)/1.1 "Inter", system-ui, sans-serif; letter-spacing: -.03em;
}
.gk-desc { grid-area: desc; margin: 0; max-width: 46em; font-size: 14.5px; line-height: 1.5; color: var(--gk-ink-2); }
.gk-short { display: none; }
.gk .gk-cta {
  grid-area: cta; justify-self: start; align-self: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 8px; background: var(--gk-cta-bg); color: var(--gk-cta-ink);
  font: 700 14.5px/1 "Inter", system-ui, sans-serif; text-decoration: none; white-space: nowrap; transition: background .15s;
}
.gk .gk-cta:hover { background: var(--gk-cta-hover); color: var(--gk-cta-ink); }
.gk-cta .ico { color: var(--gk-arrow); }
.gk .gk-sec {
  grid-area: sec; align-self: center; display: inline-flex; align-items: flex-start; gap: 8px;
  font: 500 13.5px/1.4 "Inter", system-ui, sans-serif; color: var(--gk-ink-2); text-decoration: none;
}
.gk .gk-sec:hover { color: var(--gk-ink-2); text-decoration: underline; }
.gk-sec b { font-weight: 700; color: var(--gk-label); }
.gk-sec .ico { margin-top: 1px; color: var(--gk-gift); }
.gk a:focus-visible { outline: 2px solid var(--gk-ink); outline-offset: 3px; }

/* ---------- banner ---------- */
.gk-banner {
  grid-template-columns: clamp(200px, 30%, 320px) auto minmax(0, 1fr);
  grid-template-areas: "img logo logo" "img title title" "img desc desc" "img cta sec"; row-gap: 8px; align-content: center;
}
.gk-banner > :not(.gk-img) { margin-left: 32px; margin-right: 36px; }
.gk-banner .gk-logo { margin-top: 24px; }
.gk-banner .gk-cta { margin: 6px 0 24px 32px; }
.gk-banner .gk-sec { margin: 6px 36px 24px 22px; }
.gk-banner .gk-img {
  min-height: 210px;
  -webkit-mask-image: linear-gradient(to left, transparent, #000 30%); mask-image: linear-gradient(to left, transparent, #000 30%);
}

/* ---------- strip ---------- */
.gk-strip {
  grid-template-columns: 112px minmax(0, 1fr) auto;
  grid-template-areas: "img logo cta" "img title cta" "img desc cta" "img sec cta"; gap: 4px 20px; border-radius: 12px;
}
.gk-strip .gk-img { min-height: 112px; }
.gk-strip .gk-logo { height: 22px; margin: 12px 0 2px; }
.gk-strip .gk-title { font-size: 19px; line-height: 1.15; letter-spacing: -.02em; }
.gk-strip .gk-desc { font-size: 13.5px; line-height: 1.4; }
.gk-strip .gk-sec { align-self: start; margin-bottom: 12px; font-size: 13px; }
.gk-strip .gk-cta { margin-right: 20px; }
.gk-strip .gk-long { display: none; }
.gk-strip .gk-short { display: inline; }

/* ---------- card ---------- */
.gk-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "img" "logo" "title" "desc" "cta" "sec"; row-gap: 8px; }
.gk-card > :not(.gk-img) { margin-inline: 20px; }
.gk-card .gk-img {
  aspect-ratio: 5 / 2;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.gk-card .gk-logo { position: relative; height: 28px; margin-top: -14px; }
.gk-card .gk-title { font-size: 21px; line-height: 1.12; letter-spacing: -.025em; }
.gk-card .gk-desc { font-size: 13.5px; line-height: 1.45; }
.gk-card .gk-cta { justify-self: stretch; height: 44px; padding: 0 16px; margin-top: 4px; }
.gk-card .gk-sec { align-self: start; margin-bottom: 20px; font-size: 13px; }

/* ---------- where it sits ---------- */
/* In a list (category, search results) it takes a row's place. */
.row-promo { padding: 16px 0; border-bottom: 1px solid var(--line); }
/* Configurator: between the workbench band and the slot list. */
.build-promo { margin-bottom: 28px; }

/* ---------- narrower ---------- */
@media (max-width: 1020px) {
  /* the product page is one column here: the card becomes a strip */
  .gk-card {
    grid-template-columns: 112px minmax(0, 1fr) auto;
    grid-template-areas: "img logo cta" "img title cta" "img desc cta" "img sec cta"; gap: 4px 20px; border-radius: 12px;
  }
  .gk-card > :not(.gk-img) { margin-inline: 0; }
  .gk-card .gk-img { aspect-ratio: auto; min-height: 112px; -webkit-mask-image: none; mask-image: none; }
  .gk-card .gk-logo { height: 22px; margin: 12px 0 2px; }
  .gk-card .gk-title { font-size: 19px; line-height: 1.15; letter-spacing: -.02em; }
  .gk-card .gk-cta { justify-self: start; height: auto; padding: 12px 16px; margin: 0 20px 0 0; }
  .gk-card .gk-sec { margin-bottom: 12px; }
  .gk-card .gk-long { display: none; }
  .gk-card .gk-short { display: inline; }
}
@media (max-width: 640px) {
  /* every format: a small square photo beside the logo, title and text, the
     button and the link full width under them */
  .gk.gk {
    grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: "img logo" "img title" "img desc" "cta cta" "sec sec";
    gap: 5px 14px; padding: 14px; border-radius: 12px; align-items: start;
  }
  .gk.gk > * { margin: 0; }
  .gk .gk-img {
    width: 84px; height: 84px; min-height: 0; aspect-ratio: auto; overflow: hidden; border-radius: 8px;
    -webkit-mask-image: none; mask-image: none;
  }
  .gk .gk-logo { height: 22px; }
  .gk .gk-title { font-size: 17px; line-height: 1.15; letter-spacing: -.02em; }
  .gk .gk-desc { font-size: 12.5px; line-height: 1.4; }
  .gk .gk-cta { justify-self: stretch; height: 44px; padding: 0 16px; margin-top: 7px; }
  .gk .gk-sec { align-self: start; margin-top: 3px; font-size: 13px; }
  .gk .gk-long { display: none; }
  .gk .gk-short { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .gk .gk-cta { transition: none; }
}
