/**
 * Kontakty – přepínač Poptávka / Technická podpora + košík poptávky
 * Doplňuje sekci KONTAKT v main.css
 */

.kf-choose {
  --red: #cf1008;
  --red-light: #e3140c;
  --red-soft: #fdeeee;
  --green: #1f9d4c;
  --muted: #5d5d5d;
  --line: #e6e6e6;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .06);
  padding: 70px 0 90px;
}

/* ---------- Úvod ---------- */
.kf-choose__head {
  max-width: 720px;
  margin: 0 auto 36px;
  text-align: center;
}
.kf-choose__head h2 {
  font-family: 'Readex Pro', sans-serif;
  font-size: 46px;
  font-weight: 800;
  line-height: 1.1;
  color: #000;
  margin: 0 0 12px;
}
.kf-choose__head p {
  margin: 0;
  font-size: 19px;
  color: var(--muted);
}

/* =========================================================
   PŘEPÍNAČ
   ========================================================= */
.kf-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}
.kf-switch__btn {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 26px 28px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: left;
  color: #000;
  cursor: pointer;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.kf-switch__btn:hover {
  transform: translateY(-3px);
  border-color: #f3c9c7;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .09);
}
.kf-switch__btn:focus-visible {
  outline: 3px solid rgba(207, 16, 8, .35);
  outline-offset: 3px;
}
.kf-switch__icon {
  display: flex;
  flex: 0 0 64px;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--red-soft);
  font-size: 26px;
  color: var(--red);
  transition: background-color .25s ease, color .25s ease;
}
.kf-switch__text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.kf-switch__text strong {
  font-family: 'Readex Pro', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.kf-switch__text span {
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}
.kf-switch__arrow {
  flex: 0 0 auto;
  font-size: 20px;
  color: var(--red);
  transition: transform .3s ease;
}

.kf-switch__btn[aria-selected="true"] {
  border-color: var(--red);
  box-shadow: 0 16px 40px rgba(207, 16, 8, .15);
  transform: none;
}
.kf-switch__btn[aria-selected="true"] .kf-switch__icon {
  background: var(--red);
  color: #fff;
}
.kf-switch__btn[aria-selected="true"] .kf-switch__arrow {
  transform: rotate(180deg);
}
/* když je vybráno, druhá volba ustoupí */
.kf-choose.has-choice .kf-switch__btn[aria-selected="false"] {
  opacity: .7;
}
.kf-choose.has-choice .kf-switch__btn[aria-selected="false"]:hover {
  opacity: 1;
}

/* ---------- Panely (bez JS jsou vidět oba) ---------- */
.kf-panel {
  margin-top: 40px;
  scroll-margin-top: 110px;
}
.kf-js .kf-panel {
  display: none;
}
.kf-js .kf-panel.is-open {
  display: block;
  animation: kfIn .35s ease both;
}
@keyframes kfIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Technická podpora – tlačítko dispečinku ---------- */
.kf-urgent {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--red-soft);
  font-size: 15px;
  line-height: 1.4;
  color: #000;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease;
}
.kf-urgent i {
  font-size: 20px;
  color: var(--red);
}
.kf-urgent strong {
  white-space: nowrap;
  color: var(--red);
}
.kf-urgent:hover {
  background: var(--red);
  color: #fff;
}
.kf-urgent:hover i,
.kf-urgent:hover strong {
  color: #fff;
}

/* =========================================================
   POPTÁVKA – KATALOG + KOŠÍK
   ========================================================= */
.kp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  align-items: start;
  gap: 30px;
}

/* ---------- Kroky ---------- */
.kp-step {
  margin-bottom: 22px;
  padding: 30px 30px 32px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.kp-step:last-child {
  margin-bottom: 0;
}
.kp-step__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.kp-step__num {
  display: flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--red);
  font-family: 'Readex Pro', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.kp-step__title {
  font-family: 'Readex Pro', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #000;
  margin: 4px 0 2px;
}
.kp-step__title i {
  margin-right: 4px;
  font-size: .9em;
  color: var(--red);
}
.kp-step__desc {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Záložky (Optika / Vzduchem) ---------- */
.kp-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 10px;
  background: #f2f2f2;
}
.kp-tab {
  margin: 0;
  padding: 10px 20px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-family: 'Readex Pro', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.kp-tab:hover {
  color: #000;
}
.kp-tab.is-active {
  background: #fff;
  color: var(--red);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.kp-tab .kp-tab__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: middle;
}

/* ---------- Položky ---------- */
.kp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.kp-grid--multi {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.kp-grid[hidden] {
  display: none;
}

.kp-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  margin: 0;
  padding: 18px 46px 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  color: #000;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.kp-item:hover {
  transform: translateY(-2px);
  border-color: #f0b4b1;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .06);
}
.kp-item:focus-visible {
  outline: 3px solid rgba(207, 16, 8, .35);
  outline-offset: 2px;
}
.kp-item[aria-pressed="true"] {
  border-color: var(--red);
  background: #fff8f7;
  box-shadow: 0 0 0 3px rgba(207, 16, 8, .12);
}

.kp-item__check {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid #cfcfcf;
  border-radius: 50%;
  background: #fff;
  font-size: 14px;
  color: transparent;
  transition: all .2s ease;
}
.kp-grid--multi .kp-item__check {
  border-radius: 6px;
}
.kp-item[aria-pressed="true"] .kp-item__check {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.kp-item__badge {
  position: absolute;
  top: -10px;
  left: 16px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--red);
  font-family: 'Readex Pro', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
}
.kp-item--featured {
  border-color: #f3c9c7;
}

.kp-item__name {
  font-family: 'Exo', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}
.kp-item__detail {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}
.kp-item__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 8px;
}
.kp-item__price strong {
  font-family: 'Exo', sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--red);
}
.kp-item__price strong.is-ask {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #444;
}
.kp-item__price span {
  font-size: 13px;
  color: #8a8a8a;
}

/* ---------- Košík ---------- */
.kp__cart {
  position: sticky;
  top: 120px;
  scroll-margin-top: 110px;
}
.kp-cart {
  padding: 28px 26px 26px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .1);
}
.kp-cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.kp-cart__head h3 {
  font-family: 'Readex Pro', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #000;
  margin: 0;
}
.kp-cart__head h3 i {
  margin-right: 6px;
  color: var(--red);
}
.kp-cart__count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 15px;
  background: #f2f2f2;
  font-family: 'Readex Pro', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #444;
  transition: background-color .2s ease, color .2s ease;
}
.kp-cart.has-items .kp-cart__count {
  background: var(--red);
  color: #fff;
}

.kp-cart__empty {
  margin: 0;
  padding: 18px;
  border: 1.5px dashed #dcdcdc;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: #777;
}
.kp-cart.has-items .kp-cart__empty {
  display: none;
}
.kp-cart.is-error .kp-cart__empty {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
  animation: kpShake .4s ease;
}
@keyframes kpShake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

.kp-cart__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.kp-cart__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  animation: kfIn .25s ease both;
}
.kp-cart__label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.kp-cart__name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: #000;
}
.kp-cart__name small {
  font-size: 13px;
  font-weight: 400;
  color: #777;
}
.kp-cart__price {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  color: #000;
}
.kp-cart__price.is-ask {
  font-size: 13px;
  font-weight: 500;
  color: #777;
}
.kp-cart__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4f4f4;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.kp-cart__remove:hover {
  background: var(--red);
  color: #fff;
}

.kp-cart__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px solid #000;
}
.kp-cart__total[hidden],
.kp-cart__note[hidden] {
  display: none;
}
.kp-cart__total span {
  font-size: 15px;
  font-weight: 600;
}
.kp-cart__total strong {
  font-family: 'Exo', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--red);
}
.kp-cart__note {
  margin: 4px 0 0;
  font-size: 13px;
  text-align: right;
  color: #777;
}

.kp-cart__form {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #ececec;
}
.kp-cart__form h4 {
  font-family: 'Readex Pro', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #000;
  margin: 0 0 14px;
}
/* úzký sloupec = pole pod sebou */
.kp-cart__form .kf-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}
.kp-cart__form .kf-field label {
  margin-bottom: 6px;
  font-size: 13.5px;
}
.kp-cart__form .wpcf7-textarea {
  height: 90px;
}

/* ---------- Mobilní lišta ---------- */
.kp-bar {
  display: none;
}

/* =========================================================
   RESPONZIVITA
   ========================================================= */
@media (max-width: 1399px) {
  .kp { grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; }
  .kp-step { padding: 26px 24px 28px; }
}

@media (max-width: 1199px) {
  .kf-choose__head h2 { font-size: 38px; }
  .kp { grid-template-columns: minmax(0, 1fr) 340px; }
  .kp-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}

@media (max-width: 991px) {
  .kf-choose { padding: 56px 0 70px; }
  .kp { grid-template-columns: 1fr; }
  .kp__cart { position: static; }

  .kf-panel.is-open .kp-bar.has-items {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 990;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 10px 10px 18px;
    border-radius: 12px;
    background: #111;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
    color: #fff;
    animation: kfIn .25s ease both;
  }
  .kf-panel.is-open .kp-bar.has-items.is-hidden { display: none; }
  .kp-bar__info {
    font-size: 15px;
    white-space: nowrap;
  }
  .kp-bar__info i { color: #ff4d42; }
  .kp-bar__total { margin-left: 6px; opacity: .85; }
  .kp-bar__btn {
    padding: 11px 16px;
    border-radius: 8px;
    background: var(--red);
    font-family: 'Readex Pro', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
  }
  .kp-bar__btn:hover { background: #fff; color: #000; }

  /* plovoucí servisní tlačítko by se s lištou překrývalo */
  body.kp-bar-on #service-button { display: none; }
}

@media (max-width: 767px) {
  .kf-choose__head h2 { font-size: 30px; }
  .kf-choose__head p { font-size: 16px; }
  .kf-switch { grid-template-columns: 1fr; gap: 12px; }
  .kf-switch__btn { padding: 18px 20px; gap: 16px; }
  .kf-switch__icon { flex-basis: 52px; width: 52px; height: 52px; font-size: 22px; }
  .kf-switch__text strong { font-size: 19px; }
  .kf-panel { margin-top: 28px; }

  .kp-step { padding: 22px 18px 24px; }
  .kp-step__title { font-size: 19px; }
  .kp-grid,
  .kp-grid--multi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kp-item { padding: 16px 38px 14px 14px; }
  .kp-item__check { top: 12px; right: 12px; }
  .kp-item__name { font-size: 15.5px; }
  .kp-item__price strong { font-size: 19px; }
  .kp-cart { padding: 22px 18px; }
}

@media (max-width: 420px) {
  .kp-grid,
  .kp-grid--multi { grid-template-columns: 1fr; }
  .kp-tabs { display: flex; }
  .kp-tab { flex: 1 1 0; padding: 10px 8px; font-size: 14px; }
  .kp-bar__total { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .kf-choose *,
  .kf-choose *::before,
  .kf-choose *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   „Odeslat poptávku“ – zelené, na najetí jen pohyb
   ========================================================= */
.kp-cart__form .wpcf7-submit,
.kp-cart__form .wpcf7-submit:hover,
.kp-cart__form .wpcf7-submit:focus-visible {
  background: #1f9d4c;
  color: #fff;
  box-shadow: 0 0 0 5px rgba(31, 157, 76, .14), 0 12px 26px rgba(31, 157, 76, .3);
}
.kp-cart__form .wpcf7-submit {
  transition: transform .3s ease;
}
.kp-cart__form .wpcf7-submit:hover,
.kp-cart__form .wpcf7-submit:focus-visible {
  transform: translateY(-3px);
}
