/* unified-styles-v2.css */
:root {
    --primary-color: #ff7700;
    --secondary-color: #ff7700;
    --dark-color: #333;
    --light-color: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray-medium: #E0E0E0;
    --gray-dark: #666666;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    text-decoration: none;
    position: absolute;
    left: 5%;
    top: 0;
    z-index: 1001;
}

.logo img {
    height: 120px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    margin-left: auto;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 20px;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--light-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    position: absolute;
    right: 5%;
    z-index: 1001;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background: var(--light-color);
    margin: 5px;
    transition: var(--transition);
}

/* HERO CON IMAGEN DE FONDO */
.hero-unified {
    min-height: 100vh;
    background-image: url('fondon.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    padding: 120px 20px 50px;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--light-color);
    text-align: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: var(--light-color);
    margin-bottom: 3rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* BUSCADOR PRINCIPAL */
.search-wrapper {
    background: var(--light-color);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    margin-bottom: 3rem;
}

.search-header {
    background: var(--dark-color);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.search-tabs {
    display: flex;
    gap: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 4px;
}

.tab-button {
    padding: 12px 30px;
    background: transparent;
    border: none;
    color: var(--light-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 50px;
}

.tab-button.active {
    background: var(--primary-color);
    color: var(--light-color);
}

.tab-button:hover:not(.active) {
    background: rgba(255,255,255,0.2);
}

/* PANELES DE BÚSQUEDA */
.search-panel {
    display: none;
    padding: 2rem;
}

.search-panel.active {
    display: block;
}

.search-inputs {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 150px;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group select {
    width: 100%;
    padding: 14px 35px 14px 16px;
    border: 2px solid var(--gray-medium);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--light-color);
    cursor: pointer;
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23333' d='M6 9L1 4h10z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 119, 0, 0.1);
}

.input-group select:hover {
    border-color: var(--primary-color);
}

.search-btn {
    padding: 14px 24px;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    color: var(--light-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 52px;
}

.search-btn:hover {
    background: #e06900;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 119, 0, 0.3);
}

.search-btn i {
    font-size: 1.2rem;
}

/* DIAGRAMA INFORMATIVO */
.info-diagram {
    background: var(--light-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.info-diagram h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--dark-color);
}

.diagram-content {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-wrap: wrap;
}

.diagram-image {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.diagram-image img {
    max-width: 100%;
    height: auto;
}

.diagram-labels {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.label-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--gray-light);
    border-radius: 10px;
    transition: var(--transition);
}

.label-item:hover {
    background: var(--primary-color);
    color: var(--light-color);
    transform: translateX(10px);
}

.label-letter {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.label-item:hover .label-letter {
    color: var(--light-color);
}

.label-text {
    font-weight: 600;
    color: var(--dark-color);
}

.label-item:hover .label-text {
    color: var(--light-color);
}

/* SECCIÓN DE RESULTADOS */
.results-section {
    padding: 80px 20px;
    background: var(--gray-light);
    min-height: 50vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.title-underline {
    width: 100px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* FILTROS ADICIONALES */
.additional-filters {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.filters-container {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--gray-medium);
    border-radius: 8px;
    background: var(--light-color);
    cursor: pointer;
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3e%3cpath fill='%23666' d='M5 7L1 3h8z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.apply-filters-btn,
.clear-filters-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.apply-filters-btn {
    background: var(--primary-color);
    color: var(--light-color);
}

.apply-filters-btn:hover {
    background: #e06900;
    transform: translateY(-2px);
}

.clear-filters-btn {
    background: var(--gray-medium);
    color: var(--dark-color);
}

.clear-filters-btn:hover {
    background: var(--danger);
    color: var(--light-color);
}

.apply-filters-btn i,
.clear-filters-btn i {
    margin-right: 5px;
}

/* ESTADO DE BÚSQUEDA */
.search-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-feedback {
    font-size: 1.1rem;
    color: var(--dark-color);
}

.search-count {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* GRID DE RESULTADOS */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 2rem;
}

.result-card {
    background: var(--light-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
    cursor: pointer;
}

.result-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.card-image {
    height: 220px;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.result-card:hover .card-image img {
    transform: scale(1.1) rotate(5deg);
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--dark-color);
    color: var(--light-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--dark-color);
    font-weight: 700;
    line-height: 1.3;
    min-height: 2.6em;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.meta-item i {
    color: var(--primary-color);
}

.low-stock { 
    color: var(--danger) !important; 
    font-weight: 600; 
}
.medium-stock { 
    color: var(--warning) !important; 
    font-weight: 600; 
}
.high-stock { 
    color: var(--success) !important; 
    font-weight: 600; 
}

.card-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--gray-medium);
    flex-wrap: wrap;
    gap: 1rem;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.details-button {
    background: var(--primary-color);
    color: var(--light-color);
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.details-button:hover {
    background: #e06900;
    transform: translateY(-2px);
}

/* LOADING Y NO RESULTS */
.loading,
.no-results {
    display: none;
    text-align: center;
    padding: 4rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-medium);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading span,
.no-results h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin: 1rem 0;
}

.no-results i {
    font-size: 3rem;
    color: var(--gray-dark);
    margin-bottom: 1rem;
    display: block;
}

.no-results p {
    color: var(--gray-dark);
    margin-top: 0.5rem;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.modal-content {
    background: var(--light-color);
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    color: var(--light-color);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    background: none;
    border: none;
    padding: 5px;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), #e06900);
    color: var(--light-color);
    padding: 2rem;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    display: flex;
    padding: 2rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.modal-image {
    flex: 1;
    min-width: 300px;
    background: var(--gray-light);
    border-radius: 15px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.modal-info {
    flex: 1;
    min-width: 300px;
}

#modal-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-medium);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--gray-dark);
}

.detail-value {
    color: var(--dark-color);
    font-weight: 500;
    text-align: right;
}

.price-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--gray-medium);
}

.price-row .detail-value {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.modal-footer {
    padding: 1.5rem;
    background: var(--gray-light);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-button {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.whatsapp-btn {
    background: #25D366;
    color: var(--light-color);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 200px;
}

.whatsapp-btn:hover {
    background: #1ebe57;
    transform: scale(1.05);
}

.whatsapp-btn i {
    font-size: 1.2rem;
}

.close-btn {
    background: var(--gray-medium);
    color: var(--dark-color);
    min-width: 100px;
}

.close-btn:hover {
    background: var(--danger);
    color: var(--light-color);
}

 
/* BOTÓN WHATSAPP FLOTANTE */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 100;
    text-decoration: none;
}

.whatsapp-float:hover {
    background: #1ebe57;
    transform: scale(1.1);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }
    
    .search-inputs {
        flex-direction: column;
    }
    
    .input-group {
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    .diagram-content {
        flex-direction: column;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 3%;
        height: 60px;
    }
    
    .navbar .logo img {
        height: 80px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 1rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        letter-spacing: 0;
    }
    
    .search-header {
        flex-direction: column;
        text-align: center;
    }
    
    .search-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .filters-container {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .apply-filters-btn,
    .clear-filters-btn {
        width: 100%;
    }
    
    .modal-body {
        flex-direction: column;
    }
    
    .modal-image {
        width: 100%;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .contact-list li {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-unified {
        padding: 100px 15px 30px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tab-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .search-wrapper {
        border-radius: 15px;
    }
    
    .search-header {
        padding: 1rem;
    }
    
    .search-panel {
        padding: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .card-price {
        flex-direction: column;
        align-items: stretch;
    }
    
    .details-button {
        width: 100%;
    }
}