/* style.css */
/* Google Font */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
}

/* Header & Navbar */
.katrina-header {
    background: #1e1e1e !important;
    border-bottom: 3px solid #6a1b9a;
    /* Color morado distintivo */
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
}

.logo-text .fa-mask {
    color: #ab47bc;
    /* Un morado más claro para el ícono */
}

.nav-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-link:hover,
.nav-link.active {
    color: #ab47bc !important;
}

.navbar-brand {
    font-size: 1.2rem;
}

/* Botones Principales */
.btn-primary {
    background-color: #6a1b9a;
    border-color: #6a1b9a;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #4a148c;
    border-color: #4a148c;
}

/* Sidebar (Página pública) */
.sidebar-widget {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.widget-title {
    color: #4a148c;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.category-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s ease;
    display: block;
    padding: 5px 0;
}

.category-link:hover {
    color: #6a1b9a;
}

/* Tarjetas de Disfraces (Página pública) */
.costume-card {
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.card-img-top {
    height: 350px;
    object-fit: cover;
}

.card-body {
    text-align: center;
}

.card-title {
    font-weight: 600;
    color: #333;
}

.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #6a1b9a;
}

.card-footer {
    background-color: #fff;
    border-top: none;
    padding: 1rem;
}

/* Insignia "Agotado" */
.agotado-badge {
    position: absolute;
    top: 15px;
    right: -35px;
    background-color: #d9534f;
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-weight: bold;
    font-size: 0.8rem;
    z-index: 10;
}


/* Botón Flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #fff;
}

.whatsapp-float i {
    margin-top: 15px;
}

/* --- ESTILOS DEL PANEL DE ADMINISTRACIÓN --- */

.admin-body {
    background-color: #f4f7f6;
    /* Un fondo gris muy claro */
}

/* Sidebar (Menú lateral) */
.sidebar {
    width: 250px;
    /* Ancho fijo para el menú */
    min-height: 100vh;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #343a40;
    margin-bottom: 1rem;
}

.sidebar .navbar-brand {
    color: #fff;
    font-size: 1.4rem;
}

.sidebar .nav-link {
    color: #adb5bd;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    /* Ancho fijo para íconos */
    text-align: center;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: #495057;
}

.sidebar .nav-link.active {
    color: #fff;
    font-weight: 600;
    background-color: #6a1b9a;
    /* Morado distintivo */
}

/* Contenido Principal */
.main-content {
    background-color: #f4f7f6;
    width: 100%;
}

.admin-body {
    background-color: #f4f7f6;
}

/* --- (FIN) ESTILOS DEL PANEL DE ADMINISTRACIÓN --- */



/* --- (INICIO) ESTILOS DE ESTADO DE INVENTARIO --- */
/* Estas son las clases que faltaban y solucionan tu problema */

.badge.status-disponible {
    background-color: #198754;
    /* Verde (Bootstrap Success) */
    color: #fff !important;
}

.badge.status-agotado {
    background-color: #dc3545;
    /* Rojo (Bootstrap Danger) */
    color: #fff !important;
}

.badge.status-alquilado {
    background-color: #ffc107;
    /* Amarillo (Bootstrap Warning) */
    color: #000 !important;
    /* Texto oscuro para que sea legible en amarillo */
}

.badge.status-mantenimiento {
    background-color: #6c757d;
    /* Gris (Bootstrap Secondary) */
    color: #fff !important;
}

/* --- (FIN) ESTILOS DE ESTADO DE INVENTARIO --- */


/* --- NUEVAS MEJORAS (UI/UX) --- */

/* 1. Hero Section */
.hero-section {
    /* Fondo con degradado fuerte para asegurar contraste con texto blanco */
    background: linear-gradient(135deg, #4a148c 0%, #2c0444 100%);
    /* Si existe la imagen, se pondrá encima del color pero debajo del gradiente transparente */
    background-image: linear-gradient(rgba(44, 4, 68, 0.8), rgba(44, 4, 68, 0.6)), url('uploads/katrina_hero.jpg');
    background-size: cover;
    background-position: center;
    height: 400px;
    margin-bottom: 2rem;
    border-bottom: 5px solid #ab47bc;
    display: flex;
    /* Asegura centrado */
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    z-index: 2;
    /* Texto por encima del overlay */
}

.section-title {
    font-weight: 700;
    color: #4a148c;
    border-left: 5px solid #ab47bc;
    padding-left: 15px;
}

/* 2. Mejoras en Tarjetas */
.costume-image-container {
    height: 300px;
    /* Altura fija para consistencia */
    overflow: hidden;
    position: relative;
    background-color: #eee;
}

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

.costume-card:hover .card-img-top {
    transform: scale(1.05);
    /* Zoom suave al hover */
}

/* 3. Animaciones */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.animate-fade-down {
    animation: fadeDown 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(-20px);
}

.animate-zoom-in {
    animation: zoomIn 0.6s ease-out forwards;
    transform: scale(0.9);
    opacity: 0;
}

/* Stagger animations support could be done via JS or nth-child CSS, 
   but for simplicity let's just animate them on load */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Aplicar delay escalonado simple para las primeras items (opcional) */
.col:nth-child(1) .animate-fade-in {
    animation-delay: 0.1s;
}

.col:nth-child(2) .animate-fade-in {
    animation-delay: 0.2s;
}

.col:nth-child(3) .animate-fade-in {
    animation-delay: 0.3s;
}

.col:nth-child(4) .animate-fade-in {
    animation-delay: 0.4s;
}


/* 4. Categorías Sidebar */
.category-list li {
    margin-bottom: 0.5rem;
}

.category-link {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.category-link:hover {
    background-color: #f3e5f5;
    color: #4a148c;
    text-decoration: none;
    padding-left: 15px;
    /* Pequeño desplazamiento */
}

.category-link.active {
    background-color: #e1bee7;
    color: #4a148c;
    border-left-color: #8e24aa;
    font-weight: 600;
}

/* 5. Footer Links */
footer a {
    color: #e1bee7;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Ensure sidebar widgets don't clip the dropdown */
.sidebar-widget,
.collapse,
aside {
    overflow: visible !important;
}

/* 5. Live Search Results */
#search-results-container {
    position: relative;
    z-index: 1050;
    /* Higher than bootstrap default components */
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    z-index: 9999 !important;
    /* Force on top */
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

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

.search-result-item:hover {
    background-color: #f8f9fa;
    color: #4a148c;
}

.search-result-img {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.search-result-info h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: bold;
}

.search-result-info small {
    color: #6c757d;
}

/* 6. SweetAlert Product Popup */
.swal-product-popup {
    max-width: 900px;
    /* Ancho máximo del popup */
    width: 90% !important;
}

.swal-product-image {
    width: 100%;
    max-height: 400px;
    /* Altura máxima restringida */
    object-fit: contain;
    /* Ajusta la imagen sin recortes */
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
    /* Fondo suave por si la imagen es transparente */
}

.swal-product-description {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1.5rem;
    text-align: left;
}

.swal-product-details {
    list-style: none;
    padding: 0;
    text-align: left;
    margin-bottom: 0;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.swal-product-details li {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.swal-product-details li:last-child {
    border-bottom: none;
}