
/* Piloved homepage redesign layer */
body.is-home {
    background: #f5f1e9;
    color: #17211f;
}

body.is-home .site-header {
    background: rgba(255, 252, 246, 0.94);
    border-bottom: 1px solid rgba(36, 51, 47, 0.1);
    backdrop-filter: blur(16px);
}

.plv-hero {
    position: relative;
    min-height: 640px;
    padding: 88px 0 54px;
    overflow: hidden;
    background: #12201d;
    color: #fffaf0;
}

.plv-hero-bg {
    position: absolute;
    inset: 0;
}

.plv-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(14, 27, 24, 0.92) 0%, rgba(14, 27, 24, 0.78) 42%, rgba(14, 27, 24, 0.34) 78%, rgba(14, 27, 24, 0.18) 100%);
}

.plv-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plv-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 380px;
    gap: 48px;
    align-items: end;
}

.plv-hero-copy {
    max-width: 760px;
}

.plv-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    color: #c77d1f;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.plv-hero .plv-kicker {
    color: #f4b15e;
}

.plv-hero h1 {
    margin: 0 0 20px;
    max-width: 720px;
    color: #fffaf0;
    font-size: clamp(2.45rem, 6vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: 0;
}

.plv-hero .hero-desc {
    max-width: 650px;
    margin: 0 0 26px;
    color: rgba(255, 250, 240, 0.86);
    font-size: 1.12rem;
    line-height: 1.65;
}

.plv-search.search-hero {
    max-width: 650px;
    margin: 0 0 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.plv-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.plv-quick-links a,
.plv-solid-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 6px;
    background: rgba(255, 250, 240, 0.13);
    color: #fffaf0;
    font-weight: 750;
    text-decoration: none;
}

.plv-quick-links a:hover,
.plv-solid-link:hover {
    background: #d1872d;
    color: #121a18;
}

.plv-hero-panel {
    display: grid;
    gap: 12px;
}

.plv-panel-card {
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px solid rgba(255, 250, 240, 0.2);
    border-radius: 8px;
    background: rgba(18, 32, 29, 0.72);
    color: #fffaf0;
    text-decoration: none;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.18);
}

.plv-panel-card span {
    color: #f4b15e;
    font-weight: 900;
}

.plv-panel-card strong {
    font-size: 1.1rem;
}

.plv-panel-card small {
    color: rgba(255, 250, 240, 0.72);
    line-height: 1.45;
}

.plv-main {
    padding-top: 46px;
    background: linear-gradient(180deg, #f5f1e9 0%, #fffaf0 42%, #f3efe7 100%);
}

.plv-workbench,
.plv-materials,
.plv-recent,
.plv-categories,
.plv-popular,
.plv-featured-row,
.plv-closing {
    margin-bottom: 58px;
}

.plv-section-head {
    max-width: 780px;
    margin-bottom: 24px;
}

.plv-section-head-row {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
    gap: 26px;
    align-items: end;
}

.plv-section-head h2 {
    margin: 0;
    color: #15211f;
    font-size: clamp(1.65rem, 3vw, 2.65rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.plv-section-head p {
    margin: 10px 0 0;
    color: #5e6b66;
    line-height: 1.65;
}

.plv-route-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

.plv-route-card,
.plv-material-card {
    position: relative;
    min-height: 310px;
    overflow: hidden;
    border-radius: 8px;
    background: #162320;
    color: #fffaf0;
    text-decoration: none;
    box-shadow: 0 22px 60px rgba(35, 44, 41, 0.13);
}

.plv-route-large {
    grid-row: span 2;
    min-height: 638px;
}

.plv-route-card img,
.plv-material-card img,
.plv-closing img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.plv-route-card:hover img,
.plv-material-card:hover img {
    transform: scale(1.035);
}

.plv-route-card::after,
.plv-material-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 23, 20, 0.02) 22%, rgba(13, 23, 20, 0.86) 100%);
}

.plv-route-card > div,
.plv-material-card > span,
.plv-material-card > strong {
    position: absolute;
    z-index: 1;
    left: 22px;
    right: 22px;
}

.plv-route-card > div {
    bottom: 22px;
}

.plv-route-card span,
.plv-material-card span {
    color: #f4b15e;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}

.plv-route-card h3,
.plv-material-card strong {
    margin: 8px 0 0;
    color: #fffaf0;
    font-size: 1.25rem;
    line-height: 1.15;
}

.plv-route-large h3 {
    font-size: 2rem;
}

.plv-route-card p {
    margin: 10px 0 0;
    max-width: 520px;
    color: rgba(255, 250, 240, 0.78);
    line-height: 1.5;
}

.plv-featured-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: stretch;
}

.plv-featured-card.featured-card {
    margin: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #113a36, #1a2421 55%, #c77822);
}

.plv-featured-card .featured-badge {
    background: rgba(255, 250, 240, 0.13);
    color: #ffe3bd;
}

.plv-note-card {
    padding: 24px;
    border-radius: 8px;
    border: 1px solid rgba(32, 48, 44, 0.12);
    background: #fffaf0;
    box-shadow: 0 16px 42px rgba(35, 44, 41, 0.08);
}

.plv-note-card strong {
    display: block;
    margin-bottom: 10px;
    color: #142320;
    font-size: 1.05rem;
}

.plv-note-card p {
    margin: 0;
    color: #66736e;
    line-height: 1.6;
}

.plv-material-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.plv-material-card {
    min-height: 370px;
}

.plv-material-card > span {
    bottom: 82px;
}

.plv-material-card > strong {
    bottom: 24px;
}

.plv-recent .recent-scroll {
    padding-bottom: 10px;
}

.plv-category-grid.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.plv-category-grid .category-card {
    min-height: 168px;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid rgba(32, 48, 44, 0.1);
    background: #fffdf8;
    box-shadow: none;
}

.plv-category-grid .category-card:nth-child(5n + 1) {
    background: #edf7f4;
}

.plv-category-grid .category-card:nth-child(5n + 3) {
    background: #fff4e5;
}

.plv-category-grid .category-icon {
    font-size: 1.5rem;
}

.plv-category-grid .category-name {
    color: #15211f;
    font-size: 1rem;
    line-height: 1.2;
}

.plv-category-grid .category-count {
    color: #63706c;
    line-height: 1.4;
}

.plv-refresh.btn-outline {
    justify-self: end;
    border-radius: 6px;
    border-color: #c77d1f;
    color: #9b5f18;
    background: #fffaf0;
}

.plv-closing {
    display: grid;
    grid-template-columns: 0.92fr 1fr;
    min-height: 360px;
    overflow: hidden;
    border-radius: 8px;
    background: #13211e;
    color: #fffaf0;
}

.plv-closing > div {
    padding: 46px;
    align-self: center;
}

.plv-closing h2 {
    margin: 0 0 14px;
    color: #fffaf0;
    font-size: clamp(1.7rem, 3vw, 3rem);
    line-height: 1.05;
}

.plv-closing p {
    margin: 0 0 22px;
    color: rgba(255, 250, 240, 0.78);
    line-height: 1.65;
}

@media (max-width: 980px) {
    .plv-hero {
        min-height: auto;
        padding: 72px 0 38px;
    }

    .plv-hero-bg::after {
        background: linear-gradient(180deg, rgba(14, 27, 24, 0.93) 0%, rgba(14, 27, 24, 0.8) 58%, rgba(14, 27, 24, 0.54) 100%);
    }

    .plv-hero-inner,
    .plv-featured-row,
    .plv-section-head-row,
    .plv-closing {
        grid-template-columns: 1fr;
    }

    .plv-hero-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .plv-route-grid,
    .plv-material-grid {
        grid-template-columns: 1fr;
    }

    .plv-route-large,
    .plv-route-card,
    .plv-material-card {
        min-height: 340px;
    }

    .plv-category-grid.categories-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .plv-refresh.btn-outline {
        justify-self: start;
    }

    .plv-closing img {
        min-height: 280px;
    }
}

@media (max-width: 640px) {
    .plv-hero {
        padding: 48px 0 30px;
    }

    .plv-hero h1 {
        font-size: 2.45rem;
    }

    .plv-hero .hero-desc {
        font-size: 1rem;
    }

    .plv-search.search-hero {
        border-radius: 8px;
    }

    .plv-hero-panel,
    .plv-category-grid.categories-grid {
        grid-template-columns: 1fr;
    }

    .plv-panel-card,
    .plv-note-card,
    .plv-closing > div {
        padding: 18px;
    }

    .plv-route-large,
    .plv-route-card,
    .plv-material-card {
        min-height: 300px;
    }

    .plv-route-large h3 {
        font-size: 1.45rem;
    }

    .plv-workbench,
    .plv-materials,
    .plv-recent,
    .plv-categories,
    .plv-popular,
    .plv-featured-row,
    .plv-closing {
        margin-bottom: 38px;
    }
}

/* Final homepage overrides for legacy inline CSS */
body.is-home .plv-hero h1 {
    color: #fffaf0 !important;
    text-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

body.is-home .plv-hero .hero-desc {
    color: rgba(255, 250, 240, 0.9) !important;
}

@media (max-width: 768px) {
    body.is-home .main-nav {
        display: none;
    }

    body.is-home .main-nav.open {
        display: flex;
    }

    body.is-home .main-nav .dropdown-menu {
        display: none !important;
    }

    body.is-home .main-nav.open .dropdown-menu {
        display: block !important;
    }
}
