/* ============================================================
    Product Detail — Hero
    ============================================================ */

.product-detail-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 420px;
    padding: 60px 0 48px;
    background:
        linear-gradient(140deg, rgba(0, 108, 172, 0.92), rgba(9, 46, 78, 0.9)),
        var(--surface-dark);
    isolation: isolate;
    overflow: hidden;
}

.product-detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--product-hero-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.02);
    z-index: -2;
}

.product-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 17, 25, 0.28), rgba(6, 17, 25, 0.65)),
        linear-gradient(90deg, rgba(6, 17, 25, 0.22), rgba(6, 17, 25, 0.06));
    z-index: -1;
}

.product-detail-hero-content {
    display: grid;
    gap: 28px;
    color: #fff;
}

/* ============================================================
    Product Detail — Breadcrumb
    ============================================================ */

.product-detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.04em;
}

.product-detail-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-detail-breadcrumb a:hover {
    color: #fff;
}

.product-detail-breadcrumb [aria-current="page"] {
    color: #fff;
    font-weight: 600;
}

/* ============================================================
    Product Detail — Header
    ============================================================ */

.product-detail-header {
    display: grid;
    gap: 16px;
    max-width: 760px;
}

.product-detail-eyebrow {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.product-detail-title {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.06;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.22);
}

.product-detail-excerpt {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.1rem;
    line-height: 1.65;
    max-width: 600px;
}

.product-detail-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: var(--accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
}

/* ============================================================
    Product Detail — Body Layout
    ============================================================ */

.product-detail-layout {
    width: min(1360px, 80%);
    display: grid;
    gap: 60px;
    padding-top: 52px;
    padding-bottom: 72px;
}

.product-description-section {
    width: min(1360px, 80%);
    margin-top: 80px;
    padding-top: 0;
}

.product-description-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 36px;
    align-items: start;
}

.product-description-media {
    display: grid;
    gap: 14px;
}

.product-description-main-image {
    display: block;
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--line);
    object-fit: cover;
    background: #fff;
}

.product-description-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 10px;
}

.product-description-thumb-btn {
    appearance: none;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.product-description-thumb-btn.is-active,
.product-description-thumb-btn:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.product-description-thumb-btn img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-description-content {
    display: grid;
    gap: 18px;
    align-content: start;
}

.product-description-title {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.1;
    text-align: left;
}

.product-description-highlights,
.product-related-card-highlights,
.product-card-highlights,
.category-post-card-highlights {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-description-highlights li,
.product-related-card-highlights li,
.product-card-highlights li,
.category-post-card-highlights li {
    position: relative;
    padding-left: 18px;
}

.product-description-highlights li::before,
.product-related-card-highlights li::before,
.product-card-highlights li::before,
.category-post-card-highlights li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
    transform: translateY(-50%);
}

.product-description-text {
    color: var(--text-soft);
    line-height: 1.85;
    font-size: 1.02rem;
}

.product-detail-documents {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 22px;
}

.product-detail-document {
    display: grid;
    gap: 16px;
    align-content: start;
}

.product-detail-document-preview {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-detail-document-preview-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4.1;
    border-radius: 6px;
    background: linear-gradient(180deg, #ffffff, #f1f5f9);
    box-shadow: 0 20px 28px rgba(7, 19, 29, 0.14);
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease;
}

.product-detail-document-preview-frame::after {
    content: "";
    position: absolute;
    inset: auto 18px 14px;
    height: 18px;
    border-radius: 999px;
    background: rgba(7, 19, 29, 0.16);
    filter: blur(12px);
    z-index: 0;
}

.product-detail-document-preview img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
}

.product-detail-document-preview:hover .product-detail-document-preview-frame {
    transform: translateY(-4px);
    box-shadow: 0 26px 38px rgba(7, 19, 29, 0.18);
}

.product-detail-document-meta {
    display: grid;
    gap: 10px;
}

.product-detail-document-title {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.3;
}

.product-detail-document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-detail-document-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease;
}

.product-detail-document-actions a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 108, 172, 0.04);
}

.product-detail-body {
    display: grid;
    gap: 32px;
}

.product-detail-content {
    font-size: 1.06rem;
    line-height: 1.85;
    color: var(--text-soft);
}

.product-detail-content h2,
.product-detail-content h3,
.product-detail-content h4 {
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 0.6rem;
}

/* ============================================================
    Product Detail — Attributes Table
    ============================================================ */

.product-detail-attributes {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.97rem;
}

.product-detail-attributes th,
.product-detail-attributes td {
    padding: 11px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.product-detail-attributes th {
    width: 160px;
    font-weight: 700;
    color: var(--text);
    background: rgba(19, 32, 45, 0.035);
    white-space: nowrap;
}

.product-detail-attributes td {
    color: var(--text-soft);
}

.product-detail-attributes tr:last-child th,
.product-detail-attributes tr:last-child td {
    border-bottom: none;
}

/* ============================================================
    Product Detail — Related Products
    ============================================================ */

.product-detail-related {
    display: grid;
    gap: 24px;
}

.product-detail-related-title {
    margin: 0;
    font-size: clamp(1.3rem, 2.2vw, 1.9rem);
    color: var(--text);
}

.product-detail-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.product-related-card {
    position: relative;
    display: flex;
    min-height: 260px;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(
        140deg,
        rgba(0, 108, 172, 0.92),
        rgba(9, 46, 78, 0.88)
    );
    border: 1px solid rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-related-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--related-card-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.01);
    transition: transform 0.45s ease;
    z-index: -2;
}

.product-related-card:hover::before {
    transform: scale(1.06);
}

.product-related-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(6, 17, 25, 0.22),
        rgba(6, 17, 25, 0.6)
    );
    z-index: -1;
}

.product-related-card-inner {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 28px 28px;
    color: #fff;
    text-align: center;
    z-index: 1;
}

.product-related-card-highlights {
    gap: 6px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.88rem;
    line-height: 1.35;
}

.product-related-card-highlights li {
    padding-left: 14px;
}

.product-related-card-highlights li::before {
    width: 6px;
    height: 6px;
    top: 0.72em;
    background: rgba(255, 255, 255, 0.88);
}

.product-related-card-eyebrow {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.product-related-card-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.05rem, 1.6vw, 1.5rem);
    line-height: 1.2;
}

.product-related-card-button {
    display: inline-flex;
    align-items: center;
    padding: 7px 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
    margin-top: 4px;
}

.product-related-card:hover .product-related-card-button {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    color: #fff;
}

.product-related-card-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* ============================================================
    Responsive
    ============================================================ */

/* ============================================================
    Product Detail — Tabs
    ============================================================ */

.product-detail-tabs {
    display: grid;
    gap: 0;
}

.product-detail-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--line);
}

.product-detail-tab-btn {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 14px 24px;
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
    letter-spacing: 0.02em;
    transition:
        color 0.18s ease,
        border-color 0.18s ease;
    white-space: nowrap;
}

.product-detail-tab-btn:hover {
    color: var(--text);
}

.product-detail-tab-btn.is-active {
    color: var(--accent, #006cac);
    border-bottom-color: var(--accent, #006cac);
}

.product-detail-tab-panel {
    display: none;
    padding: 40px 0;
}

.product-detail-tab-panel.is-active {
    display: block;
}

/* ============================================================
    Product Detail — Videos Tab
    ============================================================ */

.product-detail-videos {
    display: grid;
    gap: 32px;
}

.product-detail-video-item {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: var(--surface-dark, #0d1f2d);
    border-radius: 6px;
    overflow: hidden;
}

.product-detail-video-item iframe,
.product-detail-video-item embed,
.product-detail-video-item object {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}

.product-detail-video-item a {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    text-decoration: underline;
    word-break: break-all;
    padding: 20px;
}

/* ============================================================
    Responsive
    ============================================================ */

@media (max-width: 860px) {
    .product-description-section,
    .product-detail-layout {
        width: min(1360px, calc(100% - 24px));
    }

    .product-detail-hero {
        min-height: 320px;
    }

    .product-description-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail-documents {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .product-detail-hero {
        min-height: 260px;
        padding: 40px 0 36px;
    }

    .product-detail-related-grid {
        grid-template-columns: minmax(0, 1fr);

        .product-detail-document-actions a {
            width: 100%;
        }

        .product-detail-documents {
            grid-template-columns: minmax(0, 1fr);
        }
    }

    .product-detail-layout {
        padding-top: 36px;
        padding-bottom: 48px;
    }

    .product-detail-tab-btn {
        padding: 11px 14px;
        font-size: 0.88rem;
    }

    .product-detail-tab-panel {
        padding: 28px 0;
    }

    .product-description-section {
        padding-top: 8px;
    }

    .product-description-thumbs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .product-detail-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
