/* ======== 1. GLOBAL STYLES & COLOR PALETTE ======== */
:root {
    --primary-color: #4A148C; /* Deep Purple */
    --secondary-color: #7B1FA2; /* Lighter Purple */
    --accent-color: #00BCD4;   /* Cyan */
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======== 2. HEADER ======== */
.site-header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

#open-modal-btn {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

#open-modal-btn:hover {
    background-color: var(--secondary-color);
}


/* ======== 3. MAIN CONTENT & LISTING GRID ======== */
main {
    padding: 40px 0;
}

.main-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.listing-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* This style is for listings WITHOUT an image */
.card-image.no-image {
    height: 180px;
    background-color: var(--secondary-color);
    color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
    padding: 10px;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.card-content .category {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.card-content .description {
    color: var(--text-light);
    font-size: 0.95em;
    flex-grow: 1; /* Pushes the tags to the bottom */
}

.card-tags {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.card-tags .tag {
    display: inline-block;
    background-color: var(--bg-light);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
}

.card-tags .tag.verified {
    background-color: var(--accent-color);
    color: var(--bg-white);
    font-weight: 500;
}

/* ======== 4. FOOTER ======== */
.site-footer {
    background-color: #212121;
    color: #e0e0e0;
    padding: 40px 0 0;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h4 {
    color: var(--bg-white);
    margin-bottom: 15px;
}

.footer-column p, .footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #bdbdbd;
}

.footer-column ul a {
    color: #bdbdbd;
    text-decoration: none;
    line-height: 2;
    transition: color 0.3s;
}

.footer-column ul a:hover {
    color: var(--accent-color);
}

.social-icons a {
    color: var(--bg-white);
    margin-right: 15px;
    font-size: 1.2em;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #424242;
    font-size: 0.9em;
    color: #9e9e9e;
}


/* ======== 5. MODAL STYLES (Recolored) ======== */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); }
.modal-content { background-color: var(--bg-white); margin: 10% auto; padding: 40px; border: none; width: 90%; max-width: 550px; border-radius: 10px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.close-btn { color: #aaa; position: absolute; top: 15px; right: 25px; font-size: 32px; font-weight: bold; cursor: pointer; }
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.progress-bar { display: flex; justify-content: space-around; margin-bottom: 20px; }
.step-indicator { padding: 10px 20px; border-radius: 5px; background-color: #e0e0e0; color: #888; }
.step-indicator.active { background-color: var(--primary-color); color: white; font-weight: bold; }
input[type="text"] { width: 100%; padding: 12px; margin: 10px 0; border: 1px solid var(--border-color); border-radius: 5px; box-sizing: border-box; }
.separator { text-align: center; color: #999; margin: 15px 0; }
.nav-buttons { display: flex; justify-content: space-between; margin-top: 20px; }
button.next-btn, button.submit-btn { background-color: var(--primary-color); color: white; width: 48%; }
button.back-btn { background-color: #ccc; width: 48%; }
#geolocate-btn { width: 100%; background-color: var(--bg-light); border: 1px solid var(--border-color); padding: 12px; margin-top: 10px;}



/* ======== 6. BROWSE CATEGORIES PAGE ======== */

.main-subtitle {
    text-align: center;
    max-width: 600px;
    margin: -20px auto 50px auto;
    color: var(--text-light);
    font-size: 1.1em;
}

.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.category-section {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.03);
}

.category-section h2 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
    column-count: 2; /* This creates the multi-column layout */
    column-gap: 25px;
}

.subcategory-list li {
    margin-bottom: 12px;
}

.subcategory-list a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.2s ease-in-out;
    display: block;
}

.subcategory-list a:hover {
    color: var(--secondary-color);
    transform: translateX(3px);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .subcategory-list {
        column-count: 1; /* Stack into a single column on very small screens */
    }
}
/* ======== 7. AJAX SEARCH BAR (CATEGORIES PAGE) ======== */

.search-container {
    margin-bottom: 40px;
}

#category-search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1em;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-sizing: border-box; /* Important for padding and width */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#category-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 20, 140, 0.2);
}

#no-results-message {
    text-align: center;
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

#no-results-message h3 {
    color: var(--primary-color);
    margin-top: 0;
}
/* ======== 8. ABOUT US PAGE ======== */

.about-section {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    align-items: center;
    gap: 50px;
    margin-bottom: 80px;
}

.about-content,
.about-image {
    flex: 1; /* Each takes up half the space */
    min-width: 300px; /* Ensures content doesn't get too squished */
}

.about-content h2 {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
}

.about-content p {
    font-size: 1.1em;
    color: var(--text-light);
    line-height: 1.8;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* This class reverses the order of items */
.about-section.layout-reversed .about-image {
    order: -1; /* Pushes the image to the left */
}

/* Call to Action Section Styling */
.cta-section {
    background-color: var(--secondary-color);
    color: var(--bg-white);
    text-align: center;
    padding: 60px 30px;
    border-radius: 12px;
    margin-top: 80px;
}

.cta-section h2 {
    font-size: 2em;
    margin-top: 0;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--bg-white);
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 20px;
    transition: background-color 0.3s, transform 0.3s;
}

.cta-button:hover {
    background-color: #00acc1; /* A slightly darker cyan */
    transform: translateY(-3px);
}

/* Responsive adjustments for the about page */
@media (max-width: 768px) {
    .about-section.layout-reversed .about-image {
        order: initial; /* Resets the order for stacking */
    }
    .about-content h2 {
        font-size: 1.8em;
    }
}
/* ======== 9. CONTACT US PAGE ======== */

.contact-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-form {
    flex: 2;
    min-width: 300px;
}

.contact-info h3 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 0;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: var(--text-dark);
}

.info-item .icon {
    font-size: 1.5em;
    margin-right: 15px;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 20, 140, 0.2);
}

.submit-button {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: var(--secondary-color);
}
/* ======== 10. PRODUCT DETAIL PAGE ======== */

.product-page-main {
    padding: 40px 0;
}

.breadcrumbs {
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 0.9em;
}

.breadcrumbs a {
    color: var(--secondary-color);
    text-decoration: none;
}

.product-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 for details, 1/3 for sidebar */
    gap: 50px;
}

.product-details h1 {
    font-size: 2.8em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 5px;
}

.product-tagline {
    font-size: 1.2em;
    color: var(--text-light);
    margin-top: 0;
    margin-bottom: 40px;
}

.product-section {
    margin-bottom: 40px;
}

.product-section h2 {
    font-size: 1.6em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.services-offered-list {
    list-style: '✔  ';
    padding-left: 20px;
    column-count: 2;
}

.services-offered-list li {
    margin-bottom: 10px;
    font-weight: 500;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.photo-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.review-card {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-rating {
    color: #FFC107; /* Gold color for stars */
    font-size: 1.2em;
}

.review-body {
    color: var(--text-light);
    margin: 0;
}

/* Sidebar Action Card */
.product-sidebar .action-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 100px; /* Aligns with header height */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.action-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.action-card h3 {
    text-align: center;
    margin: 0 0 10px 0;
}
.action-card p {
    text-align: center;
    margin: 0 0 20px 0;
    color: var(--text-light);
}
.action-card .cta-button, .action-card .submit-button {
    width: 100%;
    margin-bottom: 10px;
    padding: 15px;
}
.action-card-footer {
    text-align: center;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .product-layout {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
    .product-sidebar .action-card {
        position: static; /* Unstick the sidebar */
    }
}
@media (max-width: 480px) {
    .services-offered-list {
        column-count: 1;
    }
}
.listing-card-link {
    text-decoration: none;
    color: inherit;
}
