/* Крона — Работы и отзывы в каталоге */

.krt-wrap,
.krt-side {
    --krt-ink: #0f342d;
    --krt-green: #4b5f16;
    --krt-green-dark: #35460a;
    --krt-muted: #8a958f;
    --krt-line: #e3e9e6;
    --krt-sage: #f2f5ec;
    --krt-star: #f5a623;
}

.krt-wrap *,
.krt-side * { box-sizing: border-box; }

.krt-wrap { clear: both; width: 100%; margin: 40px 0 8px; }
.krt-wrap--product { margin-top: 48px; }

/* ---------- Блок со слайдером ---------- */
.krt-block { margin: 0 0 44px; }
.krt-block__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 20px; }
.krt-block__titlewrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; min-width: 0; }
.krt-block__title { margin: 0 !important; color: var(--krt-ink); font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: normal; text-transform: none; }
.krt-block__controls { display: flex; flex: 0 0 auto; gap: 10px; }
.krt-block--static .krt-block__controls { display: none; }

.krt-arrow {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
    background: var(--krt-green); cursor: pointer; box-shadow: none !important; outline: none;
    transition: background-color .2s ease, opacity .2s ease;
}
.krt-arrow::before { content: ""; width: 10px; height: 10px; border-top: 2.5px solid #fff; border-right: 2.5px solid #fff; }
.krt-arrow--prev::before { transform: rotate(-135deg); margin-left: 4px; }
.krt-arrow--next::before { transform: rotate(45deg); margin-right: 4px; }
.krt-arrow:hover { background: var(--krt-green-dark); }
.krt-arrow:disabled { opacity: .35; cursor: default; }
.krt-arrow:focus-visible { outline: 2px solid #8b513c; outline-offset: 2px; }

.krt-slider {
    display: flex; gap: 20px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 0 6px;
}
.krt-slider::-webkit-scrollbar { display: none; }
.krt-slider > * { flex: 0 0 calc((100% - 40px) / 3); min-width: 0; scroll-snap-align: start; }

.krt-block__more {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
    color: var(--krt-green) !important; font-size: 15px; font-weight: 600; text-decoration: none !important;
}
.krt-block__more:hover { color: var(--krt-green-dark) !important; text-decoration: underline !important; }

/* ---------- Работа ---------- */
.krt-work { display: flex; flex-direction: column; gap: 6px; color: var(--krt-ink) !important; text-decoration: none !important; }
.krt-work__image { display: block; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: var(--krt-sage); margin-bottom: 6px; }
.krt-work__image img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .4s ease; }
.krt-work:hover .krt-work__image img { transform: scale(1.04); }
.krt-work__title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.krt-work:hover .krt-work__title { color: var(--krt-green); }
.krt-work__place { color: var(--krt-muted); font-size: 14px; line-height: 1.35; }

/* ---------- Сводка рейтинга ---------- */
.krt-summary { display: flex; align-items: center; gap: 12px; }
.krt-summary__score { color: var(--krt-ink); font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.krt-summary__stars { font-size: 18px; line-height: 1; }
.krt-summary__count { margin-top: 4px; color: var(--krt-muted); font-size: 13px; line-height: 1.25; }

.krt-stars { color: var(--krt-star); letter-spacing: 1px; white-space: nowrap; }
.krt-stars__off { color: #d9dcd8; }

/* ---------- Отзыв ---------- */
.krt-review__person { display: flex; align-items: center; gap: 12px; }
.krt-review__avatar {
    display: inline-flex; flex: 0 0 42px; width: 42px; height: 42px; align-items: center; justify-content: center;
    border-radius: 50%; background: linear-gradient(145deg, #edf3e6, #e1e8d7); color: var(--krt-ink); font-size: 19px; font-weight: 600;
}
.krt-review__name { color: #101312; font-size: 15px; font-weight: 600; line-height: 1.2; }
.krt-review__date { display: block; margin-top: 3px; color: var(--krt-muted); font-size: 13px; line-height: 1.2; }
.krt-review .krt-stars { display: block; margin: 10px 0 8px; font-size: 17px; line-height: 1; }
.krt-review__text { margin: 0 !important; color: #151817; font-size: 15px; line-height: 1.45; }

.krt-review--card { padding: 18px; border: 1px solid #e2e5e1; border-radius: 14px; background: #fff; }
.krt-review--card { display: flex; flex-direction: column; }
.krt-review--card .krt-review__text { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.krt-review--has-photos .krt-review__text { -webkit-line-clamp: 4; }

/* Фото в отзыве (только в рабочей области) */
.krt-review__photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
.krt-photo { position: relative; display: block; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--krt-sage); line-height: 0; }
.krt-photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .25s ease; }
.krt-photo:hover img { transform: scale(1.06); }
.krt-photo__more {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(15, 52, 45, .55); color: #fff; font-size: 15px; font-weight: 700; line-height: 1;
}

/* ---------- Левая колонка каталога (ПК) ---------- */
.krt-side {
    margin-top: 28px; padding: 22px 18px 18px;
    border: 1px solid #e2e5e1; border-radius: 16px; background: #fff; color: #111;
}
.krt-side__title { margin: 0 0 16px !important; color: var(--krt-ink); font-size: 22px; font-weight: 700; line-height: 1.15; }
.krt-side .krt-summary { padding-bottom: 18px; border-bottom: 1px solid var(--krt-line); }
.krt-side .krt-review { padding: 18px 0; border-bottom: 1px solid var(--krt-line); }
.krt-side .krt-review:last-child { border-bottom: 0; }
.krt-side .krt-review__text { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.krt-side__button {
    display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 12px;
    border-radius: 12px; background: var(--krt-sage); color: var(--krt-ink) !important;
    font-size: 14px; font-weight: 600; text-decoration: none !important; transition: background-color .2s ease, color .2s ease;
}
.krt-side__button:hover { background: var(--krt-ink); color: #fff !important; }

/* Отзывы в рабочей области каталога — только на телефоне и планшете (на ПК они в левой колонке) */
@media (min-width: 992px) {
    .krt-only-mobile { display: none !important; }
}

/* ---------- Планшет ---------- */
@media (max-width: 991px) {
    .krt-side { display: none !important; }
    .krt-slider > * { flex-basis: calc((100% - 20px) / 2); }
}

/* ---------- Телефон ---------- */
@media (max-width: 767px) {
    .krt-wrap { margin-top: 28px; }
    .krt-block { margin-bottom: 36px; }
    .krt-block__head { align-items: center; margin-bottom: 14px; }
    .krt-block__title { font-size: 22px; }
    .krt-block__controls { display: none; }
    .krt-summary__score { font-size: 28px; }
    .krt-summary__stars { font-size: 15px; }

    /* Лента на всю ширину экрана, следующая карточка выглядывает */
    .krt-slider { gap: 12px; margin: 0 -15px; padding: 2px 15px 6px; scroll-padding: 0 15px; }
    .krt-slider > * { flex-basis: 82%; }
    .krt-work__title { font-size: 16px; }
    .krt-review--card { padding: 16px; }
    .krt-photo { width: 64px; height: 64px; }
}

/* ---------- Просмотр фото ---------- */
.krt-lightbox { display: none; position: fixed; inset: 0; z-index: 999999; align-items: center; justify-content: center; background: rgba(0, 0, 0, .88); }
.krt-lightbox.krt-lb-open { display: flex; }
.krt-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; object-fit: contain; }
.krt-lightbox button { position: absolute; padding: 12px 18px; border: 0; background: none; color: #fff; font-size: 44px; line-height: 1; cursor: pointer; opacity: .85; box-shadow: none; }
.krt-lightbox button:hover { opacity: 1; }
.krt-lb-close { top: 8px; right: 8px; }
.krt-lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.krt-lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.krt-lb-single .krt-lb-prev,
.krt-lb-single .krt-lb-next { display: none; }

@media (prefers-reduced-motion: reduce) {
    .krt-slider { scroll-behavior: auto; }
    .krt-work__image img { transition: none; }
}
