/* 1. Refined Box-Sizing Fix (Prevents elements from becoming too wide) */
html {
    box-sizing: border-box; 
}
*, *::before, *::after {
    box-sizing: inherit; 

}
/* 2. Horizontal Scrollbar Killer */
body {
    /* This rule explicitly prevents any horizontal scrolling on the page */
    overflow-x: hidden; 
}
/* Define CSS Variables for easy color management */
:root {
    --primary-color: #008080; /* Teal */
    --secondary-color: #eb7608; /* Orange */
    --accent-color: #07cab0; /* Light Teal */
    --background-light: #f9f9f9;
    --background-lighter: #e0f7fa;
    --text-dark: #333;
    --text-medium: #555;
    --text-light: #fff;
    /* New colors for forms and alerts */
    --form-primary-blue: #2575fc;
    --form-darker-blue: #1a5bbd;
    --form-primary-purple: #6a11cb;
    --form-darker-purple: #550fad;
    --form-teal: #00bcd4;
    --form-darker-teal: #0097a7;
    --form-light-gray: #f4f7f6;
    --form-soft-white: #ffffff;
    --form-light-green: #e6ffe6;
    --form-success-green: #28a745;
    --form-light-red: #ffe6e6;
    --form-error-red: #dc3545;
}

<style>
/* Add the essential responsive and box-sizing rules */
*, *::before, *::after {
    box-sizing: border-box; 
}

body {
    overflow-x: hidden; /* Prevents unwanted horizontal scrollbar on phones */
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
}


/* Universal responsive image rule */
img {
    max-width: 100%;
    height: auto;
    display: block; /* Helps prevent extra space below images */
}

/* Container for content within sections */
.container {
    max-width: 1200px; /* Max width for larger screens */
    margin: 0 auto; /* Center the container */
    padding: 0 15px; /* Add horizontal padding for smaller screens */
    box-sizing: border-box; /* Include padding in the element's total width and height */
}

/* Header and Navigation Styles */
header {
    background-color: #f4f4f4;
    padding: 10px 15px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    grid-template-areas:
        "logo-brand contact-info"
        "search-bar search-bar"
        "main-nav main-nav";
    gap: 10px 15px;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

.logo-brand-container {
    grid-area: logo-brand;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 5px 0;
}

.logo-brand-container img {
    margin-right: 10px;
    width: 50px;
    height: 40px;
    flex-shrink: 0;
}

.logo-brand-container h3.flip-animation {
    margin: 0;
    font-size: clamp(12px, 3vw, 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-info-container {
    grid-area: contact-info;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.8em;
    padding: 2px;
    gap: 5px;
    color: #333;
    flex-shrink: 0;
    row-gap: 2px;
    text-align: right;
}

.contact-info-container a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.contact-info-container a:hover {
    color: var(--secondary-color);
}

.contact-info-container i {
    font-size: 1em;
    color: var(--primary-color);
}

.contact-info-container .top-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    row-gap: 4px;
}
.contact-info-container .email {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-nav-links {
    grid-area: main-nav;
    background-color: var(--accent-color);
    width: 100%;
    padding: 0;
}

.main-nav-links ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px 10px;
}

.main-nav-links li {
    font-size: clamp(16px, 2.5vw, 18px);
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
}

.main-nav-links a, .main-nav-links button { /* Added button for logout */
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    transition: background-color 0.3s, border-radius 0.3s;
    border-radius: 8px;
    white-space: nowrap;
    background: none; /* For buttons */
    border: none; /* For buttons */
    cursor: pointer; /* For buttons */
    font-family: inherit; /* For buttons */
    font-size: inherit; /* For buttons */
    font-weight: bold; /* For buttons */
}

.main-nav-links a:hover, .main-nav-links button:hover {
    background-color: var(--secondary-color);
    border-radius: 60px;
}

.main-nav-links .dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--accent-color);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 8px;
    overflow: hidden;
    padding: 5px 0;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 5px;
}

.main-nav-links .dropdown-content a {
    padding: 10px 16px;
    font-size: 0.9em;
    white-space: normal;
}

.search-container {
    grid-area: search-bar;
    position: relative;
    display: flex;
    align-items: center;
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    z-index: 999;
    padding: 5px 0;
}

.search-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--primary-color);
    border-right: none;
    border-radius: 20px 0 0 20px;
    font-size: 14px;
    outline: none;
    min-width: 0;
}

.search-button {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    height: fit-content;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 0 4%;
    box-sizing: border-box;
    text-align: center;
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.5);
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 900px;
    width: 98%;
    margin-top: 25px;
    z-index: 1;
    padding-bottom: 15px;
}

/* Box Styling (Quote and Refer) */
.quote-box, .refer-box {
    background-color: rgba(245, 241, 241, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: flex-start;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    color: var(--text-dark);
    max-height: 600px;
    animation-duration: 1s;
    animation-fill-mode: both;
    box-sizing: border-box;
    margin-left: 10px;
}

.quote-box h2 {
    color: var(--form-primary-blue);
    margin-bottom: 5px;
    font-size: 1.6em;
}

.refer-box h4 {
    color: var(--form-primary-purple);
    margin-bottom: 8px;
    font-size: 1.3em;
}

.refer-box p {
    color: var(--text-medium);
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 0.9em;
    margin-bottom: 4px;
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="number"], /* Added for admin panel */
form input[type="file"],   /* Added for admin panel */
form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    width: calc(100% - 20px);
    transition: border-color 0.3s ease;
    resize: vertical;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="tel"]:focus,
form input[type="number"]:focus,
form textarea:focus {
    border-color: var(--form-primary-blue);
    outline: none;
}

form button[type="submit"],
.btn, /* General button style */
.refer-btn,
.copy-link {
    background-color: var(--form-primary-blue);
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

form button[type="submit"]:hover,
.btn:hover,
.refer-btn:hover {
    background-color: var(--form-darker-blue);
    transform: translateY(-1px);
}
.copy-link {
    background-color: var(--form-teal);
}
.copy-link:hover {
    background-color: var(--form-darker-teal);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}
.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-danger {
    background-color: var(--form-error-red);
    color: var(--text-light);
}
.btn-danger:hover {
    background-color: #a71d2a; /* Darker red */
}


/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(243, 238, 238, 0.904);
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    animation: fadeIn 0.3s forwards;
    /* Removed overflow: auto; from modal itself */
}

.modal-content {
    background-color: var(--form-soft-white);
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    width: 90%;
    max-width: 500px;
    animation: slideInTop 0.4s forwards;
    color: var(--text-dark);
    max-height: 80vh; /* Limits modal height to 80% of viewport height */
    overflow-y: auto; /* Enable vertical scrolling for modal content */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: thin; /* Firefox scrollbar */
    scrollbar-color: var(--form-primary-purple) #f1f1f1; /* Firefox scrollbar color */
}

/* Webkit scrollbar styles for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--form-primary-purple);
    border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--form-darker-purple);
}

.modal-content h2 {
    color: var(--form-primary-purple);
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.6em;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #444;
    font-size: 0.85em;
}

.close {
    color: #aaa;
    position: absolute;
    top: 8px;
    right: 18px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #e74c3c;
    text-decoration: none;
}

.method-select {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: -8px;
    margin-bottom: 12px;
    gap: 8px;
}

.method-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #555;
    background-color: #f9f9f9;
    flex: 1;
    justify-content: center;
    min-width: 90px;
    font-size: 0.85em;
}

.method-option input[type="radio"] {
    display: none;
}

.method-option input[type="radio"]:checked + i {
    color: var(--form-primary-purple);
}

.method-option input[type="radio"]:checked ~ span {
    color: var(--form-primary-purple);
}

.method-option:hover {
    border-color: var(--form-primary-purple);
    background-color: #f0e6fa;
}

.method-option input[type="radio"]:checked + i,
.method-option input[type="radio"]:checked + span {
    color: var(--form-primary-purple);
}

.method-option input[type="radio"]:checked {
    border-color: var(--form-primary-purple);
    background-color: #f0e6fa;
    box-shadow: 0 0 6px rgba(106, 17, 203, 0.15);
}

.method-option i {
    font-size: 1em;
    color: #999;
    transition: color 0.3s ease;
}

#referralLinkDisplay, #quoteLinkDisplay {
    width: calc(100% - 80px);
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85em;
    background-color: #f0f0f0;
    cursor: text;
    margin-right: 6px;
    text-align: center;
    word-break: break-all;
    box-sizing: border-box;
}

.submission-message {
    margin-top: 8px;
    padding: 6px;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    font-size: 0.85em;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.5s ease-in-out;
}

.submission-message.success {
    background-color: var(--form-light-green);
    color: var(--form-success-green);
    border: 1px solid var(--form-success-green);
    opacity: 1;
}

.submission-message.error {
    background-color: var(--form-light-red);
    color: var(--form-error-red);
    border: 1px solid var(--form-error-red);
    opacity: 1;
}
.submission-message.info {
    background-color: #e0f7fa;
    color: #00838f;
    border: 1px solid #00bcd4;
    opacity: 1;
}

/* ABOUT US SECTION STYLES */
.about-us-section {
    padding: 40px 15px;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.about-us-section h2 {
    font-size: clamp(2em, 5vw, 2.5em);
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

.about-us-section h3 {
    font-size: clamp(1.4em, 4vw, 1.8em);
    margin-top: 30px;
}

.about-us-section p {
    margin-bottom: 15px;
    font-size: clamp(1em, 2.5vw, 1.1em);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.mission-vision-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.mission, .vision {
    flex: 1;
    min-width: unset;
    width: 100%;
    background-color: var(--accent-color);
    color: var(--text-light);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
    box-sizing: border-box;
}

.values-grid, .differentiators-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Product Display Section (index.html) */
 .services-section, .testimonials-section, .blog-section {
    padding: 40px 15px;
    background-color: var(--background-lighter);
    text-align: center;
}

.services-section h2, .testimonials-section h2, .blog-section h2 {
    font-size: clamp(2em, 5vw, 2.5em);
    margin-bottom: 10px;
}




/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.service-card {
    background-color: var(--text-light);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card i {
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 1em;
    color: var(--text-medium);
    flex-grow: 1;
}

/* Testimonials Section */
.testimonials-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding-bottom: 15px;
    justify-content: flex-start;
}

.testimonial-card {
    flex: 0 0 90%;
    scroll-snap-align: start;
    background-color: var(--text-light);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    text-align: center;
    min-width: 280px;
    box-sizing: border-box;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 15px;
    color: var(--text-medium);
}

.testimonial-card .author {
    font-weight: bold;
    color: var(--primary-color);
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.blog-post-card {
    background-color: var(--text-light);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-post-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-post-content h3 {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

.blog-post-content p {
    font-size: 0.95em;
    color: var(--text-medium);
    margin-bottom: 15px;
    flex-grow: 1;
}

.blog-post-content a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    margin-top: auto;
}

/* Contact Us Section */
.contact-us-section {
    background-color: var(--background-light);
    padding: 40px 15px;
    color: var(--text-dark);
    text-align: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.contact-form-container {
    background-color: var(--form-soft-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 30px auto;
    text-align: left;
    box-sizing: border-box;
}

.contact-form-container form {
    display: grid;
    gap: 15px;
}

.contact-form-container label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.contact-form-container input[type="text"],
.contact-form-container input[type="email"],
.contact-form-container input[type="tel"],
.contact-form-container textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
}

.contact-form-container textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form-container button {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: fit-content;
    margin-top: 15px;
}

/* Branch Location Section */
.branch-location-section {
    padding: 40px 15px;
    background-color: var(--background-light);
    text-align: center;
    color: var(--text-dark);
    box-sizing: border-box;
}

.branch-location-section h2 {
    font-size: clamp(2em, 5vw, 2.5em);
    margin-bottom: 30px;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.location-details, .map-container {
    flex: 1;
    padding: 20px;
    background-color: var(--form-soft-white);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: left;
    box-sizing: border-box;
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    border: none;
}

.location-details h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.location-details p {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.social-media-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-media-links a {
    font-size: 1.8em;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

/* Footer */
footer {
    background-color: #333;
    color: var(--text-light);
    padding: 30px 15px;
    text-align: center;
    font-size: 0.95em;
    border-top: 5px solid var(--secondary-color);
    box-sizing: border-box;
    width: 100%;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

footer p {
    margin: 0;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-separator {
    display: none;
}

/* Fade-in Animations */
.fade-in, .fade-in-left, .fade-in-right, .fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible, .fade-in-left.is-visible, .fade-in-right.is-visible, .fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-in-left {
    transform: translateX(-20px);
}
.fade-in-left.is-visible {
    transform: translateX(0);
}
.fade-in-right {
    transform: translateX(20px);
}
.fade-in-right.is-visible {
    transform: translateX(0);
}
.fade-in-up {
    transform: translateY(20px);
}
.fade-in-up.is-visible {
    transform: translateY(0);
}

/* Media Queries for Responsive Design */

/* Tablet and larger screens (e.g., min-width: 768px) */
@media screen and (min-width: 768px) {
    header {
        grid-template-areas:
            "logo-brand contact-info"
            "main-nav main-nav"
            "search-bar search-bar";
        gap: 15px 20px;
        padding: 15px 30px;
    }

    .logo-brand-container h3.flip-animation {
        font-size: 18px;
    }

    .contact-info-container {
        flex-direction: row;
        gap: 15px;
        font-size: 0.9em;
    }
    .contact-info-container .top-contact {
        flex-direction: row;
    }

    .main-nav-links ul {
        gap: 5px 25px;
    }

    .main-nav-links li {
        font-size: 18px;
    }

    .search-container {
        width: 60%;
        margin: 0 auto;
    }

    /* Adjustments for hero section boxes on tablets */
    .hero-content {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 80px 5%;
        margin-top: 0;
    }

    .quote-box, .refer-box {
        flex: 0 0 calc(50% - 15px);
        max-width: 450px;
    }

    .about-us-section {
        padding: 60px 30px;
    }

    .mission-vision-section {
        flex-direction: row;
        gap: 30px;
        margin-top: 40px;
    }

    .mission, .vision {
        min-width: 350px;
    }

    .values-grid, .differentiators-list {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px;
    }

    .products-grid, .services-grid, .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }

    .testimonial-card {
        flex: 0 0 calc(50% - 10px);
        min-width: 350px;
    }

    .location-info {
        flex-direction: row;
        gap: 40px;
    }

    footer .container {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }

    .footer-separator {
        display: inline;
    }
}

/* Desktop and larger screens (e.g., min-width: 1024px) */
@media screen and (min-width: 1024px) {
    header {
        grid-template-areas:
            "logo-brand search-bar contact-info"
            "main-nav main-nav main-nav";
        grid-template-columns: auto 1fr auto;
        padding: 10px 40px;
        gap: 10px 30px;
    }

    .logo-brand-container {
        justify-content: flex-start;
    }

    .contact-info-container {
        font-size: 0.95em;
        justify-content: flex-end;
    }

    .main-nav-links ul {
        justify-content: flex-start;
        gap: 5px 30px;
    }

    .main-nav-links li {
        font-size: 18px;
    }

    .search-container {
        margin: 0;
        width: 100%;
    }

    .hero-content {
        padding: 3px;
        flex-direction: row;
        justify-content: space-around;
        margin-left: -120px;
        margin-top: 2px;
    }

    .quote-box, .refer-box {
        flex: 0 0 40%;
        max-width: 500px;
    }

    .about-us-section, .products-section, .services-section,
    .blog-section, .contact-us-section,
    .branch-location-section, footer {
        padding: 80px 40px;
    }

    .values-grid, .differentiators-list {
        grid-template-columns: repeat(auto-fit, minmin(250px, 1fr));
        gap: 30px;
    }

}

/* Large Desktop screens (e.g., min-width: 1200px) */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .products-grid, .services-grid, .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
     #referralLinkDisplay, #quoteLinkDisplay {
        width: calc(100% - 100px);
        margin-right: 10px;
    }
}

/* Keyframe for flip animation */
@keyframes flip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

.flip-animation {
    display: inline-block;
    font-weight: bold;
    color: var(--secondary-color);
    animation: flip 7s infinite linear;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Styles for suggestions box */
.suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--form-soft-white);
    border: 1px solid #ccc;
    border-top: none;
    max-height: 220px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}

.suggestions-box div {
    padding: 10px;
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.suggestions-box div:hover {
    background-color: #f0f0f0;
}

/* Animations for modals/alerts */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInTop {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Custom Alert Box (for non-form related messages, or as a fallback) */
#customAlertBox {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1em;
    z-index: 3000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}
#customAlertBox.show {
    display: block;
}

/* Admin Panel Specific Styling (from previous admin.html) */
.admin-main {
    max-width: 1000px; /* Slightly wider for admin tables */
    margin-top: 20px; /* Adjust margin for admin main content */
}
.add-product-section,
.manage-products-section {
    background-color: var(--form-soft-white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}
.product-form .form-group {
    margin-bottom: 15px;
}
.product-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #444;
}
.product-form input[type="text"],
.product-form input[type="number"],
.product-form textarea,
.product-form input[type="file"] {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}
.product-form textarea {
    resize: vertical;
    min-height: 80px;
}
.admin-table-container {
    overflow-x: auto; /* Enables horizontal scrolling on small screens */
}
.admin-table-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.admin-table-container th,
.admin-table-container td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}
.admin-table-container th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
}
.admin-table-container td img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}
.admin-table-container td.actions {
    white-space: nowrap; /* Prevents buttons from wrapping */
}
.admin-table-container td .btn {
    margin-right: 5px;
    margin-bottom: 5px; /* Add some margin for stacked buttons on mobile */
}

/* Responsive adjustments for admin table */
@media (max-width: 768px) {
    .admin-table-container table,
    .admin-table-container th,
    .admin-table-container td {
        display: block; /* Make table elements stack on small screens */
        width: 100%;
    }
    .admin-table-container tbody tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        display: block;
    }
    .admin-table-container td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }
    .admin-table-container td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: calc(50% - 20px);
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
    .admin-table-container td:first-of-type {
        text-align: center; /* Center image */
    }
    .admin-table-container td.actions {
        text-align: center;
    }
}
              







/* --- Pagination Controls --- */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 10px;
}

.pagination-button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 1px solid var(--button-bg-hover);
    padding: 8px 15px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination-button:hover:not(.active) {
    background-color: var(--button-bg-hover);
    color: var(--button-text-hover);
}

.pagination-button.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    cursor: default;
    font-weight: bold;
}

/* --- Category Dropdown Styling --- */
.main-nav .dropdown {
    position: relative;
    display: inline-block;
}
#all-categories-container {
    display: block;       /* stack children vertically */
    width: 100%;
}

.product-category-section {
    display: block;       /* ensure each section takes full row */
    width: 100%;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.product-category-section:last-child {
    border-bottom: none;
}


.main-nav .dropdown .dropbtn {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--nav-link-color);
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.main-nav .dropdown .dropbtn:hover {
    background-color: var(--nav-hover-bg);
    color: var(--nav-hover-color);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--dropdown-bg); /* Use a suitable variable or color */
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10;
    border-radius: var(--border-radius-sm);
    overflow: hidden; /* For rounded corners on links */
    top: 100%; /* Position directly below the dropdown button */
    left: 0;
}

.dropdown-content a {
    color: var(--dropdown-text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: var(--dropdown-hover-bg);
    color: var(--dropdown-hover-text-color);
}

.dropdown-content a[data-category="All"] {
    font-weight: bold;
    border-bottom: 1px solid var(--border-color); /* Separator for "All" */
}

/* Ensure dropdown shows on hover, or via JS click */
/* If you want pure CSS hover:
.main-nav .dropdown:hover .dropdown-content {
    display: block;
}
*/

/* For JavaScript controlled dropdown, the JS will set display: block/none */

/* --- Info/Error Messages (from main.js showAlert) --- */
.info-message {
    text-align: center;
    padding: 15px;
    background-color: var(--info-bg);
    color: var(--info-text);
    border-radius: var(--border-radius-sm);
    margin: 20px auto;
    width: fit-content;
    max-width: 80%;
}
/* Existing Products List - List View Styles */
.product-list {
    list-style:lower-latin;
    padding: 0;
    margin: 0;
    display: flex; /* Enable flexbox for the list items */
    flex-direction: column; /* Stack list items vertically */
    gap: 0px; /* Space between each product item */
}

.product-list-item {
    display: flex; /* Arrange content inside each list item horizontally */
    align-items: flex-start; /* Align items to the top (image, details, stock/specs, actions) */
    background-color: var(--card-bg); /* Use a variable for consistent background */
    border: 1px solid var(--border-color); /* Light border */
    border-radius: var(--border-radius-md); /* Consistent border-radius */
    padding: 0px;
    box-shadow: var(--shadow-small); /* Subtle shadow */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Smooth hover effects */
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    gap: 5px; /* Gap between main sections (image, details, stock/specs, actions) */
}

.product-list-item:hover {
    transform: translateY(-3px); /* Slightly lift on hover */
    box-shadow: var(--shadow-medium); /* Enhanced shadow on hover */
}

.product-item-image {
    flex-shrink: 0; /* Prevent image from shrinking */
    width: 130px; /* Fixed width for the image container */
    height: 130px; /* Fixed height for the image container */
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    overflow: hidden; /* Hide overflow if image is larger */
}

.product-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the container, cropping if necessary */
    display: block; /* Remove extra space below image */
    border-radius: var(--border-radius-sm);
}

.product-item-details-group {
    flex-grow: 1; /* Allow this group to take primary available space */
    min-width: 200px; /* Ensure it doesn't get too small */
    max-width: 45%; /* Limit its width to ensure other elements have space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-item-details-group h4 {
    margin: 0 0 5px 0;
    color: var(--text-color-primary);
    font-size: 1.1em;
    /* white-space: nowrap; Prevent product name from wrapping initially */
    /* overflow: hidden; Hide overflow text */
    /* text-overflow: ellipsis; Add ellipsis for overflow */
}

.product-item-details-group .category {
    font-size: 0.85em;
    color: var(--text-color-secondary);
    margin-bottom: 5px;
}

.product-item-details-group .description {
    font-size: 1.9em;
    color: var(--text-color-secondary);
    margin-bottom: 10px;
    line-height: 0.7;
    max-height: 3.8em; /* Show about 3 lines of description */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
}

.product-item-details-group .price {
    font-size: 1em;
    font-weight: bold;
    color: var(--text-color-primary);
    margin-bottom: 5px;
}

.product-item-details-group .price .original-price {
    text-decoration: line-through;
    color: var(--text-color-secondary);
    font-weight: normal;
    margin-left: 8px;
    font-size: 0.9em;
}

.product-item-details-group .discount-badge {
    background-color: var(--accent-color); /* Use accent color for discount */
    color: #fff;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.75em;
    font-weight: bold;
    margin-right: 8px;
    vertical-align: middle;
}

.product-item-stock-specs {
    display: flex;
    flex-direction: column; /* Stack quantity and specs vertically */
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    min-width: 150px; /* Give it some minimum width */
    margin-left: auto; /* Push this block to the right if there's space */
    text-align: right; /* Align text within this block to the right */
}

.product-item-stock-specs .quantity {
    font-size: 0.9em;
    color: var(--text-color-secondary);
    font-weight: 500;
}

.product-item-stock-specs .product-specs-inline {
    font-size: 0.8em;
    color: var(--text-color-secondary);
    font-style: italic;
    line-height: 1.3;
    max-height: 2.6em; /* Limit to 2 lines for specs */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-item-stock-specs .no-specs {
    opacity: 0.7; /* Dim no specs message */
}

.product-item-actions {
    flex-shrink: 0; /* Prevent action buttons from shrinking */
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 8px; /* Space between buttons */
    margin-left: 15px; /* Space between stock/specs and actions */
    justify-content: center; /* Center buttons vertically */
}

.product-item-actions .btn {
    padding: 8px 12px;
    font-size: 0.85em;
    width: 80px; /* Fixed width for buttons for consistent look */
    text-align: center;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1024px) {
    .product-list-item {
        flex-wrap: wrap; /* Allow wrapping */
        justify-content: flex-start; /* Align content to start */
    }
    .product-item-details-group {
        max-width: calc(100% - 100px); /* Adjust max-width if image takes 80px + margin */
        order: 1; /* Keep details next to image */
    }
    .product-item-stock-specs {
        margin-left: 0; /* Remove auto margin */
        text-align: left; /* Align to left on wrap */
        width: 100%; /* Take full width on wrap */
        order: 3; /* Move below details */
        display: flex; /* Make it a row for qty & specs */
        flex-direction: row; /* Layout horizontally */
        gap: 15px; /* Space between qty and specs */
        justify-content: space-between; /* Space out quantity and specs */
    }
    .product-item-actions {
        order: 4; /* Move to the bottom */
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
        flex-direction: row; /* Keep buttons side by side if possible */
        justify-content: flex-end;
    }
    .product-item-image {
        order: 0; /* Keep image first */
    }
}


@media (max-width: 768px) {
    .product-list-item {
        flex-direction: column; /* Stack all main sections vertically */
        align-items: flex-start;
        padding: 10px;
    }

    .product-item-image {
        margin-bottom: 10px; /* Add space below image when stacked */
        width: 60px; /* Slightly smaller image on mobile */
        height: 60px;
    }

    .product-item-details-group {
        max-width: 100%;
        min-width: auto;
        width: 100%; /* Take full width */
    }

    .product-item-stock-specs {
        width: 100%;
        margin-top: 10px; /* Space above stock/specs */
        flex-direction: column; /* Stack quantity and specs vertically on small mobile */
        text-align: left;
    }
    
    .product-item-actions {
        flex-direction: row; /* Buttons side-by-side on mobile for better touch target */
        margin-top: 15px;
        justify-content: space-around; /* Distribute buttons */
        gap: 10px;
    }
    .product-item-actions .btn {
        flex-grow: 1; /* Allow buttons to expand */
        width: auto;

    }
}/* Minimalist product list styling */
.product-list-item-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    border-bottom: 1px solid #ddd;
    font-size: 0.595em; /* Smaller font for space saving */
}

.product-list-item-minimal:hover {
    background-color: #f0b208;
}

.product-minimal-details {
    display: flex;
    align-items: center;
     /* Set the container width to 0.9 inches */
   
}

.product-minimal-image {
    width: 35px;
    height: 35px;
    object-fit: cover;
    margin-right: 3px;
    border-radius: 3px;
}

.product-minimal-description {
    font-weight: bold;
}

.product-minimal-price {
    font-weight: 600;
    color: #337ab7;
    width: 40px;
    text-align: right;
    
}

.product-minimal-actions {
    display: flex;
    gap: 5px;
}

.btn-small {
    padding: 2px 5px;
    font-size: 0.695em;
}

/* Add this to your CSS file */

.search-container {
    display: flex;
    gap: 10px; /* Adds space between the input and button */
    margin-bottom: 20px; /* Space below the search bar */
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 8px;
    border: 1px solid #ddd;
    align-items: center;
}

#adminSearchInput {
    flex-grow: 1; /* Makes the input field take up available space */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

#adminSearchButton {
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}


.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 5px 15px;
    max-width: 500px;
    margin: auto;
    transition: all 0.3s ease-in-out;
}

.search-container:focus-within {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 15px;
    font-size: 1em;
    border-radius: 50px;
    background: transparent;
}

.search-button {
    background: linear-gradient(135deg, #008080, #00b3b3);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1em;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.search-button:hover {
    background: linear-gradient(135deg, #00b3b3, #008080);
    transform: scale(1.05);
}

.suggestions-box {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 9999;
}

.suggestions-box div {
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.suggestions-box div:hover {
    background: #f2f2f2;
}
/* Add to your existing style.css */

/* General Layout for Product List */
.product-list-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-product-image {
    width: 55px; /* Your requested size */
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}



/* Update your existing style.css file with this change */

/* Horizontal Product Item */
.admin-product-item {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* This is the main flex container for the product details */
.admin-product-info {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    justify-content: space-between;
    align-items: center;
}

/* Container for name and in-stock info */
.admin-product-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px; /* Optional: ensures name has some space */
}

/* Container for price and discount, aligned to the end */
.admin-product-right {
    display: flex;
    flex-direction: column; /* This stacks price and discount vertically */
    align-items: flex-end; /* This aligns text to the right side of the container */
}

.admin-product-info p,
.admin-product-info h4 {
    margin: 0;
    font-size: 14px;
    color: #333;
}

/* New CSS to truncate long names */
.admin-product-name {
    font-weight: bold;
    font-size: 17px !important;
    white-space: nowrap; /* Prevents text from wrapping to the next line */
    overflow: hidden; /* Hides any text that overflows the element's box */
    text-overflow: ellipsis; /* Adds "..." to show the text has been truncated */
    max-width: 48ch; /* Sets the character limit for the name */
}


/* New CSS to group the price and discount for centering */
.price-details {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-end;
    font-size:17px;
}

.admin-product-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Sort and Pagination */
.products-list-header {
    display:flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sorting-options {
    display: flex;
    align-items: center;
    gap: 20px;
}

#sortBy {
    padding: 0px;
    border-radius: 5px;
}

.sort-order-icon {
    cursor: pointer;
    font-size: 1.2rem;
    color: #007bff;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.pagination-controls .btn {
    padding: 8px 16px;
}

.pagination-controls #currentPage {
    font-weight: bold;
}

.product-card:hover .product-image {
    transform: scale(1.05); /* Gentle zoom on hover */
}

/* --- Discount Badge --- */
.discount-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: #e53e3e; /* A strong red */
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 999px; /* Pill shape */
    z-index: 10;
}

/* --- Product Information --- */
.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto; /* Pushes the price to the bottom */
}

.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1a202c;
}

.product-original-price {
    font-size: 0.9rem;
    color: #a0aec0;
    text-decoration: line-through;
}

/* --- Call-to-Action Button --- */
.cta-button {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #3182ce; /* A nice blue */
    color: #fff;
    text-align: center;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #2c5282;
}
#product-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

@media (max-width: 1400px) {
    #product-list {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    #product-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    #product-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
@media (max-width: 480px) {
    #product-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}
}





/* Add this to style.css */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #28a745; /* Success Green */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 2000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
        transform: translateY(-20px);
    }
    10%, 90% {
        opacity: 1;
        transform: translateY(0);
    }
}