/* ==========================================================================
   Apex Bio — Peptit Hesaplayıcı Stilleri (calc.css)
   Birebir apexbio.ru/calc/ tasarımına, insülin enjektörü görseline ve açık temaya uyumlu.
   ========================================================================== */

.calc-page,
.calc-pg {
  padding: 32px 0 var(--sec);
  background: var(--bg);
  min-height: calc(100vh - 120px);
}

/* Breadcrumb & Üst Alan */
.pg-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin: 0 0 20px;
  font: 400 var(--fs-0)/1.2 var(--fb);
  color: var(--dim);
}

.pg-crumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t-fast);
}

.pg-crumbs a:hover {
  color: var(--sky);
}

.pg-crumbs b {
  font-weight: 500;
  color: var(--text);
}

.pg-top {
  display: grid;
  gap: var(--s-3);
  max-width: 860px;
  margin: 0 0 var(--s-7);
}

.pg-top h1 {
  font-size: var(--fs-5);
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.15;
}

.pg-top h1 em {
  font-style: normal;
  color: var(--sky);
}

.pg-top .lead {
  color: var(--muted);
  font-weight: 300;
  font-size: var(--fs-2);
  line-height: 1.6;
}

/* Hesaplayıcı Ana Grid (2 Sütun) */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: var(--s-7);
}

/* Sol Form Kartı */
.calc-form {
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(23, 34, 53, 0.05);
  border-radius: 20px;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
}

/* Sağ Çıktı Kartı */
.calc-out {
  background: #F7F9FC;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(23, 34, 53, 0.05);
  border-radius: 20px;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.cn-lab {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--dim);
  display: block;
  margin-bottom: 8px;
}

/* Enjektör Tipi Seçimi (calc-syr) */
.calc-syr {
  border: none;
  padding: 0;
  margin: 0 0 24px;
}

.calc-syr .cn-lab {
  margin-bottom: 12px;
}

.calc-syr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.calc-radio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.calc-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.calc-radio span {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.calc-radio small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.calc-radio:hover {
  border-color: var(--line-2);
  background: #FAFCFE;
}

.calc-radio:has(input:checked),
.calc-radio.active {
  border-color: var(--sky);
  background: #EEF4FA;
  box-shadow: 0 0 0 1px var(--sky);
}

.calc-radio:has(input:checked) span,
.calc-radio.active span {
  color: var(--sky);
}

/* Form Alanları (calc-field) */
.calc-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 22px;
}

.calc-field input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--fb);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.calc-field input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(33, 78, 120, 0.15);
}

.calc-field small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* Hızlı Seçim Butonları (calc-chips) */
.calc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.calc-chips button {
  padding: 4px 14px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--fb);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.calc-chips button:hover {
  border-color: var(--sky);
  color: var(--sky);
  background: #F0F6FB;
}

.calc-chips button.on {
  background: var(--sky);
  color: #FFFFFF;
  border-color: var(--sky);
}

/* Çıktı / Sonuç Göstergesi (calc-res) */
.calc-hint {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  margin-left: 6px;
}

.calc-res {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 4px 0 18px;
}

.calc-res b {
  font-family: var(--fb);
  font-size: clamp(48px, 5.5vw, 68px);
  font-weight: 700;
  line-height: 1;
  color: var(--sky);
  letter-spacing: -0.02em;
}

.calc-res span {
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}

/* İnteraktif Görsel Enjektör (.calc-syringe) */
.calc-syringe {
  margin: 0 0 20px;
  position: relative;
}

.calc-syringe-track {
  display: flex;
  align-items: center;
  position: relative;
  padding: 10px 0;
}

.cs-body {
  flex: 1;
  height: 38px;
  background: #FFFFFF;
  border: 2px solid var(--line-2);
  border-radius: 6px 14px 14px 6px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

.cs-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10%;
  background: linear-gradient(90deg, #173B5E 0%, #214E78 50%, #0097E2 100%);
  border-radius: 4px 0 0 4px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
}

.cs-fill.over {
  background: linear-gradient(90deg, #B25E09 0%, #D93025 100%);
}

.cs-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cs-ticks i {
  position: absolute;
  top: 0;
  width: 1px;
  height: 12px;
  background: rgba(33, 78, 120, 0.35);
}

.cs-ticks i:nth-child(2n) {
  height: 18px;
  background: rgba(33, 78, 120, 0.65);
}

.cs-needle {
  width: 32px;
  height: 3px;
  background: #94A3B8;
  position: relative;
  margin-left: -2px;
  border-radius: 0 2px 2px 0;
}

.cs-needle::before {
  content: '';
  position: absolute;
  right: 100%;
  top: -6px;
  width: 8px;
  height: 15px;
  background: #64748B;
  border-radius: 2px;
}

.calc-syringe figcaption {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 6px;
  padding: 0 4px 0 2px;
}

.calc-syringe figcaption i {
  font-style: normal;
}

/* Dinamik Açıklama Metni */
.calc-note {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 20px;
}

/* Detaylı İstatistikler (.calc-more) */
.calc-more {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 20px;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.calc-more div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calc-more dt {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.calc-more dd {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--sky);
}

/* Nasıl Hesaplanır? (.calc-how) */
.calc-how {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFFFF;
  overflow: hidden;
}

.calc-how summary {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sky);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.calc-how summary::-webkit-details-marker {
  display: none;
}

.calc-how summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 600;
  color: var(--sky);
  transition: transform 0.2s ease;
}

.calc-how[open] summary::after {
  content: '−';
}

.calc-how p {
  padding: 0 16px 14px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  border-top: 1px solid #F1F5F9;
  padding-top: 10px;
}

/* 4 Adımlı Uygulama Kılavuzu (.calc-steps) */
.calc-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.calc-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.calc-steps li::before {
  content: counter(calc-step);
  counter-increment: calc-step;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #EEF4FA;
  color: var(--sky);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.calc-steps {
  counter-reset: calc-step;
}

.calc-steps li b {
  color: var(--text);
  font-weight: 600;
  margin-right: 4px;
}

/* Bilgilendirme Kutusu (.note-box) */
.note-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #F0F6FB;
  border: 1px solid #D0E2F2;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: var(--s-7);
}

.note-box .ic svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--sky);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 2px;
}

.note-box h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--sky);
}

.note-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* Danışmanlık Bannerı (.week) */
.week {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(23, 34, 53, 0.04);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: var(--s-8);
}

.week-copy {
  padding: 48px;
}

.week-copy h2 {
  font-size: var(--fs-4);
  line-height: 1.2;
  margin: 6px 0 16px;
}

.week-copy h2 em {
  font-style: normal;
  color: var(--sky);
}

.week-copy p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.week-copy .cn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.week-pic {
  height: 100%;
  min-height: 300px;
  background: #F7F9FC;
}

.week-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Popüler Ürünler Gridi (.pop-grid) */
.pop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pop-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform var(--t-normal), box-shadow var(--t-normal), border-color var(--t-normal);
  display: flex;
  flex-direction: column;
}

.pop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(23, 34, 53, 0.08);
  border-color: var(--sky);
}

.pop-card .pic {
  display: block;
  aspect-ratio: 1;
  background: #F7F9FC;
  padding: 20px;
}

.pop-card .pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pop-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pop-body b a {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.pop-body small {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 16px;
}

.pop-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pop-stock {
  font-size: 12px;
  font-weight: 600;
  color: var(--ok);
  background: #EAF7EE;
  padding: 3px 8px;
  border-radius: 4px;
}

.pop-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--sky);
  text-decoration: none;
}

/* Responsive Düzenlemeler */
@media (max-width: 980px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .week {
    grid-template-columns: 1fr;
  }
  .pop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .calc-form, .calc-out {
    padding: 24px 20px;
  }
  .calc-more {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .pop-grid {
    grid-template-columns: 1fr;
  }
}
