/* ============================================================
   PRODUCT & PROJECT DETAIL PAGES (and the 404 page)
   ============================================================ */

/* Slim blue band under the fixed menu, holding the breadcrumb trail */
.detail-hero {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
    padding: calc(var(--nav-height) + 1.1rem) var(--section-pad-x) 1.1rem;
    min-height: calc(var(--nav-height) + 1rem);
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

.breadcrumbs li + li::before {
    content: "›";
    margin-right: 0.35rem;
    color: rgba(255, 255, 255, 0.45);
}

.breadcrumbs a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-underline-offset: 3px;
}

.breadcrumbs a:hover {
    text-decoration-color: var(--accent);
}

.breadcrumbs [aria-current] {
    color: var(--accent-light);
}

/* Main block */
.detail {
    padding: clamp(2rem, 5vw, 4rem) var(--section-pad-x);
    max-width: 1280px;
    margin: 0 auto;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(1.75rem, 4vw, 3.5rem);
    align-items: start;
}

.detail-media > img,
.detail-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-card-lg);
    background: var(--light);
    box-shadow: var(--shadow-soft);
}

.detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #556274;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.detail-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.35;
}

.detail-placeholder-emoji {
    font-size: 4rem;
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
}

.detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.detail-gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.25s, box-shadow 0.25s;
}

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

.detail-info .section-tag {
    margin-bottom: 0.6rem;
}

.detail-title {
    font-family: "Barlow Condensed", sans-serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 0.9rem;
}

.detail-stock {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.detail-lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.detail-subtitle {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--blue);
    margin: 1.75rem 0 0.75rem;
}

.spec-table {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.spec-table > div {
    display: grid;
    grid-template-columns: minmax(110px, 40%) 1fr;
    border-top: 1px solid #e2e8f0;
}

.spec-table > div:first-child {
    border-top: 0;
}

.spec-table dt,
.spec-table dd {
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
}

.spec-table dt {
    background: #f8fafd;
    font-weight: 600;
    color: var(--dark);
}

.spec-table dd {
    color: #334155;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.btn-ghost {
    display: inline-block;
    padding: 0.85rem 1.5rem;
    border-radius: 4px;
    border: 1.5px solid #cbd5e1;
    color: var(--blue);
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s;
}

.btn-ghost:hover {
    border-color: var(--blue);
    background: var(--light);
}

.detail-body {
    max-width: 820px;
    margin-top: clamp(2rem, 4vw, 3rem);
}

.detail-body p {
    line-height: 1.8;
    color: #334155;
    margin-bottom: 1rem;
}

/* Related items */
.detail-related {
    background: var(--light);
    padding: clamp(2.5rem, 6vw, 4.5rem) var(--section-pad-x);
}

.detail-related .section-title {
    margin-bottom: 2rem;
}

.detail-related .products-grid,
.detail-related .projects-masonry {
    max-width: 1280px;
}

/* 404 */
.not-found {
    text-align: center;
    min-height: 45vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.not-found .detail-actions {
    justify-content: center;
}

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

@media (max-width: 480px) {
    .detail-actions > a {
        width: 100%;
        text-align: center;
    }
}

/* ── Resources page ───────────────────────────────────────── */
.resource-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.resource-card {
    display: flex;
    gap: 1.1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-card-lg);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.resource-icon {
    flex: 0 0 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--light);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-icon svg {
    width: 30px;
    height: 30px;
}

.resource-body h3 {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.4rem;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.resource-body p {
    color: var(--gray);
    line-height: 1.65;
}

.resource-body .detail-actions {
    margin-top: 1rem;
    align-items: center;
}

.resource-size {
    font-size: 0.82rem;
    color: var(--gray);
}

.resource-soon {
    margin-top: 0.75rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .resource-card {
        flex-direction: column;
    }
}

.resource-group {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--blue);
    margin: 2.25rem 0 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.resource-group + .resource-list {
    margin-top: 1rem;
}

/* "Download Catalogue" on product pages */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-color: var(--blue);
}

.btn-download svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-download small {
    font-weight: 500;
    color: var(--gray);
}

/* ── Brand pages ───────────────────────────────────────── */
.detail-brand {
    margin: -0.4rem 0 0.9rem;
    color: var(--gray);
    font-weight: 600;
}

.detail-brand a,
.brand-intro a,
a.section-tag {
    color: var(--blue);
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.brand-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-card-lg);
    background: #fff;
    color: inherit;
    transition: box-shadow 0.25s, transform 0.25s;
}

.brand-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.brand-card h2 {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.3rem;
    text-transform: uppercase;
    color: var(--dark);
}

.brand-card span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue);
}

.brand-card-logo,
.brand-head-logo {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    border-radius: 10px;
    padding: 12px;
}

.brand-card-logo img,
.brand-head-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.brand-name-tile {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1.15;
    max-width: 100%;
    overflow-wrap: anywhere;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--blue-dark);
    text-align: center;
}

.brand-head {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.brand-head-logo {
    height: 160px;
}

.brand-head-logo .brand-name-tile {
    font-size: 1.6rem;
}

.brand-intro p {
    line-height: 1.8;
    color: #334155;
    margin-bottom: 0.9rem;
}

@media (max-width: 760px) {
    .brand-head {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .brand-head-logo {
        height: 120px;
    }
}

.detail-info .aka {
    margin: -0.5rem 0 1.25rem;
}
