/* =========================================================
   Page: /pozyczka-pod-zastaw/
   ========================================================= */

/* --- Loan application modal --- */

.loan_modal[hidden] { display: none !important; }
.loan_modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.loan_modal__bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.loan_modal__content {
  position: relative;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
html.loan-modal-open { overflow: hidden; }

.loan_modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: 0; background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.loan_modal__close:hover { background: rgba(0, 0, 0, 0.06); }

.loan_modal__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  padding-right: 32px;
}
.loan_modal__subtitle {
  font-size: 13px;
  color: #666;
  margin: 0 0 16px;
  line-height: 1.5;
}

.loan_modal__params {
  display: flex;
  gap: 12px;
  background: #fdf8ec;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.loan_modal__param {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.loan_modal__param__label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.loan_modal__param__value {
  font-size: 18px;
  font-weight: 700;
  color: #8a6a1b;
}

.loan_modal__form { display: block; }
.loan_modal__row { margin-bottom: 14px; }
.loan_modal__row--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .loan_modal__row--two { grid-template-columns: 1fr; }
}

.loan_modal__field { display: block; }
.loan_modal__label {
  display: block;
  font-size: 12px;
  color: #555;
  margin-bottom: 4px;
  font-weight: 500;
}
.loan_modal__req { color: #c4a55b; }
.loan_modal__optional { color: #999; font-weight: 400; }

.loan_modal input[type="text"],
.loan_modal input[type="tel"],
.loan_modal input[type="email"] {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.loan_modal input:focus { border-color: #c9a84c; }

.loan_modal__consent {
  margin-bottom: 16px;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}
.loan_modal__consent label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
}
.loan_modal__consent input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }

.loan_modal__submit {
  width: 100%;
  justify-content: center;
  text-align: center;
  margin-bottom: 10px;
}
.loan_modal__trust {
  text-align: center;
  font-size: 12px;
  color: #999;
}

/* --- Hero loan calculator widget --- */

.hero_loan_calc__inner {
  padding: 2.475rem 2.925rem 2.6rem;
}

.hero_loan_calc__title {
  font-size: 1.38rem;
  line-height: 1;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: #212121;
}

.hero_loan_calc__field {
  margin-bottom: 1.25rem;
}

.hero_loan_calc__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
  font-weight: 500;
  color: #212121;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.hero_loan_calc__output {
  font-weight: 700;
  color: #8a6a1b;
  white-space: nowrap;
}

.hero_loan_calc__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, #c9a84c 0%, #c9a84c var(--pct, 2%), #d9d9d9 var(--pct, 2%));
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.hero_loan_calc__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c9a84c;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px #c9a84c;
  cursor: pointer;
}

.hero_loan_calc__range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: #c9a84c;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px #c9a84c;
  cursor: pointer;
}

.hero_loan_calc__result {
  background: #f9f5ea;
  border-radius: 0.3rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.hero_loan_calc__result__label {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.hero_loan_calc__result__value {
  font-size: 1.6rem;
  line-height: 1;
  color: #212121;
  margin-bottom: 0.4rem;
}

.hero_loan_calc__result__value strong {
  font-weight: 700;
}

.hero_loan_calc__result__note {
  font-size: 0.75rem;
  color: #888;
}

.hero_loan_calc__btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* Ensure hero has enough height for the calculator widget */
.promo_section--pozyczka .promo_section__inner {
  min-height: 38rem;
}

/* --- price_factors for pozyczka --- */

.section_price_factors--pozyczka .section_price_factors__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .section_price_factors--pozyczka .section_price_factors__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .section_price_factors--pozyczka .section_price_factors__list {
    grid-template-columns: 1fr;
  }

  .promo_section--pozyczka .promo_section__inner {
    min-height: unset;
  }

  /* Stack calculator below hero text on mobile */
  .hero_loan_calc.promo_section__rates {
    position: static;
    width: 100%;
    margin-top: 2rem;
    border-radius: 0;
  }
}

/* Samochody card — larger image preview to balance composition */
.skup_metal__products--pozyczka .skup_metal__products__item__image img[alt="Samochody i pojazdy"] {
  transform: scale(1.22);
}

/* Zegarki hero image — slightly smaller to balance composition */
.catalog_hero--pozyczka-type .shop_section__sklep__top__image img[src*="zlote-zegarki"] {
  transform: scale(0.88);
  transform-origin: center top;
}

/* Antyki hero image — small icon (148×140), scaled with crisp rendering */
.catalog_hero--pozyczka-type .shop_section__sklep__top__image img[src*="products/antyki"] {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
}
