/* ============================================================
   LA BRUJI TIENDA - Estilos Personalizados
   ============================================================ */

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}
::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6d28d9;
}

/* Transición suave para todos los elementos */
* {
    transition-property: background-color, border-color, color;
    transition-duration: 200ms;
}

/* Animaciones de carga */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}
.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200px 100%;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: #333;
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 100;
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white;
}

/* Galería de imágenes en producto */
.product-gallery img {
    transition: opacity 0.3s;
}
.product-thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: #8b5cf6;
}

/* Estrellas de valoración */
.star-rating .star {
    cursor: pointer;
    font-size: 1.5rem;
    color: #d1d5db;
    transition: color 0.2s;
}
.star-rating .star.active,
.star-rating .star:hover {
    color: #facc15;
}

/* Card hover effects */
.product-card {
    transition: all 0.3s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(91, 33, 182, 0.15);
}
.dark .product-card:hover {
    box-shadow: 0 12px 30px rgba(91, 33, 182, 0.3);
}

/* Admin: Sidebar */
.admin-sidebar {
    scrollbar-width: thin;
}
.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

/* Tablas responsivas */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Toast / Notificaciones */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Select personalizado */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

/* Checkbox personalizado */
.checkbox-custom {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.checkbox-custom:checked {
    background-color: #6d28d9;
    border-color: #6d28d9;
}

/* Editor de contenido rich text (textarea convertido) */
.rich-editor {
    min-height: 300px;
}

/* Badge de estado de pedido */
.badge-pendiente { background: #fef3c7; color: #92400e; }
.badge-pagado { background: #dbeafe; color: #1e40af; }
.badge-en-proceso { background: #e0e7ff; color: #3730a3; }
.badge-enviado { background: #d1fae5; color: #065f46; }
.badge-entregado { background: #a7f3d0; color: #047857; }
.badge-cancelado { background: #fee2e2; color: #991b1b; }
.dark .badge-pendiente { background: #78350f; color: #fde68a; }
.dark .badge-pagado { background: #1e3a5f; color: #bfdbfe; }
.dark .badge-en-proceso { background: #312e81; color: #c7d2fe; }
.dark .badge-enviado { background: #064e3b; color: #a7f3d0; }
.dark .badge-entregado { background: #047857; color: #d1fae5; }
.dark .badge-cancelado { background: #7f1d1d; color: #fecaca; }

/* Mobile: centrar contenido */
@media (max-width: 767px) {
    .contenido-centrado-movil {
        text-align: center;
    }
    .contenido-centrado-movil .flex.justify-between,
    .contenido-centrado-movil .grid {
        text-align: left;
    }
}
