/* ============================================
   ESTILOS GENERALES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.navbar {
    background: linear-gradient(135deg, #e8edf2 0%, #d5dce4 50%, #c8d0da 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
    border-bottom: 3px solid #f1c40f;
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}

.navbar-logo {
    height: 60px;
    width: auto;
    max-height: 60px;
    object-fit: contain;
    display: inline-block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.navbar-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.2));
}

.navbar-nav .nav-item {
    margin: 0 5px;
}

.navbar-nav .nav-link {
    color: #1a2a3a !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 22px !important;
    border-radius: 30px;
    transition: all 0.3s ease;
    background: transparent;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link i {
    margin-right: 8px;
    color: #f1c40f;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%) !important;
    color: #1a2a3a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.4);
}

.navbar-nav .nav-link:hover i {
    color: #1a2a3a !important;
}

.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%) !important;
    color: #1a2a3a !important;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.navbar-nav .nav-link.active i {
    color: #1a2a3a !important;
}

.navbar-toggler {
    border-color: #f1c40f !important;
    padding: 8px 12px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23f1c40f' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative !important;
    padding: 180px 0 !important;
    min-height: 700px !important;
    height: 85vh !important;
    display: flex !important;
    align-items: center !important;
    color: white !important;
    overflow: hidden !important;
    border-radius: 0 0 40px 40px !important;
    margin-bottom: 50px !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    transition: background-image 1.5s ease-in-out !important;
    width: 100% !important;
}

.hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.80) 0%, 
        rgba(10, 22, 40, 0.75) 50%,
        rgba(0, 0, 0, 0.70) 100%) !important;
    z-index: 1 !important;
}

.hero-content {
    position: relative !important;
    z-index: 10 !important;
    text-align: center !important;
    max-width: 950px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

.hero-content h1 {
    font-size: 4.8rem !important;
    font-weight: 800 !important;
    margin-bottom: 20px !important;
    text-shadow: 
        0 4px 40px rgba(0, 0, 0, 0.9),
        0 2px 15px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(0, 0, 0, 0.5) !important;
    animation: fadeInUp 1s ease !important;
    letter-spacing: 2px !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.hero-content h1 span {
    color: #f1c40f !important;
    text-shadow: 
        0 0 50px rgba(241, 196, 15, 0.4),
        0 0 100px rgba(241, 196, 15, 0.2),
        0 4px 40px rgba(0, 0, 0, 0.9) !important;
    font-weight: 800 !important;
}

.hero-content p {
    font-size: 1.8rem !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    margin-bottom: 35px !important;
    animation: fadeInUp 1.2s ease !important;
    text-shadow: 
        0 2px 30px rgba(0, 0, 0, 0.9),
        0 1px 15px rgba(0, 0, 0, 0.7) !important;
    max-width: 750px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    color: #ffffff !important;
    letter-spacing: 1px !important;
}

.hero-content .btn-hero {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%) !important;
    color: #1a2a3a !important;
    font-weight: 700 !important;
    padding: 18px 55px !important;
    border-radius: 50px !important;
    border: none !important;
    font-size: 1.3rem !important;
    transition: all 0.3s ease !important;
    animation: fadeInUp 1.4s ease !important;
    box-shadow: 
        0 5px 40px rgba(241, 196, 15, 0.6),
        0 0 80px rgba(241, 196, 15, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    text-decoration: none !important;
    display: inline-block !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    position: relative !important;
    z-index: 15 !important;
}

.hero-content .btn-hero:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 
        0 10px 60px rgba(241, 196, 15, 0.8),
        0 0 100px rgba(241, 196, 15, 0.4) !important;
    color: #1a2a3a !important;
    background: linear-gradient(135deg, #f1c40f 0%, #e67e22 100%) !important;
}

.hero-badges {
    display: flex !important;
    justify-content: center !important;
    gap: 40px !important;
    margin-top: 45px !important;
    animation: fadeInUp 1.6s ease !important;
    flex-wrap: wrap !important;
    position: relative !important;
    z-index: 15 !important;
}

.hero-badge {
    background: rgba(0, 0, 0, 0.70) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 14px 35px !important;
    border-radius: 50px !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    box-shadow: 
        0 5px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    transition: all 0.3s ease !important;
    color: #ffffff !important;
    text-shadow: 0 1px 15px rgba(0, 0, 0, 0.7) !important;
}

.hero-badge:hover {
    background: rgba(241, 196, 15, 0.30) !important;
    transform: translateY(-3px) !important;
    border-color: #f1c40f !important;
    box-shadow: 0 8px 40px rgba(241, 196, 15, 0.4) !important;
}

.hero-badge i {
    color: #f1c40f !important;
    margin-right: 12px !important;
    font-size: 1.2rem !important;
    text-shadow: 0 0 30px rgba(241, 196, 15, 0.5) !important;
}

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

/* ============================================
   PAGE HERO (páginas internas)
   ============================================ */
.page-hero {
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    padding: 60px 0;
    margin-bottom: 40px;
    color: white;
    text-align: center;
    border-bottom: 4px solid #f1c40f;
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 0;
}

 CATEGORÍAS EN CASCADA - VERSIÓN CENTRADA
   ============================================ */

/* Contenedor principal */
.cascada-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

/* Ruta de navegación */
.cascada-ruta {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

/* ============================================
   CATEGORÍAS GRID - CENTRADO
   ============================================ */

.nivel-categorias {
    margin-bottom: 25px;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nivel-titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

/* BADGES DE NIVEL - OCULTOS */
.badge-nivel {
    display: none !important;
}

/* GRID DE CATEGORÍAS - CENTRADO */
.categorias-grid {
    display: grid;
    gap: 20px;
    justify-items: center;
    align-items: stretch;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* PADRES - 3 columnas centradas */
.padres-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
}

/* HIJOS - 4 columnas centradas */
.hijos-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1000px;
}

/* ============================================
   CARDS DE CATEGORÍAS - CENTRADAS
   ============================================ */

.categoria-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: white;
    border-radius: 15px;
    padding: 25px 15px;
    text-decoration: none;
    color: #1a2a3a;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    width: 100%;
    min-height: 160px;
    position: relative;
}

.categoria-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #1a2a3a;
    border-color: #f1c40f;
}

.categoria-card.active {
    border-color: #f1c40f;
    background: #fffef5;
    box-shadow: 0 5px 25px rgba(241, 196, 15, 0.2);
}

/* Iconos centrados */
.categoria-card .categoria-icono {
    font-size: 3rem;
    margin-bottom: 12px;
    line-height: 1;
}

.categoria-card .categoria-nombre {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a2a3a;
    margin-bottom: 6px;
    line-height: 1.3;
}

.categoria-card .categoria-badge {
    font-size: 0.65rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 3px 12px;
    border-radius: 20px;
    margin-top: 4px;
}

/* PADRE - Estilo especial */
.categoria-card-padre {
    border-color: #dee2e6;
    background: #fafbfc;
    min-height: 180px;
    padding: 30px 20px;
}

.categoria-card-padre .categoria-icono {
    font-size: 3.8rem;
}

.categoria-card-padre .categoria-nombre {
    font-size: 1.1rem;
    font-weight: 700;
}

.categoria-card-padre:hover {
    border-color: #2c3e50;
    background: #f8f9fa;
}

.categoria-card-padre.active {
    border-color: #f1c40f;
    background: #fffef5;
}

/* HIJO - Estilo especial */
.categoria-card-hijo {
    border-color: #e9ecef;
    background: white;
    min-height: 140px;
    padding: 20px 12px;
}

.categoria-card-hijo .categoria-icono {
    font-size: 2.4rem;
}

.categoria-card-hijo .categoria-nombre {
    font-size: 0.85rem;
    font-weight: 600;
}

.categoria-card-hijo:hover {
    border-color: #27ae60;
    background: #f0faf4;
}

.categoria-card-hijo.active {
    border-color: #27ae60;
    background: #e8f5ee;
    box-shadow: 0 5px 25px rgba(39, 174, 96, 0.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablets */
@media (max-width: 992px) {
    .padres-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    .hijos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    .padres-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
    }
    .hijos-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
    }
    
    .categoria-card {
        min-height: 130px;
        padding: 18px 12px;
    }
    .categoria-card .categoria-icono {
        font-size: 2.4rem;
    }
    .categoria-card .categoria-nombre {
        font-size: 0.85rem;
    }
    .categoria-card-padre .categoria-icono {
        font-size: 3rem;
    }
    .categoria-card-padre .categoria-nombre {
        font-size: 1rem;
    }
    .categoria-card-padre {
        min-height: 150px;
    }
    .categoria-card-hijo .categoria-icono {
        font-size: 2rem;
    }
    .categoria-card-hijo {
        min-height: 110px;
        padding: 15px 10px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .padres-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
    .hijos-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 300px;
        gap: 10px;
    }
    
    .categoria-card {
        min-height: 100px;
        padding: 12px 8px;
    }
    .categoria-card .categoria-icono {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }
    .categoria-card .categoria-nombre {
        font-size: 0.75rem;
    }
    .categoria-card .categoria-badge {
        font-size: 0.55rem;
        padding: 2px 8px;
    }
    .categoria-card-padre .categoria-icono {
        font-size: 2.2rem;
    }
    .categoria-card-padre .categoria-nombre {
        font-size: 0.9rem;
    }
    .categoria-card-padre {
        min-height: 120px;
        padding: 18px 15px;
    }
    .categoria-card-hijo .categoria-icono {
        font-size: 1.5rem;
    }
    .categoria-card-hijo {
        min-height: 90px;
        padding: 10px 6px;
    }
    .categoria-card-hijo .categoria-nombre {
        font-size: 0.7rem;
    }
}

/* ============================================
   PRODUCTOS GRID (en página de productos)
   ============================================ */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.producto-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.producto-imagen {
    height: 180px;
    overflow: hidden;
    background: #f8f9fa;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.producto-info-card {
    padding: 15px;
}

.producto-info-card h6 {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: #1a2a3a;
}

.producto-info-card p {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-ver-producto {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #1a2a3a;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-ver-producto:hover {
    transform: translateX(5px);
    color: #1a2a3a;
    text-decoration: none;
    box-shadow: 0 3px 15px rgba(241, 196, 15, 0.3);
}

/* ============================================
   BUSCADOR (en página de productos)
   ============================================ */
.buscador-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.buscador-form {
    flex: 1;
    max-width: 500px;
    min-width: 250px;
}

.buscador-form .input-group .form-control {
    border-radius: 30px 0 0 30px;
    border: 2px solid #e9ecef;
    padding: 12px 20px;
    font-size: 0.95rem;
}

.buscador-form .input-group .form-control:focus {
    border-color: #f1c40f;
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.2);
}

.btn-buscar {
    border-radius: 0 30px 30px 0;
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #1a2a3a;
    border: none;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-buscar:hover {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #1a2a3a;
    box-shadow: 0 5px 20px rgba(241, 196, 15, 0.3);
}

.btn-limpiar {
    background: #e9ecef;
    color: #1a2a3a;
    border: none;
    border-radius: 30px;
    padding: 12px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-limpiar:hover {
    background: #dc3545;
    color: white;
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.3);
}

/* ============================================
   RESULTADOS INFO (en página de productos)
   ============================================ */
.resultados-info {
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.resultados-info p {
    margin-bottom: 0;
}

.nivel-vacio {
    padding: 30px 0;
}

/* ============================================
   TARJETAS DE PRODUCTOS (en index.php)
   ============================================ */
.card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    background-color: #e9ecef;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
}

.card-text {
    color: #6c757d;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f8f9fa;
}

.card-img-wrapper .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.badge-categoria {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-producto {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #1a2a3a;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-producto:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(241, 196, 15, 0.4);
    color: #1a2a3a;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-moderno {
    background: linear-gradient(180deg, #e8edf2 0%, #d5dce4 50%, #c8d0da 100%) !important;
    color: #1a2a3a;
    padding: 60px 0 20px 0;
    margin-top: 50px;
    border-top: 4px solid #f1c40f;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.footer-logo {
    height: 65px;
    width: auto;
    max-height: 65px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
}

.footer-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.15));
}

.footer-desc {
    color: #2c3e50;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    color: #1a2a3a;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: #f1c40f;
    color: #1a2a3a;
    transform: translateY(-3px);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.footer-title {
    color: #f1c40f;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: #f1c40f;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a i {
    font-size: 0.6rem;
    margin-right: 8px;
    color: #f1c40f;
}

.footer-links a:hover {
    color: #f1c40f;
    padding-left: 5px;
    text-decoration: none;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 0.95rem;
}

.footer-contact li i {
    color: #f1c40f;
    font-size: 1.1rem;
    margin-top: 3px;
    min-width: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 20px;
    margin-top: 40px;
    color: #2c3e50;
}

.footer-bottom strong {
    color: #1a2a3a;
}

.footer-bottom .text-muted {
    color: #4a5568 !important;
}

.desarrollado-por {
    color: #6c757d;
    font-size: 0.85rem;
}

.drpc-link {
    color: #f1c40f;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.drpc-link:hover {
    color: #e67e22;
    text-decoration: none;
    transform: scale(1.05);
}

.bandera-peru {
    display: inline-block;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.drpc-link:hover .bandera-peru {
    transform: rotate(10deg) scale(1.1);
}

/* ============================================
   SECCIONES DE LA PÁGINA DE INICIO
   ============================================ */
.section-padding {
    padding: 60px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a2a3a;
    margin-bottom: 10px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    margin-top: 10px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 30px;
}

.text-center .section-title::after {
    margin: 10px auto 0;
}

.bg-oscuro {
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    color: white;
}

/* ============================================
   QUIENES SOMOS
   ============================================ */
.quienes-somos {
    background: #f8f9fa;
}

.quienes-texto {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 25px;
}

.quienes-caracteristicas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.caracteristica {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #2d3748;
}

.caracteristica i {
    color: #f1c40f;
    font-size: 1.2rem;
}

.quienes-imagen {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.quienes-imagen img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

/* ============================================
   PERFIL EMPRESARIAL
   ============================================ */
.perfil-empresarial {
    background: #f8f9fa;
}

.perfil-texto p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 20px;
}

.perfil-imagen {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.perfil-imagen img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

/* ============================================
   PROPUESTA DE VALOR
   ============================================ */
.propuesta-valor {
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
}

.valor-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 30px 25px;
    border-radius: 15px;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.valor-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: #f1c40f;
}

.valor-icon {
    width: 70px;
    height: 70px;
    background: rgba(241, 196, 15, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    transition: all 0.3s ease;
}

.valor-card:hover .valor-icon {
    background: #f1c40f;
}

.valor-icon i {
    font-size: 2rem;
    color: #f1c40f;
    transition: all 0.3s ease;
}

.valor-card:hover .valor-icon i {
    color: #1a2a3a;
}

.valor-card h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 10px;
}

.valor-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============================================
   NUESTROS VALORES
   ============================================ */
.nuestros-valores {
    background: white;
}

.valor-item {
    text-align: center;
    padding: 20px 10px;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.valor-item:hover {
    transform: translateY(-5px);
    background: #f8f9fa;
}

.valor-item-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f1c40f20, #f39c1220);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: all 0.3s ease;
}

.valor-item:hover .valor-item-icon {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
}

.valor-item-icon i {
    font-size: 1.8rem;
    color: #f1c40f;
    transition: all 0.3s ease;
}

.valor-item:hover .valor-item-icon i {
    color: white;
}

.valor-item span {
    font-weight: 600;
    color: #1a2a3a;
    font-size: 0.95rem;
    display: block;
}

/* ============================================
   MISIÓN Y VISIÓN
   ============================================ */
.mision-vision {
    background: #f8f9fa;
}

.mision-card,
.vision-card {
    background: white;
    padding: 40px 35px;
    border-radius: 15px;
    text-align: center;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-top: 4px solid #f1c40f;
}

.vision-card {
    border-top-color: #3498db;
}

.mision-card:hover,
.vision-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.mision-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.mision-card .mision-icon {
    background: rgba(241, 196, 15, 0.15);
}

.mision-card .mision-icon i {
    color: #f1c40f;
}

.vision-card .mision-icon {
    background: rgba(52, 152, 219, 0.15);
}

.vision-card .mision-icon i {
    color: #3498db;
}

.mision-icon i {
    font-size: 2.2rem;
}

.mision-card h3,
.vision-card h3 {
    font-weight: 700;
    color: #1a2a3a;
    margin-bottom: 15px;
}

.mision-card p,
.vision-card p {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 0;
}

/* ============================================
   CONTADORES
   ============================================ */
.contador-item {
    padding: 20px;
    position: relative;
}

.contador-item i {
    font-size: 2.8rem;
    color: #f1c40f;
    display: block;
    margin-bottom: 15px;
}

.contador-simbolo {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f1c40f;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    margin-right: 2px;
}

.contador-numero {
    font-size: 3.5rem;
    font-weight: 800;
    display: inline-block;
    color: white;
    font-family: 'Montserrat', sans-serif;
    vertical-align: middle;
    line-height: 1;
}

.contador-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    display: block;
    margin-top: 8px;
    font-weight: 500;
    line-height: 1.3;
}

/* ============================================
   ADMIN
   ============================================ */
.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.btn-admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

/* ============================================
   DETALLE DE PRODUCTO - VERSIÓN MEJORADA
   ============================================ */

.producto-detalle-container {
    padding-top: 20px;
    padding-bottom: 40px;
}

.producto-detalle-row {
    display: flex;
    align-items: stretch;
    min-height: 500px;
}

.producto-detalle-col {
    display: flex;
    align-items: stretch;
}

/* Imagen */
.producto-imagen-detalle {
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-imagen-detalle img {
    width: 100%;
    height: 100%;
    max-height: 600px;
    object-fit: contain;
    padding: 20px;
}

/* Información del producto */
.producto-info-detalle {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    min-height: 400px;
}

.producto-info-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.badge-categoria-lg {
    background: rgba(241, 196, 15, 0.2);
    color: #f39c12;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
    align-self: flex-start;
}

.producto-titulo-detalle {
    font-size: 2rem;
    font-weight: 700;
    color: #1a2a3a;
    margin-bottom: 20px;
}

.producto-descripcion-detalle {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0 20px 0;
    flex: 1;
}

.producto-descripcion-detalle h5 {
    font-weight: 700;
    color: #1a2a3a;
    margin-bottom: 10px;
}

.producto-descripcion-detalle h5 i {
    color: #f1c40f;
}

.producto-descripcion-detalle p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 0;
    font-size: 1rem;
}

.producto-meta-detalle {
    margin: 10px 0;
}

.producto-meta-detalle p {
    margin-bottom: 8px;
    color: #4a5568;
    font-size: 0.95rem;
}

.producto-meta-detalle i {
    width: 20px;
}

/* Botones */
.producto-acciones-detalle {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.producto-acciones-detalle .btn {
    padding: 12px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-volver {
    min-width: 140px;
}

.btn-consultar {
    min-width: 160px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    color: white;
}

.btn-consultar:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    color: white;
}

.btn-volver:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .producto-detalle-row {
        min-height: unset;
        flex-direction: column;
    }
    
    .producto-imagen-detalle {
        min-height: 280px;
    }
    
    .producto-imagen-detalle img {
        max-height: 350px;
        padding: 15px;
    }
    
    .producto-info-detalle {
        min-height: unset;
        padding: 20px;
    }
    
    .producto-titulo-detalle {
        font-size: 1.5rem;
    }
    
    .producto-descripcion-detalle {
        padding: 15px;
    }
    
    .producto-acciones-detalle {
        flex-direction: column;
        align-items: stretch;
    }
    
    .producto-acciones-detalle .btn {
        text-align: center;
        padding: 12px 20px;
    }
    
    .btn-volver,
    .btn-consultar {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .producto-imagen-detalle {
        min-height: 200px;
    }
    
    .producto-imagen-detalle img {
        max-height: 250px;
        padding: 10px;
    }
    
    .producto-titulo-detalle {
        font-size: 1.2rem;
    }
    
    .producto-descripcion-detalle p {
        font-size: 0.9rem;
    }
    
    .producto-meta-detalle p {
        font-size: 0.85rem;
    }
}

/* Móviles */
@media (max-width: 768px) {
    /* Header */
    .navbar {
        padding: 8px 0;
        border-bottom: 2px solid #f1c40f;
    }
    .navbar-logo {
        height: 50px;
        max-height: 50px;
    }
    .navbar-nav .nav-link {
        padding: 8px 18px !important;
        font-size: 0.95rem;
        text-align: center;
    }
    .navbar-nav .nav-item {
        margin: 3px 0;
    }
    .navbar-collapse {
        background: linear-gradient(135deg, #e8edf2 0%, #d5dce4 100%);
        padding: 15px;
        border-radius: 10px;
        margin-top: 10px;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* Hero */
    .hero-section {
        padding: 120px 0 !important;
        min-height: 500px !important;
        height: 75vh !important;
        border-radius: 0 0 20px 20px !important;
    }
    .hero-content h1 {
        font-size: 2.8rem !important;
    }
    .hero-content p {
        font-size: 1.2rem !important;
        padding: 0 15px !important;
    }
    .hero-content .btn-hero {
        padding: 14px 40px !important;
        font-size: 1.1rem !important;
    }
    .hero-badges {
        gap: 15px !important;
        margin-top: 30px !important;
    }
    .hero-badge {
        padding: 10px 22px !important;
        font-size: 0.85rem !important;
    }

    /* Page Hero */
    .page-hero {
        padding: 40px 0;
    }
    .page-hero h1 {
        font-size: 1.8rem;
    }

    /* Buscador */
    .buscador-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .buscador-form {
        max-width: 100%;
        min-width: unset;
    }
    .btn-limpiar {
        text-align: center;
    }

    /* Categorías Grid */
    .padres-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hijos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .categorias-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .categorias-grid > a {
        max-width: 100%;
    }

    /* Cards */
    .categoria-card {
        min-height: 140px;
        padding: 20px 15px;
    }
    .categoria-card .categoria-icono {
        font-size: 2.8rem;
    }
    .categoria-card .categoria-nombre {
        font-size: 0.95rem;
    }
    .categoria-card-padre .categoria-icono {
        font-size: 3.2rem;
    }
    .categoria-card-padre .categoria-nombre {
        font-size: 1rem;
    }
    .categoria-card-hijo .categoria-icono {
        font-size: 2.2rem;
    }
    .categoria-card-hijo {
        min-height: 120px;
    }

    /* Productos Grid */
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    /* Cascada ruta */
    .cascada-ruta {
        font-size: 0.75rem;
    }

    /* Footer */
    .footer-moderno {
        padding: 40px 0 15px 0;
    }
    .footer-logo {
        height: 55px;
        max-height: 55px;
    }
    .social-links {
        justify-content: center;
    }
    .footer-contact li {
        font-size: 0.9rem;
    }

    /* Secciones */
    .section-padding {
        padding: 40px 0;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .quienes-caracteristicas {
        grid-template-columns: 1fr;
    }
    .quienes-imagen img {
        height: 220px;
        margin-top: 20px;
    }
    .perfil-imagen img {
        height: 220px;
        margin-top: 20px;
    }
    .contador-item i {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    .contador-simbolo {
        font-size: 1.8rem;
    }
    .contador-numero {
        font-size: 2.5rem;
    }
    .contador-label {
        font-size: 0.85rem;
    }
    .valor-card {
        padding: 20px 15px;
    }
    .valor-icon {
        width: 55px;
        height: 55px;
    }
    .valor-icon i {
        font-size: 1.5rem;
    }
    .valor-item-icon {
        width: 55px;
        height: 55px;
    }
    .valor-item-icon i {
        font-size: 1.4rem;
    }
    .mision-card,
    .vision-card {
        padding: 25px 20px;
    }
    .mision-icon {
        width: 55px;
        height: 55px;
    }
    .mision-icon i {
        font-size: 1.6rem;
    }

    /* Producto detalle */
    .producto-titulo {
        font-size: 1.5rem;
    }
    .producto-acciones .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .producto-acciones {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    /* Header */
    .navbar {
        padding: 6px 0;
        border-bottom: 2px solid #f1c40f;
    }
    .navbar-logo {
        height: 42px;
        max-height: 42px;
    }
    .navbar-nav .nav-link {
        padding: 6px 14px !important;
        font-size: 0.85rem;
    }

    /* Hero */
    .hero-section {
        padding: 80px 0 !important;
        min-height: 400px !important;
        height: 70vh !important;
    }
    .hero-content h1 {
        font-size: 2.2rem !important;
    }
    .hero-content p {
        font-size: 1rem !important;
    }
    .hero-content .btn-hero {
        padding: 12px 30px !important;
        font-size: 0.95rem !important;
    }
    .hero-badge {
        padding: 8px 16px !important;
        font-size: 0.75rem !important;
    }

    /* Page Hero */
    .page-hero h1 {
        font-size: 1.4rem;
    }

    /* Categorías Grid */
    .padres-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
    .hijos-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .categorias-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .categoria-card {
        min-height: 110px;
        padding: 15px 10px;
    }
    .categoria-card .categoria-icono {
        font-size: 2.2rem;
        margin-bottom: 8px;
    }
    .categoria-card .categoria-nombre {
        font-size: 0.85rem;
    }
    .categoria-card-padre .categoria-icono {
        font-size: 2.5rem;
    }
    .categoria-card-padre .categoria-nombre {
        font-size: 0.9rem;
    }
    .categoria-card-hijo .categoria-icono {
        font-size: 1.8rem;
    }
    .categoria-card-hijo {
        min-height: 100px;
        padding: 12px 8px;
    }
    .categoria-card-hijo .categoria-nombre {
        font-size: 0.75rem;
    }
    .categoria-card .categoria-badge {
        font-size: 0.6rem;
        padding: 2px 10px;
    }

    /* Productos Grid */
    .productos-grid {
        grid-template-columns: 1fr;
    }
    .producto-card .card-body {
        padding: 15px;
    }
    .card-img-wrapper {
        height: 180px;
    }
    .producto-titulo {
        font-size: 1.2rem;
    }

    /* Footer */
    .footer-logo {
        height: 45px;
        max-height: 45px;
    }

    /* Secciones */
    .section-padding {
        padding: 30px 0;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .perfil-texto p {
        font-size: 0.95rem;
    }
    .contador-item {
        padding: 10px;
    }
    .contador-item i {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    .contador-simbolo {
        font-size: 1.3rem;
    }
    .contador-numero {
        font-size: 1.8rem;
    }
    .contador-label {
        font-size: 0.7rem;
        margin-top: 5px;
    }
    .valor-card h5 {
        font-size: 1rem;
    }
    .valor-card p {
        font-size: 0.85rem;
    }
}
/* ============================================
   TARJETAS CON IMAGEN DE PORTADA
   ============================================ */

/* Estilo para tarjetas con portada */
.categoria-card.con-portada {
    color: white !important;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.9);
    min-height: 200px;
    padding: 30px 20px;
    border-color: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.categoria-card.con-portada::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.categoria-card.con-portada .categoria-icono,
.categoria-card.con-portada .categoria-nombre,
.categoria-card.con-portada .categoria-badge {
    position: relative;
    z-index: 2;
}

.categoria-card.con-portada .categoria-nombre {
    color: white !important;
    font-size: 1.2rem;
    font-weight: 700;
}

.categoria-card.con-portada .categoria-badge {
    background: rgba(0, 0, 0, 0.6);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.categoria-card.con-portada:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.categoria-card.con-portada.active {
    border-color: #f1c40f;
    box-shadow: 0 0 30px rgba(241, 196, 15, 0.3);
}

/* Para hijos con portada */
.categoria-card-hijo.con-portada {
    min-height: 160px;
    padding: 25px 15px;
}

.categoria-card-hijo.con-portada .categoria-nombre {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .categoria-card.con-portada {
        min-height: 160px;
        padding: 20px 15px;
    }
    .categoria-card.con-portada .categoria-nombre {
        font-size: 1rem;
    }
    .categoria-card-hijo.con-portada {
        min-height: 130px;
        padding: 15px 12px;
    }
    .categoria-card-hijo.con-portada .categoria-nombre {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .categoria-card.con-portada {
        min-height: 130px;
        padding: 15px 10px;
    }
    .categoria-card.con-portada .categoria-nombre {
        font-size: 0.85rem;
    }
    .categoria-card-hijo.con-portada {
        min-height: 100px;
        padding: 12px 8px;
    }
    .categoria-card-hijo.con-portada .categoria-nombre {
        font-size: 0.75rem;
    }
}
/* ============================================
   MEJORAR NITIDEZ DE MINIATURAS
   ============================================ */

/* Para todas las imágenes de productos */
.producto-imagen img,
.card-img-wrapper .card-img-top,
.producto-card .producto-imagen img {
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Mejorar calidad al hacer hover */
.producto-card:hover .producto-imagen img,
.producto-card:hover .card-img-wrapper .card-img-top {
    image-rendering: auto;
    -webkit-filter: brightness(1.02) contrast(1.02);
    filter: brightness(1.02) contrast(1.02);
}

/* Para imágenes con fondo oscuro o transparente */
.producto-imagen {
    background: #f8f9fa;
}

.producto-imagen img {
    background: white;
    padding: 5px;
    object-fit: contain;
}

/* Tamaños específicos para miniaturas */
.card-img-wrapper .card-img-top {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.producto-imagen {
    height: 180px;
    overflow: hidden;
    background: #f8f9fa;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Para pantallas retina (alta densidad) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .producto-imagen img,
    .card-img-wrapper .card-img-top {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}