﻿
/* Custom scrollbar for horizontal product lists */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Responsive Typography */
body {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 2vw, 16px);
}

/* Responsive Heading Sizes */
h1 {
    font-size: clamp(1.75rem, 5vw, 3rem);
}

h3 {
    font-size: clamp(0.875rem, 2vw, 1.125rem);
}

/* Fixed Filter/Sort Container */
.fixed-controls {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(249, 250, 251, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .fixed-controls {
        padding: 1rem 0;
        margin-bottom: 1.5rem;
    }
}

/* Desktop Dropdown animations */
.dropdown-hidden {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
    pointer-events: none;
}

.dropdown-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Desktop Dropdown Styling */
@media (min-width: 768px) {
    .desktop-dropdown {
        min-width: 320px;
        max-height: 80vh;
        overflow-y: auto;
        padding: 1.5rem;
    }

        .desktop-dropdown::-webkit-scrollbar {
            width: 6px;
        }

        .desktop-dropdown::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .desktop-dropdown::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 10px;
        }

            .desktop-dropdown::-webkit-scrollbar-thumb:hover {
                background: #94a3b8;
            }
}

/* Mobile Overlay/Popup */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .mobile-overlay.active {
        display: flex;
        opacity: 1;
    }

.mobile-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 1.5rem 1.5rem 0 0;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 51;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

    .mobile-popup.active {
        transform: translateY(0);
    }

.mobile-popup-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.mobile-popup-content {
    padding: 1.25rem;
    padding-bottom: 2rem;
}

@media (max-width: 767px) {
    .desktop-dropdown {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .mobile-overlay,
    .mobile-popup {
        display: none !important;
    }
}

.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;
}

/* Custom gradient for hero section */
.hero-gradient {
    background: linear-gradient(to right, #6366F1, #8B5CF6);
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Container Padding */
.responsive-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Responsive Button Sizing */
.btn-responsive {
    padding: clamp(0.5rem, 1vw, 0.5rem) clamp(1rem, 3vw, 1.5rem);
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

/* Responsive Input Fields */
.input-responsive {
    padding: clamp(0rem, 1vw, 0.5rem) clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

/* Responsive Product Card */
.product-card {
    border-radius: clamp(0.5rem, 1vw, 0.75rem);
}

/* Responsive Icon Sizing */
.icon-responsive {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

/* Responsive Price Text */
.price-text {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.star-rating {
    font-size: clamp(0.5rem, 1.5vw, 0.875rem);
}

/* Responsive Filter Tags */
.filter-tag {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    padding: clamp(0.25rem, 1vw, 0.375rem) clamp(0.5rem, 1.5vw, 0.75rem);
}

/* Responsive Product Grid Gap */
.product-grid {
    gap: clamp(0.3rem, 1.5vw, 1rem);
}

/* Smooth Transitions for Responsive Elements */
* {
    transition: font-size 0.2s ease, padding 0.2s ease, margin 0.2s ease;
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}

/* Close button styling */
.close-popup-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #4b5563;
    transition: all 0.2s;
}

    .close-popup-btn:hover {
        background: #e5e7eb;
        color: #1f2937;
    }
