/* Custom Styles for ZeolifeMed Website */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth transitions */
.transition-transform {
    transition: transform 0.3s ease-in-out;
}

/* Cart animation */
#cart-sidebar.open {
    transform: translateX(0) !important;
}

/* Product card hover effect */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
}

/* Button pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Modal backdrop blur */
#product-modal.active {
    backdrop-filter: blur(4px);
}

/* Loading state */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Success message */
.success-message {
    animation: slideIn 0.3s ease-out;
}

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

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile menu animation */
#mobile-menu.show {
    display: flex !important;
}

/* Category filter active state */
.category-btn.active {
    background-color: #2563eb;
    color: white;
}

/* Add to cart button success state */
.btn-success {
    background-color: #16a34a !important;
}

/* Product image container */
.product-image-container {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

.product-image-container img {
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
}

/* Quantity controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.quantity-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.quantity-btn:hover {
    background-color: #e5e7eb;
}

.quantity-value {
    min-width: 3rem;
    text-align: center;
    font-weight: 500;
}

/* Empty cart state */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem;
}

/* Responsive utilities */
@media (max-width: 768px) {
    #cart-sidebar {
        width: 100% !important;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    #cart-sidebar,
    .no-print {
        display: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1f2937;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    animation: slideInUp 0.3s ease-out;
}

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

.toast.success {
    background: #16a34a;
}

.toast.error {
    background: #dc2626;
}

/* WhatsApp Widget Styles */
#whatsapp-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.whatsapp-float {
    position: relative;
    width: 64px;
    height: 64px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float:hover {
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.7);
}

#whatsapp-bubble {
    animation: slideUp 0.3s ease-out;
}

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

.whatsapp-option {
    transition: all 0.2s ease;
}

.whatsapp-option:hover {
    transform: translateX(4px);
    border-color: #16a34a;
}

/* Pulse animation for notification badge */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* WhatsApp button bounce on load */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.whatsapp-float {
    animation: bounce 2s ease-in-out 3;
}

/* Mobile adjustments for WhatsApp widget */
@media (max-width: 768px) {
    #whatsapp-widget {
        bottom: 1rem;
        right: 1rem;
    }
    
    .whatsapp-float {
        width: 56px;
        height: 56px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
    
    #whatsapp-bubble {
        width: calc(100vw - 2rem);
        right: -1rem;
    }
}

/* Smooth fade in for bubble */
#whatsapp-bubble.show {
    display: block !important;
}

/* Custom animation for slideUp */
.animate-slideUp {
    animation: slideUp 0.3s ease-out forwards;
}

/* WhatsApp button shake animation */
@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: rotate(-10deg);
    }
    20%, 40%, 60%, 80% {
        transform: rotate(10deg);
    }
}

.whatsapp-float:hover {
    animation: shake 0.5s ease-in-out;
}

/* Ping animation for notification badge */
@keyframes ping-slow {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping-slow {
    animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* WhatsApp bubble entrance animation */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#whatsapp-bubble {
    animation: slideUpFade 0.4s ease-out;
}

/* WhatsApp option hover glow effect */
.whatsapp-option {
    position: relative;
    overflow: hidden;
}

.whatsapp-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.1), transparent);
    transition: left 0.5s;
}

.whatsapp-option:hover::before {
    left: 100%;
}

/* Footer link hover animation */
footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Social icons bounce on hover */
footer .flex a {
    transition: all 0.3s ease;
}

footer .flex a:hover {
    transform: translateY(-5px);
}

/* Certification badges pulse */
@keyframes certPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

footer .bg-gray-800:hover {
    animation: certPulse 0.6s ease-in-out;
}