/* LETT Amoblamientos - Design System */

.hidden {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

:root {
    /* Color Palette */
    --color-primary: #1a1a1a;
    /* Charcoal Black */
    --color-accent: #a67c52;
    /* Wood Accent */
    --color-bg-light: #fdfdfd;
    /* Clean White */
    --color-bg-alt: #f4f4f4;
    /* Light Gray */
    --color-text-main: #2d2d2d;
    /* Dark Gray for text */
    --color-text-muted: #666666;
    --color-white: #ffffff;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-unit: 1rem;
    --space-sm: calc(var(--space-unit) * 0.5);
    --space-md: var(--space-unit);
    --space-lg: calc(var(--space-unit) * 2);
    --space-xl: calc(var(--space-unit) * 4);

    /* Transitions */
    --transition-base: all 0.3s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-xl) 0;
}

.bg-light {
    background-color: var(--color-bg-alt);
}

.bg-dark {
    background-color: var(--color-primary);
}

.text-white {
    color: var(--color-white);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 20px;
    animation: revealUp 0.8s ease-out both;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    margin: var(--space-md) auto;
}

/* Buttons */
.btn-primary,
.btn-cta,
.btn-secondary,
.btn-submit {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary,
.btn-cta {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover,
.btn-cta:hover {
    background-color: #8c6742;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-white);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* Header & Nav */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.6rem 0;
    /* Ultra-compacto */
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.header-top-mobile {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    /* Allow logo area to grow on desktop */
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: -1px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo::before {
    content: '';
    width: 36px;
    height: 36px;
    display: inline-flex;
    flex-shrink: 0;

    border-radius: 2px;
    background-image: url("assets/casa.svg");
    background-size: 28px;
    background-position: center;
    background-repeat: no-repeat;
}

.logo span {
    font-weight: 300;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    letter-spacing: 4px;
    /* Slightly reduced for better fit */
    margin-left: 12px;
    text-transform: uppercase;
}

.logo-divider {
    width: 1.5px;
    height: 30px;
    background-color: var(--color-white);
    margin: 0 4px;
    opacity: 0.9;
    display: inline-block;
}


/* Utility Links in Header (Social + Admin) */
.utility-links-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-left: 0.5rem;
    list-style: none;
    /* Asegurar que no tenga puntos */
}

.social-links-header,
#admin-login-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

#admin-login-group {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 12px;
}

.utility-links-header svg {
    width: 20px !important;
    height: 20px !important;
    fill: #ffffff !important;
    display: block;
    transition: transform 0.3s ease, fill 0.3s ease;
}

.utility-links-header a:hover svg {
    transform: scale(1.2);
    fill: var(--color-accent) !important;
}

/* Ocultar iconos de admin según estado */
#admin-login-link.hidden,
#admin-logout-link.hidden {
    display: none !important;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    /* Slightly reduced for better fit */
    align-items: center;
    margin-left: auto;
    padding: 0;
}



.social-links-header a {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.social-links-header svg {
    width: 20px;
    height: 20px;
    transition: var(--transition-base);
}

.social-links-header a:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    transition: var(--transition-base);
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    padding-top: 110px;
    padding-bottom: 80px;
    /* Prevenir solapamiento con scroll indicator on viewports bajos */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: #111;
}

.hero-slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    overflow: hidden;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
    /* Base dark */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--color-white) !important;
    max-width: 900px;
    animation: fadeInSlide 1.5s ease-out both;
    opacity: 1;
    /* Fallback */
}

.hero-content h1 {
    font-size: clamp(3.5rem, 12vw, 5.5rem) !important;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
    line-height: 1.05;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 span {
    color: var(--color-accent);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: var(--space-lg);
    opacity: 0.9;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: 1.5rem;
}

/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0.95;
    z-index: 100;
}

.scroll-down span {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mouse {
    width: 26px;
    height: 45px;
    border: 2px solid var(--color-white);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.mouse::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--color-white);
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% {
        opacity: 0;
        top: 6px;
    }

    50% {
        opacity: 1;
        top: 15px;
    }

    100% {
        opacity: 0;
        top: 20px;
    }
}


/* Carousel */
.category-carousel-wrapper {
    position: relative;
    padding: 0 50px;
    /* Space for buttons */
    margin: var(--space-lg) 0;
}

.category-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--space-lg);
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0;
    width: 100%;
}

.category-grid::-webkit-scrollbar {
    display: none !important;
}

.category-card {
    flex: 0 0 calc((100% - (var(--space-lg) * 2)) / 3) !important;
    flex-shrink: 0 !important;
    min-width: 280px;
    height: 450px;
    background-color: var(--color-bg-alt);
    display: flex;
    align-items: flex-end;
    padding: var(--space-xl) var(--space-lg);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    color: var(--color-white);
    background-size: cover;
    background-position: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 60%);
    transition: var(--transition-base);
    z-index: 1;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.category-card:hover::before {
    background: linear-gradient(to top, var(--color-accent), transparent 90%);
    opacity: 0.8;
}

.card-content {
    position: relative;
    z-index: 2;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.category-card:hover .card-content {
    transform: translateY(0);
}

.card-content h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card-content p {
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.1s;
}

.category-card:hover .card-content p {
    opacity: 1;
    transform: translateY(0);
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
}

.carousel-btn:hover {
    background: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

@media (max-width: 1024px) {
    .category-card {
        flex: 0 0 calc(50% - var(--space-md)) !important;
    }
}

@media (max-width: 768px) {
    .carousel-btn {
        display: flex;
        width: 45px;
        height: 45px;
        opacity: 0.8;
    }

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }

    .category-card {
        flex: 0 0 85% !important;
        height: 400px !important;
    }

    .category-carousel-wrapper {
        padding: 0;
    }

    .category-grid {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
}

/* Photo Gallery Modal */
.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    flex-direction: column;
    padding: var(--space-xl);
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.gallery-modal.active {
    display: flex;
    animation: fadeIn 0.4s ease;
}

.gallery-header {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 20px 0;
    margin-top: -20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    color: var(--color-white);
    z-index: 100;
}

.gallery-header h2 {
    margin-bottom: 0;
    font-size: 2rem;
    color: var(--color-accent);
}

.close-gallery {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0 20px;
    height: 45px;
    border-radius: 30px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.close-gallery:hover {
    background: white;
    color: black;
    border-color: white;
}

.gallery-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: var(--space-xl);
}

.gallery-item {
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-item:hover {
    transform: translateY(-8px);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-img-container {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Do not crop the image */
    transition: transform 0.5s ease;
}

.gallery-quote-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(166, 124, 82, 0.9);
    /* Use accent color for visibility */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: none;
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover .gallery-quote-btn {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-quote-btn:hover {
    background: var(--color-white);
    color: var(--color-primary);
    transform: translate(-50%, -50%) scale(1.05);
}

.gallery-info {
    padding: var(--space-md);
    color: var(--color-white);
    background: #111;
}

.gallery-info h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-accent);
}

.gallery-ref {
    font-size: 0.8rem;
    color: var(--color-white);
    font-family: monospace;
    background: var(--color-accent);
    padding: 2px 6px;
    border-radius: 4px;
}

.gallery-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Carousel Grid Fixes */
.materials-grid-wrapper,
.testimonials-grid-wrapper {
    overflow: hidden !important;
}

#materials-container[style*="flex"],
#hardware-container[style*="flex"],
#testimonials-container[style*="flex"] {
    gap: 0 !important;
    scroll-snap-type: x mandatory;
}

.materials-page {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
}

/* Materials Swatches */
.material-swatch {
    text-align: center;
    padding: var(--space-md);
    background: var(--color-white);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: var(--transition-base);
}

.material-swatch:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.swatch-color {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-md);
    border-radius: 50%;
    transition: var(--transition-base);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
}

.swatch-color img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.material-swatch:hover .swatch-color {
    transform: scale(1.1);
}

.material-swatch h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

/* Hardware Specifics */
.hardware-swatch {
    padding: calc(var(--space-md) * 1.3) !important;
}

.hardware-swatch .swatch-color {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    /* Square with slight rounding */
    background-size: cover;
    background-position: center;
    margin-bottom: var(--space-lg);
}

.hardware-swatch h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.hardware-swatch p {
    font-size: 1rem;
}

.material-swatch p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Testimonials */
.testimonial-card {
    background: var(--color-bg-alt);
    padding: var(--space-xl);
    border-radius: 4px;
    position: relative;
    border-left: 4px solid var(--color-accent);
}

.quote-icon {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-accent);
    opacity: 0.2;
    position: absolute;
    top: -10px;
    left: 10px;
    line-height: 1;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
}

.client-name {
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 0.9rem;
}



/* Form Styles */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.quote-form {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--space-xl);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 1);
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group textarea {
    height: 150px;
    resize: none;
}

.btn-submit {
    width: 100%;
}

.form-feedback {
    margin-top: var(--space-md);
    padding: var(--space-md);
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.form-feedback.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.hidden {
    display: none;
}

/* Floating WhatsApp */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-base);
    z-index: 1000;
    text-decoration: none;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    background: #128c7e;
}


/* AI Assistant Chat */
.ai-launcher {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--color-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: var(--transition-base);
    font-weight: 600;
}

.ai-launcher:hover {
    transform: translateY(-5px);
    background: var(--color-accent);
    color: var(--color-primary);
}

.chat-window {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 380px;
    height: 550px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    background: var(--color-primary);
    color: white;
    padding: 1.5rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Wrapper for a message bubble + its option buttons */
.msg-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg-group.ai {
    align-items: flex-start;
}

.msg-group.user {
    align-items: flex-end;
}

.chat-footer {
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
}

.chat-footer input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
}

.msg {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.msg.ai {
    background: #f0f0f0;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    position: relative;
    padding: 0.8rem 1rem;
    margin-left: 42px;
    min-height: 40px;
}

.msg.ai::before {
    content: '';
    position: absolute;
    left: -42px;
    top: -8px;
    width: 35px;
    height: 35px;
    background-color: var(--color-primary);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8V4m0 0a1 1 0 100-2 1 1 0 000 2z'/%3E%3Crect x='5' y='8' width='14' height='12' rx='3'/%3E%3Ccircle cx='9' cy='13' r='1' fill='white'/%3E%3Ccircle cx='15' cy='13' r='1' fill='white'/%3E%3Cpath d='M9 17c1 1 5 1 6 0'/%3E%3C/svg%3E");
    background-size: 20px;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.msg.user {
    background: var(--color-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 42px;
    padding-bottom: 4px;
}

.opt-btn {
    background: white;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.opt-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* Footer (Existing) */
#main-footer {
    padding: var(--space-xl) 0;
    background-color: #111;
    color: var(--color-white);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.footer-brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-decoration: none;
    margin-bottom: 5px;
}

.footer-logo::before {
    content: '';
    width: 36px;
    height: 36px;
    display: inline-flex;
    flex-shrink: 0;
    background-image: url("assets/casa.svg");
    background-size: 28px;
    background-position: center;
    background-repeat: no-repeat;
}

.footer-logo span {
    font-weight: 300;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    letter-spacing: 4px;
    margin-left: 12px;
}

.footer-contact {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-info-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brand-address {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.brand-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-white);
    letter-spacing: 1px;
}

.brand-phone svg {
    color: var(--color-accent);
}


/* Media Queries for Mobile */
@media (max-width: 768px) {

    body,
    html {
        overflow-x: hidden !important;
        width: 100vw;
    }

    #main-header {
        padding: 4px 0 !important;
        background: rgba(10, 10, 10, 0.99) !important;
    }

    #main-header .container {
        display: flex !important;
        flex-direction: column !important;
        /* CRITICAL FIX */
        align-items: center !important;
        padding: 0 12px !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
    }

    #main-header .container {
        padding: 8px !important;
        gap: 5px !important;
    }

    .header-top-mobile {
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 4px 0 !important;
    }

    .logo {
        font-size: 0.9rem !important;
        margin: 0 !important;
        gap: 3px !important;
    }

    .logo::before {
        width: 26px !important;
        height: 26px !important;
        background-size: 20px !important;
    }

    .logo span:not(.logo-divider) {
        display: none !important;
        /* Hide to prevent overflow with icons */
    }

    .utility-links-header {
        gap: 12px !important;
    }

    .social-links-header {
        gap: 10px !important;
    }

    .nav-links {
        justify-content: flex-start !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 6px 0 !important;
        gap: 12px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .nav-links li a {
        font-size: 0.75rem !important;
        padding: 4px 2px !important;
    }

    /* Hero Fixes */
    .hero-section {
        height: 100vh !important;
        padding-top: 180px !important;
        text-align: center;
    }

    .hero-content {
        padding: 0 20px !important;
        width: 100% !important;
    }

    .hero-content h1 {
        font-size: 2.2rem !important;
        margin-bottom: 1.5rem !important;
    }

    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .hero-actions {
        flex-direction: column !important;
        width: 100%;
        max-width: 300px;
        margin: 0 auto !important;
    }

    .category-grid {
        padding: 10px 0 !important;
        width: 100% !important;
        gap: 15px !important;
    }

    .category-card {
        flex: 0 0 85vw !important;
        min-width: 85vw !important;
        height: 380px !important;
        margin: 0 auto !important;
    }

    /* Contact Section Mobile Fix */
    .contact-wrapper {
        grid-template-columns: 1fr !important;
        /* Stack vertically */
        gap: var(--space-lg) !important;
        text-align: center;
    }

    .quote-form {
        padding: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .floating-whatsapp {
        bottom: 20px !important;
        right: 20px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
    }

    .ai-launcher {
        bottom: 20px !important;
        left: 20px !important;
        padding: 0.8rem 1.2rem !important;
        font-size: 0.85rem !important;
    }
}

/* Global Elements & Fixes */
.hidden {
    display: none !important;
}

.visit-counter-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    opacity: 0.8;
}

.visit-counter-val {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.85rem;
    background: rgba(166, 124, 82, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid rgba(166, 124, 82, 0.2);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.admin-modal {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    color: #333;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.admin-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    border: none;
    font-size: 1.2rem;
}

.category-card {
    transition: all 0.3s ease;
}