﻿/* Main Layout */
.consulta-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 400px);
}

/* Search Hero Section */
.search-hero {
    width: 100%;
    max-width: 800px;
    text-align: center;
    margin-bottom: 50px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 40px;
}

/* Main Search Box */
.main-search-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 28px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-search-box:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(37, 99, 235, 0.15);
    background: white;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 10px;
}

.search-icon-left {
    position: absolute;
    left: 24px;
    font-size: 1.4rem;
    color: var(--primary);
}

#producto {
    height: 64px;
    border: none;
    background: transparent;
    padding: 0 70px 0 65px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    width: 100%;
}

#producto:focus {
    box-shadow: none;
    outline: none;
}

.btn-search-modern {
    position: absolute;
    right: 8px;
    width: 52px;
    height: 52px;
    border-radius: 20px;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.btn-search-modern:hover {
    transform: scale(1.08) rotate(5deg);
    background: var(--primary-hover);
}

/* Scanner Area */
#scanner-area {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.card-scanner {
    background: white;
    border-radius: 40px;
    padding: 40px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

.scanner-content {
    position: relative;
    padding: 20px 0;
}

.scanner-icon {
    font-size: 120px;
    color: #e2e8f0;
    opacity: 0.6;
}

.scanning-line {
    position: absolute;
    top: 20px;
    left: 10%;
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
    box-shadow: 0 0 15px #22c55e;
    z-index: 10;
    animation: scanMove 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scanMove {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(120px);
    }
}

.scanner-label {
    margin-top: 20px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Results Area */
.result-area {
    width: 100%;
    max-width: 1000px;
    margin-top: 40px;
}

.result-card-wrapper {
    margin-bottom: 30px;
}

.result-card {
    display: flex;
    background: white;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-image {
    width: 320px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.result-image img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 20px;
    transition: transform 0.4s;
}

.result-card:hover .result-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    font-size: 80px;
    color: #cbd5e1;
}

.result-info {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.result-header {
    margin-bottom: 30px;
}

.result-code {
    display: inline-block;
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.result-name {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin: 0;
}

.result-pricing-stock {
    display: flex;
    gap: 40px;
    margin-top: auto;
}

.price-label,
.stock-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.price-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.no-price {
    color: #f43f5e;
    font-size: 1.5rem;
}

.stock-value {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.in-stock .stock-value {
    color: #059669;
}

.out-of-stock .stock-value {
    color: #dc2626;
}

/* Responsive */
@media (max-width: 850px) {
    .result-card {
        flex-direction: column;
    }

    .result-image {
        width: 100%;
        padding: 40px;
    }

    .result-info {
        padding: 30px;
        text-align: center;
    }

    .result-pricing-stock {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .result-name {
        font-size: 1.8rem;
    }

    .price-value {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }
}