/* Крым ШинТорг — стили компонентов. Значения только через токены из tokens.css. */

.ks-root { font-family: var(--font-sans); color: var(--ink); background: var(--surface-0); }

/* Шапка: белая, с оригинальным логотипом */
.ks-header { box-sizing: border-box; display: flex; align-items: center; gap: var(--space-4); height: 64px; padding: 0 var(--space-4); background: var(--header-bg); color: var(--header-ink); border-bottom: 1px solid var(--header-line); }
.ks-header__logo { display: block; height: 44px; width: auto; }
.ks-header__nav { display: flex; gap: var(--space-6); font-family: var(--font-sans); font-size: 15px; font-weight: 600; }
.ks-header__nav a { color: var(--header-ink); text-decoration: none; }
.ks-header__nav a:hover { text-decoration: underline; }
.ks-header__phone { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--header-ink); text-decoration: none; white-space: nowrap; }
.ks-header__phone small { display: block; font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--header-muted); }
.ks-header .ks-icon-btn { background: transparent; color: var(--header-ink); }
.ks-header .ks-icon-btn:focus-visible { outline-color: var(--header-ink); }
.ks-header--desktop { height: 80px; padding: 0 var(--space-8); }
.ks-header--desktop .ks-header__logo { height: 60px; }

/* Кнопка */
.ks-btn {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: var(--control-height); padding: 0 var(--space-6); border-radius: var(--radius-md);
  font-family: var(--font-display); font-size: 16px; line-height: 20px; font-weight: 700;
  border: 0; cursor: pointer; text-decoration: none; transition: background-color .15s ease, transform .1s ease;
}
.ks-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ks-btn:active { transform: translateY(1px); }
.ks-btn--primary { background: var(--brand-yellow); color: var(--on-brand); }
.ks-btn--primary:hover { background: var(--brand-yellow-hover); }
.ks-btn--secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.ks-btn--secondary:hover { background: var(--surface-100); }
.ks-btn--ghost { background: transparent; color: var(--ink); padding: 0 var(--space-3); }
.ks-btn--ghost:hover { background: var(--surface-100); }
.ks-btn--lg { height: var(--control-height-lg); font-size: 17px; }
.ks-btn--block { width: 100%; }
.ks-btn[disabled] { background: var(--surface-200); color: var(--ink-muted); box-shadow: none; cursor: not-allowed; }
.ks-icon-btn {
  box-sizing: border-box; width: var(--touch-min); height: var(--touch-min); border: 0; border-radius: var(--radius-pill);
  background: var(--surface-0); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.ks-icon-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Поле */
.ks-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.ks-input {
  box-sizing: border-box; height: var(--control-height); padding: 0 14px; border-radius: var(--radius-md);
  border: 1px solid var(--line-strong); background: var(--surface-0); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; font-weight: 400;
}
.ks-input::placeholder { color: var(--ink-muted); }
.ks-input:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--ink); }
.ks-field--error .ks-input { border: 2px solid var(--danger); }
.ks-field__hint { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.ks-field--error .ks-field__hint { color: var(--danger); }

/* Чип */
.ks-chip {
  box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface-0); color: var(--ink);
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; cursor: pointer;
}
.ks-chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ks-chip[aria-pressed="true"] { border: 2px solid var(--ink); background: var(--brand-tint); font-weight: 600; }
.ks-chip--active-filter { background: var(--inverse-surface); color: var(--on-inverse); border-color: var(--inverse-surface); height: 36px; font-size: 13px; }

/* Бейдж наличия */
.ks-stock { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: var(--radius-sm); font-size: 12px; line-height: 16px; font-weight: 600; }
.ks-stock--in { background: var(--success-tint); color: var(--success); }
.ks-stock--order { background: var(--warning-tint); color: var(--warning); }
.ks-stock--out { background: var(--surface-100); color: var(--danger); }

/* Карточка товара */
.ks-card {
  box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3);
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-0); color: var(--ink);
  text-decoration: none; transition: box-shadow .2s ease, border-color .2s ease;
}
.ks-card:hover { box-shadow: var(--shadow-card); border-color: transparent; }
.ks-card__photo { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); background: var(--surface-100); display: flex; align-items: center; justify-content: center; color: var(--ink-muted); font-size: 12px; }
.ks-card__tag { position: absolute; top: 8px; left: 8px; padding: 4px 8px; border-radius: var(--radius-sm); background: var(--brand-yellow); color: var(--on-brand); font-size: 12px; font-weight: 700; }
.ks-card__fav { position: absolute; top: 4px; right: 4px; }
.ks-card__season { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.ks-card__name { margin: 0; font-family: var(--font-display); font-size: 16px; line-height: 21px; font-weight: 700; }
.ks-card__size { font-size: 14px; line-height: 20px; }
.ks-card__price { font-family: var(--font-display); font-size: 20px; line-height: 24px; font-weight: 800; }
.ks-card__price small { font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.ks-card--row { flex-direction: row; gap: var(--space-3); }
.ks-card--row .ks-card__photo { flex: 0 0 104px; aspect-ratio: auto; height: 128px; }
.ks-card--row .ks-card__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* Блок подбора */
.ks-picker { box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-0); color: var(--ink); }
.ks-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: var(--radius-md); background: var(--surface-200); }
.ks-tab { height: 40px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font-family: var(--font-sans); font-size: 14px; font-weight: 600; cursor: pointer; }
.ks-tab[aria-selected="true"] { background: var(--inverse-surface); color: var(--on-inverse); }
.ks-tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ks-picker__sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.ks-picker__sizes .ks-field { font-size: 12px; font-weight: 500; color: var(--ink-muted); gap: 4px; }
.ks-picker__sizes .ks-input { padding: 0 8px; font-weight: 600; }
.ks-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ks-check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ks-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
