/* Strona produktu */
.pdp {
    --pdp-text: #1e1e1e;
    --pdp-muted: #6b6b6b;
    --pdp-line: #ececec;
    --pdp-soft: #f5f4f2;
    --pdp-accent: #CD0000;
    padding: 20px 0 56px;
    color: var(--pdp-text);
    font-family: 'Gilroy', sans-serif;
}

.pdp *,
.pdp *::before,
.pdp *::after {
    letter-spacing: normal;
}

.pdp a {
    color: inherit;
}

/* ---------- Powrót do listy i ścieżka ---------- */
.pdp-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    margin-bottom: 20px;
}

.pdp .pdp-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 14px 0 10px;
    border-radius: 999px;
    background: #f5f4f2;
    color: var(--pdp-text, #1e1e1e);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease;
}

.pdp .pdp-back .fa {
    font-size: 16px;
    line-height: 1;
}

.pdp .pdp-back:hover,
.pdp .pdp-back:focus {
    background: #ebe9e6;
    color: var(--pdp-text, #1e1e1e);
    text-decoration: none;
}

.pdp-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    color: var(--pdp-muted);
    font-size: 13px;
    font-weight: 500;
}

.pdp .pdp-crumbs a {
    color: var(--pdp-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.pdp .pdp-crumbs a:hover {
    color: var(--pdp-accent);
}

#pdp-parent:empty,
#pdp-parent:empty + .pdp-crumb-sep {
    display: none;
}

.pdp-crumb-sep {
    color: #b5b5b5;
}

/* ---------- Układ ---------- */
.pdp-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
    gap: 48px;
}

/* ---------- Zdjęcia ---------- */
.pdp-gallery {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
}

.pdp-main {
    position: relative;
    display: block;
    grid-column: 2;
    grid-row: 1;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 14px;
    background: var(--pdp-soft);
    cursor: zoom-in;
}

.pdp-main img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 6%;
    object-fit: contain;
    border-radius: 0;
    mix-blend-mode: multiply;
}

.pdp-zoom {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    color: var(--pdp-text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    opacity: .85;
    transition: opacity .15s ease;
}

.pdp-main:hover .pdp-zoom {
    opacity: 1;
}

.pdp-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--pdp-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.pdp-badge[hidden] {
    display: none;
}

.pdp-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    grid-column: 1;
    grid-row: 1;
}

.pdp .pdp-thumb {
    display: block;
    width: 84px;
    height: 84px;
    padding: 4px;
    border: 1.5px solid transparent;
    border-radius: 10px;
    background: var(--pdp-soft);
    cursor: pointer;
    transition: border-color .15s ease;
}

.pdp .pdp-thumb:hover {
    border-color: #cfcfcf;
}

.pdp .pdp-thumb.is-active {
    border-color: var(--pdp-text);
}

.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    mix-blend-mode: multiply;
}

/* Gdy jest tylko jedno zdjęcie – na całą szerokość */
.pdp-gallery:not(:has(.pdp-thumbs)) {
    grid-template-columns: minmax(0, 1fr);
}

.pdp-gallery:not(:has(.pdp-thumbs)) .pdp-main {
    grid-column: 1;
}

/* ---------- Informacje ---------- */
.pdp .pdp-title {
    margin: 0 0 12px;
    color: var(--pdp-text);
    font-family: 'Gilroy', sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
}

.pdp-variant {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    border-radius: 999px;
    background: var(--pdp-soft);
}

.pdp .pdp-variant a {
    padding: 7px 18px;
    border-radius: 999px;
    color: var(--pdp-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.pdp .pdp-variant a:hover {
    color: var(--pdp-text);
}

.pdp .pdp-variant a.is-active {
    background: var(--pdp-text);
    color: #fff;
}

.pdp-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--pdp-line);
}

.pdp .pdp-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-height: 34px;
    margin: 0;
}

.pdp-price-now {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.pdp-price-now.pg-skeleton {
    width: 120px;
    height: 28px;
}

.pdp-price-now.is-promo {
    color: var(--pdp-accent);
}

.pdp-price-old {
    color: #8a8a8a;
    font-size: 17px;
    font-weight: 500;
}

.pdp-price-old[hidden] {
    display: none;
}

.pdp-code {
    color: #8a8a8a;
    font-size: 13px;
    font-weight: 500;
}

.pdp-short {
    margin: 16px 0 0;
    color: #4a4a4a;
    font-size: 15px;
    line-height: 1.55;
}

.pdp-short p {
    margin: 0;
    font: inherit;
    color: inherit;
}

/* Dostępne rozmiary */
.pdp-choice {
    margin-top: 22px;
}

.pdp-choice-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pdp-choice-label {
    font-size: 14px;
    font-weight: 700;
}

.pdp .pdp-size-link {
    color: var(--pdp-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pdp .pdp-size-link:hover {
    color: var(--pdp-accent);
}

.pdp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pdp-chips li {
    min-width: 48px;
    padding: 9px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.pdp-hint {
    margin: 10px 0 0;
    color: var(--pdp-muted);
    font-size: 13px;
}

/* Uwaga o personalizacji */
.pdp-notice {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fdf1f1;
    color: #5a1a1a;
    font-size: 14px;
    line-height: 1.45;
}

.pdp-notice .fa {
    margin-top: 2px;
    color: var(--pdp-accent);
    font-size: 16px;
}

/* Ilość i "Do koszyka" */
.pdp-buy {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.pdp-qty {
    display: flex;
    align-items: center;
    flex: none;
    height: 48px;
    border: 1px solid #dcdcdc;
    border-radius: 999px;
}

.pdp .pdp-qty-btn {
    width: 42px;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--pdp-text);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.pdp .pdp-qty-btn:hover {
    color: var(--pdp-accent);
}

.pdp .pdp-qty input {
    width: 36px;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--pdp-text);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    -moz-appearance: textfield;
}

.pdp .pdp-qty input::-webkit-outer-spin-button,
.pdp .pdp-qty input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.pdp .pdp-add {
    flex: 1;
    justify-content: center;
    min-height: 48px;
    font-size: 16px;
}

.pdp .b-btn.is-loading {
    opacity: .7;
    cursor: progress;
}

/* Korzyści pod przyciskiem */
.pdp-perks {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--pdp-line);
    list-style: none;
    font-size: 14px;
    font-weight: 500;
}

.pdp-perks li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdp-perks .fa {
    width: 18px;
    color: var(--pdp-muted);
    text-align: center;
}

.pdp .pdp-perks a {
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.pdp .pdp-perks a:hover {
    color: var(--pdp-accent);
}

/* ---------- Sekcje zwijane ---------- */
.pdp-sections {
    margin-top: 48px;
    border-top: 1px solid var(--pdp-line);
}

.pdp-section {
    border-bottom: 1px solid var(--pdp-line);
}

.pdp-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 4px;
    font-size: 17px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.pdp-section summary::-webkit-details-marker {
    display: none;
}

.pdp-section summary .fa {
    color: var(--pdp-muted);
    font-size: 20px;
    transition: transform .2s ease;
}

.pdp-section[open] summary .fa {
    transform: rotate(180deg);
}

.pdp-section summary:focus-visible {
    outline: 2px solid var(--pdp-accent);
    outline-offset: 2px;
}

.pdp-section-body {
    padding: 0 4px 24px;
    overflow-x: auto;
}

/* Opis z bazy ma własne style (rozstrzelone litery, różne kroje) – ujednolicenie */
.pdp-desc,
.pdp-desc p,
.pdp-desc li,
.pdp-desc span,
.pdp-desc div {
    font-family: 'Gilroy', sans-serif !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    letter-spacing: normal !important;
    color: #333;
}

.pdp-desc ul {
    padding-left: 20px;
}

.pdp-desc img {
    max-width: 100%;
    height: auto;
}

.pdp-basic {
    width: 100%;
    height: 500px;
    border: 0;
}

.pdp-specs {
    display: grid;
    gap: 8px;
    margin: 20px 0 0;
    font-size: 14px;
}

.pdp-specs div {
    display: flex;
    gap: 8px;
}

.pdp-specs dt {
    color: var(--pdp-muted);
    font-weight: 500;
}

.pdp-specs dt::after {
    content: ":";
}

.pdp-specs dd {
    margin: 0;
    font-weight: 600;
}

.pdp-links {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.pdp .pdp-links a {
    font-size: 15px; /* globalny styl linków motywu ma 12px */
    font-weight: 500;
    line-height: 1.6;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pdp .pdp-links a:hover {
    color: var(--pdp-accent);
}

#pdp-size-section {
    scroll-margin-top: 70px;
}

/* ---------- Przypięty pasek (telefon) ---------- */
.pdp-sticky {
    display: none;
}

/* ---------- Tablet i telefon ---------- */
@media (max-width: 991px) {
    .pdp-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
}

@media (max-width: 767px) {
    .pdp {
        padding-top: 12px;
    }

    .pdp-gallery {
        grid-template-columns: minmax(0, 1fr);
    }

    .pdp-main {
        grid-column: 1;
    }

    .pdp-thumbs {
        flex-direction: row;
        grid-column: 1;
        grid-row: 2;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .pdp .pdp-thumb {
        flex: none;
        width: 64px;
        height: 64px;
    }

    .pdp .pdp-title {
        font-size: 24px;
    }

    .pdp-price-now {
        font-size: 24px;
    }

    .pdp-sections {
        margin-top: 32px;
    }

    .pdp-sticky:not([hidden]) {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 900;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 15px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--pdp-line);
        background: #fff;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
    }

    .pdp-sticky-text {
        display: flex;
        flex: 1;
        flex-direction: column;
        min-width: 0;
    }

    .pdp-sticky-name {
        overflow: hidden;
        font-size: 13px;
        font-weight: 500;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pdp-sticky-price {
        font-size: 16px;
        font-weight: 700;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pdp * {
        transition: none !important;
    }
}

/* Poprawki: ścieżka (globalne style span) i pierwsza linia z opisu z bazy */
.pdp .pdp-crumbs span {
    color: var(--pdp-muted);
    font-size: 13px;
    font-weight: 500;
}

.pdp-desc > hr:first-child,
.pdp-desc > :first-child > hr:first-child {
    display: none;
}

/* Miejsce na przypięty pasek, żeby nie zasłaniał końca strony */
@media (max-width: 767px) {
    .pdp {
        padding-bottom: 96px;
    }
}

/* Tabela rozmiarów z serwera używa wierszy Bootstrapa (ujemne marginesy) – bez poziomego paska */
.pdp-section-body .row {
    margin-right: 0;
    margin-left: 0;
}
