/* ===== PRODUCT LINE PAGE ===== */

/* ---------- Hero ---------- */
.pl-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 480px;
    max-height: 720px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pl-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--color-graphite);
    background-size: cover;
    background-position: center;
    will-change: transform;
}

.pl-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(36, 35, 36, 0.3) 0%,
        rgba(36, 35, 36, 0.6) 100%
    );
    z-index: 1;
}

.pl-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 clamp(16px, 4vw, 60px);
    max-width: 900px;
}

.pl-hero-subtitle {
    display: block;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-beige);
    margin-bottom: 16px;
}

.pl-hero-title {
    font-family: var(--font-accent);
    font-size: clamp(32px, 5vw, 64px);
    color: var(--color-white);
    line-height: 1.1;
    margin: 0 0 20px;
    text-transform: uppercase;
}

.pl-hero-slogan {
    font-family: var(--font-main);
    font-size: clamp(14px, 1.2vw, 18px);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Line Navigation (3D Flip Cards) ---------- */
.pl-nav {
    background: var(--color-white);
    position: sticky;
    top: 72px;
    z-index: 90;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pl-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 40px);
    display: flex;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pl-nav-inner::-webkit-scrollbar {
    display: none;
}

.pl-nav-item {
    flex-shrink: 0;
    padding: 14px 28px;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(36, 35, 36, 0.5);
    text-decoration: none;
    white-space: nowrap;
    background: #f5f2ee;
    border-radius: 8px;
}

.pl-nav-item:hover {
    color: var(--color-graphite);
    background: #eae6e0;
}

.pl-nav-item--active {
    color: var(--color-white);
    font-weight: 700;
    background: var(--color-graphite);
    box-shadow: 0 6px 20px rgba(36, 35, 36, 0.15);
}

.pl-nav-item--active:hover {
    color: var(--color-white);
    background: var(--color-graphite);
}

/* ---------- Content section ---------- */
.pl-content {
    background: var(--color-white);
    padding: clamp(48px, 6vw, 96px) 0;
}

.pl-content-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 40px);
    text-align: center;
}

.pl-content-slogan {
    font-family: var(--font-main);
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(36, 35, 36, 0.45);
    margin-bottom: 16px;
}

.pl-content-divider {
    width: 40px;
    height: 3px;
    background: var(--color-beige);
    margin: 0 auto 24px;
    border-radius: 2px;
}

.pl-content-title {
    font-family: var(--font-accent);
    font-size: clamp(24px, 3vw, 40px);
    color: var(--color-graphite);
    line-height: 1.2;
    margin: 0 0 24px;
    text-transform: uppercase;
}

.pl-content-text {
    font-family: var(--font-main);
    font-size: clamp(14px, 1.1vw, 17px);
    color: rgba(36, 35, 36, 0.7);
    line-height: 1.8;
    text-align: left;
}

.pl-content-text p {
    margin: 0 0 16px;
}

.pl-content-text p:last-child {
    margin-bottom: 0;
}

/* ---------- Products grid ---------- */
.pl-products {
    background: var(--color-white);
    padding: clamp(40px, 5vw, 72px) 0;
}

.pl-products-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 40px);
}

.pl-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Card */
.pl-product-card {
    background: var(--color-white);
    border: 1px solid rgba(36, 35, 36, 0.08);
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.pl-product-card:hover {
    box-shadow: 0 8px 30px rgba(36, 35, 36, 0.1);
}

/* Image area with hover gallery */
.pl-product-card-img {
    display: block;
    position: relative;
    aspect-ratio: 1 / 0.85;
    overflow: hidden;
    background: #f5f2ee;
}

.pl-product-card-img img.pl-product-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}

.pl-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(36, 35, 36, 0.2);
    background: #f5f2ee;
}

/* Card body */
.pl-product-card-body {
    padding: 16px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pl-product-card-sku {
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(36, 35, 36, 0.45);
    margin: 0 0 4px;
}

.pl-product-card-name {
    font-family: var(--font-main);
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.25;
}

.pl-product-card-name a {
    color: var(--color-graphite);
    text-decoration: none;
}

.pl-product-card-desc {
    font-family: var(--font-main);
    font-size: 13px;
    color: rgba(36, 35, 36, 0.6);
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
}

.pl-product-card-btn {
    display: block;
    padding: 14px 28px;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-white);
    background: var(--color-graphite);
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    transition: background 0.3s, transform 0.15s;
    margin-top: auto;
}

.pl-product-card-btn:hover {
    background: #3a393a;
    transform: translateY(-1px);
}

/* ---------- Gallery of completed projects ---------- */
.pl-gallery {
    background: #f5f2ee;
    padding: clamp(48px, 6vw, 80px) 0;
}

.pl-gallery-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 40px);
}

.pl-gallery-title {
    font-family: var(--font-accent);
    font-size: clamp(18px, 2vw, 26px);
    color: var(--color-graphite);
    line-height: 1.3;
    text-transform: uppercase;
    margin: 0 0 clamp(24px, 3vw, 40px);
    max-width: 600px;
}

.pl-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* First item spans 2 columns and 2 rows (large feature) */
.pl-gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.pl-gallery-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 10;
    background: #e8e4de;
}

.pl-gallery-item:first-child {
    aspect-ratio: auto;
}

.pl-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.pl-gallery-item:hover img {
    transform: scale(1.05);
}

/* Placeholder items */
.pl-gallery-item--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(36, 35, 36, 0.2);
    background: #e8e4de;
    aspect-ratio: 16 / 10;
}

.pl-gallery-item--empty span {
    font-family: var(--font-main);
    font-size: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1536px) {
    .pl-nav { top: 68px; }
}

@media (max-width: 1366px) {
    .pl-nav { top: 64px; }
}

@media (max-width: 1024px) {
    .pl-nav { top: 60px; }

    .pl-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .pl-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pl-gallery-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 768px) {
    .pl-nav {
        top: 56px;
        padding: 12px 0;
    }

    .pl-nav-inner {
        justify-content: flex-start;
        padding: 0 16px;
        gap: 6px;
    }

    .pl-hero {
        height: 50vh;
        min-height: 360px;
    }

    .pl-nav-item {
        padding: 10px 18px;
        font-size: 12px;
        border-radius: 20px;
    }

    .pl-products-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 12px;
        padding: 0 16px 16px;
        margin: 0 -16px;
    }

    .pl-products-grid::-webkit-scrollbar {
        display: none;
    }

    .pl-product-card {
        flex: 0 0 80vw;
        max-width: 320px;
        scroll-snap-align: center;
    }

    .pl-gallery-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 10px;
        padding: 0 16px 16px;
        margin: 0 -16px;
    }

    .pl-gallery-grid::-webkit-scrollbar {
        display: none;
    }

    .pl-gallery-item,
    .pl-gallery-item:first-child {
        flex: 0 0 75vw;
        max-width: 300px;
        scroll-snap-align: center;
        aspect-ratio: 4 / 3;
        grid-column: auto;
        grid-row: auto;
    }

    .pl-gallery-item--empty {
        flex: 0 0 75vw;
        max-width: 300px;
    }
}

@media (max-width: 390px) {
    .pl-nav { top: 52px; }
}
