/* Estilos modernos para Tennis y Fragancias */

:root {
    --color-primario: #DC3545;
    --color-primario-dark: #b72a37;
    --color-primario-light: #ff6b7a;
    --color-secundario: #000000;
    --color-terciario: #FFFFFF;
    --color-accent: #6366f1;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #dc3545 0%, #b72a37 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* Animaciones avanzadas */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.slide-in-left {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Mejoras de UX y Botones modernos */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 0.625rem 1.5rem;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

/* Evitar que el efecto decorativo bloquee clics en enlaces/botones */
.btn::before {
    pointer-events: none;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.btn:active {
    transform: translateY(-1px);
}

.btn-primario {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-primario:hover {
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
    color: white;
}

.btn-outline-dark {
    border: 2px solid #212529;
    color: #212529;
    background: transparent;
}

.btn-outline-dark:hover {
    background: #212529;
    color: #fff;
    border-color: #212529;
    box-shadow: 0 8px 20px rgba(33, 37, 41, 0.3);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    border-radius: 12px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Hero moderno con gradiente */
.hero-section {
    background: var(--gradient-hero);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: white;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: rgba(255,255,255,0.95);
    margin-bottom: 2rem;
}

.hero-image {
    position: relative;
    z-index: 0;
}

/* Controles del carrusel mejorados - GRANDES */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.6));
    width: 4.5rem;
    height: 4.5rem;
    background-color: rgba(255,255,255,0.95);
    border-radius: 50%;
    padding: 1rem;
    background-size: 60% 60%;
    transition: all 0.3s ease;
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23DC3545'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23DC3545'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.carousel-control-prev,
.carousel-control-next { 
    width: 10%;
    opacity: 1;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    transform: scale(1.15);
    background-color: white;
    box-shadow: 0 8px 30px rgba(220, 53, 69, 0.4);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-item { 
    min-height: 450px;
    transition: transform 0.6s ease-in-out;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

/* Cards de productos modernos */
.producto-card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    overflow: hidden;
    position: relative;
}

.producto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(183, 42, 55, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.producto-card:hover::before {
    opacity: 1;
}

.producto-card img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px 16px 0 0;
}

.producto-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

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

.producto-card .card-body {
    position: relative;
    z-index: 2;
    background: white;
}

/* Inputs modernos y elegantes */
.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
    border-color: var(--color-primario);
    background-color: white;
    transform: translateY(-2px);
}

.form-control:hover, .form-select:hover {
    border-color: #cbd5e1;
}

.form-label {
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
}

/* Estética global de tarjetas y contenedores */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    border: none;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-footer { 
    border: none; 
    background: transparent;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Tablas modernizadas (admin, pedidos, etc.) */
.table {
    --tbl-border: 1px solid #eef0f3;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.table thead th {
    background: #fafbfc;
    border-bottom: var(--tbl-border);
    color: #212529 !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
}
.table tbody td { 
    border-top: var(--tbl-border);
    color: #495057;
    padding: 0.75rem;
}
.table-striped tbody tr:nth-of-type(odd) { background-color: #fcfdff; }
.table-hover tbody tr:hover { background-color: #f6f9ff; }

/* Tablas con fondo oscuro para admin */
.table-dark thead th {
    background: #343a40 !important;
    color: #ffffff !important;
    border-color: #495057;
}

.table-dark tbody td {
    background: #495057;
    color: #ffffff;
    border-color: #6c757d;
}

/* Centrado de tablas */
.table-centered {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
}

.table-centered th,
.table-centered td {
    text-align: center;
    vertical-align: middle;
}

.table-centered th:first-child,
.table-centered td:first-child {
    text-align: left;
}

.table-centered th:last-child,
.table-centered td:last-child {
    text-align: center;
}

/* Estilos para stock por tallas */
.stock-por-tallas .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin: 0.1rem;
    border-radius: 0.375rem;
}

.stock-por-tallas .badge.bg-secondary {
    background-color: #6c757d !important;
    color: white;
}

.stock-por-tallas .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000;
}

/* Badges y estados modernos */
.badge { 
    font-weight: 600; 
    letter-spacing: 0.3px;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}
.badge.bg-success { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.badge.bg-danger { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.badge.bg-warning { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important; 
    color: #111 !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Navbar moderna y elegante */
.navbar { 
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    background: var(--gradient-dark) !important;
    padding: 1rem 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1050;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    position: relative;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    color: rgba(255,255,255,0.85) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primario);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link:hover {
    color: white !important;
}

/* Estilos específicos para sidebar de empleado/admin */
.sidebar {
    background-color: #f8f9fa !important;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: #495057 !important;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    color: #212529 !important;
    background-color: #e9ecef;
    transform: translateX(2px);
}

.sidebar .nav-link.active {
    color: #ffffff !important;
    background-color: var(--color-primario);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.sidebar .nav-link.active:hover {
    color: #ffffff !important;
    background-color: var(--color-primario-dark);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

/* Footer moderno y atractivo */
footer { 
    background: var(--gradient-dark);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    color: rgba(255,255,255,0.9);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

footer h5, footer h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

footer h5::after, footer h6::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--color-primario);
    border-radius: 2px;
}

footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

footer a:hover {
    color: var(--color-primario-light);
    transform: translateX(5px);
}

footer .social-links a {
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    transform: translateX(0);
}

footer .social-links a:hover {
    background: var(--color-primario);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* Secciones genéricas en tarjetas (aplica al sitio completo) */
section.section-card > .container,
.section-card-container {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

/* Botón degradado primario */
.btn-primario {
    background: linear-gradient(135deg, #dc3545 0%, #b72a37 100%);
    border: none;
}
.btn-primario:focus { box-shadow: 0 0 0 .2rem rgba(220,53,69,.25); }

/* Cinta de oferta (ribbon) */
.ribbon {
    position: absolute;
    top: 12px;
    left: -6px;
    background: #dc3545;
    color: #fff;
    padding: 6px 12px;
    font-size: .8rem;
    font-weight: 600;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    box-shadow: 0 6px 12px rgba(220,53,69,.3);
}
.ribbon::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 6px;
    height: 6px;
    background: #8f1f2a;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* Chips de categoría */
.chip {
    display: inline-block;
    padding: 4px 10px;
    background: #f1f3f5;
    border-radius: 999px;
    font-size: .75rem;
    color: #495057;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Estilos adicionales útiles */
.auth-card {
    max-width: 480px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95) !important;
    border: 1px solid rgba(255,255,255,0.2);
}

.auth-container {
    min-height: calc(100vh - 300px);
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.feature-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(220,53,69,0.1), rgba(220,53,69,0.2));
    border-radius: 20px;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(220,53,69,0.2);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Alertas mejoradas */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .producto-card:hover {
        transform: translateY(-4px) scale(1);
    }
}

/* Estilos adicionales para auth-card */
.auth-card {
    max-width: 1100px;
}

/* Mejoras del dropdown */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    position: absolute;
    z-index: 1060;
    min-width: 200px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(220,53,69,0.1), rgba(220,53,69,0.15));
    color: var(--color-primario);
    transform: translateX(5px);
}

/* Mejora del badge del carrito */
.badge-carrito {
    font-size: 0.7rem;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Loader para transiciones */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s, visibility 0.3s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Mejoras de accesibilidad */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--color-primario);
    outline-offset: 2px;
}

/* Scrollbar personalizado para navegadores webkit */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primario);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primario-dark);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .navbar, footer, .btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

