/* =====================================================
   STORE BASE CSS
   Estilos base para las tiendas
   Las variables CSS están definidas en tokens.css
   ===================================================== */

body {
    background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-gray-200) 100%);
}

/* Navbar modernizada */
.navbar-brand img {
    border: 3px solid var(--secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-md);
}

.navbar-brand:hover img {
    transform: scale(1.05) rotate(2deg);
    box-shadow: var(--shadow-lg);
}

.navbar-dark {
    background: linear-gradient(135deg, var(--dark) 0%, #2d3748 100%);
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 12px 24px;
    border-radius: 50px;
    margin: 0 8px;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    color: white !important;
    background: linear-gradient(135deg, var(--primary), #5A52E0);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-link::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;
}

.nav-link:hover::before {
    left: 100%;
}

/* Botones mejorados */
.btn {
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 12px 30px;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #5A52E0);
    color: white;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #5A52E0, var(--primary));
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #E68A00);
    color: white;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: linear-gradient(135deg, #E68A00, var(--secondary));
    color: white;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

/* Cards con diseño moderno */
.card {
    border: none;
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    background: var(--bg-white);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

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

.card-img-top {
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    transition: transform 0.5s ease;
}

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

.card-body {
    padding: 2rem;
    position: relative;
}

/* Hover cards especiales */
.hover-card {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.hover-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary)20, var(--secondary)20);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 25px;
}

.hover-card:hover::before {
    opacity: 0.05;
}

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

/* Product cards específicas */
.product-card {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 25px;
    overflow: hidden;
    background: var(--bg-white);
    position: relative;
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary)10, var(--secondary)10);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover::after {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: var(--shadow-xl);
}

/* Footer mejorado */
.footer-plataforma {
    background: linear-gradient(135deg, var(--dark) 0%, #2d3748 100%);
    color: #FFFFFF;
    padding: 3rem 0;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    margin-top: 4rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.footer-plataforma::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.footer-plataforma a {
    color: #FFFFFF;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-plataforma a:hover {
    color: var(--detail);
    transform: translateY(-2px);
}

.footer-plataforma a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, var(--secondary), var(--detail));
    transition: width 0.3s ease;
}

.footer-plataforma a:hover::after {
    width: 100%;
}

/* Alerts modernos */
.alert {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

/* Badges mejorados */
.badge {
    padding: 0.6em 1.2em;
    font-weight: 500;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Filter badges */
.filter-badge {
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, var(--primary), #5A52E0) !important;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-badge::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;
}

.filter-badge:hover::before {
    left: 100%;
}

.filter-badge.active {
    background: linear-gradient(135deg, var(--secondary), #E68A00) !important;
    color: white;
    transform: scale(1.05);
}

/* Logo styling */
.logo {
    height: 60px;
    width: 60px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

/* Container custom padding */
.py-main {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Section styling */
.section-rounded {
    background: var(--bg-white);
    border-radius: 30px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.section-rounded::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Forms mejorados */
.form-control,
.form-select {
    border-radius: 50px;
    padding: 15px 25px;
    border: 2px solid var(--bg-gray);
    transition: all 0.3s ease;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(108, 99, 255, 0.15), var(--shadow-md);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 500;
    margin-left: 15px;
    color: var(--text-dark);
}

/* Input groups mejorados */
.input-group .form-control {
    border-radius: 50px 0 0 50px;
}

.input-group .btn {
    border-radius: 0 50px 50px 0;
}

/* Utility classes para colores */
.text-primary-plataforma {
    color: var(--primary) !important;
}

.text-secondary-plataforma {
    color: var(--secondary) !important;
}

.bg-primary-plataforma {
    background-color: var(--primary) !important;
}

.bg-secondary-plataforma {
    background-color: var(--secondary) !important;
}

.bg-light-plataforma {
    background-color: var(--bg-light) !important;
}

/* Tablas mejoradas */
.table-rounded {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-rounded thead th {
    border-top: none;
    background: linear-gradient(135deg, var(--primary), #5A52E0);
    color: white;
    font-weight: 600;
    padding: 1rem;
}

.table-rounded thead th:first-child {
    border-top-left-radius: 20px;
}

.table-rounded thead th:last-child {
    border-top-right-radius: 20px;
}

.table-rounded tbody tr:last-child td:first-child {
    border-bottom-left-radius: 20px;
}

.table-rounded tbody tr:last-child td:last-child {
    border-bottom-right-radius: 20px;
}

.table-hover tbody tr:hover {
    background-color: rgba(108, 99, 255, 0.05);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* Breadcrumbs mejorados */
.breadcrumb {
    background: var(--bg-white);
    border-radius: 50px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    font-weight: bold;
    color: var(--primary);
}

/* Carrito contador mejorado */
.cart-btn {
    position: relative;
    overflow: hidden;
}

.cart-count {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Efectos de carga suaves */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Carrusel mejorado */
.carousel-indicators [data-bs-target] {
    opacity: 0.5;
    border: 3px solid var(--primary);
    border-radius: 10px;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.carousel-indicators [data-bs-target].active {
    opacity: 1;
    transform: scale(1.1);
}

/* Responsive mejoras */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }

    .py-main {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .section-rounded {
        padding: 2rem;
    }

    .btn {
        padding: 10px 20px;
    }
}

/* Animaciones adicionales */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Efectos de glassmorphism para elementos especiales */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Mejoras para el filtro de categorías */
.filter-container {
    background: var(--bg-white) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(108, 99, 255, 0.1);
}




/* Navigation styles */
.brand-container {
    text-decoration: none;
    transition: all 0.3s ease;
}

.brand-container:hover {
    transform: translateY(-2px);
}

.brand-logo-container {
    position: relative;
}

.logo-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    transform: translate(-50%, -50%);
    animation: pulse-ring 2s infinite;
    opacity: 0;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.brand-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Custom navbar toggler */
.custom-toggler {
    border: none;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.navbar-toggler-line {
    width: 20px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Cart button modern */
.cart-btn-modern {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cart-btn-modern:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

.cart-btn-modern.has-items {
    background: linear-gradient(135deg, var(--secondary), #E68A00);
    border-color: var(--secondary);
}

.cart-icon-container {
    position: relative;
    display: inline-block;
}

.cart-count {
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    border: 2px solid white;
}

.cart-count.bounce {
    animation: bounce 0.6s ease;
}

@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        transform: scale(1);
    }

    40%,
    43% {
        transform: scale(1.3);
    }

    70% {
        transform: scale(1.1);
    }
}

/* Flash messages */
.flash-message {
    border-left: 4px solid;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.alert-icon {
    font-size: 1.5rem;
}

/* Footer improvements */
.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--detail);
    text-decoration: underline;
}

/* Toast improvements */
.custom-toast {
    border-radius: 15px;
    border: none;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.toast-icon {
    font-size: 1.2rem;
}

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

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner-ring {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Navbar hide on scroll */
.navbar {
    transition: transform 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Button loading animation */
.spin {
    animation: spin 1s linear infinite;
}

/* Main content spacing */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cart-text {
        display: none !important;
    }

    .navbar {
        margin: 0.5rem;
        margin-bottom: 0;
    }

    .footer-plataforma {
        margin-top: 2rem;
    }
}

.hero-section {
    position: relative;
    min-height: 400px;
    border-radius: 25px;
}

.hero-section h1{
    color: white;
}

.hero-background,
.hero-overlay {
    pointer-events: none;
}