/* ============================================================
   PRODUCT DETAIL PAGE
   Desktop: gallery (left) | buy box (right)
   Mobile:  stacked
   ============================================================ */

/* ============================================================
   BREADCRUMB
   ============================================================ */
.product-crumb {
    padding: var(--pp-sp-5) 0;
    border-bottom: 1px solid var(--pp-line-2);
    margin-bottom: var(--pp-sp-8);
}
.product-crumb__nav {
    font-size: var(--pp-fs-xs);
    color: var(--pp-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.product-crumb__nav a { color: var(--pp-muted); }
.product-crumb__nav a:hover { color: var(--pp-blue); }
.product-crumb__nav span { color: var(--pp-line); }
.product-crumb__current {
    color: var(--pp-ink-2) !important;
    font-weight: 600;
}

/* ============================================================
   TWO-COLUMN LAYOUT
   Desktop: 480px gallery + flexible buy box
   ============================================================ */
.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 480px) 1fr;
    gap: var(--pp-sp-12);
    align-items: start;
    padding-bottom: var(--pp-sp-12);
}
@media (max-width: 1023px) {
    .product-layout { grid-template-columns: 1fr; gap: var(--pp-sp-8); }
}

/* ============================================================
   GALLERY
   ============================================================ */
.product-gallery {
    position: sticky;
    top: calc(var(--pp-header-h) + var(--pp-sp-4));
}
@media (max-width: 1023px) {
    .product-gallery { position: static; }
}

.product-gallery__main {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #fff;
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-radius);
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: var(--pp-sp-8);
}
.product-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-gallery__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
}

/* ============================================================
   GALLERY THUMBNAIL RAIL
   ------------------------------------------------------------
   Row of small square buttons below the hero image. Clicking a
   thumbnail swaps the main image (handled by inline JS in
   product.php). Active thumbnail gets a blue border + subtle
   ring so the selected image is always obvious.
   ============================================================ */
.product-gallery__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pp-sp-3);
    margin-top: var(--pp-sp-4);
}
@media (max-width: 1023px) {
    .product-gallery__thumbs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .product-gallery__thumbs::-webkit-scrollbar { display: none; }
}

.product-gallery__thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    padding: 6px;
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-radius);
    background: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
    position: relative;
}
.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-gallery__thumb:hover {
    border-color: var(--pp-ink-2);
}
.product-gallery__thumb.is-active {
    border-color: var(--pp-blue);
    box-shadow: 0 0 0 2px var(--pp-blue-tint);
}

@media (max-width: 767px) {
    .product-gallery__thumb { width: 64px; height: 64px; padding: 4px; }
}
.product-gallery__thumb:hover,
.product-gallery__thumb.is-active {
    border-color: var(--pp-blue);
}

/* ============================================================
   BUY BOX
   ============================================================ */
.product-info {
    display: flex;
    flex-direction: column;
    gap: var(--pp-sp-5);
}

.product-info__brand {
    font-size: 11px;
    font-weight: 700;
    color: var(--pp-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.product-info__title {
    font-size: var(--pp-fs-3xl);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--pp-ink);
    line-height: 1.15;
}
@media (max-width: 767px) {
    .product-info__title { font-size: var(--pp-fs-2xl); }
}

.product-info__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pp-sp-5);
    font-size: var(--pp-fs-sm);
    color: var(--pp-muted);
    padding-bottom: var(--pp-sp-4);
    border-bottom: 1px solid var(--pp-line-2);
}
.product-info__meta strong { color: var(--pp-ink-2); font-weight: 600; }

.product-info__avail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
.product-info__avail-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.product-info__avail.is-in .product-info__avail-dot    { background: var(--pp-new); }
.product-info__avail.is-in                             { color: var(--pp-new); }
.product-info__avail.is-low .product-info__avail-dot   { background: var(--pp-refurb); }
.product-info__avail.is-low                            { color: var(--pp-refurb); }
.product-info__avail.is-order .product-info__avail-dot { background: var(--pp-certified); }
.product-info__avail.is-order                          { color: var(--pp-certified); }
.product-info__avail.is-check .product-info__avail-dot { background: var(--pp-muted); }
.product-info__avail.is-check                          { color: var(--pp-muted); }

.product-info__lede {
    font-size: var(--pp-fs-md);
    line-height: 1.55;
    color: var(--pp-ink-2);
}

/* --- Price block --- */
.product-info__price-block {
    padding: var(--pp-sp-5) 0;
    border-top: 1px solid var(--pp-line-2);
    border-bottom: 1px solid var(--pp-line-2);
}
.product-info__price {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--pp-ink);
    letter-spacing: -0.03em;
    line-height: 1.1;
}
@media (max-width: 767px) {
    .product-info__price { font-size: 1.875rem; }
}
.product-info__price-note {
    font-size: var(--pp-fs-xs);
    color: var(--pp-muted);
    margin-top: 4px;
}

/* --- CTA stack --- */
.product-info__actions {
    display: flex;
    flex-direction: column;
    gap: var(--pp-sp-3);
    padding-bottom: var(--pp-sp-5);
    border-bottom: 1px solid var(--pp-line-2);
}

/* --- Perks list --- */
.product-info__perks {
    display: flex;
    flex-direction: column;
    gap: var(--pp-sp-3);
}
.product-info__perks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: var(--pp-fs-sm);
    color: var(--pp-ink-2);
    line-height: 1.5;
}
.product-info__perks svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--pp-blue);
}

/* ============================================================
   WHATSAPP BUTTON — a page-specific variant of .pp-btn
   ============================================================ */
.pp-btn--whatsapp {
    background: #fff;
    color: #128C7E;
    border: 1px solid #128C7E;
}
.pp-btn--whatsapp:hover {
    background: #128C7E;
    color: #fff;
    border-color: #128C7E;
}

/* ============================================================
   SPECIFICATIONS TABLE
   ============================================================ */
.product-specs {
    background: #fff;
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-radius);
    overflow: hidden;
}
.product-specs__list {
    margin: 0;
}
.product-specs__row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--pp-sp-6);
    padding: var(--pp-sp-4) var(--pp-sp-6);
    border-bottom: 1px solid var(--pp-line-2);
    align-items: baseline;
}
.product-specs__row:last-child { border-bottom: none; }
.product-specs__row:nth-child(even) { background: var(--pp-bg-alt); }

.product-specs__row dt {
    font-size: var(--pp-fs-sm);
    font-weight: 600;
    color: var(--pp-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}
.product-specs__row dd {
    font-size: var(--pp-fs-md);
    color: var(--pp-ink-2);
    margin: 0;
}

@media (max-width: 767px) {
    .product-specs__row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: var(--pp-sp-3) var(--pp-sp-4);
    }
    .product-specs__row dt { font-size: 11px; }
    .product-specs__row dd { font-size: var(--pp-fs-base); }
}