/* ==========================================================================
   udi-theme — single product page (Figma 15:52)
   Top card: LEFT = gallery + details; RIGHT = name/price/cart/delivery/bundle.
   Inter for headings/copy, Roboto for price, cart, details and small labels.
   ========================================================================== */

/* Roboto (self-hosted) — extended weight range for the product page */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/roboto-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/roboto-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.pdp {
    --pdp-ink: #1c1b1f;
    --pdp-muted: #6b6b6b;
    --pdp-pink: #ed3166;
    --pdp-dark: #282a2a;
    --font-roboto: 'Roboto', var(--font-sans);
    display: block;
    color: var(--pdp-ink);
}

/* Same grid as header/footer: content-max + global --pad-x */
.pdp__inner {
    max-width: var(--content-max);
    margin-inline: auto;
    padding: 40px var(--pad-x) 60px;
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.pdp-breadcrumb {
    font-family: var(--font-roboto);
    font-size: 13px;
    line-height: 1.5;
    color: var(--pdp-pink);
    margin-bottom: 38px;
}

.pdp-breadcrumb a {
    color: var(--pdp-pink);
}

.pdp-breadcrumb a:hover {
    text-decoration: underline;
}

.pdp-breadcrumb__sep {
    margin-inline: 8px;
    color: var(--pdp-muted);
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */
.pdp__grid {
    display: grid;
    grid-template-columns: minmax(0, 646fr) minmax(0, 626fr);
    grid-template-areas:
        "gallery info"
        "details info";
    gap: 40px;
    align-items: start;
}

.pdp-gallery {
    grid-area: gallery;
    min-width: 0;
}

.pdp-details {
    grid-area: details;
}

.pdp__right {
    grid-area: info;
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */
.pdp-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pdp-gallery__main {
    position: relative;
    width: 100%;
}

.pdp-gallery__slide {
    aspect-ratio: 1 / 1;
}

.pdp-gallery__zoom {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.pdp-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pdp-gallery--empty img {
    width: 100%;
    height: auto;
}

/* Wishlist heart (Figma 15:553) — top-right overlay, toggles the wishlist. */
.pdp-gallery__fav {
    position: absolute;
    top: 28px;
    right: 28px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--pdp-ink, #1c1b1f);
    transition: color 0.15s ease;
}

.pdp-gallery__fav:hover,
.pdp-gallery__fav:focus-visible {
    color: var(--c-primary);
}

.pdp-gallery__fav svg {
    display: block;
    width: 40px;
    height: 40px;
}

.pdp-gallery__nav {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 2;
    display: flex;
    gap: 16px;
}

.pdp-gallery__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--pdp-ink, #1c1b1f);
    color: var(--pdp-ink, #1c1b1f);
    transition: background 0.15s ease, color 0.15s ease;
}

.pdp-gallery__arrow .udi-icon {
    width: 22px;
    height: 22px;
}

.pdp-gallery__arrow:hover {
    background: var(--pdp-ink, #1c1b1f);
    color: #fff;
}

.pdp-gallery__arrow.swiper-button-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pdp-gallery__thumbs {
    width: 100%;
}

.pdp-gallery__thumb {
    aspect-ratio: 1 / 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease, outline-color 0.15s ease;
    outline: 2px solid transparent;
    outline-offset: -2px;
}

.pdp-gallery__thumb.swiper-slide-thumb-active {
    opacity: 1;
    outline-color: var(--pdp-pink);
}

.pdp-gallery__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --------------------------------------------------------------------------
   Details box (attributes)
   -------------------------------------------------------------------------- */
.pdp-details {
    background: #fbf7f8;
    padding: 40px;
}

.pdp-details__title {
    margin: 0 0 20px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    color: var(--pdp-ink);
}

.pdp-details__list {
    font-family: var(--font-roboto);
    font-size: 18px;
    line-height: 1.5;
    color: var(--pdp-ink);
}

.pdp-details__row {
    margin: 0 0 12px;
}

.pdp-details__row:last-child {
    margin-bottom: 0;
}

.pdp-details__label {
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Right column — header
   -------------------------------------------------------------------------- */
.pdp__header {
    display: flex;
    flex-direction: column;
}

.pdp__title {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.3;
    color: var(--pdp-ink);
}

.pdp__subtitle {
    margin: 12px 0 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--pdp-muted);
}

.pdp-rating {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 28px;
    font-family: var(--font-roboto);
    font-size: 16px;
    line-height: 1.5;
    color: var(--pdp-ink);
}

.pdp-rating__stars {
    display: inline-flex;
    gap: 6px;
    color: var(--pdp-pink);
}

.pdp-rating__stars .udi-icon {
    width: 20px;
    height: 20px;
}

.pdp-rating__link {
    text-decoration: underline;
    text-underline-position: from-font;
}

/* --------------------------------------------------------------------------
   Right column — description + highlights
   -------------------------------------------------------------------------- */
.pdp__desc {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pdp__desc-text {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--pdp-muted);
}

.pdp__desc-text p {
    margin: 0 0 8px;
}

.pdp__desc-text p:last-child {
    margin-bottom: 0;
}

.pdp-highlights {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
}

.pdp-highlights__item {
    display: flex;
    align-items: center;
    color: var(--pdp-pink);
}

.pdp-highlights__item:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 12px;
    border-radius: 50%;
    background: var(--pdp-ink);
}

/* --------------------------------------------------------------------------
   Right column — price + cart
   -------------------------------------------------------------------------- */
.pdp__buy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pdp__price {
    margin: 0;
    font-family: var(--font-roboto);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.2;
    color: var(--pdp-dark);
}

.pdp__price del {
    color: #969696;
    font-weight: 400;
    font-size: 0.65em;
    margin-right: 12px;
}

.pdp__price ins {
    text-decoration: none;
    color: var(--pdp-pink);
}

.pdp__price .woocommerce-Price-amount {
    white-space: nowrap;
}

/* cart row: stepper + submit */
.pdp-cart {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
}

/* Variable form wraps hidden inputs + the qty/button row; keep them inline */
.pdp-cart--variable {
    display: block;
}

.pdp-cart__row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.udi-qty {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.udi-qty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--pdp-pink);
    flex-shrink: 0;
}

.udi-qty__btn:hover {
    opacity: 0.7;
}

.udi-qty__input {
    width: 57px;
    height: 48px;
    padding: 0 8px;
    text-align: center;
    border: 1px solid var(--pdp-pink);
    border-radius: 100px;
    background: #fff;
    font-family: var(--font-roboto);
    font-size: 16px;
    color: var(--pdp-pink);
    -moz-appearance: textfield;
    appearance: textfield;
}

.udi-qty__input::-webkit-outer-spin-button,
.udi-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pdp-add {
    flex: 1 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 40px;
    background: var(--pdp-pink);
    border: 1px solid var(--pdp-pink);
    border-radius: 100px;
    color: #fff;
    font-family: var(--font-roboto);
    font-size: 16px;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.pdp-add:hover,
.pdp-add:focus-visible {
    background: #fff;
    color: var(--pdp-pink);
}

/* Beat WooCommerce's default .button.alt purple (higher specificity) */
.pdp .pdp-add.button.alt {
    background: var(--pdp-pink);
    border-color: var(--pdp-pink);
    color: #fff;
}

.pdp .pdp-add.button.alt:hover,
.pdp .pdp-add.button.alt:focus {
    background: #fff;
    color: var(--pdp-pink);
}

/* AJAX in-flight state (own class so WC's .button.loading spinner stays off) */
.pdp-add.udi-loading {
    opacity: 0.65;
    pointer-events: none;
}

/* Add-to-cart error (e.g. out of stock) shown under the form */
.pdp-add__error {
    flex-basis: 100%;
    margin: 10px 0 0;
    color: #b00020;
    font-family: var(--font-roboto);
    font-size: 14px;
    line-height: 1.4;
}

.pdp__availability {
    margin: 0;
    font-family: var(--font-roboto);
    font-size: 16px;
    line-height: 1.5;
    color: var(--pdp-muted);
}

/* --------------------------------------------------------------------------
   Delivery / returns boxes
   -------------------------------------------------------------------------- */
.pdp-delivery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px 32px;
    margin-top: 20px;
}

.pdp-delivery__box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pdp-delivery__icon {
    flex-shrink: 0;
    color: var(--pdp-ink);
}

.pdp-delivery__icon .udi-icon {
    width: 24px;
    height: 24px;
}

.pdp-delivery__text {
    font-family: var(--font-roboto);
    font-size: 16px;
    line-height: 1.5;
    color: var(--pdp-muted);
    max-width: 140px;
}

/* Only the linked fragment inside a box reads as a link (design 61:8925). */
.pdp-delivery__text a {
    color: inherit;
    text-decoration: underline;
    text-underline-position: from-font;
}

.pdp-delivery__text a:hover,
.pdp-delivery__text a:focus-visible {
    color: var(--pdp-ink);
}

/* --------------------------------------------------------------------------
   Variation swatches
   -------------------------------------------------------------------------- */
.pdp-variations {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 20px;
}

.pdp-variation {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pdp-variation__label {
    margin: 0;
    font-family: var(--font-roboto);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: var(--pdp-ink);
}

.pdp-variation__value {
    font-weight: 400;
    color: var(--pdp-muted);
}

.pdp-variation__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pdp-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 60px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.pdp-swatch__box {
    position: relative;
    width: 60px;
    height: 60px;
    background: #f3f3f3;
    border: 2px solid transparent;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.pdp-swatch__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pdp-swatch:hover .pdp-swatch__box {
    border-color: #d0d0d0;
}

.pdp-swatch.is-selected .pdp-swatch__box {
    border-color: #fff;
    box-shadow: 0 0 0 3px var(--pdp-pink);
}

.pdp-swatch__name {
    font-family: var(--font-roboto);
    font-size: 16px;
    line-height: 1.5;
    color: var(--pdp-ink);
    text-align: center;
}

/* Unavailable combination */
.pdp-swatch.is-disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.pdp-swatch.is-disabled .pdp-swatch__box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, transparent calc(50% - 1px), #9a9a9a, transparent calc(50% + 1px));
}

.pdp-variation__error {
    margin: 0;
    min-height: 0;
    font-family: var(--font-roboto);
    font-size: 14px;
    line-height: 1.4;
    color: #d63638;
}

.pdp-variation__error:empty {
    display: none;
}

/* --------------------------------------------------------------------------
   "Stwórz zestaw" (upsells)
   -------------------------------------------------------------------------- */
.pdp-bundle {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.pdp-bundle__swiper {
    width: 100%;
    min-width: 0;
}

.pdp-bundle__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.pdp-bundle__title {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    color: var(--pdp-ink);
}

.pdp-bundle__nav {
    display: flex;
    gap: 20px;
}

.pdp-bundle__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--pdp-ink);
}

.pdp-bundle__arrow:hover {
    color: var(--pdp-pink);
}

.pdp-bundle__arrow.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.pdp-bcard {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #f3f3f3;
    padding: 20px;
    box-sizing: border-box;
}

.pdp-bcard__media {
    flex-shrink: 0;
    width: 112px;
    height: 112px;
}

.pdp-bcard__img {
    width: 112px;
    height: 112px;
    object-fit: cover;
    display: block;
}

.pdp-bcard__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.pdp-bcard__name {
    margin: 0;
    font-family: var(--font-roboto);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: var(--pdp-ink);
}

.pdp-bcard__price {
    margin: 0;
    font-family: var(--font-roboto);
    font-size: 16px;
    line-height: 1.5;
    color: var(--pdp-ink);
}

.pdp-bcard__price .woocommerce-Price-amount {
    white-space: nowrap;
}

.pdp-bcard__add {
    align-self: flex-start;
    font-family: var(--font-roboto);
    font-size: 16px;
    line-height: 1.5;
    color: var(--pdp-ink);
    text-decoration: underline;
    text-underline-position: from-font;
}

.pdp-bcard__add:hover {
    color: var(--pdp-pink);
}

/* --------------------------------------------------------------------------
   "Krótko o bólach" marquee (per-product)
   -------------------------------------------------------------------------- */
.pdp-pains {
    overflow: hidden;
    background: #dfbac4;
}

.pdp-pains__track {
    display: flex;
    width: max-content;
    animation: udi-marquee 40s linear infinite;
}

.pdp-pains:hover .pdp-pains__track,
.pdp-pains:focus-within .pdp-pains__track {
    animation-play-state: paused;
}

.pdp-pains__group {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 24px 30px;
}

.pdp-pains__item {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 18px;
    color: var(--pdp-dark);
}

a.pdp-pains__item:hover span,
a.pdp-pains__item:focus-visible span {
    text-decoration: underline;
    text-underline-position: from-font;
}

.pdp-pains__icon {
    display: block;
    width: 40px;
    height: 40px;
}

@keyframes udi-marquee {
    to {
        transform: translateX(-50%);
    }
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.pdp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    background: rgba(0, 0, 0, 0.9);
}

.pdp-lightbox.is-open {
    display: block;
}

body.pdp-lightbox-open {
    overflow: hidden;
}

.pdp-lightbox__swiper {
    width: 100%;
    height: 100%;
}

.pdp-lightbox .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdp-lightbox .swiper-zoom-container img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.pdp-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    display: inline-flex;
    color: #fff;
}

.pdp-lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.pdp-lightbox__arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pdp-lightbox__prev {
    left: 20px;
}

.pdp-lightbox__next {
    right: 20px;
}

.pdp-lightbox__arrow.swiper-button-disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    .pdp__grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "gallery"
            "info"
            "details";
        gap: 32px;
    }

    .pdp__title {
        font-size: 32px;
    }

    .pdp__price {
        font-size: 32px;
    }
}

@media (max-width: 559px) {
    .pdp-cart {
        flex-wrap: wrap;
    }

    .pdp-add {
        flex-basis: 100%;
    }

    .pdp-pains__item {
        font-size: 16px;
    }

    .pdp-pains__icon {
        width: 32px;
        height: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pdp-pains__track {
        animation: none;
        width: auto;
        overflow-x: auto;
    }

    .pdp-pains__group[aria-hidden="true"] {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Sticky add-to-cart bar (Figma 15:541). Colours follow the product (pink
   CTA), not the greyscale mockup. Slides up once the buy area is off-screen.
   -------------------------------------------------------------------------- */
.pdp-sticky {
    /* The bar is a sibling of .pdp, so it doesn't inherit .pdp's scoped
       vars — remap them to the global tokens (same values = same colours). */
    --pdp-pink: var(--c-primary);
    --pdp-ink: var(--c-ink);
    --pdp-muted: #6b6b6b;
    --font-roboto: 'Roboto', var(--font-sans);
    position: fixed;
    inset: auto 0 0 0;
    z-index: 90;
    background: #fdfdfd;
    box-shadow: 0 -7px 17px -1px rgba(0, 0, 0, 0.12);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.32s ease, opacity 0.32s ease, visibility 0.32s;
}

.pdp-sticky.is-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.pdp-sticky__inner {
    max-width: var(--content-max);
    margin-inline: auto;
    padding: 16px var(--pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.pdp-sticky__info {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
    font-family: var(--font-roboto);
}

.pdp-sticky__name {
    font-weight: 700;
    font-size: clamp(16px, 2vw, 24px);
    line-height: 1.3;
    color: var(--pdp-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdp-sticky__price {
    flex-shrink: 0;
    font-weight: 700;
    font-size: clamp(16px, 2vw, 24px);
    line-height: 1.3;
    color: var(--pdp-ink);
    white-space: nowrap;
}

.pdp-sticky__price del {
    margin-right: 6px;
    font-weight: 400;
    color: var(--pdp-muted);
}

.pdp-sticky__price ins {
    text-decoration: none;
}

.pdp-sticky__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 40px;
    background: var(--pdp-pink);
    border: 1px solid var(--pdp-pink);
    border-radius: 100px;
    color: #fff;
    font-family: var(--font-roboto);
    font-size: 16px;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.pdp-sticky__btn:hover,
.pdp-sticky__btn:focus-visible {
    background: #fff;
    color: var(--pdp-pink);
}

@media (max-width: 767px) {
    .pdp-sticky__inner {
        padding: 10px var(--pad-x);
        gap: 12px;
    }
    .pdp-sticky__btn {
        padding: 12px 24px;
    }
}

@media (max-width: 479px) {
    .pdp-sticky__name {
        display: none;
    }
    .pdp-sticky__btn {
        flex: 1 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pdp-sticky {
        transform: none;
        transition: opacity 0.2s ease, visibility 0.2s;
    }
}
