/* Custom Styles for Join Electronic Center */

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out;
}

.animate-pulse-slow {
    animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Background grid pattern */
.bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(100, 100, 100, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(100, 100, 100, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.dark ::-webkit-scrollbar-thumb {
    background: #555;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Material Symbols Configuration */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.fill-current {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Product card hover effects */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .product-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Image zoom effect */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* WhatsApp button pulse */
@keyframes whatsapp-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 14px 0 rgba(37, 211, 102, 0.39);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 20px 0 rgba(37, 211, 102, 0.5);
    }
}

.whatsapp-float {
    animation: whatsapp-pulse 2s ease-in-out infinite;
}

/* Badge animations */
@keyframes badge-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.badge-new {
    animation: badge-bounce 1s ease-in-out infinite;
}

/* Loading spinner */
.loading-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: #135bec;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile menu transition */
.mobile-menu {
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.closed {
    transform: translateX(-100%);
}

/* Star rating */
.star-rating {
    display: inline-flex;
}

/* Price tag effect */
.price-tag {
    position: relative;
    display: inline-block;
}

.price-tag::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #135bec, #42b72a);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.price-tag:hover::before {
    opacity: 0.1;
}

/* Glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 8px;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #135bec;
    outline-offset: 2px;
}

button:focus, a:focus {
    outline: 2px solid #135bec;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #135bec;
    color: white;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Smooth height transitions */
.transition-height {
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* No-scroll class for modal open */
body.no-scroll {
    overflow: hidden;
}

/* Fade in on scroll */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #135bec, #42b72a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
