/* ========================================
   Antique Building Materials - Custom CSS
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
    --color-brand: #a00735;
    --color-brand-dark: #7e0529;
    --color-text: #000;
    --color-text-secondary: #575757;
    --color-white: #fff;
    --font-main: 'DM Sans', sans-serif;
    --page-top-height: 103px;
    --container-max: 1250px;
    --sidebar-width: 288px;
}

/* ---- Base ---- */

body {
    font-family: var(--font-main);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    background: var(--color-white);
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    color: var(--color-brand-dark);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--color-brand);
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    color: var(--color-text);
    font-weight: 400;
    margin-top: 0;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 15px;
}

/* ---- Header / Page Top ---- */

.page-top {
    position: fixed;
    z-index: 99;
    left: 0;
    width: 100%;
    top: 0;
    height: var(--page-top-height);
    background: var(--color-white);
    transition: box-shadow 0.3s;
}

.page-top.is-scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.page-top__container {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    height: var(--page-top-height);
}

.page-top__logo img {
    max-height: 63px;
    width: auto;
    display: block;
}

.page-top__nav-desktop {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Mobile nav & toggle - hidden on desktop */
.page-top__nav-mobile {
    display: none;
}

.page-top__mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.page-top__mobile-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s, opacity 0.3s;
}

.page-top__below {
    margin-top: var(--page-top-height);
}


/* Banner / Hero image pod headerem */
.page-top-banner {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Ukryj globalny banner gdy strona ma swój page-title banner */
.page-builder:has(.page-title) ~ .page-top-banner,
body:has(.page-title) .page-top-banner {
    display: none;
}

/* ---- Nav Desktop ---- */

.nav-top-desktop {
    display: flex;
    align-items: center;
}

.nav-top-desktop > ul {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-top-desktop > ul > li {
    position: relative;
}

.nav-top-desktop > ul > li > a {
    display: block;
    padding: 13px 12px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
    line-height: 20px;
}

.nav-top-desktop > ul > li > a:hover {
    color: var(--color-brand);
}

.nav-top-desktop > ul > li.is-current > a {
    font-weight: 600;
    color: var(--color-brand);
}

/* Dropdown */
.nav-top-desktop > ul > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    list-style: none;
    padding: 12px 0;
    margin: 0;
    min-width: 280px;
    z-index: 100;
}

.nav-top-desktop > ul > li:hover > ul,
.nav-top-desktop > ul > li.is-open > ul {
    display: block;
}

.nav-top-desktop > ul > li > ul > li > a {
    display: block;
    padding: 8px 24px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 300;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.nav-top-desktop > ul > li > ul > li > a:hover {
    background: #f5f5f5;
    color: var(--color-brand);
}

/* Dropdown arrow */
.nav-top-desktop > ul > li.is-parent > a .nav-arrow {
    width: 14px;
    height: 14px;
    margin-left: 4px;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s;
    fill: currentColor;
}

.nav-top-desktop > ul > li.is-parent:hover > a .nav-arrow {
    transform: rotate(180deg);
}

/* Language switcher */
.lang-switcher {
    display: flex;
    gap: 4px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid #ddd;
    align-items: center;
}

.lang-switcher a {
    font-size: 14px;
    color: var(--color-text);
    text-decoration: none;
    padding: 4px 6px;
    transition: color 0.2s;
}

.lang-switcher a.is-active {
    font-weight: 600;
    color: var(--color-brand);
}

.lang-switcher a:hover {
    color: var(--color-brand);
}

/* ---- Mobile Nav ---- */

.mobile-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav__item {
    position: relative;
}

.mobile-nav__item.has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.mobile-nav__link {
    display: block;
    padding: 10px 20px;
    color: var(--color-text);
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    flex: 1;
}

.mobile-nav__item.is-current > .mobile-nav__link {
    color: var(--color-brand);
}

.mobile-nav__arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 20px 10px 0;
    color: var(--color-text);
    font-size: 12px;
    transition: transform 0.2s;
}

.mobile-nav__arrow.is-open {
    transform: rotate(180deg);
}

/* Submenu */
.mobile-nav__submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mobile-nav__submenu.is-open {
    display: block;
}

.mobile-nav__sublink {
    display: block;
    padding: 10px 20px 10px 20px;
    color: var(--color-text);
    font-size: 11px;
    font-weight: 400;
    text-decoration: none;
}

.mobile-nav__sublink:hover {
    color: var(--color-brand);
}

/* Language switcher mobile */
.mobile-nav__lang {
    display: flex;
    gap: 4px;
    padding: 10px 20px;
    border-top: 1px solid #eee;
}

.mobile-nav__lang a {
    font-size: 14px;
    color: var(--color-text);
    text-decoration: none;
    padding: 4px 6px;
}

.mobile-nav__lang a.is-active {
    font-weight: 600;
    color: var(--color-brand);
}

/* ---- Page Title / Banner ---- */

.page-title {
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 40px;
}

.page-title .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.page-title__logo {
    width: 300px;
    height: auto;
    padding-left: 40px;
}

.page-title__logo img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---- Homepage ---- */

/* Hide title text on banner */
.page-title .page-title__header {
    display: none;
}

/* Ukryj podwójny banner */
.page-top-banner {
    display: none;
}

/* Homepage text */
.is-homepage .block-richText {
    padding: 60px 0 40px;
}

.is-homepage .block-richText .rich-text p {
    font-size: 17px;
    line-height: 30px;
    color: var(--color-text);
    margin-bottom: 14px;
}

/* Homepage category offer section */
.section-offer__list {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.section-offer__list-single {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-offer__list-single-img {
    width: 300px;
    height: 300px;
    overflow: hidden;
    margin-bottom: 15px;
}

.section-offer__list-single-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-offer__list-single-link {
    display: inline-block;
    background: var(--color-brand);
    color: var(--color-white) !important;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.2s;
}

.section-offer__list-single-link:hover {
    background: var(--color-brand-dark);
    color: var(--color-white) !important;
}

/* ---- Contact Page ---- */

.contact-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px 60px;
    align-items: start;
    padding-top: 40px;
    padding-bottom: 60px;
}

.contact-section__text {
    grid-column: 1;
    grid-row: 1;
    font-size: 17px;
    line-height: 30px;
    color: var(--color-text-secondary);
}

.contact-section__heading {
    font-size: 30px;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 0;
    margin-bottom: 20px;
}

.contact-label, .contact-section__text strong {
    display: block;
    font-weight: 500;
    color: var(--color-brand) !important;
    margin-top: 10px;
    margin-bottom: 2px;
}

.contact-section__text{
    a{
        color: inherit;
    }
}

.contact-line {
    display: block;
}

.contact-section__text strong {
    font-weight: 500;
    color: var(--color-brand);
}

.contact-section__map {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
}

.contact-section__map iframe {
    width: 100%;
    height: 300px;
    border: 0;
    display: block;
}

.contact-section__form {
    grid-column: 2;
    grid-row: 1 / 3;
}

/* Form styles */
.freeform-form .freeform-label,
.contact-section__form label {
    display: block;
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 4px;
}

.freeform-form .freeform-input,
.contact-section__form input[type="text"],
.contact-section__form input[type="email"],
.contact-section__form textarea {
    width: 100%;
    border: 1px solid rgba(20, 48, 93, 0.32);
    border-radius: 3px;
    padding: 8px 16px;
    font-size: 15px;
    font-family: var(--font-main);
    height: 40px;
    margin-bottom: 0;
    outline: none;
    transition: border-color 0.2s;
    background: var(--color-white);
}

.freeform-form .freeform-input:focus {
    border-color: var(--color-brand);
}

.freeform-form textarea.freeform-input {
    height: auto;
    min-height: 96px;
    padding: 5px 14px;
    resize: vertical;
}

.freeform-form button[type="submit"],
.contact-section__form button[type="submit"] {
    background: var(--color-brand);
    color: var(--color-white);
    border: none;
    border-radius: 0;
    padding: 20px;
    font-size: 16px;
    font-family: var(--font-main);
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.freeform-form button[type="submit"]:hover {
    background: #14305D;
}

/* Freeform row layout */
.freeform-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.freeform-row > div {
    flex: 1;
    min-width: 0;
}

.freeform-row .freeform-col-6 {
    flex: 1;
}

.freeform-row .freeform-col-12 {
    flex: 0 0 100%;
}

/* Freeform controls (submit button area) */
[data-freeform-controls] {
    margin-top: 5px;
}

@media (max-width: 991px) {
    .contact-section .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-section__text,
    .contact-section__map,
    .contact-section__form {
        grid-column: 1;
        grid-row: auto;
    }
}

/* ---- Category Page ---- */

.category-details {
    padding: 40px 0 60px;
}

/* Top row: sidebar + description */
.category-details__top {
    display: flex;
    gap: 75px;
    align-items: flex-start;
    margin-bottom: 60px;
}

/* Sidebar nav */
.category-details__nav {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    list-style: none;
    padding: 0;
    padding-right: 40px;
    margin: 0;
    border-right: 1px solid rgba(202, 202, 202, 0.28);
}

.category-details__nav-single {
    margin: 0;
}

.category-details__nav-link {
    display: block;
    padding: 5px 0;
    color: var(--color-text);
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    line-height: 20px;
    transition: color 0.2s;
}

.category-details__nav-single + .category-details__nav-single {
    margin-top: 12px;
}

.category-details__nav-link:hover {
    color: var(--color-brand);
}

/* Content area */
.category-details__content {
    flex: 1;
    min-width: 0;
}

/* Description */
.category-details__description {
    margin-bottom: 40px;
}

.category-details__description-title {
    font-size: 32px;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 20px;
}

.category-details__description-text {
    font-size: 16px;
    line-height: 24px;
    color: var(--color-text);
}

.category-details__description-text p {
    margin-bottom: 12px;
}

/* Product tiles grid - 4 per row like original */
.category-details__tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
}

.category-details__tiles-link {
    display: block;
    text-decoration: none;
    color: var(--color-text);
    transition: opacity 0.2s;
}

.category-details__tiles-link:hover {
    opacity: 0.85;
}

.category-details__tiles-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 8px;
    border: 3px solid #000;
}

.category-details__tiles-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-details__tiles-title {
    display: block;
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    padding: 4px 0;
    color: var(--color-text);
}

/* ---- Product Page ---- */

.product-details {
    padding: 40px 0 60px;
}

/* 3-column layout: sidebar | cover/gallery | specs/CTA */
.product-details > .container {
    display: flex;
    gap: 75px;
    align-items: flex-start;
}

/* Sidebar nav */
.product-details__nav {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-details__nav-single {
    margin: 0;
}

.product-details__nav-link {
    display: block;
    padding: 5px 0;
    color: var(--color-text);
    font-size: 17px;
    font-weight: 400;
    text-decoration: none;
    line-height: 20px;
    transition: color 0.2s;
}

.product-details__nav-link:hover {
    color: var(--color-brand);
}

.product-details__nav-link--active {
    color: var(--color-brand);
}

/* Product center column (cover + gallery) */
.product-details__center {
    flex: 1;
    min-width: 0;
}

/* Cover image */
.product-details__cover {
    margin-bottom: 20px;
}

.product-details__cover img {
    width: 100%;
    display: block;
}

/* Product right column (specs + CTA) */
.product-details__specs {
    width: 345px;
    min-width: 345px;
}

/* Description sections */
.product-details__description {
    margin-bottom: 0;
}

.product-details__description-single {
    margin-bottom: 20px;
}

.product-details__description-single-header {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-brand);
    margin-bottom: 6px;
    line-height: 30px;
}

.product-details__description-single-text {
    font-size: 17px;
    line-height: 30px;
    color: var(--color-text-secondary);
}

.product-details__description-single-text ul {
    padding-left: 20px;
    margin: 8px 0;
}

.product-details__description-single-text li {
    margin-bottom: 4px;
}

/* Contact / CTA button */
.product-details__contact {
    margin: 20px 0 0;
}

.product-details__contact-link {
    display: inline-block;
    background: var(--color-brand);
    color: var(--color-white) !important;
    padding: 20px 30px;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    letter-spacing: normal;
    transition: background 0.2s;
}

.product-details__contact-link:hover {
    background: var(--color-brand-dark);
    color: var(--color-white) !important;
}

/* Gallery - below the 3 columns */
.product-details__gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 40px;
}

.product-details__gallery-single a {
    display: block;
    position: relative;
    overflow: hidden;
}

.product-details__gallery-single a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.product-details__gallery-single a:hover::after {
    opacity: 1;
}

.product-details__gallery-single img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.product-details__gallery-single a:hover img {
    transform: scale(1.05);
}

/* ---- Footer ---- */

.page-footer {
    background: url('/uploads/Brus_02_2026-03-26-204821_grap.webp') center 5% / cover no-repeat;
    padding: 100px 0;
    margin-top: 60px;
}

.page-footer__inner {
    background: var(--color-white);
    padding: 15px;
}

.page-footer__content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    min-height: 154px;
}

.page-footer__column {
    font-size: 16px;
    line-height: 30px;
    color: var(--color-text);
    text-align: center;
}

.page-footer__column:first-child {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
}

.page-footer__column a {
    color: var(--color-text);
    text-decoration: none;
}

.page-footer__column a:hover {
    text-decoration: underline;
}

/* ---- Scroll Reveal Animation ---- */

.scroll-reveal {
    opacity: 0;
    transform: translateY(80px) scale(0.95);
    transition: opacity 1.6s ease, transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ---- Responsive ---- */

@media (max-width: 991px) {
    .page-top__nav-desktop {
        display: none;
    }

    .page-top__mobile-toggle {
        display: flex;
    }

    /* Mobile nav dropdown under header */
    .page-top__nav-mobile {
        display: none;
        position: absolute;
        top: var(--page-top-height);
        left: 0;
        width: 100%;
        background: var(--color-white);
        overflow-y: auto;
        max-height: calc(100vh - var(--page-top-height));
        z-index: 98;
        padding: 0;
    }

    .page-top__nav-mobile.is-open {
        display: block;
    }

    /* Hamburger becomes X when open */
    .page-top__mobile-toggle.is-open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .page-top__mobile-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }
    .page-top__mobile-toggle.is-open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }


    /* Category/Product responsive */
    .category-details__top,
    .product-details > .container {
        flex-direction: column;
        gap: 20px;
    }

    .category-details__nav,
    .product-details__nav {
        width: 100%;
        min-width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-bottom: 20px;
    }

    .category-details__nav-link,
    .product-details__nav-link {
        padding: 6px 12px;
        border: 1px solid #ddd;
        font-size: 13px;
    }

    .product-details__specs {
        width: 100%;
        min-width: 100%;
    }

    .product-details__contact-link {
        display: block;
        width: 100%;
        text-align: center;
    }

    .section-offer__list-single {
        width: 100%;
    }

    .section-offer__list-single-link {
        display: block;
        width: 100%;
        text-align: center;
    }

    .category-details__nav {
        border-right: none;
        padding-right: 0;
    }

    .category-details__tiles {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .product-details__gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .page-footer {
        padding: 40px 0;
    }

    .page-footer__content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .category-details__tiles {
        grid-template-columns: 1fr;
    }

    .product-details__gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-details__description-title {
        font-size: 24px;
    }
}

/*fix*/
@media(min-width: 1024px){
    .page-top__container{
        max-width: 1350px;
    }
    .nav-top-desktop{
        ul{
            flex-wrap: wrap;
        }
    }
}

.block-richText{
    h2{
        margin-bottom: 2rem;
    }
}

.product-details__gallery-single-alt{
    margin-top: 0.5rem;
}

.nav-top-desktop > ul > li > ul{
    min-width: 375px;
}

.freeform-form{
    border: 1px solid #8080804f;
    padding: 1.5rem 1rem;
    /*border-radius: 0.5rem;*/
}
.freeform-form button[type="submit"], .contact-section__form button[type="submit"]{
    padding: 1rem 2rem;
    text-transform: uppercase;
}

.page-footer__author{
    background: #80808066;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}
.page-footer__author-text{
    text-align: center;
    font-size: 0.9rem;
    a{
        font-weight: bold;
        display: inline-block;
    }
}