/* Products Page Styles - Consistent with work_style.css */
:root {
    --section-spacing: 100px;
    --card-spacing: 30px;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.page-hero {
    height: 60vh; /* Reduced from 100vh */
    margin-top: 1rem;
    min-height: 500px; /* Reduced from 800px */
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px; /* Reduced from 100px */
    text-align: center;
    overflow: hidden;
    background-attachment: fixed;
    background: rgba(0, 0, 0, 0.6);
}


.page-hero-background {
    background: url('/static/images/backgrounds/back7.jpg') no-repeat center center / cover;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    transform: translateZ(0); /* triggers hardware acceleration */
}

/* Keep all other hero styles the same */
.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/static/images/backgrounds/back7.jpg') no-repeat center center / cover;
    background-attachment: fixed;
    z-index: -1;
}


.use-before::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/static/images/backgrounds/back.jpg') no-repeat center center / cover;
    background-attachment: fixed;
    z-index: -1;
  }

.page-hero .container {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    color: var(--accent-color);
    font-size: clamp(1rem, 2vw, 1.5rem);
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Products Section */
.products-section {
    background-color: white;
    padding: var(--section-spacing) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.products-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--card-spacing);
}

.product-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.product-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    flex: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

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

.old-price {
    color: red;
    text-decoration: line-through;
}

.new-price {
    color: green;
    font-weight: bold;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.price-type {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color)
}

.container h1 {
    color: var(--white);
}

.container h2 {
    color: var(--accent-color);
    font-size: 5rem;
}

.btn-view {
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-view:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.product-info {
    padding: 1.5rem;
    background: white;
}

.product-info h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.product-info p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.btn-text {
    color: var(--accent-color);
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-text:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    background-image: url('../images/backgrounds/back2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: var(--section-spacing) 0;
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 0;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    color: var(--white);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-primary {
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Styles */
@media (max-width: 992px) {
    :root {
        --section-spacing: 80px;
        --card-spacing: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    .container h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-spacing: 60px;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .product-image {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .page-hero {
        padding: 120px 0 80px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}


/* Add this to your CSS file or <style> tag */
body {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
body.images-loaded {
    opacity: 1;
}


/* Add these media queries to your existing CSS */

@media (max-width: 480px) {
    .page-hero {
        padding: 100px 0 60px;
        background-attachment: scroll; /* Disable parallax on mobile */
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card {
        margin-bottom: 15px;
    }
    
    .product-image {
        height: 220px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-info h3 {
        font-size: 1.1rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Ensure viewport is properly set */
@viewport {
    width: device-width;
    zoom: 1.0;
}


.product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background-color: #eee;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
    color: var(--text-color)
}

.filter-btn.active,
.filter-btn:hover {
    background-color: #333;
    color: white;
}






.product-card {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.product-card.hide {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
