.material-page {
    padding: 52px 0 80px;
    background: #ffffff;
    min-height: 100vh;
}

.material-top {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 30px;
    align-items: end;
    margin-bottom: 28px;
}

.small-label {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 4px;
    color: #777;
    font-weight: 700;
    margin-bottom: 10px;
}

.material-top h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 44px;
    line-height: 1.1;
    font-weight: 800;
    color: #111720;
}

.material-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #5c6470;
}

.cart-btn {
    text-decoration: none;
    background: #10151c;
    color: #fff;
    padding: 12px 20px;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.cart-btn span {
    min-width: 22px;
    height: 22px;
    background: #fff;
    color: #10151c;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.filter-tabs a {
    text-decoration: none;
    color: #151923;
    border: 1px solid #d9dde3;
    background: #fff;
    padding: 10px 22px;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    transition: 0.25s ease;
}

.filter-tabs a.active,
.filter-tabs a:hover {
    background: #10151c;
    color: #fff;
    border-color: #10151c;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.product-card {
    background: #fff;
    border: 1px solid #e7e8ec;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(16, 21, 28, 0.06);
    transition: 0.35s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 42px rgba(16, 21, 28, 0.12);
}

.product-hero {
    height: 190px;
    position: relative;
    padding: 20px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.product-theme-pla {
    background: linear-gradient(135deg, #f1dcd8, #b78e84);
}

.product-theme-composite {
    background: linear-gradient(135deg, #b99562, #594226);
}

.product-theme-engineering {
    background: linear-gradient(135deg, #3fa8d6, #17233d);
}

.product-theme-flexible {
    background: linear-gradient(135deg, #b34242, #4a2428);
}

.product-hero img {
    position: absolute;
    right: -20px;
    top: 20px;
    width: 135px;
    height: 135px;
    object-fit: contain;
    opacity: 0.9;
    transform: rotate(-12deg);
    transition: 0.4s ease;
}

.product-card:hover .product-hero img {
    transform: rotate(0deg) scale(1.08);
}

.product-badges {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    z-index: 2;
}

.product-badges span {
    background: rgba(255,255,255,0.9);
    color: #20242c;
    padding: 7px 14px;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 800;
}

.product-badges .sold-badge {
    background: #10151c;
    color: #fff;
}

.product-title-row {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.product-title-row h2 {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 4px;
}

.product-title-row p {
    font-family: 'Montserrat', sans-serif;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

.arrow-btn {
    width: 42px;
    height: 42px;
    background: #fff;
    color: #10151c;
    border-radius: 50%;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-body {
    padding: 20px;
}

.spec-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.spec-row span {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    color: #58606d;
    font-weight: 700;
}

.bars {
    display: flex;
    gap: 4px;
    margin-top: 7px;
}

.bars b {
    width: 16px;
    height: 3px;
    border-radius: 3px;
    background: #d9dde2;
}

.bars b.active {
    background: #10151c;
}

.color-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.color-row span {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.08);
}

.color-row small {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #59616d;
    margin-left: 4px;
}

.best-for {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: #59616d;
    min-height: 40px;
    margin-bottom: 22px;
}

.price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.price-row h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    color: #10151c;
    display: inline-block;
}

.price-row del {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #747b86;
    margin-left: 6px;
}

.price-row p {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #747b86;
    margin-top: 2px;
}

.add-cart {
    border: 0;
    background: #10151c;
    color: #fff;
    border-radius: 999px;
    padding: 10px 18px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

.add-cart.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.empty-products {
    grid-column: 1 / -1;
    padding: 50px;
    text-align: center;
    background: #f7f8fa;
    border-radius: 18px;
    font-family: 'Montserrat', sans-serif;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: #10151c;
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    display: none;
    z-index: 9999;
}

.toast.show {
    display: block;
}

@media (max-width: 1180px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 850px) {
    .material-top {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .material-top h1 {
        font-size: 36px;
    }
}

@media (max-width: 560px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .material-page {
        padding-top: 32px;
    }

    .material-top h1 {
        font-size: 30px;
    }
}