/* === VARIABLES Y RESET === */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --border-color: #e8ecef;
    --text-muted: #6c757d;
    --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* === NUEVO: Estilos para el botón Call-to-Action === */
.btn-cta-custom {
    background: linear-gradient(45deg, #0d6efd, #0b5ed7);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn-cta-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.btn-cta-custom:hover::before {
    left: 100%;
}

.btn-cta-custom:hover {
    background: linear-gradient(45deg, #0b5ed7, #0a58ca);
    color: white;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(13, 110, 253, 0.4);
    text-decoration: none;
}

.btn-cta-custom:focus {
    color: white;
    text-decoration: none;
    box-shadow: 0 15px 40px rgba(13, 110, 253, 0.4);
}

/* === SLIDER COMPLETAMENTE FULL WIDTH FIJO === */
.hero-slider-fullwidth {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

#heroCarousel {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    position: relative;
}

.carousel-item {
    height: 100vh;
}

.carousel-item img {
    height: 100vh;
    width: 100vw;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

.carousel-caption-custom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    color: white;
    max-width: 800px;
    width: 90%;
}

.hero-title {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease 0.3s;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease 0.6s;
    line-height: 1.6;
}

.btn-hero {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 2px;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 2px solid transparent;
    z-index: 10;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 0.9s;
}

.btn-hero:hover {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-2px);
    text-decoration: none;
}

.carousel-indicators {
    bottom: 30px;
    z-index: 15;
    margin: 0;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background-color: transparent;
    opacity: 0.7;
    transition: all 0.3s ease;
    margin: 0 3px;
}

.carousel-indicators button.active {
    background-color: white;
    opacity: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    z-index: 15;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 40px;
    height: 40px;
}

/* === ESPACIADOR CRÍTICO PARA POSICIONAR CONTENIDO === */
.hero-spacer {
    height: 100vh;
    width: 100%;
    display: block;
    position: relative;
    z-index: 1;
}

/* === SECCIONES DESPUÉS DEL SLIDER === */
.scroll-section {
    position: relative;
    z-index: 2;
    background-color: #fff;
    transition: background-color 0.5s ease;
}

.scroll-section[data-bg="light"] {
    background-color: #f8f9fa !important;
}

.scroll-section[data-bg="white"] {
    background-color: #ffffff !important;
}

.scroll-section[data-bg="primary"] {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%) !important;
}

/* === ANIMACIONES DE SCROLL === */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
}

/* === ESTADÍSTICAS DINÁMICAS === */
#stats-section .stat-card {
    display: flex;               /* Añadido: Usa flexbox para centrado vertical y horizontal */
    flex-direction: column;      /* Añadido: Dirección columna para apilar elementos */
    justify-content: center;     /* Añadido: Centra verticalmente */
    align-items: center;         /* Añadido: Centra horizontalmente */
    text-align: center;          /* Mantenido: Centrado de texto como fallback */
    padding: 3rem 1.5rem;        /* Mantenido */
    background: var(--white);    /* Mantenido */
    border: 1px solid var(--border-color); /* Mantenido */
    border-radius: 8px;          /* Mantenido */
    transition: all 0.4s ease;   /* Mantenido */
    position: relative;          /* Mantenido */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Mantenido */
    height: 100%;                /* Mantenido: Asegura altura completa */
    min-height: 200px;           /* Añadido: Altura mínima para consistencia en móvil */
}

.stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
    transform: translateY(-8px);
}

.stat-number {
    font-size: 3.5rem;           /* Mantenido, pero ajustado para responsive abajo */
    font-weight: 300;            /* Mantenido */
    color: var(--primary-color); /* Mantenido */
    line-height: 1;              /* Mantenido */
    margin-bottom: 0.5rem;       /* Mantenido */
    font-family: var(--font-family); /* Mantenido */
    letter-spacing: -0.02em;     /* Mantenido */
    width: 100%;                 /* Añadido: Ocupa todo el ancho para centrado perfecto */
}

.stat-label {
    font-size: 0.875rem;         /* Mantenido */
    color: var(--text-muted);    /* Mantenido */
    text-transform: uppercase;   /* Mantenido */
    letter-spacing: 0.5px;       /* Mantenido */
    font-weight: 500;            /* Mantenido */
    margin-bottom: 1rem;         /* Mantenido */
    width: 100%;                 /* Añadido: Ocupa todo el ancho para centrado */
}

.stat-line {
    width: 40px;                 /* Mantenido */
    height: 2px;                 /* Mantenido */
    background-color: var(--primary-color); /* Mantenido */
    margin: 0 auto;              /* Mantenido: Ya centraba horizontalmente */
    opacity: 0;                  /* Mantenido */
    transition: all 0.4s ease;   /* Mantenido */
    transform: scaleX(0);        /* Mantenido */
}

.stat-card:hover .stat-line {
    opacity: 1;
    transform: scaleX(1);
}

/* === SECCIONES GENERALES === */
.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--dark-color);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* === TARJETAS ANIMADAS CON OVERLAY === */
.product-card-animated {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card-animated:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.2);
}

.card-image-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card-animated:hover .card-image {
    transform: scale(1.15);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 123, 255, 0.9), rgba(0, 86, 179, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.5s ease;
}

.product-card-animated:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 1.5rem;
}

.overlay-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.overlay-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.btn-overlay {
    background: white;
    color: #007bff;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-overlay:hover {
    background: #f8f9fa;
    transform: scale(1.05);
    text-decoration: none;
    color: #007bff;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.75rem;
}

.card-description {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 1rem;
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    background: linear-gradient(45deg, #e9ecef, #f8f9fa);
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === TARJETAS CON EFECTO FLIP 3D === */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 300px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.flip-card-front {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    color: #343a40;
}

.flip-card-back {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    transform: rotateY(180deg);
    text-align: left;
}

.flip-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.flip-card:hover .flip-icon {
    transform: scale(1.1);
}

.flip-card-front h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.flip-card-front p {
    color: #6c757d;
    font-size: 1rem;
}

.flip-card-back h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.flip-card-back p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.service-list li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.service-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #fff;
    font-weight: bold;
}

.btn-flip {
    background: white;
    color: #007bff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-flip:hover {
    background: #f8f9fa;
    transform: scale(1.05);
    text-decoration: none;
    color: #007bff;
}

/* === TARJETAS CON DEGRADADO ANIMADO === */
.gradient-card {
    position: relative;
    padding: 3px;
    border-radius: 15px;
    background: linear-gradient(45deg, #007bff, #28a745, #ffc107, #dc3545);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
    height: 100%;
    transition: transform 0.3s ease;
}

.gradient-card:hover {
    transform: translateY(-5px);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.card-inner {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    height: calc(100% - 6px);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.card-icon {
    margin-bottom: 2rem;
}

.card-icon i {
    font-size: 3rem;
    color: #007bff;
    transition: transform 0.3s ease;
}

.gradient-card:hover .card-icon i {
    transform: scale(1.1);
}

.card-inner h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.card-inner p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.card-stats {
    display: flex;
    justify-content: space-around;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.stat strong {
    display: block;
    font-size: 1.5rem;
    color: #007bff;
}

.stat span {
    font-size: 0.8rem;
    color: #6c757d;
}

/* === TESTIMONIOS === */
.testimonial-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.testimonial-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
    transform: translateY(-8px);
}

.testimonial-content {
    flex-grow: 1;
    margin-bottom: 2rem;
}

.testimonial-quote {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--secondary-color);
    font-style: italic;
}

.testimonial-author {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    text-align: center;
}

.author-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.author-rating {
    color: var(--warning-color);
}

/* === LLAMADA A LA ACCIÓN === */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23pattern)"/></svg>');
    animation: float 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.cta-content {
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.cta-subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-cta:hover::before {
    left: 100%;
}

.btn-cta-primary {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

.btn-cta-primary:hover {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-3px);
    text-decoration: none;
}

.btn-cta-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-cta-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
    text-decoration: none;
}

/* === CARRUSEL DE MARCAS SOLO (SIN TEXTOS) === */
.brands-section {
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    overflow: hidden;
}

.brands-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

.brands-carousel {
    display: flex;
    align-items: center;
    animation: brandScroll 500s linear infinite;
    width: fit-content;
}

.brands-carousel:hover {
    animation-play-state: paused;
}

@keyframes brandScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.brand-slide {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 2rem;
    min-width: 120px;
    height: 60px;
}

.brand-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.brand-slide:hover .brand-logo {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* === MEDIA QUERIES - RESPONSIVE === */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .btn-cta-custom {
        font-size: 1.1rem;
        padding: 15px 30px;
    }
}

@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 8%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .brands-carousel {
        animation-duration: 25s;
    }
    
    .brand-slide {
        margin: 0 1.5rem;
        min-width: 100px;
        height: 50px;
    }
    
    .btn-cta-custom {
        font-size: 1rem;
        padding: 12px 25px;
    }
}

@media (max-width: 576px) {
        .stat-card {
        padding: 2rem 1rem;      /* Reducido: Menos padding para pantallas pequeñas */
        min-height: 150px;       /* Ajustado: Altura mínima más compacta */
        margin-bottom: 1.5rem;   /* Añadido: Espacio entre tarjetas en columna */
    }
    
    .stat-number {
        font-size: 2.5rem;       /* Reducido: Para que quepa mejor sin desbordar */
    }
    
    .stat-label {
        font-size: 0.8rem;       /* Reducido: Mejora legibilidad en móvil */
    }
    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .brand-slide {
        margin: 0 1rem;
        min-width: 80px;
        height: 40px;
    }
    
    .btn-cta-custom {
        font-size: 0.95rem;
        padding: 12px 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-cta {
        width: 100%;
        max-width: 280px;
    }
}

/* === SMOOTH SCROLL BAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0056b3, var(--primary-color));
}
/* Estilos para el título del chatbot (mantiene tamaño de H1) */
#n8n-chat .chat-header .chat-heading div {
    font-size: 2rem;  /* Tamaño típico de H1; ajusta a 2.5rem o 3rem si es más grande en tu diseño */
    font-weight: 700;  /* Negrita como H1 */
    line-height: 1.2;  /* Espaciado similar */
    margin: 0;         /* Elimina márgenes extras si hay */
    padding: 0;        /* Asegura consistencia */
    /* Si quieres copiar más estilos de tu .hero-title u otros H1: */
    color: inherit;    /* Hereda color del widget */
    letter-spacing: -0.02em;  /* Ejemplo de tu estilo general */
}

/* === ESTILOS PARA GESTIÓN DE PEDIDOS CON SEGUIMIENTO === */
.orders-filters {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.orders-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card-order {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,123,255,0.3);
}

.stat-card-order.pending {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    box-shadow: 0 4px 12px rgba(255,193,7,0.2);
}

.stat-card-order.processing {
    background: linear-gradient(135deg, #17a2b8, #138496);
    box-shadow: 0 4px 12px rgba(23,162,184,0.2);
}

.stat-card-order.delivered {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    box-shadow: 0 4px 12px rgba(40,167,69,0.2);
}

.stat-card-order.cancelled {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 4px 12px rgba(220,53,69,0.2);
}

.stat-number-order {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    display: block;
}

.stat-label-order {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-table-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    background: white;
}

.order-actions {
    white-space: nowrap;
}

.status-selector {
    min-width: 140px;
    font-size: 0.8rem;
}

.order-info {
    font-size: 0.875rem;
}

.order-code {
    font-weight: 600;
    color: #007bff;
    font-family: 'Courier New', monospace;
}

.client-info {
    max-width: 200px;
}

.client-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.client-details {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.2;
}

.client-address {
    font-size: 0.7rem;
    color: #868e96;
    margin-top: 0.25rem;
    line-height: 1.1;
}

.tracking-info {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.tracking-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.tracking-link:hover {
    text-decoration: underline;
}

.shipping-method {
    display: inline-block;
    padding: 2px 6px;
    background: #e9ecef;
    border-radius: 3px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 0.25rem;
}

.shipping-method.agencia {
    background: #d4edda;
    color: #155724;
}

.shipping-method.tienda {
    background: #d1ecf1;
    color: #0c5460;
}

.timeline-modal .modal-dialog {
    max-width: 800px;
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: #007bff;
    border-radius: 50%;
    z-index: 2;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 1.375rem;
    top: 1.25rem;
    width: 2px;
    height: 100%;
    background: #dee2e6;
}

.timeline-date {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.timeline-status {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-notes {
    color: #6c757d;
    font-size: 0.875rem;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.pagination-info {
    font-size: 0.875rem;
    color: #6c757d;
}

.pagination-nav {
    display: flex;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    text-decoration: none;
}

.page-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.status-update-success {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* === ESTILOS PARA GESTIÓN DEL BLOG === */
.blog-filters {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.blog-table-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.blog-preview {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-status-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.blog-actions {
    white-space: nowrap;
}

.modal-body .form-floating {
    margin-bottom: 1rem;
}

.char-counter {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: right;
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: #ffc107;
}

.char-counter.danger {
    color: #dc3545;
}

.image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 0.5rem;
    display: none;
}

.blog-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.blog-stats .stat-card {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .orders-table-container .table {
        font-size: 0.8rem;
    }
    
    .client-info {
        max-width: 150px;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* === ESTILOS PARA GESTIÓN DE ESTRELLAS === */
.stars-filters {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 200px auto auto;
    gap: 1rem;
    align-items: end;
}

.stars-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card-stars {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: white;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255,193,7,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-stars:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255,193,7,0.3);
}

.stat-card-stars.alta { background: linear-gradient(135deg, #28a745, #1e7e34); }
.stat-card-stars.media { background: linear-gradient(135deg, #17a2b8, #138496); }
.stat-card-stars.baja { background: linear-gradient(135deg, #dc3545, #c82333); }
.stat-card-stars.total { background: linear-gradient(135deg, #007bff, #0056b3); }
.stat-card-stars.promedio { background: linear-gradient(135deg, #6f42c1, #5a32a3); }

.stat-number-stars {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label-stars {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
}

.stars-table-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    background: white;
}

.star-rating {
    color: #ffc107;
    font-size: 1.2rem;
}

.star-rating .empty-star {
    color: #e4e5e9;
}

.star-input {
    max-width: 100px;
    font-size: 0.9rem;
}

.product-info .product-name {
    font-weight: 600;
    color: #007bff;
    margin-bottom: 0.25rem;
}

.product-info .product-reference {
    font-size: 0.75rem;
    color: #6c757d;
    font-family: 'Courier New', monospace;
}

.bulk-actions {
    background: #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.stars-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-stars {
    color: #ffc107;
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    .stars-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* === MEJORA ESTÉTICA PARA TARJETAS DE ESTADÍSTICAS === */

/* Damos un fondo muy sutil a toda la sección para que destaque */
#stats-section {
    background-color: #f8f9fa; /* Un gris muy claro */
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* El nuevo estilo de la tarjeta */
#stats-section .stat-card {
    background: #ffffff; /* Fondo blanco puro */
    border: none; /* Eliminamos cualquier borde anterior */
    border-radius: 12px; /* Bordes más redondeados y modernos */
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.07); /* Sombra sutil y profesional */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transiciones suaves */
    min-height: 200px; /* Aseguramos una altura consistente */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Efecto al pasar el ratón por encima */
#stats-section .stat-card:hover {
    transform: translateY(-10px); /* La tarjeta se eleva un poco más */
    box-shadow: 0 12px 30px rgba(0, 86, 179, 0.12); /* La sombra se hace más pronunciada */
}

/* Estilo para el número grande */
#stats-section .stat-number {
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Tipografía más limpia */
    font-size: 3.25rem;
    font-weight: 700; /* Un poco más de grosor para que destaque */
    color: var(--primary-color); /* Usamos tu color primario */
    margin-bottom: 0.25rem;
    letter-spacing: -0.03em;
}

/* Estilo para el texto de la etiqueta */
#stats-section .stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color); /* Usamos tu color secundario */
    text-transform: uppercase;
    letter-spacing: 0.05em; /* Un poco de espacio para que respire */
}

/* La línea decorativa */
#stats-section .stat-line {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #0056b3); /* Un degradado sutil */
    margin: 1rem auto 0;
    border-radius: 3px;
    transition: width 0.3s ease; /* Animamos el ancho al hacer hover */
}

#stats-section .stat-card:hover .stat-line {
    width: 70px; /* La línea se alarga al pasar el ratón */
}