/* ============================================================
   Catalog3D – Main Styles
   ============================================================ */

:root {
  --primary:   #3dbfa0;
  --primary-d: #2da88a;
  --dark:      #1a3d35;
  --text:      #333;
  --text-muted:#666;
  --border:    #e0e0e0;
  --bg:        #f8f8f8;
  --white:     #fff;
  --radius:    10px;
  --shadow:    0 2px 12px rgba(0,0,0,.08);
  --transition:.2s ease;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Zabrání automatickému zoomu při focusu na input na iOS/Android */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="url"],
  textarea,
  select { font-size: 16px !important; }
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ---- Container ---- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: .95rem;
  cursor: pointer; border: 2px solid transparent;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn-primary  { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); color: #fff; text-decoration: none; box-shadow: 0 4px 12px rgba(61,191,160,.35); }
.btn-outline  { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: #edfaf6; border-color: var(--primary-d); color: var(--primary-d); text-decoration: none; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-success { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn-success:hover { background: #15803d; border-color: #15803d; color: #fff; text-decoration: none; }

/* ---- Alerts ---- */
.alert { padding: 12px 20px; border-radius: 8px; margin: 16px 0; font-weight: 500; overflow-wrap: break-word; word-break: break-word; }
.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #4caf50; }
.alert-error,
.alert-danger  { background: #fdecea; color: #c62828; border-left: 4px solid #f44336; }
.alert-info    { background: #e0f2fe; color: #0c4a6e; border-left: 4px solid #38bdf8; }
.alert-warning { background: #fff7ed; color: #92400e; border-left: 4px solid #f59e0b; }

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

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--dark);
  color: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.2rem; color: #fff; font-weight: 700;
}
.logo:hover { text-decoration: none; }
.logo strong { color: var(--primary); }
.logo svg { flex-shrink: 0; }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav a { color: #ccc; padding: 8px 12px; border-radius: 6px; font-size: .95rem; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }

.nav-dropdown { position: relative; }
.nav-btn { background: none; border: none; color: #ccc; padding: 8px 12px; cursor: pointer; font-size: .95rem; border-radius: 6px; }
.nav-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.dropdown-menu {
  position: absolute; top: 100%; left: 0;
  background: var(--white); border-radius: 8px; box-shadow: var(--shadow);
  min-width: 200px; padding: 8px 0;
  display: none; z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: flex; justify-content: space-between; padding: 8px 16px; color: var(--text); font-size: .9rem; }
.dropdown-menu a:hover { background: var(--bg); text-decoration: none; }
.dropdown-menu .count { color: var(--text-muted); font-size: .8rem; }
.dropdown-menu-right { left: auto; right: 0; }

/* Nav user account button */
.nav-user-btn { display: flex; align-items: center; gap: 7px; }
.nav-user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff; font-size: .75rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btn-nav-login {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 7px; padding: 6px 14px;
  font-size: .88rem; text-decoration: none; white-space: nowrap;
  transition: background .15s;
}
.btn-nav-login:hover { background: rgba(255,255,255,.2); }

.lang-switcher { display: flex; align-items: center; gap: 2px; }
.lang-btn {
  color: rgba(255,255,255,.5); font-size: .78rem; font-weight: 600;
  padding: 4px 7px; border-radius: 5px; text-decoration: none;
  transition: color .15s, background .15s; letter-spacing: .03em;
}
.lang-btn:hover { color: #fff; text-decoration: none; }
.lang-btn--active { color: #fff; background: rgba(255,255,255,.15); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.search-form { display: flex; background: rgba(255,255,255,.1); border-radius: 8px; overflow: hidden; }
.search-form input { background: none; border: none; color: #fff; padding: 8px 12px; font-size: .9rem; width: 180px; outline: none; }
.search-form input::placeholder { color: #999; }
.search-form button { background: none; border: none; color: #ccc; padding: 8px 12px; cursor: pointer; }
.search-form button:hover { color: #fff; }

.hamburger { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; margin-left: auto; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #0d5940 60%, #0a4a35 100%);
  color: #fff; padding: 80px 0;
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-text h1 { font-size: 2.6rem; line-height: 1.2; margin-bottom: 16px; }
.hero-text h1 span { color: var(--primary); }
.hero-text p { font-size: 1.1rem; color: #bbb; margin-bottom: 28px; max-width: 500px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 2rem; color: var(--primary); }
.stat span { color: #aaa; font-size: .85rem; }
.hero-benefits { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.hero-benefit { display: flex; align-items: center; gap: 12px; }
.hero-benefit-icon { display:flex; flex-shrink: 0; opacity: .9; color: #a7f3e0; }
.hero-benefit span:last-child { color: #d4ede8; font-size: .95rem; font-weight: 500; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section-categories,
.section-featured,
.section-latest,
.section-how,
.section-materials { padding: 60px 0; }

.section-categories { background: var(--white); }
.section-how { background: #f0faf7; color: var(--dark); }
.section-how h2 { color: var(--dark); }

h2 { font-size: 1.8rem; margin-bottom: 28px; color: var(--dark); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.section-header h2 { margin-bottom: 0; }
.link-all { color: var(--primary); font-weight: 600; }

/* Kategorie */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.category-card {
  display: flex; flex-direction: column; padding: 20px 16px;
  background: var(--bg); border-radius: var(--radius);
  border: 2px solid var(--border); transition: var(--transition);
}
.category-card:hover { border-color: var(--primary); transform: translateY(-2px); text-decoration: none; }
.cat-name { font-weight: 600; color: var(--dark); }
.cat-count { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

.subcategory-filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}
.subcat-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px; font-size: .85rem;
  border: 1.5px solid #e5e7eb; color: #374151; text-decoration: none;
  background: #fff; transition: all .15s;
}
.subcat-btn:hover { border-color: var(--primary); color: var(--primary); }
.subcat-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.subcat-btn span { font-size: .75rem; opacity: .75; }

/* ============================================================
   MODEL GRID + CARD
   ============================================================ */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.model-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: var(--transition);
  display: flex; flex-direction: column;
}
.model-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }

.model-card-img-link { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: #f0f0f0; }
.model-card-img-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.model-card:hover .model-card-img-link img { transform: scale(1.05); }

.badge { position: absolute; top: 8px; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.badge-featured { left: 8px; background: var(--primary); color: #fff; }
.badge-source    { right: 8px; background: rgba(0,0,0,.6); color: #fff; }

.model-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.model-cat { font-size: .78rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* Admin – inline změna kategorie na kartě */
.admin-cat-wrap { display: flex; align-items: center; gap: 6px; }
.admin-cat-select {
  font-size: .72rem; padding: 2px 6px; border: 1px dashed #d1d5db;
  border-radius: 4px; color: #6b7280; background: #f8fafc;
  cursor: pointer; max-width: 100%; flex: 1;
  font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
  transition: border-color .15s;
}
.admin-cat-select:hover, .admin-cat-select:focus { border-color: var(--primary); color: var(--primary); outline: none; }
.admin-cat-status { font-size: .8rem; font-weight: 700; flex-shrink: 0; min-width: 14px; }
.model-title { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.model-title a { color: var(--dark); }
.model-title a:hover { color: var(--primary); text-decoration: none; }

.model-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .75rem; padding: 2px 8px; background: var(--bg); border-radius: 20px; color: var(--text-muted); border: 1px solid var(--border); }
.tag:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.model-card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.model-card-actions .btn { flex: 1; text-align: center; }

/* ============================================================
   KATALOG – LAYOUT
   ============================================================ */
.catalog-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding-top: 32px; padding-bottom: 60px; }
.catalog-sidebar { }
.catalog-sidebar h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); margin: 20px 0 8px; }
.filter-list { list-style: none; }
.filter-list a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 6px; color: var(--text); font-size: .9rem; }
.filter-list a:hover { background: var(--bg); text-decoration: none; }
.filter-list a.active { background: #fff0ea; color: var(--primary); font-weight: 600; }
.filter-list .count { font-size: .8rem; color: var(--text-muted); }

.catalog-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.catalog-header h1 { font-size: 1.6rem; margin: 0; }
.result-count { color: var(--text-muted); font-size: .9rem; }

.search-info { background: #fff0ea; padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* Paginace */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.page-btn { padding: 8px 14px; border-radius: 6px; border: 2px solid var(--border); color: var(--text); font-weight: 500; transition: var(--transition); }
.page-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Infinite scroll */
.spinner {
  display: inline-block; width: 28px; height: 28px;
  border: 3px solid #e5e7eb; border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   DETAIL MODELU
   ============================================================ */
.model-detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 20px 60px; }
.gallery-main img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery-main.no-image img { opacity: .3; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: var(--transition); }
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--primary); }

.breadcrumb-cat { font-size: .85rem; color: var(--primary); margin-bottom: 8px; display: block; }
.model-info h1 { font-size: 1.8rem; margin: 8px 0 16px; }

.model-source { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.source-badge { font-size: .78rem; padding: 3px 10px; border-radius: 20px; font-weight: 600; background: var(--bg); border: 1px solid var(--border); }
.source-own { background: #e8f5e9; border-color: #4caf50; color: #2e7d32; }
.link-external { font-size: .85rem; }

.model-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.spec { background: var(--bg); padding: 10px 14px; border-radius: 8px; }
.spec-label { font-size: .75rem; color: var(--text-muted); display: block; }

.model-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.model-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.model-description { line-height: 1.8; color: var(--text); white-space: pre-wrap; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; position: relative; }
.steps::before { content:''; display:none; }
.step { text-align: center; padding: 16px 24px; position: relative; }
.step + .step::before { content:''; position:absolute; left:0; top:36px; width:1px; height:48px; background:#c8ede5; display:none; }
.step-num { width: 52px; height: 52px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; color: #fff; margin: 0 auto 14px; box-shadow: 0 2px 8px rgba(61,191,160,.25); }
.step h3 { color: var(--dark); margin-bottom: 6px; font-size: 1rem; font-weight: 700; }
.step p { color: #4b7a6e; font-size: .88rem; line-height: 1.5; }
@media(min-width:640px) {
  .steps { gap: 0; }
  .steps .step + .step { border-left: 1px dashed #c8ede5; }
}

/* ============================================================
   MATERIALS
   ============================================================ */
.materials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.material-card { background: var(--white); padding: 20px; border-radius: var(--radius); border: 2px solid var(--border); }
.material-card strong { display: block; font-size: 1.1rem; color: var(--dark); margin-bottom: 6px; }
.material-card p { font-size: .85rem; color: var(--text-muted); }

/* ============================================================
   MODAL – POPTÁVKA
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(2px); }
.modal-box {
  position: relative; background: var(--white); border-radius: 16px;
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 32px; box-shadow: 0 20px 60px rgba(0,0,0,.3); z-index: 1;
}
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-box h2 { margin-bottom: 4px; }
.modal-model-name { color: var(--text-muted); font-size: .9rem; margin-bottom: 20px; }

.file-upload-label {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px dashed #d1d5db; border-radius: 8px;
  padding: 12px 14px; cursor: pointer; transition: border-color .2s, background .2s;
  background: #f9fafb; position: relative;
}
.file-upload-label:hover { border-color: var(--primary); background: #fff7f4; }
.file-upload-label.has-file { border-color: #16a34a; background: #f0fdf4; }
.file-upload-icon { font-size: 1.3rem; flex-shrink: 0; }
.file-upload-text { font-size: .85rem; color: #6b7280; line-height: 1.3; }
.file-upload-label.has-file .file-upload-text { color: #15803d; font-weight: 500; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: 8px;
  font-size: .95rem; transition: var(--transition); font-family: inherit;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--primary);
}
.form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-check label { display: flex; align-items: center; gap: 10px; font-weight: 400; cursor: pointer; }
.form-check input { width: auto; }
.req { color: var(--primary); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.form-errors { background: #fdecea; color: #c62828; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; }
.form-success { background: #e8f5e9; color: #2e7d32; padding: 16px; border-radius: 8px; margin-bottom: 16px; text-align: center; }

/* ── Chat send form (sdílený komponent) ────────────────────── */
.chat-attach-preview {
  display: none; align-items: center; gap: 10px;
  background: #f0f9ff; border: 1.5px solid #bae6fd;
  border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: .88em;
}
.chat-attach-preview img { max-height: 60px; max-width: 80px; border-radius: 6px; object-fit: cover; }
.chat-attach-preview .name { color: #0369a1; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attach-preview .remove { cursor: pointer; color: #dc2626; font-weight: 700; font-size: 1.1em; flex-shrink: 0; }
.attach-btn { background: none; border: 1.5px solid #d1d5db; border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 1.1em; color: #6b7280; transition: all .15s; flex-shrink: 0; }
.attach-btn:hover { border-color: #6366f1; color: #6366f1; }

/* ============================================================
   THANKS PAGE
   ============================================================ */
.thanks-page { display: flex; justify-content: center; padding: 80px 20px; }
.thanks-box { background: var(--white); border-radius: 16px; padding: 48px; text-align: center; max-width: 480px; box-shadow: var(--shadow); }
.thanks-icon { font-size: 4rem; color: #4caf50; margin-bottom: 16px; }
.thanks-box h1 { margin-bottom: 16px; }
.thanks-box p { color: var(--text-muted); margin-bottom: 8px; }
.thanks-box .btn { margin-top: 24px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--dark); color: #ccc; padding: 48px 0 0; margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand strong { color: #fff; font-size: 1.1rem; }
.footer-brand p { color: #888; font-size: .85rem; margin-top: 8px; }
.footer-links h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 12px; }
.footer-links a { display: block; color: #888; font-size: .88rem; margin-bottom: 6px; }
.footer-links a:hover { color: var(--primary); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; font-size: .82rem; color: #555; }
.footer-bottom a { color: #666; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 180px 1fr; }
  .model-detail-layout { grid-template-columns: 1fr; }
}

/* ── Mobilní menu overlay ───────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: #1a3d35;
  z-index: 98;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-10px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
.mobile-menu.open {
  display: block;
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 4px;
}
.mobile-menu-inner a {
  color: #e2e8f0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1rem;
  text-decoration: none;
  transition: background .15s;
}
.mobile-menu-inner a:hover { background: rgba(255,255,255,.1); }

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 2rem; }
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-sidebar { display: none; } /* na mobilu nahrazeno .mobile-cats */
  .mobile-cats { display: block; }
  .models-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .hamburger { display: block; }
  .search-form { display: none; }
  .form-row-3col { grid-template-columns: 1fr; }

  /* Tlačítka v kartách – wrappovat místo překrývání */
  .order-card-actions { flex-wrap: wrap; gap: 6px; }
  .btn-block-mobile { width: 100%; justify-content: center; }

  /* Přihlašovací a registrační stránky */
  .container { padding: 0 16px; }
  .card { padding: 20px 16px !important; }

  /* Dashboard zákazníka */
  .alert { border-radius: 8px; font-size: .9rem; }
}

@media (max-width: 480px) {
  .models-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .model-card-actions { flex-wrap: wrap; gap: 5px; }
  .model-card-actions .btn-primary { flex: 1 1 100%; font-size: .78rem; padding: 7px 8px; }
  .model-card-actions .btn-outline  { display: none !important; }
  .model-card-detail-btn { display: none !important; }
  .model-card-actions .js-like-btn  { margin-left: auto; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero { padding: 40px 0; }
  .modal-box { padding: 20px; max-width: calc(100vw - 32px); max-height: 92vh; overflow-x: hidden; }

  /* Celý layout */
  .container { padding: 0 12px; }

  /* Tlačítka na mobile – větší touch target */
  .btn-sm { padding: 8px 12px; font-size: .85rem; }
  .btn { padding: 10px 16px; }

  /* Formuláře */
  input, select, textarea { font-size: 16px !important; } /* zabrání zoom na iOS/Android */

  /* Model grid na malém telefonu – 2 sloupce */
  .models-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .model-card { font-size: .88rem; }
  .model-card-title { font-size: .88rem; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 8px; }
  .footer-links a { margin: 0; }
}

/* ── Mobilní kategorie (horizontální scroll) ───────────────────────────────── */
.mobile-cats {
  display: none; /* zobrazí se až přes media query */
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.mobile-cats-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px;
  scrollbar-width: none;
}
.mobile-cats-inner::-webkit-scrollbar { display: none; }
.mobile-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  font-size: .85rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.mobile-cat-btn:hover { background: #f0fdf4; border-color: var(--primary); text-decoration: none; }
.mobile-cat-btn--active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Banner slots ──────────────────────────────────────────────────────────── */
.banner-slot { width: 100%; margin: 0 auto; }
.banner-slot--homepage_top  { max-width: 1100px; padding: 0 20px; margin-bottom: 8px; }
.banner-slot--catalog_top   { margin-bottom: 16px; }
.banner-slot--catalog_inline { grid-column: 1 / -1; margin: 4px 0; }
.banner-slot--model_sidebar { margin-bottom: 16px; }

.banner-item { display: block; border-radius: 12px; overflow: hidden; text-decoration: none; }
.banner-image img { width: 100%; height: auto; display: block; border-radius: 12px; }
.banner-html { border-radius: 12px; overflow: hidden; }
.banner-text-fallback {
  background: linear-gradient(135deg,#6366f1,#8b5cf6);
  color: #fff; text-align: center; padding: 20px;
  font-weight: 700; font-size: 1.1em; border-radius: 12px;
}

/* ── Print wizard ─────────────────────────────────────────────────────────── */
.uc-wizard {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 4px;
}
.uc-wizard-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.uc-wizard-icon { font-size: 1.3rem; }
.uc-wizard-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #374151; }
.uc-wizard-sub { font-size: .74rem; color: #6b7280; margin-top: 2px; }
.uc-section { margin-bottom: 14px; }
.uc-section:last-child { margin-bottom: 0; }
.uc-section-q { font-size: .84rem; font-weight: 600; color: #374151; margin-bottom: 8px; }

/* Card grid — mobile-first (default 1 col, wider screens get 2/3) */
.uc-card-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.uc-card-grid--3 { grid-template-columns: 1fr; }
.uc-card-grid--3 .uc-card { flex-direction: row; align-items: center; text-align: left; padding: 10px 12px; gap: 10px; }
@media (min-width: 560px) {
  .uc-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .uc-card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .uc-card-grid--3 .uc-card { flex-direction: column; align-items: center; text-align: center; padding: 10px 8px; gap: 6px; }
  .uc-card-grid--3 .uc-card-ico { display: none; }
}

/* Individual card */
.uc-card {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px 12px; border: 2px solid #e8edf2;
  border-radius: 12px; background: #fff;
  cursor: pointer; text-align: left;
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.uc-card:hover {
  border-color: var(--uc-c, #3dbfa0);
  background: var(--uc-bg, #f0fdf9);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.09);
}
.uc-card--active {
  border-color: var(--uc-c, #3dbfa0) !important;
  background: var(--uc-bg, #ecfdf5) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.uc-card--active .uc-card-label { color: var(--uc-c, #3dbfa0); }

/* Icon bubble */
.uc-card-ico {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px; background: var(--uc-bg, #f1f5f9);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; line-height: 1;
  transition: background .16s;
}
.uc-card--active .uc-card-ico { background: color-mix(in srgb, var(--uc-c, #3dbfa0) 15%, white); }

/* Card text */
.uc-card-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.uc-card-label { font-size: .8rem; font-weight: 700; color: #1e293b; line-height: 1.2; transition: color .16s; }
.uc-card-desc { font-size: .68rem; color: #94a3b8; line-height: 1.3; }

/* Color per category */
.uc-card[data-val="indoor"]     { --uc-c: #2563eb; --uc-bg: #eff6ff; }
.uc-card[data-val="outdoor"]    { --uc-c: #16a34a; --uc-bg: #f0fdf4; }
.uc-card[data-val="car"]        { --uc-c: #ea580c; --uc-bg: #fff7ed; }
.uc-card[data-val="functional"] { --uc-c: #7c3aed; --uc-bg: #f5f3ff; }
.uc-card[data-val="detail"]     { --uc-c: #db2777; --uc-bg: #fdf2f8; }
.uc-card[data-val="rigid"]      { --uc-c: #475569; --uc-bg: #f1f5f9; }
.uc-card[data-val="semi"]       { --uc-c: #d97706; --uc-bg: #fffbeb; }
.uc-card[data-val="flexible"]   { --uc-c: #059669; --uc-bg: #ecfdf5; }

/* Material recommendation card */
.mat-rec {
  background: #ecfdf5; border: 1.5px solid #6ee7b7;
  border-radius: 12px; padding: 12px 14px; margin-top: 10px;
}
.mat-rec-header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.mat-rec-check { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.mat-rec-label { font-size: .68rem; font-weight: 600; color: #065f46; text-transform: uppercase; letter-spacing: .05em; }
.mat-rec-name { display: block; font-size: 1.05rem; font-weight: 700; color: #064e3b; line-height: 1.2; }
.mat-rec-note { font-size: .78rem; color: #047857; margin: 4px 0 8px; }
.mat-rec-props { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 3px 14px; }
.mat-rec-props li { font-size: .74rem; color: #065f46; }
.mat-rec-props li::before { content: '·'; margin-right: 4px; color: #34d399; font-weight: 900; }

/* ── Use-case / environment buttons (legacy – printer views) ─────────────── */
.ucbtn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-bottom: 2px;
}

.ucbtn, .pe-env-btn, .mu-env-btn, .me-env-btn, .co-ucbtn {
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 500;
  padding: 6px 14px;
  font-size: .83rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  background: #f8fafc;
  color: #475569;
  transition: all .18s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  user-select: none;
}

.ucbtn:hover, .pe-env-btn:hover, .mu-env-btn:hover, .me-env-btn:hover, .co-ucbtn:hover {
  background: #f1f5f9;
  border-color: #3dbfa0;
  color: #0d7060;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(61,191,160,.18);
}
/* Lucide icons */
.lucide { display:inline-block; vertical-align:middle; flex-shrink:0; }


/* ---- Quantity stepper ---- */
.qty-stepper { display:flex; align-items:stretch; border:1px solid #d1d5db; border-radius:8px; overflow:hidden; width:fit-content; }
.qty-stepper button { background:#f8fafc; border:none; width:36px; font-size:1.1rem; cursor:pointer; color:#374151; line-height:1; padding:0; transition:background .15s; }
.qty-stepper button:hover { background:#e5e7eb; }
.qty-stepper input { width:52px; border:none; border-left:1px solid #d1d5db; border-right:1px solid #d1d5db; text-align:center; font-size:.95rem; padding:8px 4px; -moz-appearance:textfield; }
.qty-stepper input::-webkit-inner-spin-button, .qty-stepper input::-webkit-outer-spin-button { -webkit-appearance:none; }

/* ---- Delivery quick buttons ---- */
.dq-btn { padding:6px 14px; border:1.5px solid #e2e8f0; border-radius:20px; font-size:.83rem; background:#fff; color:#374151; cursor:pointer; transition:all .15s; white-space:nowrap; }
.dq-btn:hover { border-color:#3dbfa0; color:#0d7060; }
.dq-btn.dq-active { background:#3dbfa0; border-color:#3dbfa0; color:#fff; font-weight:600; }
