/* ==========================================================================
   PODSTRONA OFERTA (2026-10-02): zakup online ze zniżką + pełna oferta
   Zakup online stoi zaraz pod nagłówkiem (linki partnerskie Unilink, Uniqa, PetHelp),
   karty pełnej oferty prowadzą do podstron produktów.
   ========================================================================== */

/* Globalna reguła p (main.css) justuje akapity od 769px; krótkie teksty w kartach wyrównujemy do lewej */
.ak-buy-section p,
.ak-cat-section p {
  hyphens: manual;
  -webkit-hyphens: manual;
}

/* --- ZAKUP ONLINE --- */
.ak-buy-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 64px 0 72px;
  color: var(--ak-text-inverse);
  background: linear-gradient(160deg, #2f7482 0%, #1f5f68 45%, #1d4658 100%);
}

.ak-buy-section::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 38%),
    radial-gradient(circle at 6% 96%, rgba(159, 212, 213, 0.16), rgba(159, 212, 213, 0) 40%);
}

.ak-buy-container {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.ak-buy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.ak-buy-head-text {
  max-width: 760px;
}

.ak-buy-h2 {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: clamp(26px, 1.6vw + 16px, 38px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--ak-text-inverse);
  margin: 0 0 14px;
  text-align: left;
  text-wrap: balance;
}

.ak-buy-section .ak-buy-lead {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-align: left;
}

.ak-buy-badge {
  flex: 0 0 auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--ak-bg-white);
  color: var(--ak-teal-action-hover);
  box-shadow: 0 18px 36px -14px rgba(5, 20, 28, 0.6);
  transform: rotate(-8deg);
}

.ak-buy-badge-small {
  font-family: 'Inter', 'Inter Fallback', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ak-teal-ink);
}

.ak-buy-badge-big {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Jak to działa */
.ak-buy-steps {
  list-style: none;
  counter-reset: ak-buy;
  margin: 34px 0 30px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ak-buy-steps li {
  counter-increment: ak-buy;
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  column-gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ak-buy-steps li::before {
  content: counter(ak-buy);
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ak-bg-white);
  color: var(--ak-teal-action-hover);
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.ak-buy-step-title {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  padding-top: 2px;
}

.ak-buy-step-text {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
  margin-top: 2px;
}

/* Karty */
.ak-buy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ak-buy-card {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  border-radius: 22px;
  background: var(--ak-bg-white);
  color: var(--ak-text-gray);
  box-shadow: 0 22px 44px -22px rgba(5, 20, 28, 0.55);
  scroll-margin-top: 100px;
}

.ak-buy-card--wide {
  grid-column: span 2;
}

.ak-buy-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ak-buy-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--ak-teal-action-gradient);
}

.ak-buy-icon svg {
  width: 25px;
  height: 25px;
  fill: var(--ak-text-inverse);
}

.ak-buy-partner {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--ak-surface-muted);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ak-navy-dark);
}

.ak-buy-partner img {
  display: block;
  height: 22px;
  width: auto;
}

.ak-buy-title {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ak-navy-heading);
  margin: 0 0 10px;
  text-align: left;
}

/* Oznaczenie ofert ze zniżką (PetHelp i Global Care są bez zniżki) */
.ak-buy-discount {
  align-self: flex-start;
  margin: -2px 0 12px;
  padding: 4px 10px;
  border-radius: 50px;
  background: #fff4e5;
  color: #8a4b00;
  font-size: 12.5px;
  font-weight: 700;
}

.ak-buy-section .ak-buy-desc {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ak-text-gray);
  margin: 0 0 16px;
  text-align: left;
}

.ak-buy-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ak-buy-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ak-navy-dark);
}

.ak-buy-list svg {
  width: 20px;
  height: 20px;
  fill: var(--ak-teal-ink);
}

.ak-buy-cta {
  margin-top: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 20px;
  border-radius: 50px;
  background: var(--ak-teal-action-gradient);
  color: var(--ak-text-inverse);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px -6px rgba(31, 95, 104, 0.45);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ak-buy-cta svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.ak-buy-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px -6px rgba(31, 95, 104, 0.55);
}

.ak-buy-cta:focus-visible,
.ak-buy-option:focus-visible {
  outline: 3px solid var(--ak-navy-dark);
  outline-offset: 3px;
}

/* NNW szkolne: wybór towarzystwa */
.ak-buy-card--wide .ak-buy-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ak-buy-section .ak-buy-options-label {
  margin: auto 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ak-navy-dark);
  text-align: left;
}

.ak-buy-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ak-buy-option {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1.5px solid var(--ak-border-light);
  background: var(--ak-bg-light);
  text-decoration: none;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ak-buy-option img {
  display: block;
  height: 28px;
  width: auto;
  max-width: 100%;
}

.ak-buy-option-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ak-navy-dark);
}

.ak-buy-option-go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ak-teal-ink);
}

.ak-buy-option-go svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.ak-buy-option:hover {
  border-color: var(--ak-teal-ink);
  background: var(--ak-bg-white);
  transform: translateY(-2px);
}

/* Informacja budująca zaufanie */
.ak-buy-trust {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ak-buy-trust svg {
  width: 28px;
  height: 28px;
  fill: #9fd4d5;
}

.ak-buy-section .ak-buy-trust p {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
}

.ak-buy-section .ak-buy-trust a {
  color: var(--ak-text-inverse);
  font-weight: 700;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* --- PEŁNA OFERTA --- */
.ak-cat-section {
  padding: 64px 0 70px;
  background-color: #ecf4f4;
}

.ak-cat-container {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.ak-cat-h2 {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: clamp(25px, 1.4vw + 16px, 34px);
  font-weight: 700;
  line-height: 1.22;
  color: var(--ak-navy-heading);
  margin: 0 0 12px;
  text-align: left;
  text-wrap: balance;
}

.ak-cat-section .ak-cat-lead {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ak-text-gray);
  margin: 0;
  max-width: 760px;
  text-align: left;
}

.ak-cat-group {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ak-navy-heading);
  margin: 38px 0 16px;
  text-align: left;
}

.ak-cat-group::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(47, 116, 130, 0.22);
}

.ak-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.ak-cat-grid--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ak-cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  border-radius: 20px;
  background: var(--ak-bg-white);
  border: 1px solid var(--ak-border-light);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease;
}

.ak-cat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 116, 130, 0.45);
  box-shadow: 0 12px 28px rgba(31, 95, 104, 0.16);
}

.ak-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.ak-cat-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(86, 168, 168, 0.15);
}

.ak-cat-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--ak-teal-ink);
}

/* Odznaka „Kup online” leży nad linkiem całej karty */
.ak-cat-online {
  position: relative;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 50px;
  background: var(--ak-teal-action-gradient);
  color: var(--ak-text-inverse);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.ak-cat-tag {
  padding: 5px 11px;
  border-radius: 50px;
  background: var(--ak-surface-muted);
  color: var(--ak-navy-dark);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.ak-cat-online:hover {
  background: var(--ak-teal-action-hover);
}

.ak-cat-title {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 10px;
  text-align: left;
}

.ak-cat-link {
  color: var(--ak-navy-heading);
  text-decoration: none;
}

/* Cała karta klika się jak link do podstrony */
.ak-cat-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
}

.ak-cat-link:focus-visible {
  outline: none;
}

.ak-cat-card:has(.ak-cat-link:focus-visible) {
  outline: 3px solid var(--ak-navy-dark);
  outline-offset: 3px;
}

.ak-cat-section .ak-cat-desc {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ak-navy-dark);
  margin: 0 0 8px;
  text-align: left;
}

.ak-cat-section .ak-cat-more {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ak-text-gray);
  margin: 0 0 16px;
  text-align: left;
}

.ak-cat-go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ak-teal-ink);
}

.ak-cat-go svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ak-cat-card:hover .ak-cat-go svg {
  transform: translateX(4px);
}

/* Szerokie akapity wyjustowane jak w całej witrynie (od 769px).
   W wąskich kartach (ok. 35 znaków w wierszu) justowanie robiło dziury między słowami, więc tam tekst jest do lewej. */
@media (min-width: 769px) {
  .ak-buy-section .ak-buy-lead,
  .ak-buy-section .ak-buy-card--wide .ak-buy-desc,
  .ak-buy-section .ak-buy-trust p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}

/* ==========================================================================
   RESPONSYWNOŚĆ
   ========================================================================== */

@media (max-width: 1024px) {
  .ak-buy-grid,
  .ak-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ak-buy-card--wide .ak-buy-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ak-buy-section {
    padding: 44px 0 50px;
  }

  .ak-buy-head {
    flex-direction: column-reverse;
    align-items: center;
    gap: 18px;
  }

  .ak-buy-h2,
  .ak-buy-section .ak-buy-lead {
    text-align: center;
  }

  .ak-buy-section .ak-buy-lead {
    font-size: 16px;
  }

  .ak-buy-badge {
    width: 112px;
    height: 112px;
  }

  .ak-buy-badge-big {
    font-size: 30px;
  }

  .ak-buy-badge-small {
    font-size: 12px;
  }

  .ak-buy-steps {
    grid-template-columns: 1fr;
    margin: 26px 0 24px;
    gap: 10px;
  }

  .ak-buy-grid,
  .ak-cat-grid,
  .ak-cat-grid--duo {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ak-buy-card--wide {
    grid-column: auto;
  }

  .ak-buy-card {
    padding: 20px 18px 18px;
  }

  .ak-buy-options {
    grid-template-columns: 1fr;
  }

  .ak-buy-option {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .ak-buy-option img {
    height: 24px;
    width: 72px;
    object-fit: contain;
    object-position: left center;
  }

  .ak-buy-option-name {
    flex: 1;
    min-width: 0;
  }

  .ak-buy-option-go {
    margin: 0;
    white-space: nowrap;
  }

  .ak-buy-trust {
    padding: 16px;
  }

  .ak-cat-section {
    padding: 44px 0 50px;
  }

  .ak-cat-h2,
  .ak-cat-section .ak-cat-lead {
    text-align: center;
  }

  .ak-cat-section .ak-cat-lead {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ak-buy-cta,
  .ak-buy-option,
  .ak-cat-card,
  .ak-cat-go svg {
    transition: none;
  }

  .ak-buy-cta:hover,
  .ak-buy-option:hover,
  .ak-cat-card:hover,
  .ak-cat-card:hover .ak-cat-go svg {
    transform: none;
  }
}

/* Mobile (2026-10-02): treść kart „Kup online” i kategorii wyśrodkowana jak w całej witrynie */
@media (max-width: 768px) {
  .ak-buy-title,
  .ak-buy-section .ak-buy-desc,
  .ak-buy-section .ak-buy-options-label,
  .ak-cat-title,
  .ak-cat-section .ak-cat-desc,
  .ak-cat-section .ak-cat-more {
    text-align: center;
  }

  .ak-buy-discount,
  .ak-cat-go {
    align-self: center;
  }

  /* Lista z ptaszkami: ikona w linii z tekstem, całość wyśrodkowana */
  .ak-buy-list li {
    display: block;
    text-align: center;
  }

  .ak-buy-list svg {
    display: inline-block;
    vertical-align: -4px;
    margin-right: 6px;
  }
}

/* Desktop (2026-10-02): opisy w kartach „Kup online” i kategorii wyjustowane jak w całej witrynie */
@media (min-width: 769px) {
  .ak-buy-section .ak-buy-desc,
  .ak-cat-section .ak-cat-desc,
  .ak-cat-section .ak-cat-more {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}
