/* Product detail page (pages/product_detail.blade.php). Section padding and headings
   come from sections.css; this file holds only page-specific pieces. */

.pd-page {
    --pd-spec-y: 16px;
}

@media (max-width: 1024px) {
    .pd-page {
        --pd-spec-y: 12px;
    }
}

@media (max-width: 767px) {
    .pd-page {
        --pd-spec-y: 10px;
    }
}

#page-content.pd-hero {
    padding: 0;
}

.pd-hero img {
    display: block;
    width: 100%;
    height: auto;
}

/* Intro */
.pd-intro .pd-intro-thumb img {
    width: 100%;
    height: auto;
}

/* Other types grid (≤ 3 cards; more use the carousel) */
.pd-types-grid > [class*="col-"] {
    margin-bottom: 24px;
}

.pd-types-grid .post-item {
    height: 100%;
    margin-bottom: 0;
}

.pd-types-grid .post-item-wrap {
    height: 100%;
}

.pd-types-grid img {
    width: 100%;
    height: auto;
}

.pd-type-specs {
    padding: 20px;
}

.pd-type-specs [class*="col-"] {
    margin-bottom: 8px;
    text-align: left;
    white-space: nowrap;
}

.pd-type-specs .pd-type-area {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 16px;
}

@media (max-width: 1024px) {
    .pd-type-specs {
        padding: 16px;
    }

    .pd-type-specs .pd-type-area {
        font-size: 15px;
    }

    .pd-type-specs [class*="col-"] {
        font-size: 13px;
    }
}

/* Overview specs */
.pd-spec-row {
    padding: var(--pd-spec-y) 20px;
}

.pd-denah-img {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 4 / 7;
    object-fit: contain;
    margin: 0 auto;
}

/* Video: iframe has no size of its own */
.pd-video iframe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
}

/* Brochure */
.pd-brochure-actions {
    margin-top: 16px;
    text-align: right;
}

@media (min-width: 1025px) {
    .pd-overview .pd-denah {
        padding-right: 3rem;
    }
}

/* Bootstrap col-lg-* stack below 992px */
@media (max-width: 991px) {
    .pd-intro .pd-intro-thumb,
    .pd-overview .pd-denah {
        margin-bottom: 24px;
    }

    .pd-brochure-form .col-lg-3 {
        margin-bottom: 12px;
    }

    .pd-brochure-form .col-lg-3:last-child {
        margin-bottom: 0;
    }

    .pd-brochure-form .btn {
        width: 100%;
    }
}

@media (max-width: 767px) {
    /* justified text leaves wide gaps on narrow screens; .text-justify is !important in plugins.css */
    .pd-intro .text-justify,
    .pd-intro .text-justify p {
        text-align: left !important;
    }

    .pd-overview .pd-denah {
        margin-bottom: 48px;
    }

    .pd-spec-row {
        padding-left: 0;
        padding-right: 0;
    }

    .pd-brochure-actions {
        text-align: center;
    }
}
