/* ============================================================
   Sortiment – katalóg produktov
   Dizajn: tmavý, konzistentný s ProBlock design systémom
   ============================================================ */

/* ── Stránka ─────────────────────────────────────────────── */
.sortiment-page {
  min-height: 100vh;
  background: #0D1117;
  color: #F9FAFB;
  font-family: 'DM Sans', system-ui, sans-serif;
}

/* ── Hero ────────────────────────────────────────────────── */
.sort-hero {
  background: linear-gradient(135deg, #111827 0%, #1F2937 100%);
  border-bottom: 1px solid #374151;
  padding: 3rem 2rem 2.5rem;
  text-align: center;
}

.sort-hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #fff;
  margin-bottom: .5rem;
}

.sort-hero-title span {
  color: #C8A84B;
}

.sort-hero-sub {
  font-size: .95rem;
  color: #9CA3AF;
  margin-bottom: 1.6rem;
}

.sort-search-wrap {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.sort-search-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6B7280;
  pointer-events: none;
}

.sort-search {
  width: 100%;
  padding: .75rem 1rem .75rem 2.8rem;
  background: #1F2937;
  border: 1px solid #374151;
  border-radius: 10px;
  color: #F9FAFB;
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}

.sort-search::placeholder { color: #6B7280; }

.sort-search:focus {
  outline: none;
  border-color: #C8A84B;
  box-shadow: 0 0 0 3px rgba(200,168,75,.15);
}

/* ── Filter tabs ─────────────────────────────────────────── */
.sort-filters-wrap {
  background: #111827;
  border-bottom: 1px solid #1F2937;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sort-filters-wrap::-webkit-scrollbar { display: none; }

.sort-filters {
  display: flex;
  gap: .35rem;
  padding: .75rem 1.5rem;
  width: max-content;
  min-width: 100%;
}

.sort-filter-btn {
  padding: .42rem 1.1rem;
  border-radius: 20px;
  border: 1px solid #374151;
  background: transparent;
  color: #9CA3AF;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}

.sort-filter-btn:hover {
  background: #1F2937;
  color: #E5E7EB;
  border-color: #4B5563;
}

.sort-filter-btn.active {
  background: #C8A84B;
  border-color: #C8A84B;
  color: #0D1117;
}

/* Subkategórie (napr. Lepidlá → Mamut) */
.sort-subfilters-wrap {
  background: #0D1117;
  border-bottom: 1px solid #1F2937;
  padding: 0 .75rem .75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sort-subfilters {
  display: flex;
  gap: .3rem;
  padding: 0 .75rem;
  width: max-content;
  min-width: 100%;
}
.sort-subfilter-btn {
  font-size: .8rem;
  padding: .35rem .9rem;
}
.sort-subfilter-btn.active {
  background: rgba(200, 168, 75, 0.25);
  border-color: rgba(200, 168, 75, 0.5);
  color: #E5E7EB;
}

/* ── Obsah ───────────────────────────────────────────────── */
.sort-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Info bar ────────────────────────────────────────────── */
.sort-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  font-size: .82rem;
  color: #6B7280;
}

/* ── Mriežka produktov ───────────────────────────────────── */
.sort-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

/* ── Karta produktu ──────────────────────────────────────── */
.sort-card {
  background: #111827;
  border: 1px solid #1F2937;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
}

.sort-card:hover {
  transform: translateY(-3px);
  border-color: #C8A84B;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.sort-card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #1F2937;
}

.sort-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .4rem;
  transition: transform .3s;
}

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

.sort-card-img-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: .25;
}

.sort-card-avail {
  position: absolute;
  top: .6rem;
  right: .6rem;
  font-size: .62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .03em;
}

.sort-avail-on  { background: rgba(34,197,94,.9);  color: #fff; }
.sort-avail-off { background: rgba(239,68,68,.85);  color: #fff; }

.sort-card-body {
  padding: .9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .25rem;
}

.sort-card-cat {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #C8A84B;
}

.sort-card-name {
  font-size: .95rem;
  font-weight: 700;
  color: #F9FAFB;
  line-height: 1.3;
}

.sort-card-brand {
  font-size: .75rem;
  color: #6B7280;
}

.sort-card-desc {
  font-size: .78rem;
  color: #9CA3AF;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-top: .1rem;
}

.sort-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px solid #1F2937;
}

.sort-card-price {
  font-size: .9rem;
  font-weight: 700;
  color: #C8A84B;
}

.sort-card-price-none {
  font-size: .78rem;
  color: #4B5563;
}

.sort-card-unit {
  font-size: .72rem;
  color: #6B7280;
  font-weight: 400;
}

/* ── Prázdny stav ────────────────────────────────────────── */
.sort-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: #4B5563;
}

.sort-empty-icon {
  font-size: 3.5rem;
  opacity: .3;
  margin-bottom: .8rem;
}

.sort-empty-text {
  font-size: 1rem;
  margin-bottom: .4rem;
  color: #6B7280;
}

.sort-empty-hint {
  font-size: .82rem;
  color: #4B5563;
}

/* ── Modál detailu produktu ──────────────────────────────── */
.sort-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sort-modal-overlay.open {
  display: flex;
}

.sort-modal {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: sortModalIn .2s ease;
}

@keyframes sortModalIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.sort-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #1F2937;
  border: 1px solid #374151;
  color: #9CA3AF;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  z-index: 10;
}

.sort-modal-close:hover { background: #374151; color: #fff; }

.sort-modal-img-wrap {
  background: #1a2030;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  min-height: 200px;
  max-height: 420px;
}

.sort-modal-img {
  max-width: 100%;
  max-height: 380px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.sort-modal-img-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  opacity: .2;
}

.sort-modal-body {
  padding: 1.5rem 1.8rem 2rem;
}

.sort-modal-cat {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #C8A84B;
  margin-bottom: .4rem;
}

.sort-modal-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
  margin-bottom: .3rem;
}

.sort-modal-brand {
  font-size: .85rem;
  color: #6B7280;
  margin-bottom: 1rem;
}

.sort-modal-desc {
  font-size: .92rem;
  color: #D1D5DB;
  line-height: 1.65;
  margin-bottom: 1.2rem;
}

.sort-modal-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 1.2rem;
  background: #1F2937;
  border-radius: 10px;
}

.sort-modal-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #C8A84B;
}

.sort-modal-price-unit {
  font-size: .8rem;
  color: #6B7280;
  margin-top: -.2rem;
}

.sort-modal-avail-badge {
  font-size: .75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  margin-left: auto;
}

/* ── Empty state: katalóg prázdny ───────────────────────── */
.sort-empty-catalog {
  display: flex;
  justify-content: center;
  padding: 4rem 1rem;
}

.sort-empty-catalog-inner {
  max-width: 440px;
  text-align: center;
  background: linear-gradient(135deg, #111827 0%, #1a2535 100%);
  border: 1px solid #2d3f55;
  border-radius: 20px;
  padding: 3rem 2.5rem;
}

.sort-empty-catalog-icon {
  font-size: 3.5rem;
  margin-bottom: 1.2rem;
  display: block;
  filter: grayscale(.3);
}

.sort-empty-catalog-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}

.sort-empty-catalog-desc {
  font-size: .93rem;
  color: #9CA3AF;
  line-height: 1.65;
  margin-bottom: 1.8rem;
}

.sort-empty-catalog-btn {
  display: inline-block;
  padding: .65rem 1.6rem;
  background: #C8A84B;
  color: #0D1117;
  border-radius: 8px;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  transition: background .18s, transform .15s;
}

.sort-empty-catalog-btn:hover {
  background: #E2C97E;
  transform: translateY(-1px);
}

/* ── Responzivita ────────────────────────────────────────── */
@media (max-width: 640px) {
  .sort-hero { padding: 2rem 1rem 1.8rem; }
  .sort-content { padding: 1.5rem 1rem 3rem; }
  .sort-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
  .sort-modal-body { padding: 1.2rem; }
  .sort-modal-name { font-size: 1.4rem; }
}
