/* ========================================
   Chander Glass House - CSS Stylesheet
   Modern, Responsive Design
   ======================================== */

/* ========== ROOT VARIABLES ========== */
:root {
    --primary-color: #1a5490;
    --secondary-color: #2980b9;
    --accent-color: #e67e22;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #ddd;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

/* ========== RESET & BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

svg {
    display: inline-block;
    vertical-align: middle;
}

/* ========== CONTAINER & LAYOUT ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.section-icon svg {
    width: 48px;
    height: 48px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-quote {
    background: var(--accent-color);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 5px;
}

.btn-quote:hover {
    background: #d35400;
}

/* ========== HEADER / NAVBAR ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
}

.logo .tagline {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-top: -5px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
}

.nav-menu a:not(.btn-quote):hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a:not(.btn-quote)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:not(.btn-quote):hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* ========== HERO SECTION ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 120px 0 80px;
    margin-top: 70px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Replaced background SVG with a cleaner geometric pattern overlay if desired, keeping original logic for now */
    background: url('/images/home-page-banner.png') bottom / cover no-repeat;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    margin: 0 auto;
}

.hero-headline {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subheadline {
    font-size: 1.3rem;
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-intro {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* ========== ABOUT SECTION ========== */
.about {
    padding: 80px 0;
    background: var(--light-color);
}

.about-content {
    display: grid;
    gap: 40px;
}

.about-text {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.feature-icon svg {
    width: 40px;
    height: 40px;
}

.feature-card h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
}

/* ========== PRODUCTS SECTION ========== */
.products {
    padding: 80px 0;
    background: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* SVG background watermark instead of emoji */
.product-image::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff' opacity='0.3'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.3;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.product-content {
    padding: 25px;
}

.product-content h3 {
    color: var(--dark-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.product-content > p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.product-features {
    margin: 20px 0;
    padding-left: 25px;
}

.product-features li {
    color: var(--text-light);
    margin-bottom: 8px;
    position: relative;
    list-style: none;
}

/* Replaced emoji checkmark with SVG data URI */
.product-features li::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 4px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23e67e22' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.product-actions .btn {
    flex: 1;
    padding: 10px 15px;
    font-size: 0.9rem;
}

/* ========== WHY US SECTION ========== */
.why-us {
    padding: 80px 0;
    background: var(--light-color);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.why-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.why-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.why-icon svg {
    width: 48px;
    height: 48px;
}

.why-card h3 {
    color: var(--dark-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.why-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========== HOW IT WORKS SECTION ========== */
.how-it-works {
    padding: 80px 0;
    background: var(--white);
}

.steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.step-number {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 15px;
    box-shadow: var(--shadow);
}

.step h3 {
    color: var(--dark-color);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.step p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.step-arrow svg {
    width: 32px;
    height: 32px;
}

/* ========== CONTACT SECTION ========== */
.contact {
    padding: 80px 0;
    background: var(--light-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 20px;
}

.contact-info h3,
.contact-form h3 {
    color: var(--dark-color);
    font-size: 1.8rem;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-item h4 {
    color: var(--dark-color);
    margin-bottom: 5px;
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 84, 144, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 20px;
    color: var(--white);
}

.footer-col p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
}

/* ========== RESPONSIVE DESIGN ========== */

/* Tablets */
@media (max-width: 968px) {
    .hero-headline {
        font-size: 2.5rem;
    }

    .hero-subheadline {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .step-arrow {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 40px 20px;
        box-shadow: var(--shadow);
        transition: var(--transition);
        align-items: flex-start;
        gap: 20px;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero {
        padding: 100px 0 60px;
        min-height: 80vh;
    }

    .hero-headline {
        font-size: 2rem;
    }

    .hero-subheadline {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 25px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .steps {
        flex-direction: column;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-headline {
        font-size: 1.6rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .product-actions {
        flex-direction: column;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Apply animations on scroll - add this class with JavaScript */
.animate-on-scroll {
    animation: fadeInUp 0.6s ease-out;
}

/* Print Styles */
@media print {
    .header,
    .hero,
    .footer,
    .mobile-menu-toggle {
        display: none;
    }
}

/* ========== SUB-PAGE HEADER ========== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    padding: 120px 0 60px; /* Top padding accounts for fixed navbar */
    margin-top: 70px;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Background Pattern for Sub-pages */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Breadcrumb style */
.breadcrumb {
    margin-top: 15px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: underline;
}

/* ========== PRODUCT FILTER & MODAL STYLES ========== */

/* Filter Buttons */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

/* Modal Content */
.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 900px;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-content {
        flex-direction: row;
        height: 500px; /* Fixed height for desktop */
    }
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

/* Modal Close Button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-dark);
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.close-modal:hover {
    color: var(--accent-color);
}

/* Modal Sections */
.modal-image {
    flex: 1;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-details h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.modal-category {
    display: inline-block;
    background: var(--light-color);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 600;
}

.modal-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 30px;
}

.modal-specs {
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

.modal-specs h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.modal-specs ul {
    list-style: disc;
    padding-left: 20px;
    color: var(--text-light);
}