/* =========================================================
   Setra Cataloghi - galleria index
   ========================================================= */

:root {
  --bg: #0d0d10;
  --bg-soft: #16161a;
  --bg-card: #1c1c22;
  --border: #2a2a32;
  --text: #f5f5f7;
  --text-soft: #a8a8b3;
  --text-dim: #6b6b75;
  --accent: #e63946;
  --accent-2: #2c7be5;
  --accent-3: #f4a261;
  --accent-grad: linear-gradient(90deg, #e63946 0%, #f4a261 25%, #2a9d8f 50%, #2c7be5 75%, #9b5de5 100%);
  --shadow: 0 10px 40px rgba(0, 0, 0, .5);
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Header */
.site-header {
  background: linear-gradient(180deg, #16161a 0%, #0d0d10 100%);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px;
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  letter-spacing: -0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text .name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.brand-text .sub {
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-link {
  font-size: 13px;
  color: var(--text-soft);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  transition: all .2s;
}
.header-link:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

/* Hero */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.hero h1 .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 16px;
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Filtri/categorie */
.filters {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.filter-btn:hover { color: var(--text); border-color: var(--text-dim); }
.filter-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Grid cataloghi */
.catalog-grid {
  max-width: 1200px;
  margin: 32px auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.catalog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: pointer;
  position: relative;
}

.catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--text-dim);
}

.catalog-cover {
  aspect-ratio: 3 / 4;
  background: #000;
  overflow: hidden;
  position: relative;
}

.catalog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.catalog-card:hover .catalog-cover img {
  transform: scale(1.04);
}

.catalog-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
}

.catalog-badge.listini    { background: rgba(230, 57, 70, .25); border-color: rgba(230, 57, 70, .5); }
.catalog-badge.cataloghi  { background: rgba(44, 123, 229, .25); border-color: rgba(44, 123, 229, .5); }
.catalog-badge.brochure   { background: rgba(42, 157, 143, .25); border-color: rgba(42, 157, 143, .5); }
.catalog-badge.aziendali  { background: rgba(155, 93, 229, .25); border-color: rgba(155, 93, 229, .5); }
.catalog-badge.b2b        { background: rgba(244, 162, 97, .25); border-color: rgba(244, 162, 97, .5); }

/* Compatibilità con vecchie categorie (se ancora presenti) */
.catalog-badge.carrozzeria { background: rgba(230, 57, 70, .25); border-color: rgba(230, 57, 70, .5); }
.catalog-badge.industria   { background: rgba(44, 123, 229, .25); border-color: rgba(44, 123, 229, .5); }
.catalog-badge.edilizia    { background: rgba(244, 162, 97, .25); border-color: rgba(244, 162, 97, .5); }

.catalog-info {
  padding: 16px 18px 18px;
}

.catalog-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.catalog-meta {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  gap: 8px;
  align-items: center;
}

.catalog-meta::before { content: ""; }

.catalog-desc {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-dim);
  grid-column: 1 / -1;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

.site-footer a { color: var(--text-soft); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 600px) {
  .hero { padding: 40px 20px 24px; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; padding: 0 16px; }
  .catalog-info { padding: 12px 14px 14px; }
  .catalog-title { font-size: 14px; }
  .catalog-desc { display: none; }
}
