/* --- Variables & Reset --- */
:root {
    --bg-dark: #050505;
    --bg-card: #121212;
    --text-primary: #EAEAEA;
    --text-secondary: #A0A0A0;
    --gold: #D4AF37;
    --gold-hover: #B5952F;
    --border: rgba(255, 255, 255, 0.1);

    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;

    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Solo aplicar cursor custom en dispositivos con puntero (no táctiles) */
@media (pointer: fine) {
    body {
        cursor: none;
    }

    .cursor-dot,
    .cursor-outline {
        display: block;
    }
}

@media (pointer: coarse) {

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}


/* --- Typistgraphy --- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    color: #fff;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.gold-text {
    color: var(--gold);
    font-style: italic;
}

.eyebrow {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* --- Layout Utilities --- */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 120px 0;
}

/* --- Custom Cursor --- */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 100000;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--gold);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    width: 40px;
    height: 40px;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

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

.logo img {
    height: 50px;
    /* Adjust based on logo needs */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links .btn-gold-outline {
    border: 1px solid var(--gold);
    padding: 10px 25px;
    border-radius: 0;
}

.nav-links .btn-gold-outline:hover {
    background: var(--gold);
    color: #000;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* --- Buttons --- */
.btn-gold {
    display: inline-block;
    background-color: var(--gold);
    color: #050505;
    padding: 15px 40px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: var(--transition);
    border: 1px solid var(--gold);
    cursor: pointer;
}

.btn-gold:hover {
    background-color: transparent;
    color: var(--gold);
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: var(--transition);
}

.btn-text:hover {
    color: var(--gold);
    gap: 15px;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomSlow 20s infinite alternate;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(5, 5, 5, 1));
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
    z-index: 1;
}

.hero-btns {
    margin-top: 40px;
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, currentColor, transparent);
    margin-top: 10px;
}

/* --- Split Layout Section --- */
.split-layout {
    display: flex;
    align-items: center;
    gap: 80px;
}

.split-layout.reverse {
    flex-direction: row-reverse;
}

.text-block,
.image-block {
    flex: 1;
}

.image-block {
    position: relative;
}

.image-block img {
    width: 100%;
    height: auto;
    filter: brightness(0.8);
    transition: var(--transition);
}

.image-block:hover img {
    filter: brightness(1);
    transform: scale(1.02);
}

.floating-card {
    position: absolute;
    bottom: -40px;
    right: -40px;
    background: rgba(20, 20, 20, 0.9);
    padding: 30px;
    max-width: 300px;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.floating-card p {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--gold);
    margin: 0;
    font-size: 1.2rem;
}

.stats {
    display: flex;
    gap: 50px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .number {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    color: var(--gold);
    line-height: 1;
}

.stat-item .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 5px;
}

/* --- Grid Gallery --- */
.grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    /* group: card; removed */
}

.card:hover {
    border-color: var(--gold);
    transform: translateY(-10px);
}

.card-image {
    height: 300px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 30px;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--gold);
    text-decoration: none;
    margin-top: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Features List --- */
.features-list {
    list-style: none;
    margin-top: 40px;
}

.features-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.features-list i {
    color: var(--gold);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.features-list h4 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 5px;
}

.features-list p {
    font-size: 0.95rem;
    margin: 0;
}

.material-showcase {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mat-box {
    width: 150px;
    height: 200px;
    background: #333;
    position: absolute;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mat-box.m1 {
    background: url('detail1.jpg') center/cover;
    /* Placeholder logic, in reality using what we have */
    background-color: #2a2a2a;
    transform: rotate(-10deg) translate(-50px, -20px);
    z-index: 1;
}

.mat-box.m2 {
    background: #1a1a1a;
    transform: rotate(5deg) translate(50px, 20px);
    z-index: 2;
    background: linear-gradient(135deg, #1f1f1f 0%, #0a0a0a 100%);
}

.bg-ref {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    z-index: 0;
}

/* --- Contact --- */
.contact-section {
    background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%);
}

.contact-card {
    background: var(--bg-card);
    padding: 60px;
    border: 1px solid var(--border);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.narrow {
    max-width: 800px;
}

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

.form-group label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

input,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 15px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.05);
}

.full-width {
    width: 100%;
    margin-top: 20px;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

/* --- Footer --- */
.footer {
    padding: 80px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
}

.footer-links,
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a,
.footer-social a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-social a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    margin-top: 60px;
    font-size: 0.8rem;
    color: #666;
}

/* --- Animations --- */
@keyframes zoomSlow {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUpAnim 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.5s;
}

@keyframes fadeUpAnim {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-text,
.reveal-image,
.reveal-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal-text.active,
.reveal-image.active,
.reveal-card.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

/* --- Responsive --- */
@media (max-width: 1024px) {

    .split-layout,
    .split-layout.reverse {
        flex-direction: column;
        gap: 40px;
    }

    .floating-card {
        position: static;
        width: 100%;
        max-width: none;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }

    .contact-info {
        flex-direction: column;
        gap: 20px;
    }

    /* Optimización de espacios para móvil */
    .section {
        padding: 60px 0;
    }

    h2 {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
        margin-bottom: 1rem;
    }

    p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .stats {
        margin-top: 20px;
        padding-top: 20px;
        gap: 30px;
    }

    .hero-content {
        padding: 15px;
    }

    .hero-btns {
        margin-top: 30px;
    }
}

/* Optimización para Muebles de Línea en móvil */
@media (max-width: 900px) {
    .product-card {
        margin-bottom: 60px;
    }
}

/* Mobile Nav Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 2000;
    /* Mayor que el navbar para cubrirlo */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    /* Mismo padding que el navbar */
}

/* Asegurar que el botón de cerrar se vea igual */
.close-btn {
    display: block !important;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-overlay a {
    color: #fff;
    font-family: var(--font-serif);
    font-size: 2rem;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.mobile-menu-overlay.active a {
    opacity: 1;
    transform: translateY(0);
}

/* --- Page Header --- */
.page-header {
    background: linear-gradient(rgba(5, 5, 5, 0.7), rgba(5, 5, 5, 1)), url('hero.png');
    background-size: cover;
    background-position: center;
    padding: 200px 0 100px;
    margin-bottom: 50px;
}

/* --- Gallery Styles --- */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 25px;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--gold);
    color: var(--gold);
}

/* --- Gallery Grid Base --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: 300px;
    gap: 20px;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

/* Masonry-like sizing (Escritorio) */
.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

@media (max-width: 768px) {

    /* Ajustes específicos de Galería en Móvil - Forzamos con !important para asegurar el override */
    .gallery-grid {
        grid-template-columns: 1fr !important;
        grid-auto-rows: 280px !important;
        gap: 15px !important;
    }

    .gallery-item.large,
    .gallery-item.tall {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .gallery-overlay {
        opacity: 1 !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent) !important;
        padding: 20px !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        transform: translateY(0) !important;
    }

    .gallery-overlay h3 {
        font-size: 1.2rem !important;
        margin-bottom: 5px;
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    transition: var(--transition);
}

.gallery-item:hover .play-btn {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
    transform: translate(-50%, -50%) scale(1.1);
}

/* --- Product Showcase (Muebles de Linea) --- */
.product-card {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 120px;
    opacity: 1;
}

.product-card.reverse {
    flex-direction: row-reverse;
}

.product-image {
    flex: 1;
    height: 600px;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.product-details {
    flex: 1;
}

.product-tag {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    display: block;
}

.product-specs {
    list-style: none;
    margin: 30px 0;
}

.product-specs li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.product-specs i {
    color: var(--gold);
    width: 18px;
}

@media (max-width: 900px) {

    .product-card,
    .product-card.reverse {
        flex-direction: column;
        gap: 30px;
    }

    .product-image {
        height: 400px;
        width: 100%;
    }
}