/* Product Detail — Precise Engineering */

.pd-page-hero .pd-hero-inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.pd-page-hero .pd-hero-content {
    order: 1;
}

.pd-page-hero .pd-hero-visual {
    order: 2;
}

.pd-product-badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    background: rgba(232, 162, 60, 0.12);
    color: var(--amber);
    border: 1px solid rgba(232, 162, 60, 0.35);
    margin-bottom: 12px;
}

.pd-badge-text {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--teal);
}

.pd-hero-features {
    list-style: none;
    margin: 20px 0 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-hero-features li {
    font-size: 0.9375rem;
    color: var(--charcoal);
    padding-left: 22px;
    position: relative;
}

.pd-hero-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--teal);
    border-radius: 50%;
}

.pd-hero-visual {
    display: flex;
    justify-content: center;
}

.pd-hero-image-wrap {
    position: relative;
    width: 100%;
    background: var(--teal-light);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
}

.pd-hero-image-wrap img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
}

.pd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.pd-gallery-item {
    background: var(--teal-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.pd-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.pd-gallery-grid.pd-gallery-single {
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
}

.pd-gallery-grid:has(.pd-gallery-item:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.pd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-overview-content {
    max-width: 800px;
    margin: 0 auto;
}

.pd-overview-content p {
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 18px;
}

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

.pd-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.pd-feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    height: 100%;
    transition: transform var(--transition), box-shadow var(--transition);
}

.pd-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.pd-feature-check {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background: var(--teal-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 0.75rem;
    font-weight: 700;
}

.pd-feature-card span:last-child {
    font-size: 0.9375rem;
    color: var(--charcoal);
    line-height: 1.5;
}

.pd-applications-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.pd-app-pill {
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
    background: var(--white);
    border: 1.5px solid var(--teal-mid);
    border-radius: 50px;
    transition: var(--transition);
}

.pd-app-pill:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.pd-benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 40px;
    max-width: 900px;
    margin: 0 auto;
}

.pd-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9375rem;
    color: var(--charcoal);
}

.spec-table.pd-spec-table thead th {
    background: var(--teal);
    color: var(--white);
    font-weight: 600;
    width: auto;
}

.spec-table.pd-spec-table tbody th {
    background: var(--off-white);
    color: var(--charcoal);
}

.pd-not-found {
    padding: 160px 0 120px;
    text-align: center;
}

.pd-not-found h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.pd-not-found p {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.pd-hidden {
    display: none !important;
}

/* Related products grid — layout when fewer than 3 cards */
.pd-related-grid:has(.catalog-card:only-child) {
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
}

.pd-related-grid:has(.catalog-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1024px) {
    .pd-related-grid:has(.catalog-card:nth-child(2):last-child) {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .pd-related-grid,
    .pd-related-grid:has(.catalog-card:nth-child(2):last-child),
    .pd-related-grid:has(.catalog-card:only-child) {
        grid-template-columns: 1fr;
        max-width: none;
    }
}

@media (max-width: 1024px) {
    .pd-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pd-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pd-page-hero .pd-hero-inner {
        grid-template-columns: 1fr;
    }

    .pd-page-hero .pd-hero-visual {
        order: -1;
    }

    .pd-features-grid,
    .pd-benefits-grid {
        grid-template-columns: 1fr;
    }

    .pd-gallery-grid {
        overflow-x: auto;
        grid-template-columns: repeat(3, minmax(260px, 1fr));
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
        max-width: none;
    }

    .pd-gallery-item {
        scroll-snap-align: start;
    }
}
