/* ===================================================================
   Tprint — style.css
   Структурированные стили поверх Tailwind CSS (tailwind.css)
   =================================================================== */

/* === Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Manrope:wght@200..800&display=swap');

/* === Base / Reset === */
body {
  font-family: "Manrope", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #fcfeff;
  color: #0f172a;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-weight: 600;
}

/* === Layout === */
.tprint-container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
}

/* === Header === */
header {
  position: relative;
  z-index: 50;
}

/* === Mega Menu === */
[data-mega-menu].hidden {
  display: none !important;
}

/* Active category button state */
[data-mega-cat].mega-cat-active {
  border-color: #cbd5e8 !important;
  background: #f8fafc !important;
  color: #0f172a !important;
}

/* === Mobile Menu === */
[data-mobile-menu].hidden {
  display: none !important;
}

[data-mobile-backdrop] {
  cursor: pointer;
}

/* === Accent Color Overrides === */
.text-emerald-500 { color: #12c9a0; }
.text-amber-600   { color: #e58a1f; }
.text-rose-600    { color: #ef3f63; }
.text-sky-700     { color: #3b7fbf; }
.text-violet-700  { color: #6a5fdc; }

.bg-emerald-100 { background-color: #d6fbef; }
.bg-amber-100   { background-color: #ffe5c2; }
.bg-rose-100    { background-color: #ffe0e7; }
.bg-sky-100     { background-color: #d9edff; }
.bg-violet-100  { background-color: #ebe6ff; }

/* === Components: Icons === */
[data-lucide="star"] {
  fill: currentColor;
  stroke: currentColor;
}

/* === Components: Buttons & Links === */
.tprint-container a.inline-flex,
.tprint-container button.inline-flex,
.tprint-container a[class*="rounded-2xl"],
.tprint-container button[class*="rounded-2xl"] {
  white-space: nowrap;
  line-height: 1.2;
}

/* === Calculator === */
.calc-loading {
  opacity: 0.85;
  pointer-events: none;
}

.calc-loading .calc-spinner {
  display: inline-flex !important;
  animation: tprint-spin 0.8s linear infinite;
}

@keyframes tprint-spin {
  to { transform: rotate(360deg); }
}

/* === Cards (shared shadow pattern) === */
.card-shadow {
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.06);
}

.card-shadow-hover {
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.08);
}

/* === Info Block (shared across pages) === */
.info-block-shadow {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.05);
}

/* === Hero Shadow === */
.hero-card-shadow {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
}

/* === Catalog: list view === */

/* Контейнер — вертикальный стек карточек */
[data-catalog-grid].catalog-list {
  display: flex !important;
  flex-direction: column;
  gap: 0.75rem;
}

/* Карточка — горизонтальный ряд: картинка | контент (текст + кнопка) */
[data-catalog-grid].catalog-list > .group {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 1rem;
  padding: 1rem !important;
  overflow: visible !important;
}

[data-catalog-grid].catalog-list > .group:hover {
  transform: none !important;
}

/* Картинка → компактная миниатюра 96×64 слева */
[data-catalog-grid].catalog-list > .group > .relative.h-\[140px\] {
  width: 96px !important;
  min-width: 96px !important;
  height: 64px !important;
  flex-shrink: 0 !important;
  border-radius: 0.75rem;
  overflow: hidden;
}

/* Картинка заполняет миниатюру */
[data-catalog-grid].catalog-list > .group > .relative.h-\[140px\] img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* Скрываем оверлей и badge поверх картинки */
[data-catalog-grid].catalog-list > .group > .relative.h-\[140px\] > :not(img) {
  display: none !important;
}

/* Контентный блок: grid из двух колонок — текст | кнопка */
[data-catalog-grid].catalog-list > .group > .flex.flex-1.flex-col.p-4 {
  flex: 1 1 0 !important;
  min-width: 0;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0;
}

/* Текстовые дети (название, описание, теги) — левая колонка */
[data-catalog-grid].catalog-list > .group > .flex.flex-1.flex-col.p-4 > :not(.mt-auto) {
  grid-column: 1;
  min-width: 0;
}

/* Кнопка — правая колонка, охватывает все строки */
[data-catalog-grid].catalog-list > .group > .flex.flex-1.flex-col.p-4 > .mt-auto {
  grid-column: 2;
  grid-row: 1 / -1;
  margin-top: 0 !important;
  padding-top: 0 !important;
  align-self: center;
}

[data-catalog-grid].catalog-list > .group > .flex.flex-1.flex-col.p-4 > .mt-auto > a {
  width: auto !important;
  white-space: nowrap;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
}
