/* ============================================================
   printer.css — Tiskárny: dashboard, chat, public list/detail
   ============================================================ */

/* ── Layout helpers ─────────────────────────────────────── */
.printer-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}
.printer-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Printer nav ────────────────────────────────────────── */
.printer-nav {
  background: #1a3d35;
  color: #fff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
}
.printer-nav .nav-brand {
  font-weight: 700;
  font-size: 1.1em;
  color: #fff;
  text-decoration: none;
  margin-right: auto;
}
.printer-nav a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .9em;
  transition: color .15s;
}
.printer-nav a:hover { color: #fff; }
.printer-nav .nav-name {
  color: rgba(255,255,255,.5);
  font-size: .85em;
}

/* ── Cards & sections ───────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}

/* ── Orders list (printer dashboard) ───────────────────── */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.order-card-body { flex: 1; min-width: 0; }
.order-card-body h3 {
  margin: 0 0 4px;
  font-size: 1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: .85em;
  color: var(--text-muted, #888);
  margin-top: 4px;
}
.order-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.already-interested {
  font-size: .85em;
  color: #28a745;
  font-weight: 600;
}

/* ── Offers list (printer's offers section) ─────────────── */
.offers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.offer-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.offer-card--unread {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px #fef3c740;
}
.offer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.offer-price {
  font-size: 1.1em;
  color: var(--primary, #2563eb);
}
.offer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Chat ───────────────────────────────────────────────── */
.conversation-container {
  max-width: 720px;
  margin: 32px auto;
  padding: 0 20px;
}
.conversation-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.conversation-header > div { flex: 1; min-width: 0; }
.conversation-header h2 { margin: 0 0 2px; font-size: 1.15em; }

.order-detail-box {
  background: #f5f7fa;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: .9em;
  margin-bottom: 20px;
  color: #555;
}

.chat-box {
  background: #f0f2f5;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 20px;
  min-height: 320px;
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}
.chat-empty {
  text-align: center;
  color: var(--text-muted, #888);
  margin: auto;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 78%;
}
/* zákazník = vpravo (customer view: --me, printer view: --customer) */
.chat-msg--me,
.chat-msg--customer {
  align-self: flex-end;
  align-items: flex-end;
}
/* tiskárna = vlevo (customer view: --other, printer view: --printer) */
.chat-msg--other,
.chat-msg--printer {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 14px 14px 14px 4px;
  padding: 10px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.chat-msg--me .chat-bubble,
.chat-msg--customer .chat-bubble {
  background: #3dbfa0;
  color: #fff;
  border-color: transparent;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 1px 4px rgba(255,107,53,.25);
}
.chat-bubble p { margin: 0 0 4px; line-height: 1.55; }
.chat-bubble p:last-of-type { margin-bottom: 0; }
.chat-time {
  font-size: .73em;
  opacity: .6;
  display: block;
  margin-top: 3px;
}
.chat-label {
  font-size: .76em;
  font-weight: 600;
  color: var(--text-muted, #888);
  padding: 0 4px;
}

.chat-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.chat-input {
  flex: 1;
  resize: vertical;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: .95em;
  line-height: 1.5;
}
.chat-input:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* ── Modal (zájem o poptávku) ───────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  margin: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-box h3 { margin: 0 0 16px; }
.modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  color: #888;
  margin: -4px -4px 0 0;
}
.modal-close:hover { color: #333; }

/* ── Status badges ──────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.status-nova    { background: #dbeafe; color: #1e40af; }
.status-overena { background: #dcfce7; color: #166534; }
.status-dokonceno { background: #e5e7eb; color: #374151; }
.status-pending   { background: #fef9c3; color: #854d0e; }
.status-active    { background: #dcfce7; color: #166534; }
.status-suspended { background: #fee2e2; color: #991b1b; }

/* ── Nav badges ─────────────────────────────────────────── */
.badge-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: .7em;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
}
.badge-nav--neutral {
  background: #6b7280;
}

/* ── Unread badge ───────────────────────────────────────── */
.badge-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: .72em;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Public printer list ────────────────────────────────── */
.printers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.printer-card-public {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow .18s, border-color .18s;
}
.printer-card-public:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.1);
  border-color: var(--primary, #2563eb);
}
.printer-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.printer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.printer-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.printer-avatar-placeholder {
  background: var(--primary, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4em;
  font-weight: 700;
}
.printer-avatar-lg.printer-avatar-placeholder { font-size: 2em; }

.printer-card-public h3 { margin: 0 0 2px; font-size: 1em; }
.printer-city { font-size: .85em; color: var(--text-muted, #888); }

.printer-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0;
  font-size: .9em;
}
.stars { color: #f59e0b; letter-spacing: 1px; }
.inline-stars { font-size: .9em; }

.printer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}
.tag {
  background: #f0f4ff;
  color: #2563eb;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .78em;
  font-weight: 500;
}
.printer-bio {
  font-size: .85em;
  color: #666;
  margin: 10px 0 0;
  line-height: 1.5;
}

/* ── Public printer detail ──────────────────────────────── */
.printer-profile-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.printer-profile-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.printer-profile-top h1 { margin: 0 0 4px; }
.printer-bio-full {
  color: #555;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

.printer-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 560px) {
  .printer-profile-grid { grid-template-columns: 1fr; }
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: .9em;
}
.feature-list li:last-child { border-bottom: none; }

.ratings-list { display: flex; flex-direction: column; gap: 16px; }
.rating-item { border-bottom: 1px solid #f0f0f0; padding-bottom: 14px; }
.rating-item:last-child { border-bottom: none; padding-bottom: 0; }
.rating-stars { color: #f59e0b; font-size: 1.1em; margin-bottom: 4px; }
.rating-item p { margin: 4px 0; color: #444; font-size: .9em; }

/* ── Star rating input ──────────────────────────────────── */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
  margin: 6px 0;
}
.star-rating input[type=radio] { display: none; }
.star-rating label {
  font-size: 2em;
  color: #d1d5db;
  cursor: pointer;
  transition: color .1s;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #f59e0b;
}

/* ── Customer order header ──────────────────────────────── */
.customer-order-header .order-code {
  font-family: monospace;
  font-size: 1em;
  color: var(--text-muted, #888);
  letter-spacing: .05em;
}
.order-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: .9em;
}
.order-table td {
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}
.order-table td:first-child {
  color: #888;
  width: 120px;
  padding-right: 16px;
  white-space: nowrap;
}
.order-table tr:last-child td { border-bottom: none; }

/* ── Buttons ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 7px; font-size: .9em; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: background .15s, box-shadow .15s; }
.btn-primary { background: var(--primary, #2563eb); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: transparent; color: var(--primary, #2563eb); border: 1.5px solid var(--primary, #2563eb); }
.btn-outline:hover { background: #eff6ff; }
.btn-sm { padding: 5px 11px; font-size: .82em; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 12px 20px; font-size: 1em; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: #22c55e; color: #fff; }
.btn-success:hover { background: #16a34a; }

/* ── Forms ──────────────────────────────────────────────── */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9em; }
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=password],
.form-row input[type=tel],
.form-row input[type=number],
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: .95em;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color .15s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.form-hint { font-size: .82em; color: #888; margin-top: 4px; }
.form-section-title { font-weight: 700; margin: 24px 0 12px; font-size: 1em; color: #333; border-bottom: 1px solid #eee; padding-bottom: 6px; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .9em; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* ── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted, #888);
}
.empty-state p { margin: 0 0 16px; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  color: inherit;
  text-decoration: none;
  font-size: .9em;
  transition: background .15s, border-color .15s;
}
.page-btn:hover { background: #f5f7fa; border-color: #ccc; }
.page-btn.active { background: var(--primary, #2563eb); color: #fff; border-color: transparent; }

/* ── Page intro ─────────────────────────────────────────── */
.page-intro { margin-bottom: 8px; }
.page-intro h1 { margin: 0 0 8px; }

/* ── Admin printers table ───────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; font-size: .9em; }
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid #e8e8e8;
  color: #555;
  font-weight: 600;
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }

/* ── Badge ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  color: #374151;
  border-radius: 20px;
  padding: 1px 8px;
  font-size: .78em;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Checkbox list (dotazník) ───────────────────────────── */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 0;
}
.checkbox-list label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: normal;
  font-size: .88em;
  cursor: pointer;
  line-height: 1.4;
}
.checkbox-list input[type=checkbox] {
  width: auto;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ── Interest row (Moje nabídky) ────────────────────────── */
.interest-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.interest-row--unread { border-left: 3px solid #2563eb; }
.interest-row--direct { border-left: 3px solid #f59e0b; background: #fffbeb; }
.interests-list--compact .interest-row {
  padding: 7px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
  font-size: .88rem;
}
.order-card--direct { border-color: #f59e0b; border-left: 4px solid #f59e0b; background: #fffbeb; }
.interest-row-title { text-decoration: none; color: inherit; }
.interest-row-title:hover strong { text-decoration: underline; }
.interest-actions { display: flex; gap: 6px; }

/* ── Order detail grid ──────────────────────────────────── */
.order-detail-grid {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) {
  .order-detail-grid { grid-template-columns: 1fr !important; }
}

/* ── Průběh poptávky (timeline) ─────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  border-left: 2px solid #e5e7eb;
  margin-left: 10px;
  padding-left: 20px;
  position: relative;
}
.timeline-item:last-child { border-left-color: transparent; }
.timeline-dot {
  position: absolute;
  left: -11px;
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7em;
  font-weight: 700;
  flex-shrink: 0;
}
.timeline-done .timeline-dot  { background: #22c55e; color: #fff; border: 2px solid #22c55e; }
.timeline-pending .timeline-dot { background: #fff; color: #9ca3af; border: 2px solid #d1d5db; font-size: .9em; }
.timeline-done { border-left-color: #22c55e; }
.timeline-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 1px 0;
}
.timeline-body strong { font-size: .9em; }
.timeline-body .text-muted { font-size: .82em; }

/* ── Mini průběh nabídky v offer-card ───────────────────── */
.offer-history {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: .8em;
  margin: 8px 0 12px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
  color: #555;
}
.offer-history-sep { color: #ccc; }
.offer-history-done   { color: #16a34a; }
.offer-history-pending { color: #9ca3af; }
.offer-history-unread  { color: #ef4444; font-weight: 600; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .printer-nav { padding: 0 12px; gap: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .printer-nav a { white-space: nowrap; font-size: .82em; padding: 12px 4px; }
  .chat-box { min-height: 220px; max-height: 320px; }
  .conversation-header { flex-direction: column; align-items: flex-start; }
  .printer-profile-top { flex-direction: column; }

  /* Order card – tlačítka pod obsah */
  .order-card { flex-direction: column; gap: 12px; }
  .order-card-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .order-card-actions .btn,
  .order-card-actions a,
  .order-card-actions button {
    flex: 1 1 auto;
    text-align: center;
    min-width: 80px;
  }

  /* Interest row (Moje nabídky) – stack na mobile */
  .interest-row {
    grid-template-columns: 1fr;
  }
  .interest-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
  .interest-actions .btn,
  .interest-actions a,
  .interest-actions button {
    flex: 1 1 auto;
    text-align: center;
  }

  /* Offer card */
  .offer-card-header { flex-direction: column; gap: 8px; }
  .offer-actions { width: 100%; }
  .offer-actions .btn,
  .offer-actions a { flex: 1 1 auto; text-align: center; }

  /* Dashboard stats */
  .dashboard-stats { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }

  /* Conversation */
  .conversation-container { padding: 0 12px; margin: 16px auto; }
  .chat-msg { max-width: 90% !important; }
  .order-detail-box { flex-direction: column; gap: 8px; }

  /* Formuláře */
  .form-row-2col { grid-template-columns: 1fr !important; }
  .printer-profile-grid { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════════════════
   AVATAR UPLOAD
   ══════════════════════════════════════════════════════════ */
.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 8px;
}
.avatar-preview-wrap { flex-shrink: 0; }
.avatar-preview {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e8e8e8;
  display: block;
}
.avatar-preview-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  border: 3px solid #e8e8e8;
}

/* ══════════════════════════════════════════════════════════
   MATERIALS CHECKLIST
   ══════════════════════════════════════════════════════════ */
.materials-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.material-check,
.form-row .material-check,
label.material-check {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 99px;
  font-size: .88em;
  font-weight: 400;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  user-select: none;
  margin-bottom: 0;
}
.material-check input,
.form-row .material-check input { display: none !important; }
.material-check:hover,
label.material-check:hover {
  border-color: #3dbfa0;
  color: #3dbfa0;
}
.material-check--active,
label.material-check--active {
  border-color: #3dbfa0;
  background: #fff5f0;
  color: #c0440f;
  font-weight: 600;
}
.materials-group-label {
  width: 100%;
  font-size: .75em;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin: 8px 0 2px;
}
.materials-group-label:first-child { margin-top: 0; }

/* ══════════════════════════════════════════════════════════
   PRINTERS PAGE – hero
   ══════════════════════════════════════════════════════════ */
.printers-page { background: #f5f7fa; min-height: 100vh; }
.printers-hero {
  background: linear-gradient(135deg, #1a3d35 0%, #0d5940 60%, #0a4a35 100%);
  padding: 64px 0 56px;
  text-align: center;
  color: #fff;
}
.printers-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 12px;
}
.printers-hero p {
  color: rgba(255,255,255,.65);
  font-size: 1.05rem;
  margin: 0 0 28px;
}

/* ══════════════════════════════════════════════════════════
   PRINTER CARD – new visual
   ══════════════════════════════════════════════════════════ */
.printers-grid-new {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}
/* Compact card – thumbnail vlevo ─────────────────────────── */
.printer-card-new {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 18px 22px;
  gap: 0;
}
.printer-card-new:hover {
  border-color: #3dbfa0;
  box-shadow: 0 4px 16px rgba(255,107,53,.12);
  transform: translateY(-1px);
  text-decoration: none;
}
.printer-card-thumb {
  flex-shrink: 0;
  width: 90px;
  max-height: 120px;
  overflow: hidden;
  border-radius: 13px 0 0 13px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  align-self: stretch;
}
.printer-card-thumb img {
  width: 90px;
  height: 120px;
  max-height: 120px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.printer-card-thumb-placeholder {
  width: 90px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: #3730a3;
}
.printer-card-info {
  padding: 0 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.printer-card-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.printer-card-name strong { font-size: .98rem; color: #111; }
.printer-card-name .text-muted { font-size: .8em; }
.printer-card-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .83em;
  color: #6b7280;
  flex-wrap: wrap;
}
.printer-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.printer-card-tags .tag {
  font-size: .72em;
  padding: 1px 7px;
  background: #f0f4ff;
  color: #3b5bdb;
  border: 1px solid #dbe4ff;
  border-radius: 99px;
}
.tag--more { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.printer-card-bio {
  font-size: .8em;
  color: #6b7280;
  line-height: 1.4;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════
   VEŘEJNÝ PROFIL tiskáře
   ══════════════════════════════════════════════════════════ */
.printer-profile-hero {
  background: linear-gradient(135deg, #1a3d35 0%, #0a4a35 100%);
  padding: 48px 20px;
  color: #fff;
}
.printer-profile-hero-inner {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.printer-profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.25);
  flex-shrink: 0;
}
.printer-profile-avatar.printer-avatar-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  border: 3px solid rgba(255,255,255,.2);
  flex-shrink: 0;
}
.printer-profile-hero-info h1 { margin: 0 0 4px; font-size: clamp(1.4rem,4vw,2rem); }
.printer-profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 8px 0 12px;
  font-size: .9rem;
  color: rgba(255,255,255,.75);
}
.profile-stat-pill {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 99px;
  padding: 2px 10px;
  font-size: .82em;
  color: rgba(255,255,255,.9);
}
.printer-bio-full {
  color: rgba(255,255,255,.7);
  font-size: .92rem;
  line-height: 1.6;
  margin: 0 0 16px;
}
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8ecf0;
}
.printer-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.specs-heading {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  margin: 0 0 10px;
}

/* ── Portfolio grid ──────────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.portfolio-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8ecf0;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.portfolio-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.portfolio-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
}
.portfolio-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}
.portfolio-card:hover .portfolio-img-wrap img { transform: scale(1.04); }
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s;
  color: #fff;
  font-size: .9rem;
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }
.portfolio-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.portfolio-card-meta { display: flex; align-items: center; gap: 6px; }
.portfolio-price { color: #16a34a; font-weight: 700; font-size: .88em; }
.portfolio-desc { font-size: .8em; color: #6b7280; margin: 2px 0 0; }

/* ── Portfolio photo grid (Google Images style) ──────────── */
.portfolio-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.portfolio-photo-item {
  position: relative;
  overflow: visible;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  transition: box-shadow .18s, transform .18s;
}
.portfolio-photo-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.13);
  transform: translateY(-2px);
}
.portfolio-photo-item > a {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  text-decoration: none;
}
.portfolio-photo-item img,
.portfolio-photo-item video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform .22s, opacity .22s;
  border-radius: 10px 10px 0 0;
}
.portfolio-photo-item > a > div {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}
.portfolio-photo-item > a:hover img,
.portfolio-photo-item > a:hover video {
  transform: scale(1.04);
  opacity: .9;
}
.portfolio-photo-overlay { display: none; }

/* Edit button — always visible for owner */
.portfolio-photo-edit-btn {
  display: block;
  margin-top: 4px;
  padding: 4px 10px;
  background: #e4e6ea;
  color: #1c1e21;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background .15s;
}
.portfolio-photo-edit-btn:hover { background: #1877f2; color: #fff; }
.portfolio-photo-title {
  color: #fff;
  font-weight: 600;
  font-size: .82rem;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portfolio-photo-meta {
  color: rgba(255,255,255,.85);
  font-size: .73rem;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
@media (max-width: 700px) {
  .portfolio-photo-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
}
@media (max-width: 480px) {
  .portfolio-photo-grid { grid-template-columns: repeat(2, 1fr); gap: 3px; }
}

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox-backdrop.lightbox-open { display: flex; }
.lightbox-box {
  background: #fff;
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.lightbox-box img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #f5f7fa;
  display: block;
}
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.lightbox-info {
  padding: 14px 18px 18px;
}
.lightbox-info strong { font-size: 1rem; display: block; margin-bottom: 4px; }
#lightboxMeta { font-size: .85em; color: #6b7280; margin-bottom: 6px; }
#lightboxDesc { font-size: .88em; color: #374151; margin: 0; }

/* ── Portfolio správa v profilu ──────────────────────────── */
.portfolio-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.portfolio-manage-card {
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.portfolio-manage-card > img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.portfolio-manage-body { padding: 8px 12px; flex: 1; }
.portfolio-add-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.portfolio-add-preview {
  flex-shrink: 0;
  width: 100px;
}
.portfolio-add-placeholder {
  width: 100px;
  height: 100px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #9ca3af;
}

@media (max-width: 600px) {
  .printers-grid-new { grid-template-columns: 1fr; }
  .printers-hero { padding: 44px 20px 36px; }
  .materials-checklist { gap: 6px; }
  .avatar-upload-row { flex-wrap: wrap; }
  .printer-profile-hero-inner { flex-direction: column; gap: 16px; }
  .printer-specs-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); }
  .portfolio-add-row { flex-direction: column; }
  .printer-card-thumb { width: 80px; }
  .printer-card-thumb img { width: 80px; }
  .printer-card-thumb-placeholder { width: 80px; }
}

/* ══════════════════════════════════════════════════════════
   Public Printer Profile — Facebook-inspired redesign
   ══════════════════════════════════════════════════════════ */

.pp-root {
  background: #f0f2f5;
  min-height: 100vh;
  padding-top: 20px;
}

/* Cover photo */
.pp-cover-wrap {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  height: 260px;
  background: linear-gradient(160deg, #e4e6ea 0%, #c8ccd4 100%);
  overflow: hidden;
  border-radius: 0 0 12px 12px;
}
.pp-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pp-cover-empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #dde1e9 0%, #c3c8d4 100%);
}
.pp-cover-btn-wrap {
  position: absolute;
  bottom: 14px;
  right: 16px;
  display: flex;
  gap: 8px;
}
.pp-cover-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.92);
  color: #1c1e21;
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: background .15s;
  text-decoration: none;
}
.pp-cover-btn:hover { background: #fff; }
.pp-cover-btn--remove { color: #c0392b; }

/* Identity bar (below cover) */
.pp-identity-bar {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.07);
  margin: 0 auto;
  max-width: 960px;
  border-radius: 0 0 12px 12px;
}
.pp-identity-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 18px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

/* Avatar */
.pp-avatar-wrap {
  position: relative;
  margin-top: -40px;
  flex-shrink: 0;
}
.pp-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  display: block;
}
.pp-avatar-initials {
  background: linear-gradient(135deg, #1877f2, #42b3d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
}
.pp-avatar-edit-form { position: absolute; bottom: 4px; right: 4px; }
.pp-avatar-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #e4e6ea;
  border-radius: 50%;
  cursor: pointer;
  color: #1c1e21;
  transition: background .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.pp-avatar-edit-btn:hover { background: #d0d3d8; }

/* Name / meta */
.pp-identity-info {
  flex: 1;
  min-width: 0;
  padding-bottom: 4px;
}
.pp-name {
  font-size: 1.65rem;
  font-weight: 800;
  color: #1c1e21;
  margin: 12px 0 2px;
  line-height: 1.15;
}
.pp-company { font-size: .92rem; color: #606770; margin-bottom: 2px; }
.pp-contact-person { font-size: .82rem; color: #8a8d91; }
.pp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.pp-meta-chip {
  background: #f0f2f5;
  color: #444950;
  font-size: .78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

/* Action buttons */
.pp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 4px;
  margin-left: auto;
}
.pp-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .88rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: filter .15s;
  white-space: nowrap;
}
.pp-btn:hover { filter: brightness(.94); }
.pp-btn-primary { background: #1877f2; color: #fff; }
.pp-btn-secondary { background: #e4e6ea; color: #1c1e21; }
.pp-btn-ghost { background: transparent; color: #606770; border: 1px solid #ccd0d5; }
.pp-btn-sm { font-size: .78rem; padding: 5px 12px; font-weight: 600; }

/* Body / cards */
.pp-body {
  max-width: 960px;
  margin: 20px auto;
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pp-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.pp-bio p { color: #444950; line-height: 1.6; margin: 0; }
.pp-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1c1e21;
  margin: 0 0 14px;
}
.pp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pp-section-header .pp-section-title { margin-bottom: 0; }

/* Specs grid */
.pp-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 24px;
}
.pp-specs-label { font-size: .78rem; font-weight: 700; color: #8a8d91; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.pp-specs-list { list-style: none; padding: 0; margin: 0; font-size: .88rem; color: #444950; }
.pp-specs-list li::before { content: '• '; color: #1877f2; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pp-tag { background: #e7f0fd; color: #1877f2; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 12px; }

/* Ratings */
.pp-ratings { display: flex; flex-direction: column; gap: 14px; }
.pp-rating-item { border-bottom: 1px solid #f0f2f5; padding-bottom: 14px; }
.pp-rating-item:last-child { border-bottom: none; padding-bottom: 0; }
.pp-rating-stars { color: #f59e0b; font-size: 1rem; margin-bottom: 4px; }
.pp-rating-comment { margin: 4px 0; color: #444950; font-size: .88rem; }
.pp-rating-meta { font-size: .78rem; color: #8a8d91; }

/* Responsive */
@media (max-width: 680px) {
  .pp-cover-wrap { height: 160px; }
  .pp-avatar { width: 86px; height: 86px; }
  .pp-avatar-wrap { margin-top: -28px; }
  .pp-name { font-size: 1.25rem; }
  .pp-actions { width: 100%; justify-content: flex-start; }
  .pp-specs-grid { grid-template-columns: 1fr 1fr; }
  .pp-body { padding: 0 12px 32px; }
}
@media (max-width: 420px) {
  .pp-specs-grid { grid-template-columns: 1fr; }
}

/* ── Region & material chips (registrace tiskárny) ────────── */
.region-chip { display: inline-flex; cursor: pointer; }
.region-chip input { display: none; }
.region-chip span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  font-size: .85em;
  font-weight: 500;
  color: #374151;
  transition: all .15s;
  user-select: none;
  white-space: nowrap;
}
.region-chip:hover span { border-color: #6366f1; color: #6366f1; }
.region-chip input:checked + span {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}
