/* 🛠️ Utilidades y Clases Auxiliares */

/* Contenedor de estrellas */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

/* Integración con contenido */
.content-overlay {
    position: relative;
    z-index: 1;
    backdrop-filter: blur(1px);
}

.content-overlay .glass-element {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Efectos de profundidad */
.featured-element {
    position: relative;
    z-index: 2;
}

.featured-element::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: inherit;
    z-index: -1;
    animation: featured-glow 4s ease-in-out infinite alternate;
}

@keyframes featured-glow {
    from {
        opacity: 0.3;
        transform: scale(1);
    }
    to {
        opacity: 0.7;
        transform: scale(1.02);
    }
}

/* Utilidades responsive */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem 1rem 1rem;
        margin-top: 1.5rem;
    }

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

    .product-card {
        margin-bottom: 1.5rem;
    }

    .product-img {
        height: 140px;
    }
}

/* Utilidades de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    .glow-white,
    .badge-glow-white {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }

    .btn:hover {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
}

/* Modo impresión */
@media print {
    .stars,
    .navbar,
    .footer,
    .btn,
    .theme-toggle-advanced {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .container {
        box-shadow: none !important;
        background: white !important;
    }
}

/* Utilidades de debug (desactivadas por defecto) */
/*
.debug-grid {
    background-image:
        linear-gradient(rgba(255, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.debug-borders * {
    border: 1px solid red !important;
}
*/

/* Utilidades de espaciado */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Utilidades de texto */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-weight-light { font-weight: 300; }
.font-weight-normal { font-weight: 400; }
.font-weight-bold { font-weight: 700; }
.font-weight-bolder { font-weight: 900; }

/* Utilidades de display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Utilidades de flexbox */
.justify-content-start { justify-content: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }

/* Utilidades de posición */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* Utilidades de borde */
.border { border: 1px solid #dee2e6; }
.border-0 { border: 0; }
.border-top { border-top: 1px solid #dee2e6; }
.border-bottom { border-bottom: 1px solid #dee2e6; }
.border-left { border-left: 1px solid #dee2e6; }
.border-right { border-right: 1px solid #dee2e6; }

.rounded { border-radius: 0.25rem; }
.rounded-0 { border-radius: 0; }
.rounded-circle { border-radius: 50%; }
.rounded-pill { border-radius: 50rem; }

/* Utilidades de sombra */
.shadow { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }
.shadow-lg { box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.175); }
.shadow-none { box-shadow: none; }