/* ============================================================
   ESHOP — Universal e-shop styles
   Tokens: --esh-* (overrideable per template)
   Defaults: dark (video template compatible)
   ============================================================ */

:root {
  --esh-bg:             #0a0a0f;
  --esh-card-bg:        #1a1a1f;
  --esh-text:           #ffffff;
  --esh-text-2:         #b8b8c4;
  --esh-text-3:         #6e6e80;
  --esh-accent:         #a3e635;
  --esh-accent-text:    #fff;
  --esh-line:           #232330;
  --esh-badge-sale:     #dc2626;
  --esh-badge-out-bg:   #374151;
  --esh-badge-out-text: #9ca3af;
}

.esh-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  max-width: 1340px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  align-items: start;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.esh-sidebar {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--esh-card-bg, #0f0f12);
  border: 1px solid var(--esh-line, #232330);
  border-radius: 12px;
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.esh-sb-mobile-head {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--esh-text, #fff);
}
.esh-sb-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--esh-text-2, #b8b8c4);
  display: flex;
  align-items: center;
}
.esh-sb-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--esh-line, #232330);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.esh-sb-section:last-of-type { border-bottom: none; }
.esh-sb-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--esh-text-3, #6e6e80);
  margin-bottom: 4px;
}
.esh-sb-desc {
  font-size: 11px;
  color: var(--esh-text-3, #6e6e80);
  margin-top: -2px;
  margin-bottom: 4px;
  line-height: 1.5;
}
.esh-filter-row {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
  color: var(--esh-text-2, #b8b8c4);
  padding: 2px 0;
  transition: color 0.15s;
  user-select: none;
}
.esh-filter-row:hover { color: var(--esh-text, #fff); }
.esh-native-input {
  accent-color: var(--esh-accent, #a3e635);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}
.esh-cat-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--esh-text-2, #b8b8c4);
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.15s;
}
.esh-cat-nav-link:hover { color: var(--esh-accent, #a3e635); }
.esh-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.esh-price-sep { color: var(--esh-text-3, #6e6e80); font-size: 13px; }
.esh-price-input {
  width: 76px;
  background: var(--esh-card-bg, #1a1a1f);
  border: 1px solid var(--esh-line, #27272a);
  border-radius: 7px;
  color: var(--esh-text, #fff);
  font-size: 13px;
  padding: 6px 9px;
  font-family: inherit;
  -moz-appearance: textfield;
}
.esh-price-input::-webkit-outer-spin-button,
.esh-price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.esh-price-input:focus { outline: none; border-color: var(--esh-accent, #a3e635); }
.esh-reset-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 9px 14px;
  background: none;
  border: 1px solid var(--esh-line, #27272a);
  border-radius: 8px;
  color: var(--esh-text-3, #6e6e80);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.esh-reset-btn:hover { border-color: var(--esh-text-3, #6e6e80); color: var(--esh-text, #fff); }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.esh-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: var(--esh-text-3, #6e6e80);
}
.esh-breadcrumb a {
  color: var(--esh-text-3, #6e6e80);
  text-decoration: none;
  transition: color 0.15s;
}
.esh-breadcrumb a:hover { color: var(--esh-text, #fff); }
.esh-breadcrumb span { color: var(--esh-text-2, #b8b8c4); }

/* ── Category heading ───────────────────────────────────────── */
.esh-cat-heading {
  font-size: 28px;
  font-weight: 800;
  color: var(--esh-text, #fff);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

/* ── Toolbar ────────────────────────────────────────────────── */
.esh-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  min-height: 36px;
}
.esh-count { font-size: 13px; color: var(--esh-text-3, #6e6e80); }
.esh-filter-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  background: var(--esh-card-bg, #0f0f12);
  border: 1px solid var(--esh-line, #27272a);
  border-radius: 8px;
  color: var(--esh-text, #fff);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
}

/* ── Grid ───────────────────────────────────────────────────── */
.esh-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Card ───────────────────────────────────────────────────── */
.esh-card {
  background: var(--esh-card-bg, #1a1a1f);
  border: 1px solid var(--esh-line, #27272a);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
}
.esh-card:hover {
  border-color: var(--esh-accent, #a3e635);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(163, 230, 53, 0.12);
}
.esh-card.esh-hidden { display: none; }
.esh-card-img-wrap {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--esh-card-bg, #1a1a1f);
  overflow: hidden;
  text-decoration: none;
}
.esh-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.esh-card:hover .esh-card-img-wrap img { transform: scale(1.05); }
.esh-card-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--esh-text-3, #6e6e80);
}
.esh-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.esh-badge-sale { background: var(--esh-badge-sale, #dc2626); color: var(--esh-accent-text, #fff); }
.esh-badge-feat { background: var(--esh-accent, #a3e635); color: var(--esh-bg, #0a0a0f); }
.esh-badge-out  { background: var(--esh-badge-out-bg, #374151); color: var(--esh-badge-out-text, #9ca3af); top: auto; bottom: 10px; }
.esh-card-body {
  padding: 12px 14px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.esh-card-cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--esh-accent, #a3e635);
}
.esh-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--esh-text, #fff);
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.esh-card-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: auto;
  padding-top: 8px;
}
.esh-card-price strong { font-size: 17px; font-weight: 800; color: var(--esh-text, #fff); }
.esh-card-old { font-size: 12px; color: var(--esh-text-3, #6e6e80); text-decoration: line-through; }
.esh-card-footer {
  padding: 8px 12px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.esh-detail-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1.5px solid var(--esh-line, #27272a);
  border-radius: 8px;
  color: var(--esh-text-2, #b8b8c4);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: border-color 0.15s, color 0.15s;
  font-family: inherit;
}
.esh-card:hover .esh-detail-btn { border-color: var(--esh-accent, #a3e635); color: var(--esh-accent, #a3e635); }
.esh-cart-icon-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1.5px solid var(--esh-line, #27272a);
  border-radius: 8px;
  background: transparent;
  color: var(--esh-text-2, #b8b8c4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}
.esh-cart-icon-btn:hover { border-color: var(--esh-accent, #a3e635); color: var(--esh-accent, #a3e635); }

/* ── Empty states ───────────────────────────────────────────── */
.esh-empty-global,
.esh-empty-filter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 20px;
  color: var(--esh-text-3, #6e6e80);
  text-align: center;
}
.esh-empty-global p,
.esh-empty-filter p { font-size: 15px; margin: 0; }

/* ── Mobile backdrop ────────────────────────────────────────── */
.esh-sb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 199;
}
.esh-sb-backdrop.open { display: block; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .esh-wrap { grid-template-columns: 240px 1fr; gap: 24px; }
  .esh-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .esh-wrap { grid-template-columns: 1fr; padding: 24px 16px 60px; gap: 0; }
  .esh-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 300px;
    max-width: 90vw;
    z-index: 200;
    border-radius: 0 16px 16px 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .esh-sidebar.open { transform: translateX(0); }
  .esh-sb-mobile-head { display: flex; }
  .esh-filter-toggle { display: flex; }
  .esh-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .esh-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   E-shop filter sidebar — accordion sekcie
   ============================================================ */

/* Zruš padding a gap z pôvodného .esh-sb-section —
   accordion header a body si padding spravujú sami */
.esh-sb-section {
  padding: 0;
  gap: 0;
}

/* ── Section header (button) ────────────────────────────────── */
.esh-sb-section-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.2s;
}
.esh-sb-section-hd:hover .esh-sb-title { color: var(--esh-accent, #a3e635); }
.esh-sb-section--open .esh-sb-section-hd { border-bottom-color: var(--esh-accent, #a3e635); }
.esh-sb-section-hd .esh-sb-title { margin-bottom: 0; }

/* ── Chevron ────────────────────────────────────────────────── */
.esh-sb-chevron {
  flex-shrink: 0;
  color: var(--esh-text-3, #6e6e80);
  transition: transform 0.3s ease, color 0.15s;
}
.esh-sb-section--open .esh-sb-chevron {
  transform: rotate(180deg);
  color: var(--esh-accent, #a3e635);
}
.esh-sb-section-hd:hover .esh-sb-chevron { color: var(--esh-accent, #a3e635); }

/* ── Collapsible body ───────────────────────────────────────── */
.esh-sb-section-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding-bottom 0.3s ease;
  padding-bottom: 0;
}
.esh-sb-section--open .esh-sb-section-body {
  max-height: 600px;
  padding-bottom: 8px;
}

/* ── Mobile drawer: sticky hlavička s badge ─────────────────── */
.esh-sb-mobile-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--esh-text, #fff);
}
.esh-sb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--esh-accent, #a3e635);
  color: var(--esh-accent-text, #fff);
  font-size: 11px;
  font-weight: 700;
  border-radius: 100px;
  line-height: 1;
}
