@font-face {
  font-family: "Reddit Sans";
  src: url("../fonts/reddit-sans/RedditSans-wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Reddit Sans";
  src: url("../fonts/reddit-sans/RedditSans-Italic-wght.woff2") format("woff2");
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
}

/* Full-width WALL&ROLL layout with safe inner spacing. */
:root {
  --theme-container-edge-spacing: 100vw;
  --theme-normal-container-max-width: none;
  --theme-content-vertical-spacing: 40px !important;
  --wr-accent: #e8441a;
  --wr-accent-hover: #c93612;
  --theme-palette-color-1: var(--wr-accent);
  --theme-link-hover-color: var(--wr-accent);
  --wr-font-body: "Reddit Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --wr-font-display: var(--wr-font-body);
  --theme-font-family: var(--wr-font-body);
  --wr-page-start-gap: 36px;
  --wr-page-start-gap-mobile: 22px;
  --wr-type-hero-title: clamp(48px, 4.5vw, 64px);
  --wr-type-page-title: clamp(32px, 2.7vw, 42px);
  --wr-type-section-title: clamp(34px, 3vw, 44px);
  --wr-type-content-title: clamp(24px, 2vw, 30px);
  --wr-type-card-title: 16px;
  --wr-weight-heading: 700;
  --wr-weight-card: 600;
  --wr-weight-kicker: 800;
}

/* Jeden kolor akcentu dla nawigacji i odnośników funkcyjnych. */
[data-header] .menu > .current-menu-item > a,
[data-header] .menu > .current-menu-ancestor > a,
[data-header] .menu > .current-menu-parent > a,
[data-header] .menu > .current-product-ancestor > a,
[data-header] .menu a:hover,
body.single-product .woocommerce-product-details__short-description a,
body.single-product .att-short-description-toggle,
body.single-product .att-material-category-description-toggle {
  color: var(--wr-accent) !important;
}

body.single-product .woocommerce-product-details__short-description a:hover,
body.single-product .att-short-description-toggle:hover,
body.single-product .att-material-category-description-toggle:hover {
  color: var(--wr-accent-hover) !important;
}

body.single-product .att-product-tab {
  --att-red: var(--wr-accent);
  --att-red-dark: var(--wr-accent-hover);
}

/* Brand accent separating the navigation from page content. */
[data-header] .ct-header {
  border-bottom: 3px solid var(--wr-accent) !important;
}

/*
 * Globalna typografia WALL&ROLL.
 * Reddit Sans dla interfejsu i wszystkich nagłówków.
 */
body,
button,
input,
select,
textarea,
.ct-button,
.button,
.menu,
.ct-header,
.ct-footer,
.woocommerce {
  font-family: var(--wr-font-body) !important;
  font-optical-sizing: auto;
}

/* Blocksy assigns font-family directly to navigation links, using a dynamic
   system-font variable. Inheriting the header font alone does not reach them. */
#header.ct-header,
.att-mega {
  --theme-font-family: var(--wr-font-body);
}

body.att-topbar-enabled #header.ct-header [data-device="desktop"] #header-menu-1 > .menu > li > .ct-menu-link {
  font-family: var(--wr-font-body);
  font-weight: 600;
}

h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.page-title,
.product_title,
.woocommerce-loop-product__title,
.woocommerce-products-header__title {
  font-family: var(--wr-font-display) !important;
  font-weight: var(--wr-weight-heading);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.page-title,
.entry-title,
.woocommerce-products-header__title {
  font-size: var(--wr-type-page-title);
}

body.page:not(.att-homepage-active):not(.att-about-page-active) main .entry-content > h2 {
  font-size: var(--wr-type-content-title);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--wr-accent);
  outline-offset: 3px;
}

/* Duży obszar dotykowy bez powiększania samych ikon menu. */
[data-device="mobile"] .ct-header-trigger,
[data-device="mobile"] .ct-toggle-close,
.ct-panel .ct-toggle-close {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.site-main > .ct-container-full {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}

/*
 * Spokojny początek zwykłych podstron pod linią nagłówka.
 * Dedykowane strony ATT mają własny blok otwierający i pozostają pełnej szerokości.
 */
body.page:not(.home):not(.att-homepage-active):not(.att-about-page-active):not(.att-contact-page-active) .site-main,
body.single-post .site-main,
body.archive:not(.woocommerce):not(.att-category-v3) .site-main {
  padding-top: var(--wr-page-start-gap);
}

body.page .site-main:has(.att-samples-page),
body.category .site-main:has(.wr-blog-shell) {
  padding-top: 0;
}

[data-header] .ct-header [class*="ct-container"] {
  width: 100%;
  max-width: none;
  padding-inline: clamp(20px, 4.2vw, 80px);
}

[data-footer] .ct-footer [class*="ct-container"] {
  width: 100%;
  max-width: none;
  padding-inline: clamp(20px, 4.2vw, 80px);
}

.jtc-homepage-wrapper,
.jtc-homepage-builder-wrapper,
.jtc-homepage-builder-wrapper > .jtc-builder-section,
.jtc-hero-slider-block,
.jtc-slider-wrapper[data-width="full"] .jtc-slider {
  width: 100%;
  max-width: none;
}

@media (max-width: 768px) {
  body.page:not(.home):not(.att-homepage-active):not(.att-about-page-active):not(.att-contact-page-active) .site-main,
  body.single-post .site-main,
  body.archive:not(.woocommerce):not(.att-category-v3) .site-main {
    padding-top: var(--wr-page-start-gap-mobile);
  }

  body.page .site-main:has(.att-samples-page),
  body.category .site-main:has(.wr-blog-shell) {
    padding-top: 0;
  }

  [data-header] .ct-header [class*="ct-container"],
  [data-footer] .ct-footer [class*="ct-container"] {
    padding-inline: 18px;
  }
}

/* Accessories are a simple, full-width catalogue without wallpaper filters. */
body.term-akcesoria-do-tapetowania #main > .ct-container,
body.term-akcesoria-do-tapetowania #main > .ct-container > section {
  width: 100%;
}

@media (min-width: 1000px) {
  body.term-akcesoria-do-tapetowania .att-cat-after {
    width: 100%;
    margin-left: 0;
  }
}

/* Wybrany układ karty produktu: galeria z pionowymi miniaturami + kalkulator. */
body.single-product #main .hero-section {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

body.single-product .hero-section > .entry-header,
body.single-product .product-entry-wrapper {
  width: 100%;
  max-width: none;
  padding-inline: clamp(20px, 4.2vw, 80px);
}

body.single-product .hero-section > .entry-header {
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  padding-bottom: 18px;
}

body.single-product .hero-section .ct-breadcrumbs {
  order: 1;
  margin-bottom: 13px;
  color: #8a8a86;
  font-size: 10px;
  letter-spacing: .035em;
  text-transform: uppercase;
}

body.single-product .hero-section .page-title {
  order: 2;
  max-width: 980px;
  margin: 0;
  color: #171717;
  font-size: clamp(20px, 1.54vw, 27px);
  line-height: 1.08;
}

body.single-product .product-entry-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(430px, 1fr);
  gap: clamp(18px, 2vw, 34px);
  align-items: start;
  padding-bottom: 48px;
}

body.single-product .product-entry-wrapper > .wr-product-gallery-column {
  width: 100%;
  min-width: 0;
}

body.single-product .product-entry-wrapper > .summary {
  width: 100% !important;
  min-width: 0;
  margin-inline: 0 !important;
}

body.single-product .wr-product-gallery-column > .woocommerce-product-gallery {
  width: 100% !important;
  margin-inline: 0 !important;
}

body.single-product .wr-product-gallery-column > .wr-product-short-description {
  min-width: 0;
  margin: 0 0 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid #e5e1da;
}

body.single-product .wr-product-short-description .woocommerce-product-details__short-description {
  max-width: 760px;
  margin: 0;
  color: #242424;
  font-size: 15px;
  line-height: 1.7;
}

body.single-product .product-entry-wrapper > .woocommerce-product-gallery,
body.single-product .product-entry-wrapper > .summary {
  width: 100%;
  min-width: 0;
  margin: 0;
}

body.single-product .product-entry-wrapper > .summary > .price {
  display: none !important;
}

@media (min-width: 1101px) {
  /* Górny blok produktu zaczyna się razem z pełną galerią, także z miniaturami. */
  body.single-product #main .wr-product-gallery-column > .wr-product-short-description {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
  }

  body.single-product .woocommerce-product-gallery .ct-product-gallery-container > .flexy-container {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas: "thumbs main";
    gap: 10px;
    align-items: start;
  }

  body.single-product .woocommerce-product-gallery .flexy {
    grid-area: main;
    min-width: 0;
  }

  body.single-product .woocommerce-product-gallery .flexy-pills {
    grid-area: thumbs;
    width: 88px;
    margin: 0;
  }

  body.single-product .woocommerce-product-gallery .flexy-pills ol {
    display: flex !important;
    width: 100%;
    max-height: 780px;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0 3px 0 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  body.single-product .woocommerce-product-gallery .flexy-pills li {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    opacity: .68;
  }

  body.single-product .woocommerce-product-gallery .flexy-pills li.active {
    opacity: 1;
  }

  body.single-product .woocommerce-product-gallery .flexy-pills li.active .ct-media-container {
    box-shadow: 0 0 0 2px var(--wr-accent);
  }

  body.single-product .woocommerce-product-gallery .flexy-pills .ct-media-container,
  body.single-product .woocommerce-product-gallery .flexy-pills img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  body.single-product .woocommerce-product-gallery .flexy-view,
  body.single-product .woocommerce-product-gallery .flexy-item,
  body.single-product .woocommerce-product-gallery .flexy-item .ct-media-container {
    border-radius: 0;
  }

  body.single-product .woocommerce-product-gallery .flexy-item .ct-media-container img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }
}

@media (max-width: 1100px) {
  body.single-product .product-entry-wrapper {
    grid-template-columns: 1fr;
  }

  body.single-product .wr-product-gallery-column > .wr-product-short-description {
    margin: 0 0 20px;
    padding: 0 0 18px;
  }

  body.single-product .woocommerce-product-gallery .flexy-item .ct-media-container img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
}

@media (max-width: 768px) {
  body.single-product .hero-section > .entry-header,
  body.single-product .product-entry-wrapper {
    padding-inline: 16px;
  }

  body.single-product .hero-section > .entry-header {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  body.single-product .hero-section .page-title {
    font-size: 27px;
  }

  body.single-product .product-entry-wrapper {
    gap: 20px;
    padding-bottom: 34px;
  }
}

/* Karta produktu korzysta z tej samej ramy co główna nawigacja ATT. */
@media (min-width: 1000px) {
  body.single-product #main > :is(.ct-container, .ct-container-full) {
    width: min(calc(100% - 64px), 1680px);
    max-width: 1680px;
    margin-inline: auto;
    padding-inline: 0;
  }

  body.single-product .hero-section > .entry-header,
  body.single-product .product-entry-wrapper {
    padding-inline: 0;
  }
}
