/* IT-HOUSE — custom styles beyond Tailwind */
[x-cloak] { display: none !important; }

html { scroll-behavior: smooth; }

/* Container default */
.container { max-width: 1280px; }
@media (min-width: 1536px) { .container { max-width: 1440px; } }

/* Subtle focus ring everywhere */
:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth image rendering */
img { -webkit-user-drag: none; user-select: none; }

/* ---------------------------------------------------------------------------
   Уведомление о cookie.
   Написано обычным CSS, а не утилитами Tailwind, специально: tailwind.css
   собирается заранее из шаблонов, и любой новый класс, добавленный позже,
   молча не работает. Баннер обязан показываться при любом состоянии сборки.
   --------------------------------------------------------------------------- */
.cookie-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.12);
  padding: 14px 16px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .25s ease, transform .25s ease;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar.is-visible { opacity: 1; transform: translateY(0); }

.cookie-bar__inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
@media (min-width: 720px) {
  .cookie-bar__inner { flex-direction: row; align-items: center; gap: 22px; }
}

.cookie-bar__text {
  flex: 1; margin: 0;
  font-size: 13.5px; line-height: 1.55; color: #334155;
}
.cookie-bar__text a { color: #1d4ed8; font-weight: 600; text-decoration: underline; }
.cookie-bar__text a:hover { color: #1e40af; }

.cookie-bar__actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-bar__btn {
  border-radius: 12px; padding: 10px 18px;
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.cookie-bar__btn--accept { background: #2563eb; color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .25); }
.cookie-bar__btn--accept:hover { background: #1d4ed8; }
.cookie-bar__btn--minimal { background: #fff; color: #334155; border-color: #cbd5e1; }
.cookie-bar__btn--minimal:hover { border-color: #94a3b8; }

@media (max-width: 719px) {
  .cookie-bar__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-bar__btn { width: 100%; }
}

/* ---------------------------------------------------------------------------
   Правовые страницы (политика обработки данных).
   Тоже обычным CSS: list-disc, pl-6 и w-40 отсутствуют в собранном tailwind.css,
   а перечни в юридическом документе обязаны читаться как перечни.
   --------------------------------------------------------------------------- */
.legal-doc ul { list-style: disc outside; padding-left: 24px; margin: 0 0 12px; }
.legal-doc ul li { margin-bottom: 5px; }
.legal-doc h2 { margin-top: 26px; }
.legal-doc dt { min-width: 168px; }

/* ---------------------------------------------------------------------------
   Классы из шаблонов, которых нет в собранном tailwind.css (сборка от 25.05).
   Без них карточка товара на десктопе шла в одну колонку (блок цены под
   галереей), мобильная панель «В корзину» не прижималась к низу экрана,
   а фильтры каталога и корзина не вставали сбоку.
   --------------------------------------------------------------------------- */
.aspect-square { aspect-ratio: 1 / 1; }
.bottom-0 { bottom: 0; }
.gap-2\.5 { gap: .625rem; }
.mb-0\.5 { margin-bottom: .125rem; }
.pt-4 { padding-top: 1rem; }
.max-w-5xl { max-width: 64rem; }
.shadow-\[0_-4px_16px_rgba\(15\,23\,42\,0\.08\)\] { box-shadow: 0 -4px 16px rgba(15, 23, 42, .08); }
@media (min-width: 1024px) {
  .lg\:grid-cols-\[minmax\(0\,1fr\)_400px\] { grid-template-columns: minmax(0, 1fr) 400px; }
  .lg\:grid-cols-\[280px_minmax\(0\,1fr\)\] { grid-template-columns: 280px minmax(0, 1fr); }
}

/* ---------------------------------------------------------------------------
   Окно «Запросить цену» (src/views/_request_modal.php).
   --------------------------------------------------------------------------- */
.req-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.req-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.req-modal__panel {
  position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: #fff; border-radius: 24px; padding: 28px 24px 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
}
.req-modal__close {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: #64748b; font-size: 26px; line-height: 1; cursor: pointer;
}
.req-modal__close:hover { background: #f1f5f9; color: #0f172a; }
.req-modal__title { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: #0f172a; }
.req-modal__product { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: #334155; padding-right: 28px; }
.req-modal__hint { margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; color: #64748b; }
.req-modal__hint a, .req-modal__alt a, .req-modal__consent a { color: #1d4ed8; font-weight: 700; }
.req-modal__row { margin-bottom: 12px; }
.req-modal__grid { display: grid; grid-template-columns: 1fr 120px; gap: 12px; }
.req-modal__label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: #334155; }
.req-modal__input {
  display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 15px;
  border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #0f172a;
}
.req-modal__input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
textarea.req-modal__input { resize: vertical; }
.req-modal__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.req-modal__consent {
  display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; padding: 10px 12px;
  border-radius: 12px; background: #f8fafc; font-size: 12px; line-height: 1.5; color: #475569; cursor: pointer;
}
.req-modal__consent input { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; }
.req-modal__error { margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; border: 1px solid #fecdd3; background: #fff1f2; color: #be123c; font-size: 13.5px; }
.req-modal__submit {
  display: block; width: 100%; padding: 14px 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: #2563eb; color: #fff; font: inherit; font-size: 16px; font-weight: 800;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
}
.req-modal__submit:hover { background: #1d4ed8; }
.req-modal__submit:disabled { opacity: .6; cursor: default; }
.req-modal__alt { margin: 12px 0 0; text-align: center; font-size: 13px; color: #64748b; }
.req-modal__done { text-align: center; padding: 8px 0 4px; }
.req-modal__done-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: #d1fae5; color: #059669;
  font-size: 28px; font-weight: 800; line-height: 56px;
}
.req-modal__done .req-modal__hint { margin-bottom: 18px; }
@media (max-width: 479px) {
  .req-modal { align-items: flex-end; padding: 0; }
  .req-modal__panel { max-width: none; max-height: 92vh; border-radius: 20px 20px 0 0; }
  .req-modal__grid { grid-template-columns: 1fr 96px; }
}

/* ---------------------------------------------------------------------------
   Вкладка «Инструкции» в карточке товара (src/views/_product_docs.php).
   --------------------------------------------------------------------------- */
.pdocs-count { display: inline-block; min-width: 20px; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 12px; line-height: 18px; text-align: center; }
.pdocs-title { margin: 0 0 14px; font-size: 18px; font-weight: 800; color: #0f172a; }
.pdocs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pdocs-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.pdocs-item:hover { border-color: #bfdbfe; }
.pdocs-icon { flex-shrink: 0; width: 40px; height: 48px; border-radius: 6px; background: #fef2f2; color: #b91c1c; font-size: 11px; font-weight: 800; letter-spacing: .04em; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; border: 1px solid #fecaca; }
.pdocs-body { min-width: 0; flex: 1; }
.pdocs-name { display: block; font-weight: 700; color: #1d4ed8; text-decoration: none; line-height: 1.35; overflow-wrap: anywhere; }
.pdocs-name:hover { text-decoration: underline; }
.pdocs-meta { margin-top: 3px; font-size: 13px; color: #64748b; }
.pdocs-ext { color: #94a3b8; }
.pdocs-note { margin: 8px 0 0; font-size: 13px; color: #475569; }
.pdocs-warn { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13px; line-height: 1.45; }
.pdocs-warn a, .pdocs-foot a { color: inherit; font-weight: 700; }
.pdocs-foot { margin: 14px 0 0; font-size: 13px; color: #64748b; }
@media (max-width: 479px) { .pdocs-item { padding: 12px; gap: 10px; } .pdocs-icon { width: 34px; height: 42px; } }

/* ---------------------------------------------------------------------------
   Страница «Все категории» (src/pages/categories.php).
   --------------------------------------------------------------------------- */
.cat-all { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 640px) { .cat-all { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cat-all { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cat-all__card { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 20px; }
.cat-all__head { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.cat-all__icon { flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 8px 18px rgba(37, 99, 235, .2); }
.cat-all__icon svg { width: 26px; height: 26px; }
.cat-all__title { display: flex; flex-direction: column; min-width: 0; }
.cat-all__name { font-size: 17px; font-weight: 800; color: #0f172a; line-height: 1.25; }
.cat-all__head:hover .cat-all__name { color: #1d4ed8; }
.cat-all__count { margin-top: 2px; font-size: 13px; color: #64748b; }
.cat-all__subs { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid #f1f5f9; display: grid; gap: 2px; }
.cat-all__subs a { display: flex; justify-content: space-between; gap: 12px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px;
  font-size: 14px; color: #334155; text-decoration: none; }
.cat-all__subs a:hover { background: #eff6ff; color: #1d4ed8; }
.cat-all__n { color: #94a3b8; font-variant-numeric: tabular-nums; }
