/* ========================================================================== 
   VENTIA — KONTAKT, CMS, MAPA, SKLEPY, 404 I STRONY SYSTEMOWE
   ========================================================================== */

body:is(#contact, #cms, #stores, #sitemap, #pagenotfound, #manufacturer, #supplier) #main {
  font-family: 'Poppins', sans-serif;
  color: var(--ventia-color-text-primary);
}

body:is(#contact, #cms, #stores, #sitemap, #pagenotfound, #manufacturer, #supplier) .page-header h1 {
  margin: 8px 0 20px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--ventia-color-text-primary);
  text-transform: none;
}

body#contact #content.page-content {
  padding: 20px 24px;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body#contact .contact-form {
  padding: 0;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  box-shadow: none;
}

body#contact .contact-form h3 {
  position: relative;
  padding-bottom: 12px;
  margin: 0 0 20px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ventia-color-text-primary);
  text-transform: none;
}

body#contact .contact-form h3::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  content: '';
  background: var(--ventia-color-brand-primary);
  border-radius: 3px;
}

body#contact .contact-form .form-footer {
  padding-top: 6px;
  font-family: 'Poppins', sans-serif;
  text-align: right;
}

body#contact .contact-rich {
  padding: 20px 24px;
  margin-bottom: 16px;
  font-family: 'Poppins', sans-serif;
  background: var(--ventia-color-bg-soft);
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body#contact .contact-rich h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--ventia-color-text-primary);
  text-transform: none;
}

body#contact .contact-rich .block .icon {
  color: var(--ventia-color-brand-primary-dark);
}

/* Treści CMS dostają rytm i typografię zamiast surowego HTML classic. */
body#cms #content.page-content {
  padding: 20px 24px;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ventia-color-text-primary);
  background: #fff;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body#cms #content.page-content :is(h2, h3, h4, h5) {
  position: relative;
  padding-bottom: 10px;
  margin: 24px 0 14px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ventia-color-text-primary);
  text-transform: none;
}

body#cms #content.page-content > :is(h2, h3, h4, h5):first-child {
  margin-top: 0;
}

body#cms #content.page-content :is(h2, h3)::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  content: '';
  background: var(--ventia-color-brand-primary);
  border-radius: 3px;
}

body#cms #content.page-content p,
body#cms #content.page-content li {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ventia-color-text-secondary);
  text-align: left !important;
}

body#cms #content.page-content :is(ul, ol) {
  padding-left: 22px;
  margin-bottom: 16px;
}

body#cms #content.page-content :is(img, iframe, video) {
  max-width: 100%;
  border-radius: 10px;
}

body#cms #content.page-content table {
  width: 100%;
  margin: 16px 0;
  font-family: 'Poppins', sans-serif;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: 10px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

body#cms #content.page-content :is(th, td) {
  padding: 10px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  border-bottom: 1px solid var(--ventia-color-border-default);
}

body#cms #content.page-content th {
  font-weight: 600;
  color: var(--ventia-color-text-secondary);
  background: var(--ventia-color-bg-soft);
}

body#stores #content.page-content,
body:is(#manufacturer, #supplier) #content.page-content {
  padding: 20px 24px;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body#stores .store-item-container,
body:is(#manufacturer, #supplier) .brand,
body:is(#manufacturer, #supplier) .supplier {
  padding: 16px;
  margin-bottom: 12px;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  border: 1px solid var(--ventia-color-border-default);
  border-radius: 10px;
  box-shadow: none;
}

body#stores .store-item-container:hover,
body:is(#manufacturer, #supplier) :is(.brand, .supplier):hover {
  border-color: var(--ventia-color-brand-primary);
}

body#sitemap .sitemap {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin-right: -8px;
  margin-left: -8px;
  font-family: 'Poppins', sans-serif;
}

body#sitemap .sitemap > [class*='col-'] {
  padding: 8px;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  background-clip: content-box;
  border-radius: var(--ventia-radius-12);
}

body#sitemap .sitemap > [class*='col-'] > h2,
body#sitemap .sitemap > [class*='col-'] > ul {
  margin-right: 16px;
  margin-left: 16px;
  font-family: 'Poppins', sans-serif;
}

body#sitemap .sitemap > [class*='col-'] {
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px var(--ventia-color-border-default);
}

body#sitemap .sitemap h2 {
  position: relative;
  padding: 16px 0 12px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ventia-color-text-primary);
  text-transform: none;
  border-bottom: 0;
}

body#sitemap .sitemap h2::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 3px;
  content: '';
  background: var(--ventia-color-brand-primary);
  border-radius: 3px;
}

body#sitemap .sitemap ul {
  padding: 0 0 16px;
  list-style: none;
}

body#sitemap .sitemap li,
body#sitemap .sitemap a {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 24px;
  color: var(--ventia-color-text-secondary);
}

body#sitemap .sitemap li {
  margin-bottom: 8px;
}

body#sitemap .sitemap li:last-child {
  margin-bottom: 0;
}

body#sitemap .sitemap a:hover {
  color: var(--ventia-color-brand-primary);
}

body#pagenotfound #main .page-content,
body#pagenotfound .page-not-found {
  max-width: 760px;
  padding: 24px;
  margin: 0 auto 24px;
  font-family: 'Poppins', sans-serif;
  text-align: center;
  background: var(--ventia-color-bg-soft);
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body#pagenotfound .page-not-found :is(h4, .h4) {
  margin: 0 0 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ventia-color-text-primary);
  text-transform: none;
}

/* The card carries a single hint paragraph, so it reads as body copy rather
   than as a caption under a heading. */
body#pagenotfound .page-not-found p {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  line-height: 22px;
  color: var(--ventia-color-text-secondary);
}

/* Wyniki systemowe korzystają z tego samego nagłówka co kategoria. */
body:is(#search, #best-sales, #new-products, #prices-drop) #main .page-header h1,
body:is(#search, #best-sales, #new-products, #prices-drop) #main h1.h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--ventia-color-text-primary);
  text-transform: none;
}

/* Ukrycie wizualne, nie display: none — patrz custom.css, H1 musi zostać
   w drzewie dostępności. */
body:is(#search, #best-sales, #new-products, #prices-drop) #js-product-list-header {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Na stronach systemowych korzeń drzewa kategorii nie może udawać H1. */
body:is(#search, #best-sales, #new-products, #prices-drop) .block-categories .category-top-menu > li > a {
  display: none;
}

body:is(#search, #best-sales, #new-products, #prices-drop) .block-categories .category-top-menu > li > .category-sub-menu {
  margin-top: 0;
}

body:is(#search, #best-sales, #new-products, #prices-drop) .page-not-found {
  padding: 24px;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--ventia-color-bg-soft);
  border: 1px solid var(--ventia-color-border-default);
  border-radius: var(--ventia-radius-12);
  box-shadow: none;
}

body:is(#search, #best-sales, #new-products, #prices-drop) .page-not-found h4 {
  margin: 0 0 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--ventia-color-text-primary);
  text-transform: none;
}

body:is(#search, #best-sales, #new-products, #prices-drop) .page-not-found p {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 20px;
  color: var(--ventia-color-text-secondary);
}

@media (max-width: 767.98px) {
  body:is(#contact, #cms, #stores, #sitemap, #pagenotfound, #manufacturer, #supplier) .page-header h1,
  body:is(#search, #best-sales, #new-products, #prices-drop) #main :is(.page-header h1, h1.h1) {
    font-size: 26px;
  }

  body#contact #content.page-content,
  body#cms #content.page-content,
  body#stores #content.page-content,
  body:is(#manufacturer, #supplier) #content.page-content {
    padding: 16px;
  }

  body#cms #content.page-content p,
  body#cms #content.page-content li {
    font-size: 13px;
    line-height: 1.65;
  }

  body#contact .contact-form .form-footer {
    text-align: left;
  }

  body#sitemap .sitemap {
    display: block;
    margin: 0;
  }
}
