/* 
   PALLET WORLD - Main Components (Hero, Search, Categories, Products, Services, Ticker)
   =============================================================================
*/

/* --- BANNER PROMOCIONAL --- */
.banner-promocional {
    width: 100%;
    max-width: none; 
    margin: 0;
    padding: 100px 20px 20px;
    display: flex;
    justify-content: center;
    background: var(--bg-gradient);
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.05);
    animation: fadeIn 1s ease-out;
}

.banner-img {
    width: 100%;
    max-width: 1200px;
    height: auto;
    border-radius: var(--radius-md);
    object-fit: contain;
    max-height: 450px;
    display: block;
    box-shadow: var(--glass-shadow);
}

@media (max-width: 768px) {
    .banner-promocional {
        padding-top: 80px;
        margin-bottom: 0;
    }
}

/* --- HERO PREMIUM --- */
.hero-v2-logo {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -60%);
    z-index: 10;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.v2-logo-img {
    width: clamp(130px, 22vw, 200px);
    height: auto;
    filter: drop-shadow(0 0 20px rgba(13, 217, 217, 0.5));
    animation: floating-logo 5s ease-in-out infinite;
}

@keyframes floating-logo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-pallet-world {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 160px 20px 120px;
    background: transparent; /* El fondo viene del body */
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-content {
    max-width: 1000px !important;
    width: 95%;
    padding: 100px 60px 60px;
    z-index: 2;
    border-radius: var(--radius-lg);
    position: relative;
    background: var(--glass-bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

@media (max-width: 768px) {
    .hero-v2-logo { transform: translate(-50%, -50%); }
    .v2-logo-img { width: 150px; }
    .hero-content {
        padding: 75px 20px 30px !important;
        margin-top: 30px;
    }
    .hero-pallet-world {
        padding-top: 110px !important;
        min-height: 50svh;
        padding-bottom: 60px;
    }
}

.hero-content h2 { 
    font-size: clamp(1.8rem, 4.5vw, 2.8rem); 
    color: var(--brand-navy); 
    margin-bottom: 15px; 
    line-height: 1.15; 
    font-weight: 800; 
    letter-spacing: -1px; 
}

.hero-content p { 
    font-size: clamp(0.9rem, 1.8vw, 1.05rem); 
    color: var(--text-muted); 
    margin-bottom: 25px; 
    line-height: 1.5; 
    max-width: 100%; 
}

.hero-content strong { color: var(--brand-orange); font-weight: 600; }

.hero-actions { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* --- BUSCADOR PREMIUM --- */
.search-container { 
    position: relative; 
    display: flex; 
    align-items: center; 
    z-index: 1002;
}

.search-container input {
    padding: 12px 18px 12px 45px; 
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border); 
    outline: none; 
    font-family: var(--font-main);
    width: 100%; 
    font-size: 0.95rem; 
    background: var(--glass-bg); 
    color: var(--text-color);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    transition: var(--transition-modern);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.search-container input:focus { 
    border-color: var(--brand-cyan); 
    box-shadow: 0 10px 25px rgba(13, 217, 217, 0.3);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.95);
}

.search-icon { 
    position: absolute; 
    left: 18px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--brand-navy); 
    opacity: 0.6;
    pointer-events: none;
    z-index: 2;
    transition: var(--transition-modern);
}

.search-container:focus-within .search-icon {
    opacity: 1;
    color: var(--brand-cyan);
    transform: translateY(-50%) scale(1.1);
}

.search-results {
    position: absolute !important; 
    top: calc(100% + 12px); 
    left: 0; 
    right: 0; 
    border-radius: var(--radius-md);
    z-index: 1001; 
    overflow-y: auto; 
    max-height: 450px;
    background: var(--glass-bg-card); 
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: var(--transition-modern);
}

.search-results.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition-modern);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(12, 112, 242, 0.05);
    padding-left: 22px;
}

.search-item img {
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.search-item-info h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-navy);
}

.search-item-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-orange);
}

.search-item-cat {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- CATEGORIAS --- */
.categorias-lista { display: flex; flex-direction: column; max-width: 850px; margin: 30px auto; padding: 0; border-top: 1px solid var(--border-color); }
.categoria-card { background: transparent; border-bottom: 1px solid var(--border-color); transition: all 0.3s ease; position: relative; }
.categoria-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent-color); transform: scaleY(0); transition: transform 0.2s ease; }
.categoria-card.active::before { transform: scaleY(1); }

.categoria-header { padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; color: var(--text-color); user-select: none; }
.categoria-header span:first-child { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-family: var(--font-heading); }

.subcategorias-container {
    max-height: 0; overflow: hidden; opacity: 0; display: flex; flex-wrap: wrap; gap: 12px; padding: 0 24px;
    background: rgba(13, 217, 217, 0.05); transition: all 0.4s ease;
}
.categoria-card.active .subcategorias-container { max-height: 500px; padding: 6px 24px 22px 24px; opacity: 1; }

/* --- PRODUCTOS --- */
#productos, .grid-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; padding: 30px 20px; max-width: 1400px; margin: 0 auto; }

.producto-card {
    background: var(--glass-bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: auto;
    box-shadow: var(--shadow-md);
}
.producto-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--brand-cyan);
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

.producto-card h2 { 
    font-size: 1.2rem; 
    margin: 12px 0 8px; 
    color: var(--brand-navy); 
    font-weight: 700;
}

.producto-card img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    transition: transform 0.5s ease;
}

.producto-card:hover img {
    transform: scale(1.05);
}

.precio {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-orange);
    margin: 8px 0;
    display: block;
}

.producto-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.lista-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.lista-specs li {
    font-size: 0.75rem;
    background: rgba(12, 112, 242, 0.05);
    color: var(--brand-navy);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 500;
}

.acciones-card { 
    display: flex; 
    gap: 10px; 
    margin-top: auto; 
    width: 100%; 
}

.btn-detalle {
    flex: 1;
}

.btn-carrito {
    width: 50px;
    padding: 0 !important;
    flex-shrink: 0;
}

/* --- SERVICIOS --- */
.servicios-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
    padding: 40px 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
}
.servicio-card { 
    background: var(--glass-bg-card);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md); 
    overflow: hidden; 
    transition: all 0.4s ease; 
    display: flex; 
    flex-direction: column; 
    box-shadow: var(--glass-shadow);
    height: 100%;
}
.servicio-card:hover { transform: translateY(-8px); background: rgba(255, 255, 255, 0.98); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }

.servicio-img-container {
    width: 100%;
    height: 220px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}

.servicio-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.5s ease;
}

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

.servicio-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.servicio-card h3 {
    font-size: 1.25rem;
    color: var(--brand-navy);
    margin-bottom: 12px;
    font-weight: 700;
}

.servicio-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.servicio-desc p { margin-bottom: 10px; }
.servicio-desc p:last-child { margin-bottom: 0; }

.servicio-card .btn-wsp {
    align-self: flex-start;
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* --- TICKER MARCAS --- */
.marcas-section { padding: 60px 0; overflow: hidden; background: transparent; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); text-align: center; }
.marcas-titulo { color: var(--brand-navy); font-size: 0.9rem; margin-bottom: 25px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }

.marcas-ticker { display: flex; overflow: hidden; white-space: nowrap; position: relative; width: 100%; }

.marca-nombre { 
    font-family: 'Poppins', sans-serif; 
    font-size: 1.8rem; 
    font-weight: 800; 
    color: var(--brand-navy); 
    opacity: 0.25; 
    letter-spacing: 5px; 
    margin: 0 60px; 
    transition: all 0.3s ease; 
    user-select: none; 
    display: inline-block;
}
.marca-nombre:hover { opacity: 1; color: var(--brand-orange); transform: scale(1.1); }

/* --- ESTADISTICAS --- */
.cifras-section { 
    padding: 80px 20px; 
    background: linear-gradient(135deg, var(--brand-navy) 0%, #06459d 100%);
    color: #ffffff; 
    text-align: center; 
    position: relative; 
    border-top: 4px solid var(--brand-cyan); 
}
.cifras-section h3 { font-size: 1rem; letter-spacing: 4px; text-transform: uppercase; color: var(--brand-cyan); margin-bottom: 60px; font-weight: 700; }
.cifras-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 40px; 
    max-width: 1200px; 
    margin: 0 auto; 
}
.cifra-item h2 { font-size: 4rem; font-weight: 800; margin: 0; color: #ffffff; font-family: var(--font-heading); line-height: 1; letter-spacing: -1px; transition: all 0.4s ease; }
.cifra-item p { font-size: 0.9rem; color: var(--brand-cyan); text-transform: uppercase; letter-spacing: 2px; margin-top: 12px; font-weight: 600; }
.cifra-item:hover h2 { color: var(--brand-cyan); transform: scale(1.1); }
