/* flycam.kz — стили новых разделов: КазФАС, Магазин, Медиа, кнопка WhatsApp.
   Подключается после site.css, не в слое (приоритет выше слоёв site.css). Цвета и размеры — из :root site.css. */

/* ---------- подменю раздела КазФАС ---------- */
.sec-nav { background: #fff; border-bottom: 1px solid var(--line) }
.sec-nav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin }
.sec-nav a { display: inline-flex; align-items: center; padding: 19px 18px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap }
.sec-nav a:hover { color: var(--ink) }
.sec-nav a[aria-current=page] { color: var(--ink); border-bottom-color: var(--teal) }
.kz-hero h1 { font-size: clamp(34px, 4.2vw, 60px); max-width: 980px }
.kz-body .detail-content h2 { margin-bottom: 18px }
.kz-body .detail-content p + p { margin-top: 16px }
.kz-body .detail-content a:not(.button):not(.text-link) { color: var(--teal); text-decoration: underline; text-underline-offset: 3px }
.kz-note { margin-top: 22px; padding: 16px 20px; border-left: 3px solid var(--teal); background: var(--paper); font-size: 15px; line-height: 1.75 }
.kz-note.small, .kz-body .detail-content p.kz-small { font-size: 14px; line-height: 1.75; color: var(--muted) }
.kz-links { margin: 18px 0 0; padding: 0; list-style: none }
.kz-links li { border-top: 1px solid var(--line) }
.kz-links li:last-child { border-bottom: 1px solid var(--line) }
.kz-body .detail-content .kz-links li a:not(.button):not(.text-link) { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) 18px; align-items: center; gap: 6px 22px; padding: 16px 0; font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--ink); text-decoration: none }
.kz-body .detail-content .kz-links li a:not(.button):not(.text-link):hover { color: var(--teal) }
.kz-body .detail-content .kz-links li a span { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.55; text-align: left }
.kz-links .icon { width: 18px; height: 18px; color: var(--teal); justify-self: end }
.kz-aside-price { display: block; font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 6px }
.kz-aside-note { font-size: 13px; color: var(--muted) }
.detail-aside .button.wa { margin-top: 12px }

/* ---------- лицензии ---------- */
.kz-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 6px }
.kz-plan { border: 1px solid var(--line); background: #fff; padding: 26px 26px 24px }
.kz-plan h3 { font-size: 18px; line-height: 1.35; margin-bottom: 14px }
.kz-plan .kz-price { display: block; font-size: 42px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1 }
.kz-plan .kz-unit { display: block; margin-top: 8px; font-size: 13px; color: var(--muted) }
.kz-steps { list-style: none; margin: 0; padding: 0; counter-reset: kz }
.kz-steps li { counter-increment: kz; position: relative; padding: 15px 0 15px 54px; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.7 }
.kz-steps li:first-child { border-top: 1px solid var(--line) }
.kz-steps li::before { content: counter(kz, decimal-leading-zero); position: absolute; left: 0; top: 17px; color: var(--teal); font-size: 14px; font-weight: 700; letter-spacing: .06em }
.kz-rules { margin: 0; padding: 0; list-style: none }
.kz-rules li { display: flex; align-items: flex-start; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.7 }
.kz-rules li:first-child { border-top: 1px solid var(--line) }
.kz-rules .icon { color: var(--teal); height: 19px; width: 19px; margin-top: 4px; flex: none }

/* ---------- формы (заявка на лицензию, оформление заказа) ---------- */
.fc-form { margin-top: 8px }
.fc-form label { display: block; font-size: 13px; font-weight: 600; line-height: 1.5; margin: 0 0 16px }
.fc-form input:not([type=checkbox]):not([type=radio]), .fc-form select, .fc-form textarea { display: block; width: 100%; border: 1px solid #cbd8da; background: #fcfdfd; border-radius: 3px; padding: 12px 13px; margin-top: 8px; font-size: 15px; color: var(--ink); line-height: 1.5; min-height: 47px; font-weight: 400 }
.fc-form textarea { resize: vertical }
.fc-form input:hover, .fc-form select:hover, .fc-form textarea:hover { border-color: #7fa9a7 }
.fc-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px }
.fc-form fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0 }
.fc-form legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 10px }
.fc-form .choice { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 0 0 10px; cursor: pointer; font-size: 14px; line-height: 1.6 }
.fc-form .choice input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; padding: 0; min-height: 0; accent-color: var(--teal) }
.fc-form .choice > span { font-size: 14px; line-height: 1.6; font-weight: 400 }
.fc-form .choice a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px }
.fc-form .hint, .detail-content .fc-form p.hint { display: block; font-size: 12px; line-height: 1.7; color: var(--muted); font-weight: 400; margin: 6px 0 0 }
.fc-form .terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.fc-form .term-card { display: block; position: relative; margin: 0; cursor: pointer }
.fc-form .term-card input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0 }
.fc-form .term-card > span { display: block; border: 1px solid #cbd8da; border-radius: 4px; padding: 16px 18px; background: #fff; transition: border-color .2s, box-shadow .2s }
.fc-form .term-card strong { display: block; font-size: 15px }
.fc-form .term-card em { display: block; font-style: normal; font-size: 24px; font-weight: 700; margin-top: 6px }
.fc-form .term-card input:checked + span { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); background: #f1f8f6 }
.fc-form .term-card input:focus-visible + span { outline: 3px solid #d88645; outline-offset: 2px }
.fc-form [hidden] { display: none }
.fc-form .box { border-left: 3px solid var(--teal); background: var(--paper); padding: 16px 18px 6px; margin: 0 0 20px }
.fc-form .submit-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 8px }
.fc-form .submit-row .sum { font-size: 14px; color: var(--muted) }
.fc-form .submit-row .sum strong { color: var(--ink); font-size: 20px; margin-left: 6px }
[data-kind=error] { padding: 12px 16px; border-left: 3px solid #b3261e; background: #fdf0ee; color: #6b1a14; font-size: 14px; line-height: 1.7; margin: 14px 0 }
[data-kind=error] .text-link { color: #6b1a14; text-decoration: underline; font-size: 14px; padding: 0 }
.kz-done { border: 1px solid var(--line); border-top: 3px solid var(--teal); background: #fff; padding: 30px 30px 26px }
.kz-done h2 { font-size: 28px !important; margin-bottom: 12px !important; outline: none }
.kz-done p { font-size: 16px !important; line-height: 1.8 !important }
.kz-done .kz-steps { margin: 18px 0 }
.kz-done .result-buttons { margin-top: 18px }

/* ---------- галерея ---------- */
.kz-fig { margin: 0 }
.kz-fig a { display: block; position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--soft) }
.kz-fig img { display: block; width: 100%; height: auto; aspect-ratio: 24 / 11; object-fit: cover }
.kz-fig .kz-zoom { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; background: #11313ccc; color: #fff; padding: 8px 12px; font-size: 12px; font-weight: 600; border-radius: 3px }
.kz-fig .kz-zoom .icon { width: 16px; height: 16px }
.kz-fig a:hover .kz-zoom { background: var(--teal) }
.kz-fig figcaption { padding: 14px 2px 0; font-size: 15px; color: var(--muted); line-height: 1.7 }
.lightbox { border: 0; padding: 0; width: min(96vw, 1500px); max-width: none; max-height: calc(100dvh - 24px); background: #0b1d24; color: #fff; border-radius: 6px; overflow: hidden }
.lightbox::backdrop { background: #0b1f2bdd; backdrop-filter: blur(3px) }
.lightbox img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 90px); object-fit: contain; background: #0b1d24 }
.lightbox .kz-cap { padding: 12px 18px 14px; font-size: 14px; color: #c9d9dd }
.lightbox .dialog-close { z-index: 2; background: #ffffffe6 }

/* ---------- документы и ресурсы ---------- */
.kz-docs { margin: 0; padding: 0; list-style: none }
.kz-doc { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 26px 0; border-top: 1px solid var(--line) }
.kz-doc:last-child { border-bottom: 1px solid var(--line) }
.kz-doc > .icon { width: 40px; height: 40px; color: var(--teal); stroke-width: 1.1 }
.kz-doc h3 { font-size: 20px; line-height: 1.35; margin-bottom: 6px }
.kz-doc p { font-size: 15px; line-height: 1.75; color: var(--muted); max-width: 720px }
.kz-doc .kz-meta { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); letter-spacing: .03em }
.kz-doc .button { min-width: 170px; font-size: 13px; min-height: 48px }
.kz-res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px }
.kz-res { border: 1px solid var(--line); background: #fff; padding: 32px 30px 26px; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, box-shadow .2s }
.kz-res:hover { border-color: #8bb7b3; box-shadow: 0 8px 30px #14313c08 }
.kz-res .kz-domain { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal) }
.kz-res h2, .kz-res h3 { font-size: 24px; line-height: 1.25 }
.kz-res p { font-size: 15px; line-height: 1.8; color: var(--muted); flex: 1 }
.kz-res .text-link { margin-top: 8px; align-self: flex-start }
.kz-foot-note { margin-top: 30px; font-size: 14px; color: var(--muted); line-height: 1.75 }

/* ---------- Медиа ---------- */
.md-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px }
.md-card { border: 1px solid var(--line); background: #fff; padding: 34px 32px 30px; display: flex; flex-direction: column; gap: 12px }
.md-card > .icon { width: 44px; height: 44px; color: var(--teal); stroke-width: 1.1; margin-bottom: 8px }
.md-card h2 { font-size: 28px; line-height: 1.2 }
.md-card p { font-size: 16px; line-height: 1.8; color: var(--muted); flex: 1 }
.md-card .button { align-self: flex-start; margin-top: 10px }
.md-card.accent { background: var(--ink); border-color: var(--ink); color: #fff }
.md-card.accent h2 { color: #fff }
.md-card.accent p { color: #c3d6da }
.md-card.accent > .icon { color: var(--mint) }

/* ---------- магазин ---------- */
.shop-banner { padding: 14px 18px; border-left: 3px solid #d88645; background: #fff6ec; font-size: 14px; line-height: 1.7; margin: 0 0 26px; color: #5b3410 }
.shop-banner[hidden] { display: none }
.shop-section { padding-top: 50px }
.shop-grid > .empty-state { grid-column: 1 / -1 }
.fc-form small { font-weight: 400; color: var(--muted) }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px }
.shop-card { border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s }
.shop-card:hover { border-color: #8bb7b3; box-shadow: 0 8px 30px #14313c0d }
.shop-card[hidden] { display: none }
.shop-media { display: block; aspect-ratio: 4 / 3; background: var(--soft); overflow: hidden }
.shop-img { display: block; width: 100%; height: 100%; object-fit: cover }
.shop-img.is-ph { display: grid; place-items: center; color: var(--teal); background: linear-gradient(135deg, #eaf3f1, #f7f8f8) }
.shop-img.is-ph .icon { width: 70px; height: 70px; stroke-width: .8 }
.shop-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1 }
.shop-cat { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); font-weight: 700; margin: 0 }
.shop-badge { display: inline-block; background: #fff1e0; color: #7a3f0c; border-radius: 2px; padding: 2px 7px; font-size: 10px; letter-spacing: .06em }
.shop-card h3 { font-size: 21px; line-height: 1.3 }
.shop-card h3 a:hover { color: var(--teal) }
.shop-sum { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 0 }
.shop-buy { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap }
.shop-price { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 0 }
.shop-price.big { font-size: 30px; margin: 4px 0 14px }
.shop-buy .button { min-height: 44px; padding: 10px 16px; font-size: 12px; gap: 14px }
.shop-soldout { font-size: 13px; color: var(--muted) }
.shop-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 60; background: var(--ink); color: #fff; border-radius: 6px; padding: 14px 20px; display: flex; gap: 22px; align-items: center; font-size: 14px; box-shadow: 0 12px 40px #0a283d40; transition: opacity .25s, transform .25s; max-width: calc(100% - 32px) }
.shop-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto }
.shop-toast .text-link { color: var(--mint); padding: 0; font-size: 14px; gap: 10px; white-space: nowrap }
.shop-dialog { width: min(900px, calc(100% - 32px)) }
.shop-dialog [data-dialog-body] { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 34px; padding: 40px }
.shop-dialog-media .shop-img { aspect-ratio: 4 / 3; border: 1px solid var(--line) }
.shop-dialog-info h2 { font-size: 30px; line-height: 1.2; margin-bottom: 10px }
.shop-dialog-info .eyebrow { margin-bottom: 12px; font-size: 11px }
.shop-dialog-info p { font-size: 15px; line-height: 1.8; margin-bottom: 10px }
.shop-dialog-info .shop-price.big { margin: 4px 0 14px }
.shop-specs { margin: 14px 0 18px; display: grid; gap: 0 }
.shop-specs div { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.shop-specs dt { color: var(--muted) }
.shop-specs dd { margin: 0; font-weight: 600; text-align: right }
.shop-demo-note { font-size: 13px !important; color: #7a3f0c; background: #fff6ec; padding: 10px 12px; border-left: 3px solid #d88645 }
.shop-buy-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 14px }
.qty { display: inline-flex; align-items: center; border: 1px solid #cbd8da; border-radius: 3px; background: #fff }
.qty button { width: 40px; height: 44px; display: grid; place-items: center; background: none; color: var(--ink) }
.qty button:hover { background: var(--soft) }
.qty .icon { width: 16px; height: 16px }
.qty-input { width: 54px; height: 44px; border: 0; border-left: 1px solid #e2ebec; border-right: 1px solid #e2ebec; text-align: center; font-size: 15px; background: none; color: var(--ink); -moz-appearance: textfield; padding: 0 }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0 }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 60px; align-items: start }
.cart-layout[hidden], [data-cart-main][hidden], [data-cart-aside][hidden], [data-cart-empty][hidden], [data-order-done][hidden] { display: none }
.cart-lines { list-style: none; margin: 0; padding: 0 }
.cart-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto 112px 36px; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line) }
.cart-line:first-child { border-top: 1px solid var(--line) }
.cart-media .shop-img { width: 96px; height: 72px; border: 1px solid var(--line) }
.cart-media .shop-img.is-ph .icon { width: 34px; height: 34px }
.cart-info h3 { font-size: 17px; line-height: 1.35; font-weight: 600 }
.cart-info h3 a:hover { color: var(--teal) }
.cart-unit { font-size: 13px; color: var(--muted); margin: 4px 0 0 }
.cart-sum { text-align: right; font-size: 17px; font-weight: 700 }
.cart-remove { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: none; color: var(--muted) }
.cart-remove:hover { background: var(--soft); color: var(--ink) }
.cart-remove .icon { width: 18px; height: 18px }
.cart-aside { background: var(--paper); border-top: 3px solid var(--teal); padding: 30px 28px 28px; position: sticky; top: 110px }
.cart-aside h2 { font-size: 24px; margin-bottom: 18px }
.cart-total { margin: 0 0 22px; padding: 0 }
.cart-total div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 15px }
.cart-total dt { color: var(--muted) }
.cart-total dd { margin: 0; font-weight: 600 }
.cart-total .grand { border-top: 1px solid #c7d4d6; margin-top: 6px; padding-top: 14px; font-size: 20px }
.cart-total .grand dt { color: var(--ink); font-weight: 600 }
.cart-total .grand dd { font-weight: 700 }
.cart-empty { text-align: center; background: var(--paper); padding: 70px 30px }
.cart-empty h2 { font-size: 28px; margin-bottom: 12px }
.cart-empty p { font-size: 16px; margin-bottom: 24px; color: var(--muted) }
.cart-note { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 14px 0 0 }

/* ---------- ширина экрана ---------- */
@media (max-width: 1020px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .cart-layout { grid-template-columns: minmax(0, 1fr); gap: 36px }
  .cart-aside { position: static }
  .kz-body .detail-content p { font-size: 17px }
  .page-hero-actions { flex-shrink: 1 }
}
@media (max-width: 760px) {
  .shop-dialog [data-dialog-body] { grid-template-columns: 1fr; padding: 54px 22px 26px; gap: 20px }
  .kz-plans, .fc-form .terms, .kz-res-grid, .md-grid { grid-template-columns: 1fr }
  .fc-form .row { grid-template-columns: 1fr }
  .kz-doc { grid-template-columns: 40px minmax(0, 1fr); gap: 14px 16px }
  .kz-doc .button { grid-column: 1 / -1; min-width: 0 }
  .kz-doc > .icon { width: 32px; height: 32px }
  .cart-line { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "m i x" "q q s"; gap: 12px 14px }
  .cart-line .cart-media { grid-area: m }
  .cart-line .cart-media .shop-img { width: 72px; height: 54px }
  .cart-line .cart-info { grid-area: i }
  .cart-line .cart-remove { grid-area: x; align-self: start; justify-self: end }
  .cart-line .qty { grid-area: q; justify-self: start }
  .cart-line .cart-sum { grid-area: s; align-self: center; white-space: nowrap }
  .kz-plan .kz-price { font-size: 36px }
  .kz-body .detail-content .kz-links li a:not(.button):not(.text-link) { grid-template-columns: minmax(0, 1fr) 18px }
  .kz-body .detail-content .kz-links li a span { grid-column: 1; grid-row: 2 }
  .kz-links .icon { grid-column: 2; grid-row: 1 }
  .md-card { padding: 26px 22px 24px }
  .md-card h2 { font-size: 24px }
  .kz-fig .kz-zoom { right: 8px; bottom: 8px; padding: 6px 9px }
  .sec-nav a { padding: 16px 14px }
}
@media (max-width: 560px) {
  .shop-grid { grid-template-columns: 1fr }
  .shop-toast { bottom: 14px; padding: 12px 16px; gap: 14px }
  .cart-aside { padding: 24px 18px }
  .kz-done { padding: 24px 18px }
  .page-hero-actions { width: 100% }
  .page-hero-actions .button { width: 100% }
}
