.chemical-group-page {
    background: <?php echo $page_bg; ?>;
    min-height: 100vh;
    padding: 40px 0;
}

.chemical-group-page .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Section - Enhanced */
.chemical-header {
    background: <?php echo $header_gradient; ?>;
    border-radius: 24px;
    padding: 50px;
    margin-bottom: 30px;
    color: #fff;
    box-shadow: 0 20px 60px <?php echo $header_shadow; ?>;
    position: relative;
    overflow: hidden;
}

.chemical-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: rotate(25deg);
    pointer-events: none;
}

.chemical-header::after {
    content: '<?php echo $type_icon; ?>';
    position: absolute;
    bottom: -20px;
    right: 30px;
    font-size: 150px;
    opacity: 0.1;
    pointer-events: none;
}

.chemical-header-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.chemical-badge-wrapper {
    flex-shrink: 0;
}

.chemical-title-section {
    flex: 1;
}

.chemical-type-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.chemical-title-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chemical-subtitle {
    font-size: 1.15rem;
    opacity: 0.95;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.chemical-stats-inline {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.stat-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.stat-inline .stat-value {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Info Box */
.chemical-info-box {
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.chemical-info-box h2 {
    font-size: 1.4rem;
    color: <?php echo $accent_color; ?>;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.chemical-description {
    color: #4b5563;
    line-height: 1.9;
    font-size: 1.05rem;
}

/* Stats Grid */
.chemical-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 2px solid #fef3c7;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #f59e0b;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 5px;
}

/* Warning Box */
.resistance-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.resistance-warning .warning-icon {
    font-size: 2rem;
}

.resistance-warning .warning-content h3 {
    color: #92400e;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.resistance-warning .warning-content p {
    color: #78350f;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Products Section */
.products-section {
    margin-top: 30px;
}

.products-section h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-color: #f59e0b;
}

.product-card-image {
    position: relative;
    padding-top: 75%;
    background: #f3f4f6;
    overflow: hidden;
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-content {
    padding: 20px;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.product-card-title a {
    color: inherit;
    text-decoration: none;
}

.product-card-title a:hover {
    color: #f59e0b;
}

.product-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

.product-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f59e0b;
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #6b7280;
}

.product-card-rating .star {
    color: #fbbf24;
}

/* No Products */
.no-products {
    background: #fff;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    color: #6b7280;
}

.no-products .icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .chemical-header {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .chemical-header::after {
        font-size: 80px;
        bottom: -10px;
        right: 10px;
    }
    
    .chemical-header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .chemical-badge-wrapper {
        display: flex;
        justify-content: center;
    }
    
    .chemical-type-label {
        display: inline-flex;
        margin-left: auto;
        margin-right: auto;
    }
    
    .chemical-title-section h1 {
        font-size: 1.6rem;
    }
    
    .chemical-subtitle {
        font-size: 1rem;
    }
    
    .chemical-stats-inline {
        justify-content: center;
        gap: 12px;
    }
    
    .stat-inline {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}
