/* CSS E-Commerce Fino & Premium (Inspiración MEI / Racks Point) */

:root {
    /* Colores Industriales (RAL) Invertidos */
    --color-primary: #e25303; /* Naranja RAL 2004 (Principal) */
    --color-primary-dark: #c94a03; 
    --color-primary-light: #fff3ed; 
    
    --color-action: #007cb0; /* Azul RAL 5015 (Detalles/Botones alternativos) */
    --color-action-hover: #004f9e; 
    
    /* Colores Secundarios & Fondos */
    --color-grey-light: #e0e0e0;
    --color-grey-graphite: #474a51; 
    --color-grey-anthracite: #222222; 
    
    --text-dark: #222; /* Más oscuro para fondo blanco */
    --text-muted: #666;
    
    --bg-main: #ffffff; /* Fondo Blanco Total */
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --border-light: #eaeaea;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 50px;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
ul { list-style: none; }

/* TOP BAR COLOR EXTRAMO */
.top-bar {
    background: var(--color-action); /* Azul RAL 5015 */
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 2rem; /* COMPACTADO */
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
}

/* HEADER DELUXE COMPACTO */
.main-header {
    background: var(--bg-white);
    padding: 0 2rem; /* REDUCIDO A 0 VERTICAL PARA PEGAR EL LOGO */
    border-bottom: 2px solid var(--color-primary); /* MAS COLOR (Naranja) */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-wrapper img {
    height: 45px; /* REDUCIDO A LA MITAD SEGUN EL USUARIO */
    object-fit: contain;
    margin: 5px 30px 5px 0; /* Arriba 5px, Derecha 30px, Abajo 5px, Izquierda 0 */
    transition: transform 0.2s;
}

.logo-wrapper:hover img {
    transform: scale(1.02);
}

/* BUSCADOR PREMIUM */
.search-bar {
    flex: 1;
    display: flex;
    background: var(--bg-main);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    overflow: hidden;
    max-width: 600px;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    background: var(--bg-white);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-light);
}

.search-bar input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.search-bar input::placeholder {
    color: #a0a0a0;
}

.search-bar button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0 1.5rem;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.search-bar button:hover {
    background: var(--color-primary-dark);
}

/* HEADER ACTIONS */
.header-actions {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-weight: 500;
    font-size: 0.95rem;
}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-action);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 71, 61, 0.2);
}

.cart-btn:hover {
    background: var(--color-action-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 71, 61, 0.3);
}

/* NAVIGATION CON MUCHO COLOR */
.nav-menu {
    background: var(--color-primary); /* FONDO NARANJA RAL 2004 */
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem; /* MAS COMPACTO */
    flex-wrap: wrap; /* Para todas las categorias nuevas */
}

.nav-menu a {
    display: block;
    padding: 0.5rem 0.5rem; /* COMPACTADO EXTREMO */
    font-weight: 600;
    color: #ffffff; /* BLANCO */
    font-size: 0.85rem; /* REDUCIDO */
    position: relative;
    text-transform: uppercase;
}

.nav-menu a:hover, .nav-menu a.active {
    color: #ffe0cc; /* Naranja super clarito o amarillo */
    background: rgba(0,0,0,0.1);
}

.nav-menu a.active::after {
    display: none; /* Quite el underline para hacerlo mas crudo */
}

/* GENERAL CONTENT COMPACTO */
.container {
    max-width: 1400px;
    margin: 1rem auto; /* REDUCCION DE MARGIN */
    padding: 0 1rem;
}

.breadcrumb {
    color: var(--text-muted);
    font-size: 0.75rem; /* PEQUEÑO */
    margin-bottom: 0.5rem; /* MUY COMPACTO */
    font-weight: 500;
}

.breadcrumb a { color: var(--color-primary); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--color-primary-dark); }

/* CATEGORY HERO COMPACTO (CONFIGURADOR) */
.category-hero {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    padding: 0.5rem 1rem; /* SUPER COMPACTO */
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.category-hero h1 {
    font-size: 1.4rem; /* MAS PEQUEÑO */
    font-weight: 700;
    color: #111;
    margin-bottom: 0.2rem;
    letter-spacing: -0.5px;
}

.category-hero p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.configurator-wrapper {
    width: 100%; 
    height: 480px; /* FIJADO PARA CABER EN PANTALLA SIN SCROLL CON CABECERA COMPACTA */
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 0.5rem;
    background: var(--bg-main);
    border: 1px solid var(--color-action); /* BORDE AZUL PARA MAS COLOR */
}

/* FILTERS */
.catalog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    align-items: stretch;
}

.sidebar-filters {
    background: transparent;
}

.filter-group {
    margin-bottom: 2rem;
}
.filter-title { 
    font-weight: 700; 
    margin-bottom: 1rem; 
    font-size: 1rem;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-item { 
    display: flex; 
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.7rem; 
    color: var(--text-muted); 
    font-size: 0.95rem; 
    cursor: pointer;
    transition: color 0.2s;
}

.filter-item:hover { color: var(--color-primary); }
.filter-item input { accent-color: var(--color-primary); width: 16px; height: 16px; }

/* PRODUCT GRID CUATRO COLUMNAS */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-white);
    padding: 0;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-card:hover {
    box-shadow: var(--shadow-md); 
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.product-img {
    width: 100%; height: 260px; box-sizing: border-box;
    display: flex; justify-content: center; align-items: center;
    border-bottom: 1px solid var(--border-light); 
    background: #ffffff; /* pure white */
    padding: 25px; margin-bottom: 0; overflow: hidden;
}

.product-img svg {
    width: 100%;
    height: 100%; /* Force fill available space */
    object-fit: contain; /* Alto o ancho a tope sin recortar */
    transform: scale(1);
    transition: transform 0.3s ease-out;
}

.product-card:hover .product-img svg {
    transform: scale(1.02);
}

/* SVG COLOR FINISHES FOR CATALOG SVGs */
.mat-galva-post { fill: #94a3b8; stroke: #64748b; stroke-width: 0.5; } 
.mat-galva-shelf { fill: #c89054; stroke: #b47b3e; stroke-width: 0.5; } 
.mat-galva-front { fill: #94a3b8; stroke: #64748b; stroke-width: 0.5; } 
.mat-galva-side { fill: #64748b; stroke: #475569; stroke-width: 0.5; }
.mat-negro-post { fill: #334155; stroke: #0f172a; stroke-width: 0.5; } 
.mat-negro-shelf { fill: #c89054; stroke: #b47b3e; stroke-width: 0.5; } 
.mat-negro-front { fill: #1e293b; } 
.mat-negro-side { fill: #0f172a; stroke: #000000; stroke-width: 0.5; }

.product-title {
    font-size: 1.05rem; color: #111; margin-bottom: 0.5rem; font-weight: 600; line-height: 1.4;
}

.product-sku { font-size: 0.8rem; color: #999; margin-bottom: 1rem; letter-spacing: 0.5px; }

.product-price {
    font-size: 1.5rem; color: var(--color-primary); font-weight: 700; margin-bottom: 1.5rem; margin-top: auto;
}

.btn-add {
    display: block; width: 100%; background: var(--bg-main); color: var(--color-primary);
    padding: 0.9rem; border-radius: var(--radius-sm); font-weight: 600; transition: all 0.2s;
    border: 1px solid var(--border-light); cursor: pointer; text-align: center;
}
.btn-add:hover { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* PRODUCT DETAILS PAGE */
.product-detail-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
    background: var(--bg-white); padding: 3rem; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.product-gallery img { width: 100%; height: 500px; object-fit: contain; background: var(--bg-main); border-radius: var(--radius-md); padding: 2rem;}

.product-info h1 { font-size: 2.2rem; margin-bottom: 1rem; color: #111; line-height: 1.2; letter-spacing: -0.5px;}

.tag-stock { display: inline-block; padding: 0.4rem 0.8rem; background: #e8f5e9; color: #2e7d32; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 600; margin-bottom: 1.5rem; }

.price-block { margin: 2rem 0; padding: 1.5rem 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.price-block .huge-price { font-size: 3rem; color: var(--color-action); font-weight: 800; letter-spacing: -1px;}

.qty-wrapper { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem;}
.qty-wrapper input { width: 80px; padding: 0.8rem; font-size: 1.1rem; border: 1px solid var(--border-light); border-radius: var(--radius-sm); text-align: center; }

.btn-buy-massive { background: var(--color-action); color: white; padding: 1.2rem; border-radius: var(--radius-pill); font-weight: 700; font-size: 1.2rem; width: 100%; transition: all 0.3s; border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(255, 71, 61, 0.3);}
.btn-buy-massive:hover { background: var(--color-action-hover); transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255, 71, 61, 0.4);}

.specs-table { width: 100%; border-collapse: collapse; margin-top: 3rem; font-size: 0.95rem; }
.specs-table th, .specs-table td { padding: 1.2rem; border-bottom: 1px solid var(--border-light); text-align: left; }
.specs-table th { background: var(--bg-main); width: 35%; font-weight: 600; color: #444; border-radius: 4px 0 0 4px;}
/* =========================================
   MEGA HERO FULL-WIDTH 
   ========================================= */
.hero-fullscreen {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 75vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
    opacity: 0.8;
}

.hero-fallback-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('../img/hero_background.png') center/cover no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
}

.hero-content-mega {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content-mega h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.hero-content-mega p {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 3rem;
    color: #e2e8f0;
    max-width: 800px;
}

.mega-nav-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.mega-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mega-nav-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-3px);
}
/* =========================================
   VARIANTE COLOR SWATCHES
   ========================================= */
.swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.swatch:hover {
    transform: scale(1.15);
}
.swatch.active {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-primary);
}
/* =========================================
   MEGAMENU DESPLEGABLE FULL-WIDTH
   ========================================= */
.nav-item {
    position: static; /* Para que el panel dependa del navbar y no del item */
}

.nav-item.has-megamenu.megamenu-open .megamenu-panel {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.megamenu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-top: 1px solid var(--border-light);
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease-out;
    z-index: 2000;
    padding: 2rem 5%;
    gap: 3rem;
    text-align: left;
}

.megamenu-column {
    flex: 1;
}

.megamenu-column h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
}

.megamenu-column a {
    display: block;
    color: var(--text-muted);
    padding: 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 400;
    border: none;
    transition: color 0.2s, padding-left 0.2s;
}

.megamenu-column a:hover {
    color: var(--color-primary);
    background: transparent;
    padding-left: 0.5rem; /* Efecto slide interactivo */
}

.megamenu-feature {
    flex: 1.5;
    background: var(--bg-main);
    border-radius: 4px;
    padding: 1.5rem;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    border: 1px dashed var(--border-light);
}

.megamenu-feature img {
    max-width: 150px;
    margin-bottom: 1rem;
}
/* =========================================
   BOTONES DE PROFUNDIDAD (FONDO)
   ========================================= */
.depth-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}
.depth-btn {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.5rem 0.2rem;
    font-size: 0.70rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.depth-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

/* =========================================
   MEGA FOOTER SEO (GENERADO POR IA)
   ========================================= */
.ai-footer-wrapper {
    background-color: #0f172a;
    color: #cbd5e1;
    padding: 4rem 2rem 2rem;
    font-family: 'Inter', sans-serif;
    border-top: 4px solid var(--color-primary);
    text-align: left;
    border-radius: 8px; 
}
.ai-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}
.ai-footer-col-brand img {
    height: 45px;
    filter: invert(1);
    mix-blend-mode: screen;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}
.ai-footer-col-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #94a3b8;
}
.ai-footer-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ai-footer-links {
    list-style: none;
    padding: 0; margin: 0;
}
.ai-footer-links li {
    margin-bottom: 0.8rem;
}
.ai-footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.ai-footer-links a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}
.ai-footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #64748b;
    max-width: 1400px;
    margin-left: auto; margin-right: auto;
}
@media (max-width: 768px) {
    .ai-footer-grid { grid-template-columns: 1fr; }
    .ai-footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

.ai-footer-seo-block {
    max-width: 1400px;
    margin: 4rem auto 0;
    padding-top: 3rem;
    border-top: 1px dashed #334155;
    color: #94a3b8;
}
.ai-footer-seo-block h4 {
    color: #f8fafc;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.ai-footer-seo-block p {
    font-size: 0.85rem;
    line-height: 1.8;
}.depth-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(241, 90, 36, 0.3);
    transform: translateY(-1px);
}

.cat-tabs { display: flex; list-style: none; padding: 0; margin-bottom: 2rem; gap: 10px; flex-wrap: wrap; justify-content: center; border: none; }
.cat-tab { padding: 0.6rem 1.4rem; font-weight: 800; color: #002B49; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 2px solid transparent; margin-bottom: 0; border-radius: 50px; background: #f1f5f9; font-size: 0.9rem; box-shadow: none; letter-spacing: 0.3px; }
.cat-tab:hover { color: var(--color-primary); background: #fffaf5; border-color: var(--color-primary); transform: translateY(-1px); }
.cat-tab.active { color: #fff; background: var(--color-primary); border-color: var(--color-primary); box-shadow: 0 4px 12px rgba(226, 83, 3, 0.35); transform: translateY(-1px); }