/* Product details page. Shared tokens, cards, rails and the hang-tag live in storefront.css. */

/* ---------- Hero: gallery + buy box ---------- */

.pd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    padding: 24px;
}

/* Keep the photo in view while the (taller) buy box scrolls; clears the fixed site header */
.pd-gallery {
    position: sticky;
    top: 88px;
    align-self: start;
    min-width: 0;
}

.pd-stage {
    display: flex;
    aspect-ratio: 1 / 1;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    background: var(--pd-sunk);
    border-radius: 12px;
}

.pd-stage::-webkit-scrollbar {
    display: none;
}

.pd-stage:focus-visible {
    outline: none;
    box-shadow: var(--pd-ring);
}

.pd-slide {
    flex: 0 0 100%;
    margin: 0;
    scroll-snap-align: start;
}

.pd-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding: 3px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.pd-thumb {
    flex: 0 0 68px;
    height: 68px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--pd-sunk);
    overflow: hidden;
    cursor: pointer;
    opacity: .65;
    transition: opacity .15s, border-color .15s;
}

.pd-thumb:hover,
.pd-thumb.is-active {
    opacity: 1;
}

.pd-thumb.is-active {
    border-color: var(--pd-green-deep);
}

.pd-thumb:focus-visible {
    outline: none;
    box-shadow: var(--pd-ring);
}

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

.pd-info {
    min-width: 0;
    padding-top: 4px;
}

.pd-title {
    margin: 0;
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem);
    font-weight: 600;
    line-height: 1.3;
}

.pd-sku {
    margin: 6px 0 0;
    font-size: .9rem;
    color: var(--pd-muted);
}

/* Price block — the one loud element on the page */

.pd-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-top: 18px;
    padding-block: 16px;
    border-block: 1px solid var(--pd-line);
}

.pd-price__now {
    font-size: clamp(2.1rem, 1.7rem + 1.6vw, 2.9rem);
    font-weight: 700;
    font-stretch: 87.5%;
    line-height: 1;
    color: var(--pd-green-deep);
}

.pd-price__was {
    font-size: 1.15rem;
    color: var(--pd-muted);
    text-decoration-thickness: 1.5px;
}

.pd-price__save {
    flex-basis: 100%;
    font-size: .95rem;
    color: var(--pd-muted);
}

.pd-price__save strong {
    font-weight: 600;
    color: var(--pd-ink);
}

/* Options: color, size, quantity */

.pd-opt {
    margin: 18px 0 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.pd-opt__head,
.pd-opt legend {
    display: block;
    float: none;
    width: auto;
    margin: 0 0 8px;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.pd-opt__value {
    margin-left: 6px;
    font-weight: 400;
    color: var(--pd-muted);
}

.pd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pd-chip {
    position: relative;
    margin: 0;
}

.pd-chip input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.pd-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 42px;
    padding: 0 16px;
    border: 1.5px solid #cfd9d3;
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
    font-weight: 500;
    transition: border-color .15s, background-color .15s;
}

.pd-chip:hover span {
    border-color: var(--pd-green);
}

.pd-chip input:checked + span {
    border-color: var(--pd-green-deep);
    background: var(--pd-mint);
    color: var(--pd-green-dark);
    box-shadow: inset 0 0 0 1px var(--pd-green-deep);
}

.pd-chip input:focus-visible + span {
    box-shadow: var(--pd-ring);
}

.pd-qty {
    display: inline-flex;
    height: 44px;
    border: 1.5px solid #cfd9d3;
    border-radius: 10px;
    overflow: hidden;
}

.pd-qty button {
    width: 44px;
    border: 0;
    background: var(--pd-sunk);
    color: var(--pd-ink);
    font-size: .9rem;
}

.pd-qty button:hover {
    background: var(--pd-mint);
}

.pd-qty input {
    width: 54px;
    border: 0;
    border-inline: 1.5px solid #cfd9d3;
    text-align: center;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pd-ink);
    -moz-appearance: textfield;
    appearance: textfield;
}

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

.pd-qty button:focus-visible,
.pd-qty input:focus-visible {
    outline: none;
    background: var(--pd-mint);
}

/* Buy buttons */

.pd-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 22px;
}

.pd-actions form {
    margin: 0;
}

.pd-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    padding: 0 12px;
    border: 1.5px solid var(--pd-green-deep);
    border-radius: 10px;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}

.pd-btn:focus-visible {
    outline: none;
    box-shadow: var(--pd-ring);
}

.pd-btn--ghost {
    background: #fff;
    color: var(--pd-green-deep);
}

.pd-btn--ghost:hover {
    background: var(--pd-mint);
}

.pd-btn--solid {
    background: var(--pd-green-deep);
    color: #fff;
}

.pd-btn--solid:hover {
    background: var(--pd-green-dark);
    border-color: var(--pd-green-dark);
}

/* Delivery + call */

.pd-ship {
    margin-top: 18px;
    padding: 4px 16px;
    background: var(--pd-mint);
    border-radius: 12px;
}

.pd-ship__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
}

.pd-ship__row + .pd-ship__row {
    border-top: 1px dashed #c9e0d3;
}

.pd-ship__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: var(--pd-green-deep);
    font-size: .9rem;
}

.pd-ship__text {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}

.pd-ship__text small {
    display: block;
    font-size: .82rem;
    color: var(--pd-muted);
}

.pd-ship__amount {
    font-weight: 600;
    white-space: nowrap;
}

.pd-call {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 12px 16px;
    border: 1.5px solid var(--pd-line);
    border-radius: 12px;
    color: var(--pd-ink);
    text-decoration: none;
    transition: border-color .15s;
}

.pd-call:hover {
    border-color: var(--pd-green);
    color: var(--pd-ink);
}

.pd-call:focus-visible {
    outline: none;
    box-shadow: var(--pd-ring);
}

.pd-call__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pd-green);
    color: #fff;
}

.pd-call__text {
    line-height: 1.3;
}

.pd-call__text small {
    display: block;
    font-size: .85rem;
    color: var(--pd-muted);
}

.pd-call__text strong {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: .02em;
}

/* ---------- Description ---------- */

.pd-section {
    padding: 24px;
}

.pd-desc {
    max-width: 75ch;
    font-size: 1.02rem;
    line-height: 1.8;
    color: #2b3a33;
}

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

.pd-desc p:last-child {
    margin-bottom: 0;
}

.pd-video {
    max-width: 720px;
    margin-top: 20px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.pd-video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

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

@media (max-width: 991.98px) {
    .pd-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding: 12px 12px 20px;
    }

    .pd-gallery {
        position: static;
    }

    .pd-info {
        padding: 0 4px;
    }

    .pd-section {
        padding: 16px 12px 20px;
    }
}

@media (max-width: 400px) {
    .pd-btn {
        gap: 6px;
        font-size: 1rem;
    }

    .pd-btn .svg-inline--fa,
    .pd-btn i {
        display: none;
    }
}
