/* Ammyla – rozloženie kategórie a detailu produktu (002)
   Kategória: od 1440 px bočné menu ako doteraz, 768–1439 px bez menu a filter v riadku.
   Mobil do 767 px sa nemení. Patrí k nemu ammyla-rozlozenie-001.js */

/* Detail: sivý pás za názvom produktu preč */
.type-detail .p-detail-inner-header h1::before { display: none !important; }

.amf-dot { display: none; }

/* Detail: užší, vycentrovaný obsah na väčších obrazovkách */
@media (min-width: 1200px) {
  body.type-detail #content-wrapper,
  body.type-detail .breadcrumbs-wrapper { max-width: 1230px !important; margin-left: auto !important; margin-right: auto !important; }
}

/* Kategória bez bočného menu: 4 produkty vedľa seba */
@media (min-width: 1200px) and (max-width: 1439px) {
  body.type-category #content-wrapper,
  body.type-category .breadcrumbs-wrapper { max-width: 1230px !important; margin-left: auto !important; margin-right: auto !important; }
  body.type-category #content-wrapper #products .product { width: calc(25% - 20px) !important; flex: 0 0 calc(25% - 20px) !important; max-width: none !important; }
}

/* Farby pod kartou: zarovnané s textom, „+ ďalšie“ hneď za nimi */
@media (min-width: 768px) {
  body.type-category #products .widget-parameter-wrapper { justify-content: flex-start !important; align-items: center; box-sizing: border-box; padding: 0 22px !important; }
  body.type-category #products .widget-parameter-list { flex: 0 1 auto; justify-content: flex-start !important; min-width: 0; margin-left: -1px !important; }
  body.type-category #products .widget-parameter-list:has(> li:nth-child(4)) > li:nth-child(n+3) { display: none !important; }
  body.type-category #products .widget-parameter-more { flex: 0 0 auto; white-space: nowrap; margin: 9px 0 0 6px !important; }
}

@media (min-width: 768px) and (max-width: 1439px) {
  body.type-category aside.sidebar { display: none !important; }
  body.type-category #content-wrapper main#content { width: 100% !important; max-width: 100% !important; flex: 1 1 100% !important; margin: 0 !important; padding-left: 0 !important; }

  /* obal filtra */
  #filters-wrapper { width: 100% !important; flex: 0 0 100% !important; }
  #filters-wrapper,
  #filters-wrapper .filters-wrapper { display: block !important; overflow: visible !important; margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
  #filters-wrapper .filters-unveil-button-wrapper,
  #filters-wrapper .filters-close-btn,
  #filters-wrapper .filter-section-button,
  #filters-wrapper .filter-section-manufacturer,
  body #content-wrapper #filters-wrapper #filters .filter-section-count:not(.clear-section),
  body #content-wrapper #filters-wrapper #filters .clear-section .filter-total-count { display: none !important; }

  body #content-wrapper #filters-wrapper #filters {
    display: flex !important; flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 8px;
    position: static !important; transform: none !important; width: 100% !important; max-width: none !important;
    height: auto !important; max-height: none !important; overflow: visible !important; visibility: visible !important; opacity: 1 !important;
    background: none !important; box-shadow: none !important; padding: 12px 0 !important; margin: 0 0 12px !important;
    border: 0 !important; border-top: 1px solid #E4D9D0 !important; border-bottom: 1px solid #E4D9D0 !important;
  }
  body #content-wrapper #filters-wrapper #filters .filter-sections,
  body #content-wrapper #filters-wrapper #filters #category-filter-hover { display: contents !important; }

  body #content-wrapper #filters-wrapper #filters .slider-wrapper,
  body #content-wrapper #filters-wrapper #filters .filter-section-parametric,
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean { position: relative; width: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean { order: -1; }
  body #content-wrapper #filters-wrapper #filters .slider-wrapper { order: 5; }

  /* tlačidlá filtrov */
  body #content-wrapper #filters-wrapper #filters .amf-chip > h4,
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean fieldset > div {
    height: 38px !important; box-sizing: border-box !important; display: flex !important; align-items: center !important; gap: 8px;
    margin: 0 !important; padding: 0 16px !important; background: #fff !important;
    border: 1px solid #d6c7b8 !important; border-radius: 19px !important;
    font: 400 15px/36px Arsenal, sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; color: #3b2a21 !important; white-space: nowrap;
  }
  body #content-wrapper #filters-wrapper #filters .amf-chip > h4 { cursor: pointer; }
  body #content-wrapper #filters-wrapper #filters .amf-chip > h4::before { display: none !important; }
  body #content-wrapper #filters-wrapper #filters .amf-chip > h4::after {
    content: '' !important; display: block !important; position: static !important; width: 6px; height: 6px; background: none !important;
    border: solid #6E381E; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translate(-2px, -2px);
  }
  body #content-wrapper #filters-wrapper #filters .amf-chip > h4 > span:first-child {
    font: inherit !important; line-height: 36px !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
    background: none !important; text-transform: none !important; color: inherit !important;
  }
  body #content-wrapper #filters-wrapper #filters .amf-chip > h4 > span::before,
  body #content-wrapper #filters-wrapper #filters .amf-chip > h4 > span::after,
  body #content-wrapper #filters-wrapper #filters .amf-chip > h4 > *:not(span:first-child):not(.amf-num) { display: none !important; }

  body #content-wrapper #filters-wrapper #filters .amf-chip.amf-open > h4 { background: #F7F4F1 !important; border-color: #6E381E !important; }
  body #content-wrapper #filters-wrapper #filters .amf-chip.amf-active > h4,
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean fieldset > div:has(input:checked) { border-color: #6E381E !important; box-shadow: inset 0 0 0 1px #6E381E; }
  body #content-wrapper #filters-wrapper #filters .amf-chip > h4 > .amf-num { display: block !important; position: static !important; order: 1; min-width: 18px; height: 18px !important; box-sizing: border-box; margin: 0 !important; padding: 0 4px !important; border: 0 !important; border-radius: 9px !important; background: #6E381E !important; color: #fff !important; font: 700 12px/18px Arsenal, sans-serif !important; text-align: center; vertical-align: middle; }
  body #content-wrapper #filters-wrapper #filters .amf-chip > h4::after { order: 2; }

  body #content-wrapper #filters-wrapper #filters .filter-section-boolean .param-filter-top,
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean form { margin: 0 !important; padding: 0 !important; border: 0 !important; }
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean fieldset { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 !important; padding: 0 !important; border: 0 !important; }
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean label { margin: 0 !important; padding: 0 !important; height: auto !important; background: none !important; border: 0 !important; color: #3b2a21 !important; font: inherit !important; }
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean .filter-count { position: static !important; display: inline !important; height: auto !important; margin: 0 0 0 8px !important; padding: 0 !important; background: none !important; font-size: 13px; color: #8a7668; }
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean fieldset > div:has(input:checked) { background: #F7F4F1 !important; }
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean label::before,
  body #content-wrapper #filters-wrapper #filters .filter-section-boolean label::after { display: none !important; }

  /* rozbaľovacie okno */
  body #content-wrapper #filters-wrapper #filters .amf-chip > form,
  body #content-wrapper #filters-wrapper #filters .amf-chip > .amf-pop { display: none !important; }
  body #content-wrapper #filters-wrapper #filters .amf-chip.amf-open > form,
  body #content-wrapper #filters-wrapper #filters .amf-chip.amf-open > .amf-pop {
    display: block !important; position: absolute; top: 44px; left: 0; z-index: 99; min-width: 230px; max-height: none !important; overflow: visible !important;
    background: #fff; border: 1px solid #E4D9D0; border-radius: 10px; box-shadow: 0 12px 30px rgba(59, 42, 33, .14); padding: 14px 16px !important; margin: 0 !important;
  }
  body #content-wrapper #filters-wrapper #filters .amf-chip.amf-right > form,
  body #content-wrapper #filters-wrapper #filters .amf-chip.amf-right > .amf-pop { left: auto; right: 0; }
  body #content-wrapper #filters-wrapper #filters .amf-chip fieldset > div { margin: 0 0 6px !important; white-space: nowrap; }
  body #content-wrapper #filters-wrapper #filters .amf-chip fieldset > div.advanced-filters-wrapper { display: none !important; }
  body #content-wrapper #filters-wrapper #filters .amf-chip:not(.amf-farba) fieldset { display: flex !important; flex-direction: column; align-items: flex-start; }
  body #content-wrapper #filters-wrapper #filters .amf-farba.amf-open > form { min-width: 330px; }
  body #content-wrapper #filters-wrapper #filters .amf-farba fieldset { display: grid !important; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  #filters-wrapper .amf-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 7px; vertical-align: -2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
  body #content-wrapper #filters-wrapper #filters .slider-wrapper .amf-pop { min-width: 280px; }

  /* zrušenie filtrov */
  body #content-wrapper #filters-wrapper #filters .clear-section { order: 90; width: auto !important; margin: 0 0 0 4px !important; padding: 0 !important; border: 0 !important; }
  body #content-wrapper #filters-wrapper #filters #clear-filters { position: static !important; transform: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; line-height: 38px; }
  body #content-wrapper #filters-wrapper #filters #clear-filters a { display: inline !important; height: auto !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; font: 400 14px/38px Arsenal, sans-serif !important; color: #6E381E !important; text-transform: none !important; text-decoration: underline; white-space: nowrap; }
}
