/**
 * custom.css — własne style motywu Hummingbird (new.stoltronic.pl)
 *
 * Ładowany PO assets/css/theme.css (patrz config/theme.yml → assets.css).
 * Tu wpisujemy wszystkie nadpisania wyglądu. Nie edytować theme.css.
 */

/* @import musi być przed wszystkimi regułami CSS, inaczej przeglądarka go zignoruje */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* ============================================================
   Typografia — IBM Plex (styl automatyki przemysłowej / inżynierii)
   IBM Plex Sans: interfejs i treść; IBM Plex Mono: indeksy/referencje
   ============================================================ */

:root {
  --bs-body-font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--bs-body-font-family);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.left-block__title, .right-block__title {
  font-family: var(--bs-body-font-family);
  letter-spacing: -0.01em;
}

/* ============================================================
   Listing produktów w kategorii — układ tabelaryczny (B2B)
   Szablony: catalog/_partials/productlist.tpl
            catalog/_partials/miniatures/product-row.tpl
   ============================================================ */

.ptable-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ptable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ptable__th {
  text-align: left;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid #d9d9d9;
  white-space: nowrap;
}

.ptable__th--price {
  text-align: right;
}

.ptable__row {
  border-bottom: 1px solid #e6e6e6;
}

.ptable__row:hover {
  background: #f6f8fa;
}

.ptable__cell {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
}

.ptable__cell--thumb {
  width: 84px;
}

.ptable__thumb-link {
  display: block;
  width: 72px;
  height: 72px;
}

.ptable__thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  background: #fff;
}

.ptable__name {
  font-weight: 600;
  text-decoration: none;
}

.ptable__name:hover {
  text-decoration: underline;
}

.ptable__flags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: 0.5rem;
}

.ptable__flags .badge {
  font-size: 0.7rem;
  vertical-align: middle;
}

.ptable__cell--ref {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  white-space: nowrap;
  color: #444;
}

.ptable__cell--price {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ptable__price {
  font-weight: 700;
}

.ptable__price-old {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: #999;
}

.ptable__empty {
  color: #bbb;
}

/* --- Telefon: każdy wiersz jako karta ------------------------ */
@media (max-width: 767.98px) {
  .ptable-wrap { overflow-x: visible; }

  .ptable,
  .ptable tbody,
  .ptable__row,
  .ptable__cell {
    display: block;
    width: 100%;
  }

  .ptable thead {
    display: none;
  }

  .ptable__row {
    position: relative;
    min-height: 88px;
    padding: 0.75rem 0.75rem 0.75rem 96px;
    margin-bottom: 0.6rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
  }

  .ptable__row:hover {
    background: none;
  }

  .ptable__cell {
    padding: 0.1rem 0;
    border: 0;
  }

  .ptable__cell--thumb {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    width: 72px;
  }

  .ptable__cell--name {
    font-size: 1.02rem;
    margin-bottom: 0.2rem;
  }

  .ptable__cell--ref,
  .ptable__cell--price {
    text-align: left;
  }

  .ptable__cell[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: #777;
    font-family: inherit;
  }

  .ptable__price-old {
    display: inline;
    margin-left: 0.4rem;
  }
}

/* ============================================================
   Strona główna — HERO (Stoltronic)
   Szablon: templates/index.tpl (blok page_content_top)
   ============================================================ */

:root {
  --st-red: #e30613;          /* akcent: przyciski, "Szukaj". Logo = #ff0000 — podmień tu jeśli chcesz 1:1 */
  --st-red-hover: #c00510;
  --st-hero-bg-1: #7d0f14;    /* gradient tła hero (góra-lewo) */
  --st-hero-bg-2: #4a0a0d;    /* gradient tła hero (dół-prawo) */
  --st-hero-bar: rgba(0, 0, 0, 0.28); /* ciemniejszy pasek atutów */
  --st-hero-ink: #ffffff;
  --st-hero-ink-dim: rgba(255, 255, 255, 0.82);
  --st-hero-ink-faint: rgba(255, 255, 255, 0.6);
}

/* hero przylega do headera */
body#index #wrapper {
  padding-top: 0;
}

.st-hero {
  color: var(--st-hero-ink);
}

.st-hero__band {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(135deg, var(--st-hero-bg-1) 0%, var(--st-hero-bg-2) 62%, #3a080b 100%);
}

.st-hero__inner {
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem);
  display: grid;
  /* prawa kolumna = auto: bez zdjęcia (hero.png) kolumna się zwija, tekst wypełnia szerokość */
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.st-hero__content {
  max-width: 640px;
}

.st-hero__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--st-hero-ink);
}

.st-hero__subtitle {
  margin: 0.65rem 0 0;
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--st-hero-ink);
}

.st-hero__lead {
  margin: 0.75rem 0 0;
  max-width: 46ch;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--st-hero-ink-dim);
}

.st-hero__search {
  display: flex;
  margin-top: 1.6rem;
  max-width: 560px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.st-hero__search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  color: #1a1a1a;
  font-family: inherit;
}

.st-hero__search-input:focus {
  outline: 2px solid var(--st-red);
  outline-offset: -2px;
}

.st-hero__search-btn {
  flex: 0 0 auto;
  border: 0;
  padding: 0 1.6rem;
  background: var(--st-red);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.st-hero__search-btn:hover {
  background: var(--st-red-hover);
}

.st-hero__examples {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  color: var(--st-hero-ink-faint);
}

.st-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.st-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 5px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.st-hero__btn .material-icons {
  font-size: 1.2em;
}

.st-hero__btn--primary {
  background: var(--st-red);
  border-color: var(--st-red);
  color: #fff;
}

.st-hero__btn--primary:hover {
  background: var(--st-red-hover);
  border-color: var(--st-red-hover);
  color: #fff;
}

.st-hero__btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.st-hero__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.st-hero__media {
  min-width: 0;
  text-align: center;
}

.st-hero__img {
  max-width: min(44vw, 520px);
  max-height: 380px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 42px rgba(0, 0, 0, 0.45));
}

/* --- Pasek atutów --------------------------------------------- */
.st-hero__usps {
  background: var(--st-hero-bar);
}

.st-hero__usps-inner {
  max-width: 1240px;
  margin-inline: auto;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: clamp(0.75rem, 3vw, 2.5rem);
}

.st-usp {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.st-usp .material-icons {
  font-size: 1.4rem;
  color: #fff;
}

/* --- Responsywność ------------------------------------------- */
@media (max-width: 991.98px) {
  .st-hero__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .st-hero__content {
    max-width: none;
  }

  .st-hero__img {
    max-height: 300px;
  }
}

@media (max-width: 767.98px) {
  .st-hero__media {
    display: none;
  }

  .st-hero__search {
    flex-wrap: wrap;
  }

  .st-hero__search-input {
    flex-basis: 100%;
  }

  .st-hero__search-btn {
    flex-basis: 100%;
    padding: 0.8rem;
  }

  .st-hero__usps-inner {
    justify-content: flex-start;
    gap: 0.75rem 1.25rem;
  }

  .st-usp {
    flex-basis: calc(50% - 0.75rem);
    font-size: 0.8rem;
  }
}
