/* --- Global Styles & Variables --- */
:root {
    --primary-color: #FFC107; /* Bright yellow */
    --primary-dark-variant: #E0A800; /* Slightly darker yellow for hover */
    --dark-color: #212529; /* Very dark grey */
    --medium-dark-color: #343A40; /* Darker grey for card backgrounds */
    --light-color: #f8f9fa; /* Off-white */
    --text-color: #dee2e6; /* Light grey for body text */
    --secondary-text-color: #adb5bd; /* Slightly darker light grey for secondary info */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --box-shadow-light: 0 4px 8px rgba(0,0,0,0.2), 0 8px 16px rgba(0,0,0,0.15); /* Lighter shadow for general cards */
    --box-shadow-heavy: 0 8px 16px rgba(0,0,0,0.3), 0 16px 32px rgba(0,0,0,0.25); /* Heavier shadow for hover/summary */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 50px;
    --transition-speed: 0.3s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; } /* scroll-padding-top for header */

body { 
    font-family: var(--font-body); 
    line-height: 1.6; /* Improved line height for readability */
    letter-spacing: 0.02em; /* Subtle letter spacing */
    background-color: var(--dark-color); 
    background-image: linear-gradient(180deg, #343A40 0%, #212529 25%, #212529 75%, #343A40 100%); /* Smoother gradient */
    color: var(--text-color); 
}

/* Class to prevent body scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

.container { max-width: 1200px; margin: auto; padding: 0 20px; }
h1, h2, h3 { 
    font-family: var(--font-heading); 
    font-weight: 700; 
    margin-bottom: 20px; 
    color: var(--light-color); 
    letter-spacing: 0.03em; /* More prominent heading letter spacing */
}
h2 { 
    text-align: center; 
    font-size: 2.8rem; 
    margin-bottom: 60px; 
    position: relative; 
    line-height: 1.2;
}
h2::after { 
    content: ''; 
    position: absolute; 
    bottom: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 80px; 
    height: 4px; 
    background: var(--primary-color); 
    border-radius: 2px; 
}
section { padding: 80px 0; }

/* --- Header with Glassmorphism Effect --- */
header { 
    background: rgba(40, 45, 50, 0.85); /* Slightly less transparent */
    -webkit-backdrop-filter: blur(12px); /* Increased blur */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); /* Slightly more visible border */
    padding: 1rem 0; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000; 
    box-shadow: var(--box-shadow-light); /* Added shadow to header */
}
header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { 
    font-family: var(--font-heading); 
    font-size: 1.8rem; /* Slightly larger logo */
    font-weight: 700; 
    text-decoration: none; 
    color: var(--light-color); 
    transition: color var(--transition-speed) ease; 
    letter-spacing: 0.05em; /* Logo letter spacing */
}
.logo i { color: var(--primary-color); margin-right: 8px; font-size: 1.5rem; } /* Icon size relative to logo text */
.logo:hover { color: var(--primary-dark-variant); }
nav ul { list-style: none; display: flex; }
nav ul li { margin-left: 30px; } /* Increased spacing between nav items */
nav a { 
    text-decoration: none; 
    color: var(--text-color); 
    font-weight: 500; 
    font-size: 1.05rem; /* Slightly larger nav text */
    transition: color var(--transition-speed) ease, transform var(--transition-speed) ease; /* Added transform transition */
    padding: 5px 0; /* Add padding for better hit area */
}
nav a:hover { 
    color: var(--primary-color); 
    transform: translateY(-2px); /* Subtle lift on hover */
}
.hamburger { display: none; cursor: pointer; font-size: 2rem; color: var(--primary-color); } /* Larger hamburger icon */

/* --- Estimator Section (Original Hero styles) --- */
#estimator-section { 
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), url('https://images.pexels.com/photos/257736/pexels-photo-257736.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') no-repeat center center/cover; 
    background-size: cover; 
    min-height: 100vh; 
    padding: 120px 20px 80px 20px; 
    display: flex; 
    justify-content: center; 
    align-items: center; /* Center align content vertically in hero */
    text-align: center; 
    color: var(--light-color); 
    flex-direction: column; 
}
#estimator-section .hero-content {
    max-width: 1200px;
    margin: auto; 
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px; /* Increased spacing between elements */
}
#estimator-section h1 { 
    font-size: 4rem; /* Larger hero heading */
    text-shadow: 0 6px 20px rgba(0,0,0,0.6); /* More pronounced shadow */
    margin-bottom: 0; 
    line-height: 1.1;
}
#estimator-section p { 
    font-size: 1.4rem; /* Larger hero paragraph */
    max-width: 800px; /* Wider paragraph */
    margin-bottom: 10px; 
    color: var(--secondary-text-color); /* Slightly subdued text color */
}
/* This h2 was likely intended for "Generate Your Estimation" within the hero, adjusted to match new section headings */
#estimator-section h2 { 
    font-size: 2.8rem; 
    margin-top: 60px; 
    margin-bottom: 30px; 
    position: relative; 
    color: var(--light-color);
}
#estimator-section h2::after { 
    content: ''; 
    position: absolute; 
    bottom: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 80px; 
    height: 4px; 
    background: var(--primary-color); 
    border-radius: 2px; 
}
.section-description {
    text-align: center;
    max-width: 800px;
    margin-bottom: 40px; /* Increased spacing */
    font-size: 1.2rem; /* Larger description text */
    color: var(--secondary-text-color);
}


/* --- Search Bar Styles --- */
.search-container { 
    position: relative; 
    max-width: 700px; /* Wider search bar */
    width: 100%; 
    margin: 30px auto 0 auto; 
}
.search-container i { 
    position: absolute; 
    left: 20px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: #a0a0a0; /* Slightly darker icon color */
    font-size: 1.3rem; /* Larger icon */
}
#search-bar { 
    width: 100%; 
    padding: 20px 25px 20px 60px; /* Increased padding */
    border-radius: var(--border-radius-lg); 
    border: 2px solid transparent; 
    font-size: 1.15rem; /* Larger font in search bar */
    font-family: var(--font-body); 
    background-color: rgba(255, 255, 255, 0.95); /* Less transparent background */
    color: #333; 
    transition: all var(--transition-speed) ease; 
}
#search-bar:focus { 
    outline: none; 
    border-color: var(--primary-color); 
    background-color: #fff; 
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.4); /* More prominent focus shadow */
}
#search-bar::placeholder {
    color: #888;
}

/* --- Filter Button Styles --- */
.product-filters { 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 18px; /* Increased gap */
    margin-top: 35px; 
    margin-bottom: 60px; /* Increased spacing */
}
.filter-btn { 
    padding: 12px 30px; /* Increased padding */
    border: 2px solid var(--primary-color); /* Thicker border */
    background: transparent; 
    color: var(--primary-color); 
    font-family: var(--font-heading); 
    font-weight: 600; 
    border-radius: var(--border-radius-lg); /* More rounded */
    cursor: pointer; 
    transition: all var(--transition-speed) ease; 
    font-size: 1.05rem;
}
.filter-btn:hover { 
    background: var(--primary-color); 
    color: var(--dark-color); 
    transform: translateY(-5px); /* More pronounced lift on hover */
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3); /* Stronger shadow */
}
.filter-btn.active-filter { 
    background: var(--primary-color); 
    color: var(--dark-color); 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4); 
}

/* --- Product Grid Styles (for the estimation list) --- */
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Slightly wider minmax */
    gap: 35px; /* Increased gap */
    width: 100%; 
    margin-bottom: 60px; /* Increased spacing */
}
.product-card { 
    background: var(--medium-dark-color); 
    border-radius: var(--border-radius-md); 
    box-shadow: var(--box-shadow-light); /* Apply light shadow */
    border: 1px solid rgba(255, 255, 255, 0.1); 
    overflow: hidden; /* Important for description truncation */
    display: flex; 
    flex-direction: column; 
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease; 
    cursor: pointer; /* Indicate it's clickable */
}
.product-card:hover { 
    transform: translateY(-12px); /* More pronounced lift */
    box-shadow: var(--box-shadow-heavy); /* Heavier shadow on hover */
}
.product-card img { 
    width: 100%; 
    aspect-ratio: 1 / 1; 
    object-fit: cover; 
    display: block; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Subtle separator for image */
}
.product-card .card-content { 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
    min-height: 280px; /* Adjusted to give more vertical space consistently */
}
.product-card h3 { 
    padding: 0; 
    margin-bottom: 10px; 
    color: var(--primary-color); 
    font-size: 1.4rem; /* Larger product title */
    line-height: 1.3;
}
.product-card p { 
    padding: 0; 
    color: var(--secondary-text-color); /* Lighter description text */
    font-size: 0.95rem;
    line-height: 1.5;
}
/* Style for links within description */
.product-card p a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color var(--transition-speed) ease;
}
.product-card p a:hover {
    color: var(--primary-dark-variant);
}


/* --- New styles for expandable description --- */
.product-description-wrapper {
    max-height: 4.5em; /* Approximately 3 lines of text, adjust based on font-size and line-height */
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease-out, margin-bottom 0.4s ease-out; /* Smooth transition */
    margin-bottom: 5px; /* Space before "Read More" button or next element */
    flex-shrink: 0; /* Prevent description from shrinking excessively */
}

.product-description-wrapper.expanded {
    max-height: 500px; /* A sufficiently large value for full expansion */
    overflow: visible; /* Allows content to be fully seen */
    margin-bottom: 10px; /* More space when expanded */
}

/* Gradient fade for truncated descriptions */
.product-description-wrapper:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5em; /* Fading gradient height */
    background: linear-gradient(to top, rgba(52, 58, 64, 1), rgba(52, 58, 64, 0)); /* Matches product card background */
    pointer-events: none; /* Allows clicks to pass through */
}

/* Ensure no fade for short descriptions that don't truncate */
.product-description-wrapper.no-truncate::after {
    display: none;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.95rem; 
    font-weight: 500;
    padding: 0;
    margin-top: 5px; /* Space above button */
    margin-bottom: 10px; /* IMPORTANT: Space below button, pushes next element down */
    text-align: left;
    transition: color var(--transition-speed) ease;
    align-self: flex-start; /* Align button to the start */
    flex-shrink: 0; /* Prevent button from shrinking */
    z-index: 10; /* Ensure button is clickable over the fade */
}

.read-more-btn:hover {
    color: var(--primary-dark-variant);
    text-decoration: underline;
}

/* --- Category Badge, Product Rate, Warranty Styles --- */
.category-badge { 
    display: inline-block; 
    background-color: var(--dark-color); 
    color: var(--secondary-text-color); 
    padding: 6px 12px; 
    border-radius: var(--border-radius-sm); 
    font-size: .85rem; 
    margin-top: 0; /* Managed by the preceding element's margin-bottom or flex distribution */
    margin-bottom: 10px; /* Space below badge */
    font-weight: 500; 
    align-self: flex-start; /* Align to start */
    flex-shrink: 0;
}

.product-rate { 
    font-size: 1.6rem; 
    font-weight: 700; 
    color: var(--light-color); 
    margin-top: 0; /* Managed by the preceding element's margin-bottom or flex distribution */
    margin-bottom: 10px; /* Space below rate */
    flex-shrink: 0;
}

.product-warranty {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin-top: 0; /* Managed by the preceding element's margin-bottom or flex distribution */
    margin-bottom: 15px; /* IMPORTANT: Space before quote controls */
    font-weight: 400;
    display: block; 
    flex-shrink: 0;
}

/* NEW: Styles for the 'Note' field on product cards */
.product-note {
    font-size: 0.9em;
    color: var(--secondary-text-color);
    margin-top: 10px; /* Space from element above */
    margin-bottom: 15px; /* Space before quote controls */
    padding: 8px 10px;
    background-color: rgba(255, 193, 7, 0.1); /* Subtle background matching primary color */
    border-left: 3px solid var(--primary-color); /* Highlight with primary color */
    border-radius: var(--border-radius-sm);
    font-style: italic; /* Make it look like a note */
    line-height: 1.4;
    flex-shrink: 0;
    text-align: left;
    width: 100%; /* Take full width */
}
.product-note a { /* Style links within the note */
    color: var(--primary-color);
    text-decoration: underline;
}
.product-note a:hover {
    color: var(--primary-dark-variant);
}


/* --- Quote Estimation Controls & Summary --- */
.quote-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Pushes controls to the very bottom, creating space above */
    padding-top: 20px; 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    flex-shrink: 0;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px; 
    margin-bottom: 5px; 
    cursor: pointer;
    font-size: 1.05rem; 
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: var(--light-color);
    font-weight: 500;
}

/* Hide the browser's default checkbox */
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px; 
    width: 22px; 
    background-color: var(--dark-color);
    border: 2px solid var(--primary-color);
    border-radius: 5px; 
    transition: all var(--transition-speed) ease;
}

/* On mouse-over, add a light background color */
.checkbox-container:hover input ~ .checkmark {
    background-color: #555;
}

/* When the checkbox is checked, add a primary color background */
.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Create the checkmark (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark */
.checkbox-container .checkmark:after {
    left: 7px; 
    top: 3px;
    width: 6px; 
    height: 12px;
    border: solid var(--dark-color); 
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 12px; 
}

.quantity-control label {
    font-weight: 500;
    color: var(--light-color);
    font-size: 1.05rem;
}

.product-quantity-input {
    width: 70px; 
    padding: 10px 12px; 
    border-radius: var(--border-radius-sm); 
    border: 1px solid #555;
    background-color: var(--dark-color);
    color: var(--light-color);
    font-size: 1.05rem; 
    text-align: center;
    transition: all var(--transition-speed) ease;
}

.product-quantity-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.6); 
}

.product-quantity-input:disabled {
    background-color: #333;
    color: #888;
    cursor: not-allowed;
}

.item-total {
    margin-top: 20px; 
    font-size: 1.3rem; 
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
    width: 100%; 
}

#quote-summary {
    background: var(--medium-dark-color);
    border-radius: var(--border-radius-md); 
    box-shadow: var(--box-shadow-heavy); 
    padding: 40px; 
    margin-top: 80px; 
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15); 
    width: 100%; 
}

#quote-summary h3 {
    font-size: 2.5rem; 
    margin-bottom: 30px; 
    color: var(--light-color);
}

#total-amount {
    font-size: 3rem; 
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 40px; 
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.6); 
}

#quote-summary .cta-button {
    margin: 15px; 
    padding: 18px 40px; 
    font-size: 1.1rem; 
}

.print-button {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: 2px solid var(--primary-color);
}
.print-button:hover {
    background-color: var(--primary-dark-variant); 
    color: var(--dark-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

/* NEW: Place Order button style */
.order-button {
    background-color: transparent;
    color: var(--light-color); /* Light text color */
    border: 2px solid var(--light-color); /* Light border */
}
.order-button:hover {
    background-color: var(--light-color); /* Fills with light color */
    color: var(--dark-color); /* Dark text on hover */
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2); /* Light shadow */
}


.contact-button {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.contact-button:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

/* --- Footer --- */
footer { 
    background: #1c2024; 
    text-align: center; 
    padding: 2.5rem 0; 
    border-top: 1px solid rgba(255,255,255,0.15); 
    width: 100%;
}
footer p {
    font-size: 0.95rem;
    color: var(--secondary-text-color);
    margin-bottom: 20px;
}
.social-links a { 
    color: var(--text-color); 
    margin: 0 18px; 
    font-size: 1.6rem; 
    transition: color var(--transition-speed) ease, transform var(--transition-speed) ease; 
}
.social-links a:hover { 
    color: var(--primary-color); 
    transform: translateY(-8px) scale(1.1); 
}

.contact-info {
    margin-top: 25px; 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; 
    gap: 35px; 
}
.contact-info a {
    color: var(--light-color); 
    text-decoration: none;
    font-size: 1.15rem; 
    font-family: var(--font-body);
    transition: color var(--transition-speed) ease;
}
.contact-info a:hover {
    color: var(--primary-color);
}
.contact-info i {
    margin-right: 10px; 
    color: var(--primary-color); 
    font-size: 1.25rem; 
}

/* Added footer navigation styles */
.footer-nav {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 25px; 
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--secondary-text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition-speed) ease;
}

.footer-nav a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Styles for general content pages (About Us, Contact Us, Privacy Policy, Terms) */
.page-content {
    padding-top: 120px; 
    padding-bottom: 80px;
    min-height: calc(100vh - 80px); 
    background-color: var(--dark-color); 
    color: var(--text-color);
    display: none; 
    align-items: center; 
    justify-content: flex-start; 
}

.page-content.active-page-content {
    display: flex; 
    flex-direction: column; 
}


.page-content .container {
    background-color: var(--medium-dark-color);
    padding: 40px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-light);
    text-align: left; 
    width: 100%; 
    max-width: 900px; 
}

.page-content h2 {
    text-align: left; 
    margin-left: 0;
    margin-right: 0;
    font-size: 2.2rem;
    color: var(--primary-color); 
}
.page-content h2::after {
    left: 0; 
    transform: translateX(0);
}
.page-content h3 {
    font-size: 1.6rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--light-color);
}

.page-content p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.page-content ul {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    color: var(--secondary-text-color);
}

.page-content ul li {
    margin-bottom: 8px;
    font-size: 1.05rem;
}
.page-content ol {
    list-style-type: decimal;
    margin-left: 25px;
    margin-bottom: 20px;
    color: var(--secondary-text-color);
}
.page-content ol li {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

/* Contact Page Specific Styles (removed form related styles as the form is gone) */
.contact-details {
    margin-top: 30px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    color: var(--light-color);
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.3rem;
    min-width: 25px; 
    text-align: center;
}

.contact-item a {
    color: var(--light-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.contact-item a:hover {
    color: var(--primary-color);
}


/* --- Scroll & Load Animations --- */
.fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; } 
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive Design --- */
@media (max-width: 992px) { 
    #estimator-section h1 { font-size: 3.5rem; }
    #estimator-section h2 { font-size: 2.2rem; }
    #estimator-section p { font-size: 1.25rem; }
    .product-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } 
    #quote-summary h3 { font-size: 2rem; }
    #total-amount { font-size: 2.5rem; }

    .page-content { padding-top: 100px; } 
    .page-content h2 { font-size: 2rem; }
    .page-content h3 { font-size: 1.4rem; }
    .page-content p, .page-content ul li, .page-content ol li { font-size: 1rem; }
    .contact-item { font-size: 1rem; }
    .contact-item i { font-size: 1.2rem; }
}
@media (max-width: 768px) { 
    section { padding: 60px 0; }
    h2 { font-size: 2.2rem; margin-bottom: 40px; }
    #estimator-section { padding-top: 100px; padding-bottom: 60px; }
    #estimator-section h1 { font-size: 3rem; } 
    #estimator-section h2 { font-size: 1.8rem; }
    #estimator-section p { font-size: 1.1rem; margin-bottom: 20px; } 
    .hamburger { display: block; } 
    nav ul { 
        display: none; 
        flex-direction: column; 
        width: 100%; 
        position: absolute; 
        top: 73px; 
        left: 0; 
        background-color: var(--medium-dark-color); 
        border-bottom: 1px solid rgba(255,255,255,0.1); 
        box-shadow: var(--box-shadow-light);
    } 
    nav ul.active { display: flex; } 
    nav ul li { text-align: center; margin: 0; } 
    nav ul li a { padding: 15px; display: block; border-bottom: 1px solid #495057; } 
    .contact-info {
        flex-direction: column;
        gap: 20px;
    }
    .search-container { max-width: 100%; }
    #search-bar { padding: 15px 20px 15px 50px; font-size: 1rem; }
    .product-filters { gap: 10px; margin-bottom: 40px; }
    .filter-btn { padding: 10px 20px; font-size: 0.95rem; }
    .product-grid { gap: 25px; margin-bottom: 40px; }
    .product-card h3 { font-size: 1.3rem; }
    .product-card p { font-size: 0.95rem; }
    .product-rate { font-size: 1.4rem; }
    .category-badge { padding: 5px 10px; font-size: 0.8rem; }
    .checkbox-container { padding-left: 28px; font-size: 0.95rem; }
    .checkmark { height: 20px; width: 20px; }
    .checkmark:after { left: 6px; top: 2px; width: 5px; height: 10px; border-width: 0 2px 2px 0; }
    .quantity-control { width: 100%; justify-content: flex-start; }
    .product-quantity-input { flex-grow: 1; max-width: 90px; }
    .item-total { text-align: left; font-size: 1.1rem; margin-top: 10px; }
    #quote-summary { padding: 30px; margin-top: 60px; }
    #quote-summary h3 { font-size: 1.8rem; margin-bottom: 20px; }
    #total-amount { font-size: 2.2rem; margin-bottom: 30px; }
    #quote-summary .cta-button { margin: 10px 5px; padding: 15px 30px; font-size: 1rem; }
    footer { padding: 2rem 0; }
    .social-links a { margin: 0 12px; font-size: 1.4rem; }
    .contact-info a { font-size: 1.05rem; }
    .contact-info i { margin-right: 6px; font-size: 1.1rem; }
    .footer-nav { margin-top: 20px; gap: 15px; }

    .page-content { padding-top: 100px; padding-bottom: 60px; }
    .page-content .container { padding: 30px; }
    .page-content h2 { font-size: 1.8rem; }
    .page-content h3 { font-size: 1.3rem; }
    .page-content p, .page-content ul li, .page-content ol li { font-size: 0.95rem; }
    .contact-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .contact-item i { min-width: auto; margin-right: 0; }

    .product-description-wrapper { max-height: 4em; margin-bottom: 5px; } 
    .read-more-btn { font-size: 0.85rem; margin-top: 5px; margin-bottom: 8px; } 
    .product-warranty { margin-top: 8px; margin-bottom: 12px; } 
    .product-note { font-size: 0.85em; margin-top: 8px; margin-bottom: 12px; padding: 6px 8px; } /* Responsive note style */

    /* Order form responsive adjustments */
    #order-form-modal-content {
        padding: 20px;
    }
    #order-form h3 {
        font-size: 1.8rem;
    }
    .form-group label {
        font-size: 0.95rem;
    }
    .form-group input {
        padding: 10px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    #estimator-section h1 { font-size: 2.2rem; }
    #estimator-section h2 { font-size: 1.6rem; margin-bottom: 30px; }
    #estimator-section p { font-size: 1rem; }
    .search-container i { left: 15px; font-size: 1.1rem; }
    #search-bar { padding: 12px 15px 12px 45px; font-size: 0.95rem; }
    .filter-btn { padding: 8px 15px; font-size: 0.85rem; }
    .product-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
    .product-card h3 { font-size: 1.1rem; margin-bottom: 5px; }
    .product-card p { font-size: 0.85rem; }
    .product-rate { font-size: 1.2rem; margin-bottom: 5px; }
    .category-badge { padding: 4px 8px; font-size: 0.75rem; margin-bottom: 10px; }
    .checkbox-container { padding-left: 28px; font-size: 0.95rem; }
    .checkmark { height: 20px; width: 20px; }
    .checkmark:after { left: 6px; top: 2px; width: 5px; height: 10px; border-width: 0 2px 2px 0; }
    .quantity-control label { font-size: 0.95rem; }
    .product-quantity-input { width: 60px; padding: 8px; font-size: 0.95rem; }
    .item-total { font-size: 1rem; }
    #quote-summary h3 { font-size: 1.6rem; }
    #total-amount { font-size: 1.8rem; }
    #quote-summary .cta-button { margin: 8px 4px; padding: 12px 20px; font-size: 0.9rem; }
    footer { padding: 1.5rem 0; }
    footer p { font-size: 0.85rem; margin-bottom: 15px; }
    .social-links a { margin: 0 10px; font-size: 1.3rem; }
    .contact-info a { font-size: 1rem; }
    .contact-info i { margin-right: 6px; font-size: 1.1rem; }
    .footer-nav { gap: 10px; font-size: 0.85rem; }

    .page-content .container { padding: 20px; }
    .page-content h2 { font-size: 1.6rem; }
    .page-content h3 { font-size: 1.2rem; }
    .page-content p, .page-content ul li, .page-content ol li { font-size: 0.9rem; }
    .contact-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .contact-item i { min-width: auto; margin-right: 0; }

    .product-description-wrapper { max-height: 4em; margin-bottom: 5px; } 
    .read-more-btn { font-size: 0.85rem; margin-top: 5px; margin-bottom: 8px; } 
    .product-warranty { margin-top: 8px; margin-bottom: 12px; } 
    .product-note { font-size: 0.85em; margin-top: 8px; margin-bottom: 12px; padding: 6px 8px; } /* Responsive note style */

    /* Order form responsive adjustments */
    #order-form h3 {
        font-size: 1.6rem;
    }
    .form-group label {
        font-size: 0.9rem;
    }
    .form-group input {
        padding: 8px;
        font-size: 0.9rem;
    }
}

/* Print specific styles for the generated quote window (no change here, as it's for a popup) */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    header, footer, .hamburger, #estimator-section .cta-button, .search-container, .product-filters, .quote-controls,
    .page-content:not(.active-page-content), /* Hide all non-active content sections */
    #order-form-modal-overlay /* Hide order form modal */
    { 
        display: none !important;
    }
    /* Ensure the active content section is displayed when printing */
    .page-content.active-page-content {
        display: block !important; /* Use block for print layout */
        flex-direction: unset !important;
        justify-content: unset !important;
        align-items: unset !important;
        padding-top: 20px !important;
        min-height: auto !important; 
        background: none !important; 
        color: #000 !important; 
    }

    #estimator-section .hero-content, .page-content .container {
        margin: 0 !important;
        align-items: flex-start !important; /* Adjust alignment for print */
        gap: 15px !important;
        background-color: #fff !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }
    #estimator-section h1, #estimator-section h2, #estimator-section h3, #estimator-section p,
    .page-content h2, .page-content h3, .page-content p, .page-content ul li, .page-content ol li {
        color: #000 !important;
        text-shadow: none !important;
        text-align: left !important; /* Ensure text is left aligned in print */
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: none !important;
    }
    #estimator-section h2::after, .page-content h2::after {
        display: none !important; /* Hide underline for print */
    }
    #estimator-section .section-description {
        color: #333 !important;
        text-align: left !important;
    }
    .product-card {
        border: 1px solid #eee;
        box-shadow: none;
        page-break-inside: avoid;
    }
    .product-card img {
        max-width: 100px; 
        max-height: 100px;
        float: left;
        margin-right: 15px;
    }
    .item-total {
        text-align: left;
        color: #000;
        font-size: 1rem;
        font-weight: 500;
    }
    #quote-summary {
        background: #f0f0f0;
        border: 1px solid #ddd;
        box-shadow: none;
        margin-top: 30px;
        text-align: left !important;
    }
    #quote-summary h3 {
        text-align: left !important;
    }
    #total-amount {
        color: #000;
        text-shadow: none;
        font-size: 2rem;
        text-align: left !important;
    }
    .contact-item a {
        color: #333 !important;
    }
}


/* --- Product Modal Specific Styles --- */
#product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Above everything else */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#product-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#product-modal-content {
    background-color: var(--medium-dark-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-heavy);
    width: 90%;
    max-width: 800px; /* Max width for the modal */
    position: relative;
    padding: 30px;
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Max height to allow scrolling */
    overflow-y: auto; /* Enable scrolling for content */
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

#product-modal-overlay.visible #product-modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--secondary-text-color);
    cursor: pointer;
    transition: color var(--transition-speed) ease;
    z-index: 10; /* Ensure it's clickable */
}

.modal-close-btn:hover {
    color: var(--primary-color);
}

.modal-body {
    display: flex;
    flex-direction: column; /* Stack image and details vertically on smaller screens */
    gap: 25px; /* Spacing between image and details */
    align-items: center; /* Center content horizontally initially */
}

#modal-product-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0; /* Prevent image from shrinking */
    object-fit: contain; /* Ensure image fits without cropping */
    max-height: 350px; /* Limit image height */
}

.modal-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align text content to the left */
    width: 100%; /* Take full width */
}

#modal-product-name {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center; /* Center name */
    width: 100%;
}

#modal-product-description {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.7;
    white-space: pre-wrap; /* Preserves formatting and line breaks */
    word-wrap: break-word; /* Breaks long words */
    max-height: unset; /* Remove max-height for modal description */
    overflow: visible; /* Ensure full description is visible */
    /* Remove any fade effect from the modal description */
}
#modal-product-description::after {
    display: none !important; 
}
/* Style links within the modal description */
#modal-product-description a {
    color: var(--primary-color);
    text-decoration: underline;
}
#modal-product-description a:hover {
    color: var(--primary-dark-variant);
}


#modal-product-test {
    font-size: 1rem;
    color: var(--secondary-text-color);
    margin-top: 10px;
    margin-bottom: 25px;
    padding: 10px 15px;
    background-color: var(--dark-color);
    border-radius: var(--border-radius-sm);
    width: 100%;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* NEW: Styles for the 'Note' field in the modal */
#modal-product-note {
    font-size: 1rem;
    color: var(--secondary-text-color);
    margin-top: 15px;
    margin-bottom: 25px;
    padding: 12px 18px;
    background-color: rgba(255, 193, 7, 0.15); /* Slightly stronger background for modal note */
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    font-style: italic;
    line-height: 1.5;
    width: 100%;
    display: none; /* Hidden by default if no content, shown by JS */
}
.product-note-modal-label {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 5px;
}
#modal-product-note a { /* Style links within the modal note */
    color: var(--primary-color);
    text-decoration: underline;
}
#modal-product-note a:hover {
    color: var(--primary-dark-variant);
}


#modal-quote-controls {
    width: 100%;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0; /* Ensures it flows correctly after previous elements */
}
#modal-quote-controls .checkbox-container {
    margin-bottom: 0; /* Remove extra margin for modal controls */
}

/* Specific styles for modal's checkbox and quantity input to override generic ones if needed */
.product-select-checkbox-modal + .checkmark { /* Targeting the custom checkbox for modal */
    /* Adjust if you want different size/style in modal */
}
.product-quantity-input-modal {
    /* Adjust if you want different size/style in modal */
}


/* Responsive adjustments for modal */
@media (min-width: 768px) {
    .modal-body {
        flex-direction: row; /* Side-by-side on larger screens */
        align-items: flex-start; /* Align top */
    }
    #modal-product-image {
        max-width: 40%; /* Image takes up less width */
        max-height: none; /* Allow more height */
    }
    .modal-details {
        flex-grow: 1; /* Details take remaining space */
        align-items: flex-start; /* Ensure left alignment */
        text-align: left;
    }
    #modal-product-name {
        text-align: left; /* Align name left on larger screens */
    }
}

@media (max-width: 480px) {
    #product-modal-content {
        padding: 20px;
    }
    .modal-close-btn {
        font-size: 1.5rem;
        top: 10px;
        right: 10px;
    }
    #modal-product-name {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    #modal-product-description {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    #modal-product-test {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    #modal-product-note { /* Responsive adjustments for modal note */
        font-size: 0.9rem;
        padding: 10px 12px;
        margin-top: 10px;
        margin-bottom: 20px;
    }
    .product-note-modal-label {
        margin-right: 3px;
    }
    #modal-quote-controls {
        padding-top: 15px;
    }
}

/* NEW: Styles for the Order Form Modal */
#order-form-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Darker overlay for order form */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002; /* Higher than product modal */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#order-form-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#order-form-modal-content {
    background-color: var(--medium-dark-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-heavy);
    width: 90%;
    max-width: 550px; /* Max width for the order form */
    position: relative;
    padding: 30px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

#order-form-modal-overlay.visible #order-form-modal-content {
    transform: translateY(0);
}

#order-form-modal-content h3 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

#order-form-modal-content p {
    text-align: center;
    color: var(--secondary-text-color);
    margin-bottom: 25px;
}

#order-form .form-group {
    margin-bottom: 20px;
}

#order-form .form-group label {
    display: block;
    font-size: 1.05rem;
    color: var(--light-color);
    margin-bottom: 8px;
    font-weight: 500;
}

#order-form .form-group input {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--border-radius-sm);
    border: 1px solid #555;
    background-color: var(--dark-color);
    color: var(--light-color);
    font-size: 1.05rem;
    transition: all var(--transition-speed) ease;
}

#order-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.6);
}

#order-form .cta-button {
    width: 100%;
    margin-top: 20px;
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: 2px solid var(--primary-color);
    padding: 15px 25px;
    font-size: 1.1rem;
}

#order-form .cta-button:hover {
    background-color: var(--primary-dark-variant);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
    transform: translateY(-3px);
}

.form-note {
    font-size: 0.85rem;
    color: var(--secondary-text-color);
    margin-top: 20px;
    text-align: center;
    line-height: 1.4;
}
