/* ==========================================================================
   Para-Cord — karta produktu
   Galeria, panel zakupu, warianty, zakładki opisu, kafle cech.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Układ górnej sekcji
   -------------------------------------------------------------------------- */

.pc-pdp {
    display: grid;
    gap: 24px;
    margin-top: var(--pc-block-gap);
}

/* --------------------------------------------------------------------------
   2. Galeria
   -------------------------------------------------------------------------- */

.pc-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.pc-gallery__stage {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--pc-line);
    border-radius: var(--pc-r-md);
    background: var(--pc-surface-soft);
    overflow: hidden;
}

.pc-gallery__stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-gallery__wish {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--pc-r-pill);
    background: #fff;
    color: var(--pc-navy-700);
    box-shadow: var(--pc-shadow-sm);
    transition: color var(--pc-dur) var(--pc-ease), transform var(--pc-dur) var(--pc-ease);
}

.pc-gallery__wish:hover {
    color: var(--pc-pink);
    transform: scale(1.06);
}

.pc-gallery__wish[aria-pressed='true'] {
    color: var(--pc-pink);
}

.pc-gallery__wish[aria-pressed='true'] svg {
    fill: currentColor;
}

.pc-gallery__nav {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    display: flex;
    gap: 8px;
}

.pc-gallery__zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
}

/* Miniatury — pod sceną na wąskich ekranach, obok niej na szerokich */
.pc-gallery__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.pc-gallery__thumb {
    flex: none;
    width: 68px;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 2px solid var(--pc-line);
    border-radius: var(--pc-r-sm);
    overflow: hidden;
    background: var(--pc-surface-soft);
    transition: border-color var(--pc-dur) var(--pc-ease);
}

.pc-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-gallery__thumb[aria-current='true'] {
    border-color: var(--pc-pink);
}

.pc-gallery__thumb:hover {
    border-color: var(--pc-pink-300);
}

/* --------------------------------------------------------------------------
   3. Panel zakupu
   -------------------------------------------------------------------------- */

.pc-buy {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pc-buy__badge {
    align-self: flex-start;
    padding: 5px 14px;
    border-radius: var(--pc-r-pill);
    background: var(--pc-pink);
    color: #fff;
    font-family: var(--pc-font-display);
    font-size: 11.5px;
    font-weight: 600;
}

.pc-buy__title {
    font-size: clamp(25px, 5.6vw, 36px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--pc-ink);
}

.pc-buy__title em {
    display: block;
    font-style: normal;
    color: var(--pc-pink);
}

.pc-buy__rating {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: var(--pc-muted);
}

.pc-buy__rating strong {
    font-family: var(--pc-font-display);
    font-weight: 600;
    color: var(--pc-ink);
}

.pc-buy__lead {
    max-width: 62ch;
    font-size: 14px;
    line-height: 1.6;
    color: var(--pc-body);
}

/* --- Cena + dostępność --------------------------------------------------- */

.pc-buy__pricerow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pc-buy__price {
    font-family: var(--pc-font-display);
    font-size: clamp(28px, 6vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--pc-ink);
}

.pc-buy__price del {
    margin-left: 10px;
    font-size: 17px;
    font-weight: 500;
    color: var(--pc-muted);
}

.pc-buy__stock {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--pc-muted);
}

.pc-buy__stock strong {
    display: block;
    font-family: var(--pc-font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--pc-ink);
}

.pc-buy__stock i {
    width: 9px;
    height: 9px;
    border-radius: var(--pc-r-pill);
    background: var(--pc-green);
}

/* --- Warianty ------------------------------------------------------------ */

.pc-variant__label {
    margin-bottom: 9px;
    font-family: var(--pc-font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--pc-ink);
}

.pc-variant__label span {
    font-weight: 400;
    color: var(--pc-muted);
}

.pc-variant__colors {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.pc-variant__color {
    width: 58px;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 2px solid var(--pc-line);
    border-radius: var(--pc-r-sm);
    overflow: hidden;
    background: var(--pc-surface-soft);
    transition: border-color var(--pc-dur) var(--pc-ease),
                transform var(--pc-dur) var(--pc-ease);
}

.pc-variant__color img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-variant__color:hover {
    transform: translateY(-2px);
    border-color: var(--pc-pink-300);
}

.pc-variant__color[aria-pressed='true'] {
    border-color: var(--pc-pink);
}

/* --- Rozmiar ------------------------------------------------------------- */

.pc-variant__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.pc-variant__guide {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--pc-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pc-variant__guide:hover {
    color: var(--pc-pink);
}

.pc-variant__sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.pc-size {
    min-width: 96px;
    padding: 11px 16px;
    border: 1px solid var(--pc-line-strong);
    border-radius: var(--pc-r-sm);
    background: #fff;
    font-family: var(--pc-font-display);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--pc-ink);
    transition: border-color var(--pc-dur) var(--pc-ease),
                color var(--pc-dur) var(--pc-ease);
}

.pc-size:hover {
    border-color: var(--pc-pink-300);
}

.pc-size[aria-pressed='true'] {
    border-color: var(--pc-pink);
    color: var(--pc-pink);
    font-weight: 600;
}

/* --- Dodanie do koszyka -------------------------------------------------- */

.pc-buy__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pc-qty {
    display: inline-flex;
    align-items: center;
    flex: none;
    border: 1px solid var(--pc-line-strong);
    border-radius: var(--pc-r-sm);
    background: #fff;
    overflow: hidden;
}

.pc-qty button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 46px;
    color: var(--pc-ink);
    transition: background-color var(--pc-dur) var(--pc-ease);
}

.pc-qty button:hover {
    background: var(--pc-surface-alt);
}

.pc-qty input {
    width: 46px;
    height: 46px;
    border: 0;
    border-inline: 1px solid var(--pc-line);
    text-align: center;
    font-family: var(--pc-font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--pc-ink);
    -moz-appearance: textfield;
}

.pc-qty input::-webkit-outer-spin-button,
.pc-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pc-buy__cart {
    flex: 1 1 200px;
    height: 46px;
}

.pc-buy__wish {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--pc-line-strong);
    border-radius: var(--pc-r-sm);
    background: #fff;
    color: var(--pc-navy-700);
    transition: color var(--pc-dur) var(--pc-ease),
                border-color var(--pc-dur) var(--pc-ease);
}

.pc-buy__wish:hover,
.pc-buy__wish[aria-pressed='true'] {
    color: var(--pc-pink);
    border-color: var(--pc-pink);
}

.pc-buy__wish[aria-pressed='true'] svg {
    fill: currentColor;
}

/* --------------------------------------------------------------------------
   4. Zakładki opisu
   -------------------------------------------------------------------------- */

.pc-tabs {
    margin-top: 6px;
    border-bottom: 1px solid var(--pc-line);
}

.pc-tabs__list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.pc-tabs__list::-webkit-scrollbar {
    display: none;
}

.pc-tab {
    position: relative;
    flex: none;
    padding: 13px 16px;
    font-family: var(--pc-font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--pc-muted);
    white-space: nowrap;
    transition: color var(--pc-dur) var(--pc-ease);
}

.pc-tab:hover {
    color: var(--pc-ink);
}

.pc-tab[aria-selected='true'] {
    color: var(--pc-ink);
    font-weight: 600;
}

.pc-tab[aria-selected='true']::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 3px;
    border-radius: var(--pc-r-pill);
    background: var(--pc-pink);
}

.pc-tabpanel {
    padding-top: 26px;
}

.pc-tabpanel[hidden] {
    display: none;
}

/* --- Treść zakładki „Opis produktu” -------------------------------------- */

.pc-desc {
    display: grid;
    gap: 24px;
}

.pc-desc__title {
    margin-bottom: 14px;
    font-size: clamp(21px, 4.6vw, 28px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--pc-ink);
}

.pc-desc__title em {
    font-style: normal;
    color: var(--pc-pink);
}

.pc-desc__text p + p {
    margin-top: 14px;
}

.pc-desc__text {
    max-width: 58ch;
    font-size: 14px;
    line-height: 1.68;
    color: var(--pc-body);
}

.pc-desc__uses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
    align-content: start;
}

.pc-use {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.pc-use svg {
    width: 34px;
    height: 34px;
    color: var(--pc-navy-700);
}

.pc-use span {
    font-size: 12px;
    line-height: 1.35;
    color: var(--pc-muted);
}

/* --- Kafle cech ---------------------------------------------------------- */

.pc-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.pc-feature__media {
    aspect-ratio: 3 / 2;
    border-radius: var(--pc-r-md);
    overflow: hidden;
    background: var(--pc-surface-alt);
}

.pc-feature__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-feature h4 {
    margin-top: 11px;
    font-family: var(--pc-font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--pc-ink);
}

.pc-feature p {
    margin-top: 3px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--pc-muted);
}

/* --- Tabela specyfikacji ------------------------------------------------- */

.pc-spec {
    width: 100%;
    max-width: 720px;
    border-collapse: collapse;
    font-size: 13.5px;
}

.pc-spec th,
.pc-spec td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--pc-line);
}

.pc-spec th {
    width: 42%;
    font-family: var(--pc-font-display);
    font-weight: 600;
    color: var(--pc-ink);
}

.pc-spec td {
    color: var(--pc-muted);
}

.pc-spec tr:nth-child(odd) {
    background: var(--pc-surface-soft);
}

/* --- Lista wypunktowana (Cechy / Zastosowanie) --------------------------- */

.pc-bullets {
    display: grid;
    gap: 12px;
    max-width: 62ch;
}

/* Bez flexa — punkty zawierają <strong>, który jako element flex
   zostałby oderwany od reszty zdania. */
.pc-bullets li {
    position: relative;
    display: block;
    padding-left: 29px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--pc-body);
}

.pc-bullets svg {
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    color: var(--pc-pink);
}

/* --------------------------------------------------------------------------
   5. Punkty łamania
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
    .pc-features {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .pc-desc__uses {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .pc-pdp {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 28px;
        align-items: start;
    }

    /* Miniatury przechodzą na lewą stronę sceny */
    .pc-gallery {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 10px;
    }

    /* Produkt z jednym zdjęciem nie ma miniatur — bez tego zdjęcie wpadłoby
       do kolumny 78 px zarezerwowanej na pasek miniatur. */
    .pc-gallery--single {
        grid-template-columns: minmax(0, 1fr);
    }

    .pc-gallery__thumbs {
        flex-direction: column;
        overflow-x: visible;
        overflow-y: auto;
        max-height: 100%;
    }

    .pc-gallery__thumb {
        width: 100%;
    }
}

@media (min-width: 1024px) {
    .pc-pdp {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        gap: 40px;
    }

    .pc-desc {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
        gap: 40px;
    }

    .pc-desc__uses {
        gap: 22px 14px;
    }

    .pc-features {
        gap: 18px;
    }
}
