﻿/* =============== PRODUCT DETAILS LAYOUT =============== */

.product-details {
    margin: 140px auto 60px;
    max-width: 1400px;
    padding: 0 20px;
}

/* GRID WRAPPER */
.pd-wrap {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 60px;
    align-items: start;
}

/* =============== GALLERY =============== */

.pd-gallery {
    width: 100%;
}

.pd-main img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 10px;
}

/* thumbnails (DESKTOP GRID DEFAULT) */
.pd-thumbs {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.pd-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

    .pd-thumb:hover {
        opacity: 0.75;
    }

/* =============== INFO COLUMN =============== */

.pd-info {
    padding-top: 10px;
}

.pd-breadcrumb {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 8px;
}

.pd-info h1 {
    font-size: 42px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.pd-sub {
    color: #bbb;
    font-size: 14px;
    margin-bottom: 18px;
}

.pd-desc {
    line-height: 1.7;
    color: #ccc;
    font-size: 15px;
}

.pd-block {
    margin: 26px 0;
}

    .pd-block h4 {
        font-size: 14px;
        letter-spacing: 0.08em;
        margin-bottom: 8px;
        text-transform: uppercase;
    }

.pd-line {
    font-size: 14px;
    color: #ddd;
}

/* CTA */
.pd-cta {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 28px;
    border-radius: 30px;
    background: #000;
    border: 1px solid #fff;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

    .pd-cta:hover {
        opacity: 0.85;
    }

/* =============== FULL SLAB =============== */

.pd-slab {
    margin-top: 60px;
}

    .pd-slab h3 {
        margin-bottom: 14px;
        font-size: 20px;
    }

    .pd-slab img {
        width: 100%;
        max-height: 600px;
        object-fit: cover;
        border-radius: 12px;
    }

/* =============== SIMILAR PRODUCTS =============== */

.similar-products {
    margin-top: 70px;
}

.similar-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

    .similar-slider::-webkit-scrollbar {
        display: none;
    }

.similar-slider {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.product-card {
    min-width: 260px;
    scroll-snap-align: start;
    text-decoration: none;
    color: #fff;
}

    .product-card img {
        width: 100%;
        border-radius: 8px;
    }

    .product-card h4 {
        margin-top: 8px;
        font-size: 15px;
    }

/* =============== RESPONSIVE BREAKPOINTS =============== */

/* Tablets */
@media (max-width: 1024px) {
    .pd-wrap {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .pd-info h1 {
        font-size: 34px;
    }
}

/* Mobile (THUMB SWIPE SLIDER HERE) */
@media (max-width: 768px) {
    .product-details {
        margin-top: 110px;
    }

    .pd-main img {
        max-height: 360px;
    }

    /* ✅ Convert thumbnails grid to horizontal swipe slider */
    .pd-thumbs {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 8px 2px;
        margin-top: 12px;
        /* prevents page vertical scrolling issues while swiping */
        touch-action: pan-x;
    }

        /* Hide scrollbar */
        .pd-thumbs::-webkit-scrollbar {
            display: none;
        }

    .pd-thumbs {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    /* ✅ Each thumb becomes slide item */
    .pd-thumb {
        flex: 0 0 auto;
        width: 86px;
        height: 86px;
        scroll-snap-align: start;
        border-radius: 10px;
    }

    .pd-info h1 {
        font-size: 28px;
    }

    .pd-desc {
        font-size: 14px;
    }

    .pd-slab img {
        max-height: 420px;
    }
}

/* Small phones */
@media (max-width: 480px) {

    /* tighter thumbnails on smaller screens */
    .pd-thumb {
        width: 74px;
        height: 74px;
    }

    .product-card {
        min-width: 200px;
    }

    .pd-info h1 {
        font-size: 24px;
    }
}
