/**
 * =============================================================================
 * COMPONENTES CSS - Estilos globales parametrizados
 * =============================================================================
 */

/* ================================
   FOOTER PROFESIONAL
   ================================ */
.footer-modern {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}

.footer-logo {
    filter: brightness(1.1);
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-description {
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-title {
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--bs-primary);
}

/* Footer Links */
.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--bs-primary);
    transform: translateX(5px);
}

.footer-links a::before {
    content: '→ ';
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-links a:hover::before {
    opacity: 1;
}

/* Social Links */
.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-link:hover {
    background: var(--bs-primary);
    color: #fff;
    transform: translateY(-3px);
}

.social-whatsapp:hover {
    background: #25D366;
}

.social-facebook:hover {
    background: #1877F2;
}

.social-instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-youtube:hover {
    background: #FF0000;
}

.social-tiktok:hover {
    background: #000000;
}

/* Contact Items */
.contact-item {
    font-size: 0.95rem;
}

.contact-item a:hover {
    color: var(--bs-primary) !important;
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
}

/* Responsive Footer */
@media (max-width: 767.98px) {
    .footer-main {
        text-align: center;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center;
    }

    .footer-links a::before {
        display: none;
    }

    .contact-item {
        justify-content: center;
    }
}

/* Animation on scroll */
.footer-modern .row > div {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.footer-modern .row > div:nth-child(1) { animation-delay: 0.1s; }
.footer-modern .row > div:nth-child(2) { animation-delay: 0.2s; }
.footer-modern .row > div:nth-child(3) { animation-delay: 0.3s; }
.footer-modern .row > div:nth-child(4) { animation-delay: 0.4s; }

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

/* ================================
   NAVBAR PROFESIONAL
   ================================ */
.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-sticky.scrolled {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    backdrop-filter: blur(10px);
    background: rgba(33, 37, 41, 0.95) !important;
}

.logo-fixed-size {
    width: 150px;
    height: auto;
    max-height: 50px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

/* Nav Links Animation */
.nav-link-animated {
    position: relative;
    padding: 0.5rem 1rem !important;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

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

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

.nav-link-animated.active {
    color: var(--bs-primary) !important;
}

/* WhatsApp Link */
.nav-link-whatsapp {
    color: #25D366 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link-whatsapp:hover {
    color: #128C7E !important;
    transform: scale(1.05);
}

/* CTA Button */
.btn-nav-cta {
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--bs-primary-rgb), 0.3);
}

.btn-nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--bs-primary-rgb), 0.4);
}

/* Mobile Menu */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(33, 37, 41, 0.98);
        padding: 1rem;
        border-radius: 0 0 1rem 1rem;
        margin-top: 0.5rem;
    }

    .nav-link-animated {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-link-animated::after {
        display: none;
    }

    .btn-nav-cta {
        width: 100%;
        margin-top: 1rem;
        text-align: center;
    }
}

/* Toggler Animation */
.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-image: none;
    position: relative;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    content: '✕';
    color: white;
    font-size: 1.5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ================================
   ALERTAS MODERNAS
   ================================ */
.alert-modern {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInDown 0.4s ease;
}

.alert-modern .alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-modern .alert-content {
    flex: 1;
}

.alert-modern .alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-modern .alert-message {
    margin: 0;
    opacity: 0.9;
}

.alert-modern .btn-close {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.alert-modern .btn-close:hover {
    opacity: 1;
}

/* Alert Success */
.alert-modern-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-modern-success .alert-icon {
    color: #28a745;
}

/* Alert Error */
.alert-modern-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-modern-danger .alert-icon {
    color: #dc3545;
}

/* Alert Warning */
.alert-modern-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
}

.alert-modern-warning .alert-icon {
    color: #ffc107;
}

/* Alert Info */
.alert-modern-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-modern-info .alert-icon {
    color: #17a2b8;
}

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

.toast-modern {
    min-width: 300px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideInRight 0.4s ease;
}

.toast-modern .toast-header {
    border: none;
    padding: 0.75rem 1rem;
}

.toast-modern .toast-body {
    padding: 0.75rem 1rem;
}

.toast-success {
    background: #28a745;
    color: white;
}

.toast-success .toast-header {
    background: rgba(0, 0, 0, 0.1);
    color: white;
}

.toast-error {
    background: #dc3545;
    color: white;
}

.toast-error .toast-header {
    background: rgba(0, 0, 0, 0.1);
    color: white;
}

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

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

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

/* ================================
   CARRITO WIDGET
   ================================ */
.cart-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bs-color-carrito-compras, #f8f9fa);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cart-widget:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cart-widget .carrito-icon {
    font-size: 1.5rem;
    color: var(--bs-dark);
}

.cart-widget .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--bs-color-contador-carrito, #dc3545);
    color: white;
    font-size: 0.7rem;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* ================================
   BOTONES COMPARTIR
   ================================ */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.btn-share-whatsapp { background: #25D366; }
.btn-share-facebook { background: #1877F2; }
.btn-share-twitter { background: #1DA1F2; }
.btn-share-copy { background: #6c757d; }

.btn-share-copy.copied {
    background: #28a745;
}

/* ================================
   SKELETON LOADING
   ================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-image {
    height: 200px;
    width: 100%;
}
