/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9; 
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

/* Hide number input arrows */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}

/* Active states for filters */
.filter-active {
    color: #dc2626;
    font-weight: 600;
}

.filter-active span:first-child {
    color: #dc2626;
}

.wishlist-active {
    color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

/* Product card cursor pointer for clickability */
.product-card {
    cursor: pointer;
}

/* Modal image styling */
.modal-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Floating Cart Button - Fixed at top when scrolling */
.floating-cart-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.floating-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(220, 38, 38, 0.5);
}

.floating-cart-btn:active {
    transform: translateY(0);
}

.floating-cart-btn .cart-icon {
    font-size: 18px;
}

.floating-cart-btn .cart-count {
    background: white;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Admin tab styling */
.admin-tab {
    transition: all 0.2s ease;
}

.admin-tab:hover {
    color: #dc2626;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .floating-cart-btn {
        top: auto;
        bottom: 90px;
        right: 20px;
        padding: 14px 18px;
    }

    .floating-cart-btn .cart-text {
        display: none;
    }

    .floating-cart-btn .cart-icon {
        font-size: 20px;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Line clamp utility */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pulse animation for live indicator */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* Card hover lift effect */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Custom selection color */
::selection {
    background-color: #fecaca;
    color: #7f1d1d;
}

/* Focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: #dc2626;
}

/* WhatsApp button pulse */
@keyframes whatsapp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
