* { box-sizing: border-box; }
body { margin: 0; font-family: Roboto, 'Segoe UI', Helvetica, Arial, sans-serif; background: #f7f7f9; color: #3d3e3d; font-size: 14px; }
a { color: #3d3e3d; text-decoration: none; transition: color .15s; }
a:hover { color: #79a02f; text-decoration: none; }
img { max-width: 100%; display: block; }

.tk-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Header — корпоративный зелёный АгроКаталога */
.tk-header { background: #aacc52; }
.tk-header__inner { display: flex; align-items: center; gap: 24px; padding: 10px 16px; flex-wrap: wrap; }
.tk-logo { display: flex; align-items: center; gap: 10px; }
.tk-logo__img { width: 44px; height: 44px; }
.tk-logo__text { font-size: 21px; font-weight: 700; line-height: 1; color: #3d3e3d; }
.tk-logo__text small { display: block; font-size: 11px; font-weight: 400; opacity: .7; }
.tk-nav { display: flex; gap: 18px; }
.tk-nav a { color: #3d3e3d; font-size: 15px; font-weight: 500; }
.tk-nav a:hover { opacity: .75; }
.tk-auth { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.tk-btn { display: inline-block; padding: 8px 16px; border-radius: 6px; border: 1px solid transparent; font-size: 14px; cursor: pointer; }
.tk-btn--primary { background: #3d3e3d; color: #fff; font-weight: 600; }
.tk-btn--primary:hover { background: #52544f; color: #fff; }
.tk-btn--ghost { background: transparent; color: #3d3e3d; border-color: rgba(61,62,61,.45); }
.tk-btn--ghost:hover { background: rgba(255,255,255,.35); }
.tk-btn--danger { background: #fdecea; color: #b3261e; }
.tk-btn--sm { padding: 5px 10px; font-size: 13px; }
.tk-btn--lg { padding: 12px 28px; font-size: 16px; }

.tk-main { min-height: 60vh; padding: 24px 0 48px; }

/* Hero */
.tk-hero { background: #fff; border-radius: 12px; padding: 36px 32px; margin-bottom: 24px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.tk-hero h1 { margin: 0 0 8px; font-size: 28px; }
.tk-hero p { margin: 0 0 20px; color: #7e7e7e; }
.tk-hero__search { display: flex; max-width: 640px; margin: 0 auto; gap: 8px; }
.tk-hero__search input { flex: 1; padding: 12px 16px; border: 1px solid #cecfda; border-radius: 8px; font-size: 15px; }
.tk-hero__search input:focus { border-color: #aacc52; outline: none; }

/* Category groups */
.tk-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 28px; }
.tk-cats__group { background: #fff; border-radius: 10px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.tk-cats__root { display: block; font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.tk-cats__children a { display: block; font-size: 14px; padding: 4px 0; color: #5c6772; }

/* Grid + cards */
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tk-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.07); color: inherit; display: flex; flex-direction: column; transition: box-shadow .15s; }
.tk-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.tk-card__img { position: relative; aspect-ratio: 4/3; background: #eff2ef; display: flex; align-items: center; justify-content: center; }
.tk-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tk-card__img img.is-broken { display: none; }
.tk-card__noimg { display: flex; align-items: center; justify-content: center; }
.tk-card__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tk-card__title { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-card__meta { font-size: 12.5px; color: #7e7e7e; }
.tk-card__footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.tk-card__price { font-weight: 700; }
.tk-card__type { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.tk-card__type--sell { background: #e8f2d0; color: #4e7a12; }
.tk-card__type--buy { background: #e3ecf7; color: #1a4b8f; }
.tk-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; background: #eff0f3; color: #5c6772; }
.tk-badge--vip { position: absolute; top: 8px; left: 8px; background: #fad652; color: #3d3e3d; font-weight: 700; }
.tk-badge--ok { background: #e8f2d0; color: #4e7a12; }

/* Layout list */
.tk-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.tk-sidebar { background: #fff; border-radius: 10px; padding: 16px; position: sticky; top: 16px; }
.tk-sidebar__title { font-weight: 700; margin-bottom: 10px; }
.tk-sidebar__group { margin-bottom: 12px; }
.tk-sidebar__root { display: block; font-weight: 600; padding: 5px 8px; border-radius: 6px; }
.tk-sidebar__child { display: block; font-size: 13.5px; padding: 4px 8px 4px 20px; border-radius: 6px; color: #5c6772; }
.tk-sidebar .is-active { background: #e8f2d0; }

.tk-filters { display: flex; gap: 10px; background: #fff; padding: 12px; border-radius: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.tk-filters input, .tk-filters select, .tk-select, .tk-input { padding: 9px 12px; border: 1px solid #cecfda; border-radius: 7px; font-size: 14px; background: #fff; }
.tk-filters input { flex: 1; min-width: 180px; }
.tk-filters input:focus, .tk-filters select:focus, .tk-input:focus, .tk-select:focus { border-color: #aacc52; outline: none; }

.tk-h1 { font-size: 24px; margin: 4px 0 18px; }
.tk-h1 small { color: #8b95a1; font-weight: 400; font-size: 15px; }
.tk-section-head { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 14px; }
.tk-section-head h1, .tk-section-head h2 { margin: 0; font-size: 22px; }
.tk-empty { background: #fff; padding: 28px; border-radius: 10px; color: #7e7e7e; text-align: center; }

/* Item page */
.tk-item { display: grid; grid-template-columns: 1fr 360px; gap: 24px; }
.tk-item__gallery { display: flex; flex-direction: column; gap: 10px; }
.tk-item__photo { background: #fff; border-radius: 10px; padding: 8px; }
.tk-item__photo img { border-radius: 8px; margin: 0 auto; max-height: 480px; object-fit: contain; }
.tk-item__photo.is-empty { min-height: 220px; display: flex; align-items: center; justify-content: center; background: #eff2ef url('/img/svg/empty-thumbnail.svg') center/96px no-repeat; }
.tk-item__info { background: #fff; border-radius: 10px; padding: 22px; height: fit-content; position: sticky; top: 16px; }
.tk-item__info h1 { font-size: 22px; margin: 0 0 12px; }
.tk-item__price { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.tk-item__meta { display: flex; flex-wrap: wrap; gap: 10px; color: #7e7e7e; font-size: 13.5px; margin-bottom: 18px; }
.tk-item__contacts { border-top: 1px solid #eff0f3; padding-top: 16px; }
.tk-item__contacts-title { font-weight: 600; margin-bottom: 10px; }
.tk-item__phone { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; color: #4e7a12; margin-bottom: 4px; }
.tk-ico { flex-shrink: 0; }
.tk-item__person { color: #7e7e7e; font-size: 14px; margin-bottom: 10px; }
.tk-item__text { background: #fff; border-radius: 10px; padding: 22px; margin-top: 24px; }
.tk-item__text h2 { margin-top: 0; font-size: 19px; }

/* My list */
.tk-mylist { display: flex; flex-direction: column; gap: 10px; }
.tk-mylist__row { display: flex; gap: 14px; background: #fff; border-radius: 10px; padding: 12px; align-items: center; }
.tk-mylist__img { width: 90px; height: 64px; border-radius: 6px; overflow: hidden; background: #eff2ef url('/img/svg/empty-thumbnail.svg') center/40px no-repeat; flex-shrink: 0; }
.tk-mylist__img img { width: 100%; height: 100%; object-fit: cover; }
.tk-mylist__main { flex: 1; min-width: 0; }
.tk-mylist__title { font-weight: 600; font-size: 15px; }
.tk-mylist__meta { font-size: 13px; color: #7e7e7e; margin-top: 4px; }
.tk-mylist__actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

/* Form */
.tk-form { max-width: 760px; }
.tk-form__section { background: #fff; border-radius: 10px; padding: 18px 20px; margin-bottom: 14px; }
.tk-form__label, .tk-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.tk-form .form-group { margin-bottom: 14px; }
.tk-form .tk-input, .tk-form .tk-select, .tk-form input[type=text], .tk-form input[type=number], .tk-form textarea, .tk-form select { width: 100%; padding: 10px 12px; border: 1px solid #cecfda; border-radius: 7px; font-size: 14px; }
.tk-form .help-block { color: #b3261e; font-size: 13px; margin-top: 4px; }
.tk-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tk-radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; font-weight: 400 !important; }
.tk-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tk-photos img { width: 90px; height: 68px; object-fit: cover; border-radius: 6px; }
.tk-form__hint { color: #7e7e7e; font-size: 13px; }

/* Flash, breadcrumbs, pagination, footer, error */
.tk-flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.tk-flash--success { background: #e8f2d0; color: #4e7a12; }
.tk-flash--error { background: #fdecea; color: #b3261e; }
.tk-breadcrumbs { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13px; color: #7e7e7e; }
.tk-breadcrumbs li { display: inline; }
.tk-breadcrumbs li + li:before { content: ' / '; }
.tk-pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 24px 0 0; justify-content: center; }
.tk-pagination__item a, .tk-pagination li a, .tk-pagination li span { display: block; padding: 8px 13px; border-radius: 7px; background: #fff; color: #3d3e3d; }
.tk-pagination li.is-active a, .tk-pagination .active a { background: #aacc52; color: #3d3e3d; font-weight: 600; }
.tk-footer { background: #3d3e3d; color: #9aa5b0; padding: 20px 0; font-size: 13.5px; }
.tk-footer__row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.tk-footer a { color: #e8f2d0; }
.tk-footer__links { display: flex; gap: 18px; }
.tk-error { text-align: center; padding: 60px 0; }

/* Auth */
.tk-authbox { max-width: 440px; margin: 24px auto; }
.tk-authbox__alt { text-align: center; padding: 0 10px; }
.tk-authbox__social { margin-bottom: 18px; }
.tk-btn--social { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; background: #fff; border: 1px solid #cecfda; font-weight: 500; font-size: 15px; }
.tk-btn--social:hover { border-color: #aacc52; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tk-btn--ghost-dark { background: transparent; color: #3d3e3d; border-color: #cecfda; margin-top: 8px; }
.tk-btn--ghost-dark:disabled { opacity: .5; cursor: default; }
.tk-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: #eff0f3; border-radius: 8px; padding: 4px; }
.tk-tabs__btn { flex: 1; padding: 9px; border: none; border-radius: 6px; background: transparent; font-size: 14px; font-weight: 500; color: #5c6772; cursor: pointer; }
.tk-tabs__btn.is-active { background: #fff; color: #3d3e3d; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.tk-tab { display: none; }
.tk-tab.is-active { display: block; }
.tk-field-error { color: #b3261e; font-size: 13px; margin-top: 6px; }
.tk-form .checkbox label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; }

@media (max-width: 860px) {
    .tk-layout, .tk-item { grid-template-columns: 1fr; }
    .tk-sidebar, .tk-item__info { position: static; }
    .tk-form__grid { grid-template-columns: 1fr; }
    .tk-hero { padding: 24px 18px; }
}
