/* ==============================
   SINGLE PRODUCT PAGE — FULL CSS
   ============================== */

/* Fallback theme variables */
:root {
    --theme-accent: #752D42;
    /* maroon */
    --theme-btn: #20385c;
    /* deep blue (not used here, but handy) */
    --theme-text: #111;
    --muted: #6b7280;
    --star: #f2b01e;
    --card: #fff;
    --line: #eee;
}

/* Page shell */
.product-page {
    padding: clamp(18px, 3.5vw, 42px) 0;
    color: var(--theme-text);
}

/* Two-column layout (image | info) */
.pp-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: clamp(16px, 3vw, 36px);
}

@media (max-width: 992px) {
    .pp-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------
   GALLERY
   Desktop: thumbs left, main right
   Mobile:  main first, thumbs below
   --------------------------------- */
.pp-gallery-inner {
    display: grid;
    grid-template-columns: 84px 1fr;
    grid-template-areas: "thumbs main";
    gap: 12px;
    align-items: start;
}

.pp-thumbs {
    grid-area: thumbs;
}

.pp-main {
    grid-area: main;
}

@media (max-width: 768px) {
    .pp-gallery-inner {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "thumbs";
        /* thumbs under main image */
        gap: 10px;
    }

    /* Horizontal thumbnail rail for mobile */
    .pp-thumbs {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 70px;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 6px;
        scroll-snap-type: x mandatory;
        /* smooth scroll */
    }

    .pp-thumb {
        scroll-snap-align: start;
    }
}

/* Thumbnails */
.pp-thumbs {
    display: grid;
    gap: 10px;
}

.pp-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #f7f7f7;
    padding: 0;
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease;
}

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

.pp-thumb:is(:hover, :focus-visible) {
    transform: translateY(-1px);
}

.pp-thumb.is-active {
    border-color: var(--theme-accent);
}

/* Main image area */
.pp-main {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #f6f6f6;
    border: 1px solid var(--line);
    aspect-ratio: 5 / 4;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .10);
}

.pp-main img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* change to 'contain' if you prefer full image */
    display: block;
    transition: opacity .2s ease;
}

/* ---------------------------------
   INFO SIDE
   --------------------------------- */
.pp-title {
    margin: 0 0 .25rem;
    font-weight: 800;
    font-size: clamp(22px, 2.2vw, 34px);
}

.pp-rating {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .5rem;
}

.stars {
    color: var(--star);
    font-size: 16px;
}

.pp-rev {
    color: var(--muted);
    font-size: .95rem;
}

.pp-artist {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin: .25rem 0 1rem;
}

.pp-artist img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #fff;
}

.pp-artist .text-muted {
    color: var(--muted);
}

.pp-price {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 900;
    margin-bottom: .75rem;
}

/* Buy via WhatsApp */
.pp-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}

.btn-wa {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 0;
    background: #25D366;
    color: #fff;
    font-weight: 800;
    letter-spacing: .3px;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.btn-wa:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .18);
    filter: brightness(1.03);
}

/* Share row */
.pp-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: .5rem;
    color: var(--muted);
}

.pp-share a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--theme-text);
    border: 1px solid var(--line);
    border-radius: 50%;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.pp-share a:hover {
    transform: translateY(-1px);
    border-color: var(--theme-accent);
}

/* Product details / accordions */
.pp-hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: 1rem 0;
}

.pp-accordions details {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    padding: .9rem 1rem;
    margin-top: .6rem;
}

.pp-accordions summary {
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    outline: none;
}

.pp-accordions summary::-webkit-details-marker {
    display: none;
}

.pp-accordions details[open] {
    border-color: var(--theme-accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.pp-desc {
    color: #333;
    line-height: 1.7;
}

.pp-list {
    margin: .5rem 0 0 1.1rem;
}

/* Optional helpers */
.text-muted {
    color: var(--muted);
}

.me-1 {
    margin-right: .25rem;
}

.d-block {
    display: block;
}