/* ===== Nadpisy a tooltipy ===== */

#filters h4 {
  display: flex;
  align-items: center;
}

#filters h4::before {
  top: 50%;
  height: 12px;
  line-height: 12px;
  margin-top: -6px;
}

.filter-section .show-tooltip.question-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  padding-left: 1px;
  font: 700 12px/1 Arial, sans-serif;
  color: var(--us-accent, #c75300);
}

#filters h4 .question-tooltip {
  margin-top: 0;
  margin-bottom: 0;
}

/* ===== Hodnoty filtrů ===== */

#filters .filter-section-parametric fieldset {
  box-sizing: border-box;
  min-width: 0;
  padding-inline: 6px;
}

#filters .filter-section-parametric .filter-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 36px;
  margin: 4px 0;
  padding: 7px 10px 7px 34px;
  border-radius: 8px;
  background: var(--mh-cream, #f8f4ee);
  color: var(--mh-espresso, #3b2219);
  cursor: pointer;
  transition: background-color .15s, box-shadow .15s;
}

#filters .filter-section-parametric input:checked + .filter-label {
  background: #ffe8cc;
  box-shadow: inset 0 0 0 1px var(--mh-orange, #ff8a00);
  font-weight: 600;
}

#filters .filter-section-parametric .filter-count {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--us-muted, #555);
  font-size: 12px;
  font-weight: 400;
}

#filters .filter-section-parametric input[type="checkbox"] + .filter-label::before,
#filters .filter-section-parametric input[type="checkbox"]:checked + .filter-label::after {
  left: 10px;
}

#filters .filter-section-parametric input:focus-visible + .filter-label {
  outline: 2px solid var(--us-accent, #c75300);
  outline-offset: 2px;
}

/* ===== Grafické stupnice ===== */

#filters .filter-label.mh-scale-label {
  gap: 10px;
  font-size: 13px;
}

#filters .mh-filter-scale {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  color: var(--mh-espresso, #3b2219);
}

#filters .mh-filter-dot {
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  border: 1px solid var(--mh-latte, #bfa373);
  border-radius: 50%;
  background: transparent;
}

#filters .mh-filter-dot.is-filled {
  border-color: currentColor;
  background: currentColor;
}

#filters .mh-filter-name {
  min-width: 0;
}

/* Značky přidávané JS podle aktuálních počtů. */

#filters .mh-filter-option-hidden,
#filters .filter-section.mh-filter-section-hidden {
  display: none !important;
}

/* ===== Vysouvací panel ===== */

.mh-mobile-toolbar {
  display: none;
}

#mh-filter-drawer {
  --mh-drawer-padding: 16px;

  position: fixed;
  inset: 0 auto 0 0;
  box-sizing: border-box;
  width: min(390px, calc(100vw - 24px));
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #fff;
  color: var(--mh-espresso, #3b2219);
}

#mh-filter-drawer::backdrop {
  background: rgba(0, 0, 0, .42);
}

#mh-filter-drawer[open] {
  display: flex;
  flex-direction: column;
}

#mh-filter-drawer .mh-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: 14px var(--mh-drawer-padding);
  padding-top: max(14px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--us-border, #d9d9d9);
}

#mh-filter-drawer .mh-drawer-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

#mh-filter-drawer .mh-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: 32px/1 Arial, sans-serif;
  cursor: pointer;
}

#mh-filter-drawer .mh-drawer-content {
  flex: 1 1 auto;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px var(--mh-drawer-padding) 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

#mh-filter-drawer #filters {
  position: static !important;
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#mh-filter-drawer .filter-sections {
  display: block !important;
}

#mh-filter-drawer #filters,
#mh-filter-drawer #filters .filter-sections,
#mh-filter-drawer #filters .filter-section,
#mh-filter-drawer #filters .param-filter-top,
#mh-filter-drawer #category-filter-hover {
  background: transparent !important;
}

html.mh-filter-scroll-lock,
html.mh-filter-scroll-lock body {
  overflow: hidden !important;
}

/* ===== Panel a select do 1199 px ===== */

@media (max-width: 1199px) {
  html body #category-header .listSorting {
    display: none !important;
  }

  /* Původní filtry přímo ve stránce skryjeme. */
  html body #filters,
  html body #content #filters,
  html body .sidebar #filters {
    display: none !important;
  }

  /* Uvnitř panelu zůstávají viditelné. */
  html body #mh-filter-drawer #filters {
    display: block !important;
  }

  html body #category-header {
    padding: 0 !important;
  }

  html body #category-header .mh-mobile-toolbar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 16px !important;
  }

  .mh-mobile-toolbar .mh-open-filters,
  .mh-mobile-toolbar .mh-sort-select {
    box-sizing: border-box;
    min-height: 44px;
    border: 1px solid var(--us-border, #d9d9d9);
    border-radius: 8px;
    background-color: #fff;
    color: var(--mh-espresso, #3b2219);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
  }

  .mh-mobile-toolbar .mh-open-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0;
    padding: 10px 12px;
    font-weight: 600;
    white-space: nowrap;
  }

  .mh-mobile-toolbar .mh-sort-select {
    flex: 0 1 190px;
    min-width: 0;
    width: 48%;
    margin: 0;
    padding: 10px 30px 10px 10px;
    font-weight: 400;
  }

  #mh-filter-drawer {
    transform: translateX(-100%);
    transition: transform .22s ease;
  }

  #mh-filter-drawer.mh-drawer-open {
    transform: translateX(0);
  }
}

/* ===== Původní rozložení od 1200 px ===== */

@media (min-width: 1200px) {
  html body #category-header .mh-mobile-toolbar {
    display: none !important;
  }
}

/* ===== Hover a fokus ===== */

@media (hover: hover) and (pointer: fine) {
  #filters .filter-section-parametric input:not(:disabled) + .filter-label:hover {
    background: #ffe8cc;
  }

  .mh-mobile-toolbar .mh-open-filters:hover {
    background: var(--mh-cream, #f8f4ee);
  }
}

.mh-mobile-toolbar :focus-visible,
#mh-filter-drawer button:focus-visible {
  outline: 2px solid var(--us-accent, #c75300);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  #mh-filter-drawer,
  #filters .filter-section-parametric .filter-label {
    transition: none;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .sidebar.sidebar-left {
    display: none !important;
  }
}
/* Tabulka doplňkových parametrů produktu */
.extended-description table.detail-parameters {
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--us-border, #d9d9d9);
  border-spacing: 0;
  border-collapse: separate;
  border-radius: 8px;
  overflow: hidden;
  background: var(--mh-cream, #f8f4ee);
  color: var(--mh-espresso, #3b2219);
}

.extended-description table.detail-parameters tr,
.extended-description table.detail-parameters th,
.extended-description table.detail-parameters td {
  background: transparent;
}

.extended-description table.detail-parameters th,
.extended-description table.detail-parameters td {
  padding: 12px 16px;
  border: 0;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.5;
}

.extended-description table.detail-parameters th {
  width: 35%;
  font-weight: 600;
}

.extended-description table.detail-parameters td {
  font-weight: 400;
  overflow-wrap: anywhere;
}

.extended-description table.detail-parameters tr + tr > th,
.extended-description table.detail-parameters tr + tr > td {
  border-top: 1px solid rgba(59, 34, 25, .1);
}

/* Hodnoty jsou odkazy na odpovídající výběr kávy */
.extended-description table.detail-parameters td a {
  color: var(--mh-espresso, #3b2219);
  text-decoration: underline;
  text-decoration-color: rgba(59, 34, 25, .25);
  text-underline-offset: 3px;
}

.extended-description table.detail-parameters td a:hover {
  color: var(--us-accent, #c75300);
  text-decoration-color: currentColor;
}

.extended-description table.detail-parameters a:focus-visible {
  outline: 2px solid var(--us-accent, #c75300);
  outline-offset: 3px;
}

/* Tooltipy */
.extended-description table.detail-parameters .question-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  margin: 0 4px 0 0;
  padding: 0;
  vertical-align: middle;
  font: 700 12px/1 Arial, sans-serif;
  color: var(--us-accent, #c75300);
}

@media (max-width: 767px) {
  .extended-description table.detail-parameters th,
  .extended-description table.detail-parameters td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .extended-description table.detail-parameters th {
    width: 40%;
  }
}
/* Téměř bílé pozadí tabulky */
.extended-description table.detail-parameters {
  background-color: #fcfaf7;
}

/* Přepsání šedého pruhování Shoptetu */
.tab-content .extended-description table.detail-parameters tr:nth-child(odd),
.tab-content .extended-description table.detail-parameters tr:nth-child(even),
.tab-content .extended-description table.detail-parameters th,
.tab-content .extended-description table.detail-parameters td {
  background: transparent;
}
.extended-description table.detail-parameters a.mh-scale-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.extended-description table.detail-parameters .mh-filter-scale {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  color: var(--mh-espresso, #3b2219);
}

.extended-description table.detail-parameters .mh-filter-dot {
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  border: 1px solid var(--mh-latte, #bfa373);
  border-radius: 50%;
  background: transparent;
}

.extended-description table.detail-parameters .mh-filter-dot.is-filled {
  border-color: currentColor;
  background: currentColor;
}

.extended-description table.detail-parameters .mh-filter-name {
  min-width: 0;
}