/* Compairox Custom Styles */

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

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

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

/* Compare button active state */
.compare-btn.active {
    background-color: rgb(79 70 229 / 0.1) !important;
    color: rgb(79 70 229) !important;
    border: 2px solid rgb(79 70 229);
}

.dark .compare-btn.active {
    background-color: rgb(99 102 241 / 0.2) !important;
    color: rgb(165 180 252) !important;
    border: 2px solid rgb(99 102 241);
}

/* Smooth transitions for dark mode */
body, nav, footer, main, section, div, a, button, input, select {
    transition-property: background-color, border-color, color;
    transition-duration: 200ms;
    transition-timing-function: ease-in-out;
}

/* Product card image hover */
.product-card img {
    transition: transform 0.5s ease;
}
.product-card:hover img {
    transform: scale(1.05);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 9999px;
}
.dark ::-webkit-scrollbar-thumb {
    background: #374151;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Compare floating bar */
#compareFloatingBar {
    animation: slideUp 0.3s ease-out;
}

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

/* Focus styles */
input:focus, select:focus, button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgb(99 102 241 / 0.2);
}

/* Category dropdown animation */
.group:hover .group-hover\:visible {
    visibility: visible;
    opacity: 1;
}

