/* ============================================================
   MixHoreca Консултант — Стилове
   ============================================================
   Цветовете и размерите са в :root - можеш да ги променяш
   на едно място без да пипаш останалия CSS.
============================================================ */

:root {
  --primary: #1e3a5f;
  --primary-light: #2c5282;
  --accent: #22c55e;
  --warning: #f59e0b;
  --premium: #8b5cf6;
  --bg: #f5f7fa;
  --text: #1a2332;
  --text-light: #64748b;
  --border: #e2e8f0;
  --hover-bg: #f8fafc;
  --error: #ef4444;
  --info: #3b82f6;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

/* ============================================================
   CONTAINER & HEADER
============================================================ */
.konsultant-container {
  max-width: 980px;
  margin: 20px auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

.konsultant-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 32px 40px;
  text-align: center;
}

.konsultant-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.konsultant-header .tagline {
  opacity: 0.92;
  font-size: 15px;
  max-width: 620px;
  margin: 0 auto 16px;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  opacity: 0.85;
}

/* ============================================================
   PROGRESS BAR
============================================================ */
.progress-bar {
  height: 4px;
  background: var(--border);
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.4s ease;
}

/* ============================================================
   BODY (questions / categories / results)
============================================================ */
.konsultant-body {
  padding: 32px 40px;
  min-height: 320px;
}

/* Loading state */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 16px;
}

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

/* Error state */
.error-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--error);
}

.error-state .error-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.error-state .error-message {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 16px;
}

/* ============================================================
   CATEGORY SELECTION
============================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.category-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.category-card:hover {
  border-color: var(--primary);
  background: var(--hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.category-card .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.category-card .name {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 6px;
}

.category-card .tagline {
  font-size: 13px;
  color: var(--text-light);
}

/* ============================================================
   QUESTIONS
============================================================ */
.question-block h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.question-hint {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--hover-bg);
  border-left: 3px solid var(--info);
  border-radius: 4px;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-card {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-card:hover {
  border-color: var(--primary-light);
  background: var(--hover-bg);
}

.option-card.selected {
  border-color: var(--primary);
  background: rgba(30, 58, 95, 0.04);
}

.option-card .option-label {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.option-card .option-description {
  font-size: 13px;
  color: var(--text-light);
}

/* ============================================================
   RESULTS — PRODUCT CARDS
============================================================ */
.results-header {
  text-align: center;
  margin-bottom: 28px;
}

.results-header h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.results-header p {
  color: var(--text-light);
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.product-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
}

.product-card.recommended {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.03);
}

.product-card.budget {
  border-color: var(--warning);
}

.product-card.premium {
  border-color: var(--premium);
}

.product-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.product-badge.recommended { background: var(--accent); }
.product-badge.budget { background: var(--warning); }
.product-badge.premium { background: var(--premium); }

.product-header {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.product-image {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  background: var(--hover-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
  flex-shrink: 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1;
}

.product-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.product-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.stock-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.stock-badge.in_stock {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.stock-badge.by_order {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.product-reason {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.special-note {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--warning);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 12px;
}

.product-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.btn-buy {
  background: var(--accent);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}

.btn-buy:hover {
  background: #16a34a;
}

.btn-consult {
  background: white;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-consult:hover {
  background: var(--primary);
  color: white;
}

/* ============================================================
   FOOTER
============================================================ */
.konsultant-footer {
  padding: 20px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  background: var(--hover-bg);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 640px) {
  body { padding: 10px; }
  .konsultant-header { padding: 20px; }
  .konsultant-header h1 { font-size: 22px; }
  .konsultant-body { padding: 20px; }
  .konsultant-footer { padding: 14px 20px; }
  .product-header { flex-direction: column; }
  .product-image { width: 100%; height: 200px; }
  .trust-badges { gap: 10px; font-size: 12px; }
}
