/* ============================================================
   Home page (templates/home/page.php, components/*.php).
   After the canvas "Strona główna — poprawki UI/UX" (Oct 2026):
   one 15px side margin (the theme container's), H2 26px on
   phones and 36px above, body text 16px, every link and button
   at least 44px tall, no capitals on buttons.
   ============================================================ */

.pb-home {
    --pb-ink: #23231f;
    --pb-heading: #2a2a2a;
    --pb-body: #3a3a34;
    --pb-muted: #6b6a62;
    --pb-line: #e8e1d5;
    --pb-home-gap: 72px;
    display: flex;
    flex-direction: column;
    gap: var(--pb-home-gap);
    color: var(--pb-body);
}

/* Across the whole window, out of the theme's container. `clip` on the page
   wrapper keeps the 100vw (which counts the scrollbar) from scrolling. */
.pb-bleed {
    margin-inline: calc(50% - 50vw);
}

.main-page-wrapper:has(.pb-home) {
    overflow-x: clip;
}

/* ---- Shared pieces ---------------------------------------------- */

.pb-home .pb-section__title {
    margin: 0;
    color: var(--pb-heading);
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
}

.pb-home .pb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 28px;
    border-radius: var(--radius-base);
    background: var(--color-primary);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
    transition: background-color var(--transition-base);
}

.pb-home .pb-btn:hover,
.pb-home .pb-btn:focus-visible {
    background: var(--color-primary-dark);
    color: #fff;
}

/* A text link with an arrow: sage, underlined, 44px tall. */
.pb-home .pb-link,
.pb-home .pb-products__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.pb-home .pb-link:hover,
.pb-home .pb-products__more:hover {
    color: var(--color-primary-dark);
}

.pb-home .pb-link svg,
.pb-home .pb-products__more svg,
.pb-home .pb-tile__cta svg {
    flex: none;
    width: 18px;
    height: 18px;
}

.pb-home .pb-badge {
    display: inline-block;
    margin: 0;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--pb-ink);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ---- Hero ------------------------------------------------------- */

.pb-hero {
    --pb-hero-bg: #fbf0e0;
    --pb-hero-eyebrow: #9a4630;
    --pb-hero-accent: #c46248;
    background: var(--pb-hero-bg);
    /* Straight under the header, as the Elementor section was. */
    margin-top: calc(-1 * var(--wd-top-gap, 40px));
}

/* Tones: a campaign's colours, chosen by `tone:` in its hero file. The
   eyebrow must keep 4.5:1 on the ground (#9a4630 on #fbf0e0: 5.7:1). */
.pb-hero--jesien {
    --pb-hero-bg: #fbf0e0;
    --pb-hero-eyebrow: #9a4630;
    --pb-hero-accent: #c46248;
}

.pb-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: var(--container-width);
    min-height: 560px;
    margin-inline: auto;
}

.pb-hero__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 15px;
}

.pb-hero__eyebrow {
    margin: 0 0 16px;
    color: var(--pb-hero-eyebrow);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pb-home .pb-hero__title {
    margin: 0 0 20px;
    color: var(--pb-heading);
    font-family: var(--font-heading);
    font-size: clamp(36px, 5vw, 72px);
    font-style: italic;
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: -0.005em;
}

.pb-hero__accent {
    display: block;
    color: var(--pb-hero-accent);
}

.pb-hero__text {
    max-width: 480px;
    margin: 0 0 28px;
    color: var(--pb-body);
    font-size: 18px;
    line-height: 1.6;
    text-wrap: pretty;
}

.pb-hero__coupon {
    margin: -8px 0 28px;
    color: #8a5030;
}

.pb-hero__coupon-label {
    margin: 0 0 6px;
    font-weight: 700;
    text-transform: uppercase;
}

.pb-hero__coupon-note {
    margin: 6px 0 0;
    font-size: 14px;
}

/* The picture fills its half without setting the height: the hero is as
   tall as its copy, at least 560px, so the next heading shows on a laptop
   screen without scrolling. */
.pb-hero__media {
    position: relative;
}

.pb-hero__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Hero, photo layout ----------------------------------------- */

/* Room photos edge to edge (two on wide screens, the first on phones), the
   copy over the first one, a dot on each poster linking to its page. */
.pb-hero--photo {
    overflow: hidden;
    /* Content width, like the sections below; a little air under the header. */
    margin-top: calc(-1 * var(--wd-top-gap, 40px) + 15px);
    border-radius: 6px;
    background: #2a2018;
}

.pb-hero--photo .pb-hero__inner {
    grid-template-columns: repeat(var(--pb-panels, 2), minmax(0, 1fr));
    max-width: none;
    /* Never taller than a 3:4 photo at the panel's width (each panel is half
       the container, 4/3 of that): the photo then only ever crops at top and
       bottom, which is what the hotspot positions assume. */
    height: min(clamp(520px, calc(100svh - 175px), 820px), calc((min(100vw, var(--container-width)) - 30px) * 2 / 3));
    min-height: 0;
}

.pb-hero__panel {
    /* Which part of the 3:4 photo shows when the panel is wider than that:
       0 = the top, 1 = the bottom. The hotspots follow it. */
    --py: .15;
    position: relative;
    grid-row: 1;
    margin: 0;
    overflow: hidden;
    container-type: size;
}

/* The copy shares the first column, so place the photos explicitly. */
.pb-hero__panel:nth-of-type(1) {
    grid-column: 1;
}

.pb-hero__panel:nth-of-type(2) {
    grid-column: 2;
}

.pb-hero--photo .pb-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: 50% calc(var(--py) * 100%);
}

/* A dark wash under the copy, so white text reads on any photo. */
.pb-hero--photo .pb-hero__panel:first-of-type::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 20, 14, .85) 0%, rgba(28, 20, 14, .6) 40%, rgba(28, 20, 14, .2) 62%, rgba(28, 20, 14, 0) 75%);
    pointer-events: none;
}

.pb-hero--photo .pb-hero__copy {
    position: relative;
    z-index: 2;
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    justify-content: flex-end;
    padding: 48px 64px 56px;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
    /* Clicks on the photo around the copy reach the hotspots below it. */
    pointer-events: none;
}

.pb-hero--photo .pb-hero__copy > * {
    pointer-events: auto;
}

.pb-hero--photo .pb-hero__eyebrow {
    color: #f3dcc6;
}

.pb-home .pb-hero--photo .pb-hero__title {
    color: #fff;
    font-size: clamp(36px, 4vw, 60px);
}

.pb-hero--photo .pb-hero__accent {
    color: #f2b48c;
}

.pb-hero--photo .pb-hero__text {
    color: #f7f0e8;
}

/* On a photo the button is white: sage on a dark brown wash disappears. */
.pb-home .pb-hero--photo .pb-btn {
    text-shadow: none;
    background: #fff;
    color: var(--pb-ink);
}

.pb-home .pb-hero--photo .pb-btn:hover,
.pb-home .pb-hero--photo .pb-btn:focus-visible {
    background: var(--color-surface-warm);
    color: var(--pb-ink);
}

/* ---- Hotspots ---------------------------------------------------- */

/* A layer over the photo, in its coordinates; only the dot and the open
   card take clicks. x/y are fractions of the whole 3:4 photo, which is drawn
   4/3 of the panel's width tall (133.33cqw) and shifted up by --py of what
   overflows. */
.pb-hotspot {
    --dot-top: calc(var(--y) * 133.333cqw - (133.333cqw - 100cqh) * var(--py));
    --card-w: min(280px, calc(100cqw - 24px));
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.pb-hotspot__dot {
    position: absolute;
    left: calc(var(--x) * 100%);
    /* Kept inside the panel whatever the crop. */
    top: clamp(30px, var(--dot-top), calc(100cqh - 30px));
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: auto;
    transition: transform var(--transition-base), background-color var(--transition-base);
}

/* The plus, turning into a cross while the card is open. */
.pb-hotspot__dot::before,
.pb-hotspot__dot::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 2px;
    border-radius: 1px;
    background: var(--pb-ink);
    transition: transform var(--transition-base);
}

.pb-hotspot__dot::after {
    transform: rotate(90deg);
}

.pb-hotspot__dot[aria-expanded="true"]::before {
    transform: rotate(45deg);
}

.pb-hotspot__dot[aria-expanded="true"]::after {
    transform: rotate(135deg);
}

.pb-hotspot__dot:hover,
.pb-hotspot__dot:focus-visible {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.08);
}

.pb-hotspot__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* A slow ring, so the dot reads as something to tap. */
@media (prefers-reduced-motion: no-preference) {
    .pb-hotspot__dot[aria-expanded="false"] {
        animation: pb-hotspot-pulse 2.4s ease-out infinite;
    }

    @keyframes pb-hotspot-pulse {
        0% { box-shadow: 0 4px 14px rgba(0, 0, 0, .25), 0 0 0 0 rgba(255, 255, 255, .55); }
        70%, 100% { box-shadow: 0 4px 14px rgba(0, 0, 0, .25), 0 0 0 14px rgba(255, 255, 255, 0); }
    }
}

/* The card: under the dot, centred on it, but never past the photo's
   edges (12px in from either side). */
.pb-hotspot__card {
    position: absolute;
    left: clamp(12px, calc(var(--x) * 100cqw - var(--card-w) / 2), calc(100cqw - var(--card-w) - 12px));
    top: calc(clamp(30px, var(--dot-top), calc(100cqh - 30px)) + 32px);
    display: flex;
    gap: 14px;
    box-sizing: border-box;
    width: var(--card-w);
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
    color: var(--pb-ink);
    text-decoration: none;
    text-shadow: none;
    pointer-events: auto;
}

.pb-hotspot__card[hidden] {
    display: none;
}

.pb-hotspot__thumb {
    display: grid;
    flex: none;
    place-items: center;
    width: 80px;
    aspect-ratio: 768 / 1075;
    border-radius: 4px;
    background: var(--color-surface-warm);
}

.pb-hotspot__thumb img {
    display: block;
    width: 84%;
    height: auto;
    box-shadow: 1px 2px 4px rgba(35, 35, 31, .18);
}

.pb-hotspot__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.pb-hotspot__name {
    font-family: var(--font-heading);
    font-size: 16px;
    line-height: 1.3;
}

.pb-hotspot__price {
    font-size: 14px;
    font-weight: 600;
}

.pb-hotspot__price del {
    margin-left: 4px;
    color: var(--pb-muted);
    font-weight: 400;
}

.pb-hotspot__go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    margin-top: 4px;
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.pb-hotspot__go svg {
    width: 16px;
    height: 16px;
}

.pb-hotspot__card:hover .pb-hotspot__go,
.pb-hotspot__card:focus-visible .pb-hotspot__go {
    color: var(--color-primary-dark);
}

/* ---- Products --------------------------------------------------- */

/* Heading and link in one row above the grid; on phones the link moves
   under it (see the phone block). */
.pb-products {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title more"
        "grid  grid";
    align-items: baseline;
    gap: 32px 24px;
}

.pb-products > .pb-section__title {
    grid-area: title;
}

.pb-products > .pb-products__more {
    grid-area: more;
}

.pb-products > .pb-products__grid {
    grid-area: grid;
}

/* ---- Collection tiles ------------------------------------------- */

.pb-tiles {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.pb-tiles__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    gap: 32px 24px;
}

.pb-tile {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--pb-ink);
}

.pb-tile__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 6px;
}

.pb-tile__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
}

.pb-home .pb-tile__title {
    margin: 0;
    color: var(--pb-ink);
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.25;
}

.pb-tile__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 600;
}

.pb-tile:hover .pb-tile__cta-label,
.pb-tile:focus-visible .pb-tile__cta-label {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---- About ------------------------------------------------------ */

.pb-about {
    background: var(--color-surface-warm);
}

/* Photo and copy as one centred pair: the photo's column is only as wide
   as the photo, so wide screens add margin outside the pair, not a gap
   inside it. */
.pb-about__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px 80px;
    max-width: var(--container-width);
    margin-inline: auto;
    padding: 72px 15px;
    box-sizing: border-box;
}

.pb-about__photo {
    display: flex;
    flex: 0 1 440px;
    justify-content: center;
    min-width: 280px;
    margin: 0;
}

.pb-about__img {
    display: block;
    box-sizing: border-box;
    width: min(440px, 100%);
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 10px solid #fff;
    box-shadow: 0 18px 40px rgba(35, 35, 31, .16);
}

.pb-about__copy {
    display: flex;
    flex: 1 1 480px;
    flex-direction: column;
    min-width: 0;
    max-width: 640px;
}

.pb-about__eyebrow {
    margin: 0 0 6px;
    color: var(--pb-muted);
    font-size: 14px;
    line-height: 1.5;
}

.pb-about__copy > .pb-section__title {
    margin-bottom: 16px;
}

.pb-about__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--pb-body);
    font-size: 16px;
    line-height: 1.6;
}

.pb-about__text p {
    margin: 0;
    text-wrap: pretty;
}

.pb-about__more {
    align-self: flex-start;
    margin-top: 8px;
}

.pb-about__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 48px;
    margin: 20px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--pb-line);
    list-style: none;
}

.pb-stat {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
}

.pb-stat__icon {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    color: var(--pb-heading);
}

.pb-stat__icon svg {
    width: 24px;
    height: 24px;
}

.pb-stat__value {
    align-self: end;
    color: var(--pb-heading);
    font-family: var(--font-heading);
    font-size: 26px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.pb-stat__label {
    align-self: start;
    color: var(--pb-muted);
    font-size: 15px;
    line-height: 1.35;
}

.pb-perk {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    color: var(--pb-heading);
    font-family: var(--font-heading);
    font-size: 16px;
    line-height: 1.3;
}

.pb-perk__icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

@media (max-width: 1024px) {
    .pb-hero--photo .pb-hero__copy {
        padding: 32px;
    }
}

/* ---- Below the two-column hero ---------------------------------- */

@media (max-width: 899px) {
    .pb-hero:not(.pb-hero--photo) .pb-hero__inner {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .pb-hero:not(.pb-hero--photo) .pb-hero__img {
        position: static;
        height: auto;
        aspect-ratio: 390 / 292;
    }
}

/* ---- Phone ------------------------------------------------------ */

@media (max-width: 767px) {
    .pb-home {
        --pb-home-gap: 48px;
    }

    .pb-home .pb-section__title {
        font-size: 26px;
    }

    .pb-hero__copy {
        padding: 28px 15px;
    }

    .pb-hero__eyebrow {
        margin-bottom: 10px;
        font-size: 12px;
    }

    .pb-home .pb-hero__title {
        margin-bottom: 14px;
        line-height: 1.1;
    }

    .pb-hero__text {
        margin-bottom: 20px;
        font-size: 16px;
        line-height: 1.55;
    }

    /* Full width on phones: the thumb's target. */
    .pb-home .pb-btn {
        align-self: stretch;
        min-height: 48px;
        padding: 0 20px;
    }

    /* The link becomes a full-width button under the grid. */
    .pb-products {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "title"
            "grid"
            "more";
        gap: 20px;
    }

    .pb-home .pb-products__more {
        justify-content: center;
        min-height: 48px;
        margin-top: 4px;
        padding: 0 16px;
        border: 1px solid #cfc8bb;
        border-radius: var(--radius-base);
        background: #fff;
        color: var(--pb-heading);
        text-decoration: none;
    }

    .pb-home .pb-products__more:hover {
        border-color: var(--pb-heading);
        color: var(--pb-heading);
    }

    /* Tiles: one row that scrolls sideways; the next tile peeks in. */
    .pb-tiles {
        gap: 20px;
    }

    .pb-tiles__row {
        display: flex;
        gap: 12px;
        margin-inline: -15px;
        padding: 0 15px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 15px;
        scrollbar-width: none;
    }

    .pb-tiles__row::-webkit-scrollbar {
        display: none;
    }

    .pb-tile {
        flex: none;
        width: 264px;
        gap: 12px;
        scroll-snap-align: start;
    }

    .pb-tile__meta {
        flex-wrap: nowrap;
        align-items: center;
        min-height: 28px;
        gap: 12px;
    }

    .pb-home .pb-tile__title {
        font-size: 20px;
    }

    .pb-tile__cta-label {
        display: none;
    }

    .pb-tile__cta svg {
        width: 20px;
        height: 20px;
    }

    .pb-about__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 28px;
        padding: 48px 15px;
    }

    .pb-about__photo {
        flex: none;
    }

    .pb-about__img {
        width: 216px;
        border-width: 8px;
        box-shadow: 0 14px 30px rgba(35, 35, 31, .16);
    }

    .pb-about__copy {
        flex: none;
    }

    .pb-about__eyebrow {
        font-size: 13px;
    }

    .pb-about__copy > .pb-section__title {
        margin-bottom: 14px;
    }

    .pb-about__stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        margin-top: 16px;
    }

    .pb-stat {
        column-gap: 12px;
    }

    .pb-stat__icon {
        width: 44px;
        height: 44px;
    }

    .pb-stat__icon svg {
        width: 22px;
        height: 22px;
    }

    .pb-stat__label {
        font-size: 14px;
    }

    .pb-perk {
        align-items: center;
    }

    /* Photo hero: edge to edge on phones, the first photo only, the copy
       over its lower part. */
    .pb-hero--photo {
        margin-inline: -15px;
        margin-top: calc(-1 * var(--wd-top-gap, 40px));
        border-radius: 0;
    }

    .pb-hero--photo .pb-hero__inner {
        grid-template-columns: minmax(0, 1fr);
        height: min(500px, 133vw);
    }

    .pb-hero--photo .pb-hero__panel ~ .pb-hero__panel {
        display: none;
    }

    /* Bottom-aligned, wider phones lost the top of the photo, poster and
       dot with it; a third of the way down keeps both in view. */
    .pb-hero--photo .pb-hero__panel {
        --py: .35;
    }

    .pb-hero--photo .pb-hero__copy {
        padding: 24px 15px 28px;
    }

    .pb-hero--photo .pb-hero__text {
        margin-bottom: 18px;
    }

}
