/**
 * ============================================
 * SS INFOTECH - PRODUCTS PAGE STYLES
 * ============================================
 * Modern, Clean, Responsive Design
 * Mobile-First Approach
 * Pure CSS - No Frameworks
 * ============================================
 */

/* ============================================
   CSS VARIABLES - Design System
   ============================================ */
:root {
    /* Primary Colors */
    --primary-color: #4A90E2;
    --primary-dark: #2E5C8A;
    --primary-light: #7AB8F5;

    /* Accent Colors */
    --accent-color: #50C9E8;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #F44336;

    /* Neutral Colors */
    --text-primary: #1A2332;
    --text-secondary: #5A6C84;
    --text-muted: #8B95A8;
    --text-white: #FFFFFF;

    /* Background Colors */
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-gradient: linear-gradient(135deg, #E8F4FF 0%, #F5F9FF 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 40px rgba(74, 144, 226, 0.15);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 50px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Z-Index Hierarchy */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-modal-backdrop: 1000;
    --z-modal: 1001;
    --z-tooltip: 1002;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.products-hero {
    background: var(--bg-gradient);
    padding: 3rem 0 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Decorative background circles */
.products-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.products-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(80, 201, 232, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.products-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    word-wrap: break-word;
}

.products-hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   SEARCH FORM
   ============================================ */
.search-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 1rem;
}

.search-container {
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border: 2px solid rgba(74, 144, 226, 0.15);
    border-radius: var(--radius-pill);
    padding: 0.375rem 0.375rem 0.375rem 1rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    width: 100%;
}

.search-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1), var(--shadow-lg);
    transform: translateY(-2px);
}

.search-icon {
    color: var(--primary-color);
    font-size: 1rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 0.625rem 0.5rem;
    font-weight: 500;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--text-white);
    border: none;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    flex-shrink: 0;
}

.search-btn:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.search-btn:active {
    transform: scale(0.95);
}

/* Mobile Search Adjustments */
@media (max-width: 575px) {
    .search-form {
        padding: 0 0.75rem;
    }

    .search-container {
        padding: 0.25rem 0.25rem 0.25rem 0.75rem;
    }

    .search-icon {
        font-size: 0.875rem;
        margin-right: 0.375rem;
    }

    .search-input {
        font-size: 0.875rem;
        padding: 0.5rem 0.25rem;
    }

    .search-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .search-btn i {
        font-size: 0.875rem;
    }
}

/* Tablet Search Adjustments */
@media (min-width: 576px) and (max-width: 767px) {
    .search-container {
        padding: 0.375rem 0.375rem 0.375rem 1.25rem;
    }

    .search-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* Desktop Search Adjustments */
@media (min-width: 768px) {
    .search-form {
        padding: 0;
    }

    .search-container {
        padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    }

    .search-icon {
        font-size: 1.125rem;
        margin-right: 0.75rem;
    }

    .search-input {
        font-size: 1rem;
        padding: 0.75rem 0.5rem;
    }

    .search-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    padding: 2rem 1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ============================================
   FILTER & SORT BAR
   ============================================ */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-white);
    border: 1px solid rgba(74, 144, 226, 0.12);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    width: 100%;
}

.filter-btn,
.sort-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-white);
    border: 2px solid rgba(74, 144, 226, 0.15);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-btn:hover,
.sort-btn:hover {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-btn:active,
.sort-btn:active,
.filter-btn.active,
.sort-btn.active {
    transform: scale(0.95);
    background: var(--primary-dark);
    color: var(--text-white);
    border-color: var(--primary-dark);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sort Dropdown */
.sort-dropdown {
    position: relative;
}

.sort-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-white);
    border: 1px solid rgba(74, 144, 226, 0.12);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: var(--z-dropdown);
}

.sort-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sort-item:last-child {
    border-bottom: none;
}

.sort-item:hover {
    background: rgba(74, 144, 226, 0.08);
    color: var(--primary-color);
}

.sort-item.active {
    background: rgba(74, 144, 226, 0.12);
    color: var(--primary-color);
    font-weight: 700;
}

/* ============================================
   CATEGORY FILTER SECTION - Dropdown System
   ============================================ */
.category-filter-section {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

/* All Products Dropdown Container */
.all-products-dropdown {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

/* All Products Button */
.all-products-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-white);
    border: 2px solid rgba(74, 144, 226, 0.15);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.all-products-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.1), transparent);
    transition: left 0.5s;
}

.all-products-btn:hover::before {
    left: 100%;
}

.all-products-btn:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.all-products-btn.active {
    border-color: var(--primary-color);
    background: rgba(74, 144, 226, 0.05);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.all-products-btn i:first-child {
    color: var(--primary-color);
    font-size: 1.125rem;
}

.all-products-btn span {
    flex: 1;
    text-align: left;
}

/* Dropdown Arrow Animation */
.dropdown-arrow {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-arrow.rotated {
    transform: rotate(180deg);
}

/* Category Dropdown Menu */
.category-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid rgba(74, 144, 226, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    backdrop-filter: blur(10px);
}

.category-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Ensure dropdown appears above other content */
.category-dropdown-menu {
    z-index: var(--z-dropdown);
}

/* Custom Scrollbar for Dropdown */
.category-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.category-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(74, 144, 226, 0.05);
    border-radius: var(--radius-sm);
}

.category-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 226, 0.3);
    border-radius: var(--radius-sm);
}

.category-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Dropdown Item */
.category-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition);
    border-bottom: 1px solid rgba(74, 144, 226, 0.06);
    position: relative;
    overflow: hidden;
}

.category-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-dropdown-item:hover::before,
.category-dropdown-item.active::before {
    transform: scaleY(1);
}

.category-dropdown-item:last-child {
    border-bottom: none;
}

.category-dropdown-item i:first-child,
.category-dropdown-item .category-emoji {
    color: var(--primary-color);
    font-size: 1rem;
    width: 20px;
    text-align: center;
    display: inline-block;
    /* Ensure width is respected */
}

.category-dropdown-item span {
    flex: 1;
}

.category-dropdown-item:hover {
    background: rgba(74, 144, 226, 0.08);
    color: var(--primary-color);
    padding-left: 1.5rem;
}

.category-dropdown-item.active {
    background: rgba(74, 144, 226, 0.12);
    color: var(--primary-color);
    font-weight: 700;
}

/* Check Icon for Active Item */
.check-icon {
    color: var(--success-color);
    font-size: 0.875rem;
    animation: checkmark 0.3s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.2) rotate(0deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.2), transparent);
    margin: 0.5rem 0;
}

/* No Categories State */
.no-categories {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.no-categories i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.no-categories p {
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0;
}

/* Active Filter Badge */
.active-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(80, 201, 232, 0.1) 100%);
    border: 2px solid rgba(74, 144, 226, 0.2);
    border-radius: var(--radius-pill);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.active-filter-badge span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Clear Filter Button */
.clear-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 50%;
    color: var(--danger-color);
    text-decoration: none;
    transition: var(--transition);
}

.clear-filter:hover {
    background: var(--danger-color);
    color: var(--text-white);
    transform: rotate(90deg) scale(1.1);
}

.clear-filter i {
    font-size: 0.75rem;
}


/* ============================================
   PRODUCTS GRID - Horizontal Layout
   ============================================ */
.products-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 3rem;
    width: 100%;
}

/* Desktop Grid (2 columns for better use of space, but still horizontal cards) */
@media (min-width: 992px) {
    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* ============================================
   PRODUCT CARD - Horizontal Design
   ============================================ */

/* Product Card Link Wrapper */
.product-card-link {
    text-decoration: none !important;
    display: block;
    color: inherit;
    outline: none !important;
}

.product-card-link:hover {
    text-decoration: none;
}

.product-card {
    display: flex;
    flex-direction: row;
    background: var(--bg-white) !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    padding: 1rem;
    transition: var(--transition);
    align-items: flex-start;
    /* Align image/content to top */
    min-height: 140px;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(74, 144, 226, 0.3) !important;
}

/* Left Side: Product Image */
.product-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    margin-right: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent !important;
    position: relative;
    top: 50%;
    transform: translateY(0);
}

/* Center image vertically relative to card if needed, 
   but usually top alignment w/ details is safer for variable content.
   User asked: "Keep image vertically centered". 
   Let's align it relative to the card's height?
   Flex align-items: center on .product-card would center everything vertically.
   But Flipkart titles are at the top.
   So I will make .product-card align-items: center? 
   No, usually text is top aligned.
   If I want image vertically centered, I can use align-self: center on .product-image
*/
.product-card {
    align-items: flex-start;
    /* Default for text */
}

.product-image {
    align-self: center;
    /* Vertically center the image box */
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    /* Helps transparent PNGs blend if bg isn't pure white */
}

/* Right Side: Product Details */
.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    min-width: 0;
    /* Prevents text overflow issues */
}

/* Product Title */
.product-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary) !important;
    line-height: 1.3;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rating Row */
.rating-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.rating-badge {
    background-color: #388e3c !important;
    /* Flipkart Green */
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: normal;
}

.rating-badge i {
    font-size: 0.65rem;
}

.review-count {
    color: #878787 !important;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Price Row */
.price-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700 !important;
    color: #212121 !important;
}

.offer-text {
    color: #388e3c !important;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1px;
}

/* Extra Info */
.extra-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 0.25rem;
}

.bank-offer {
    color: #26a541 !important;
    font-size: 0.75rem;
    font-weight: 500;
}

.delivery-info {
    font-size: 0.75rem;
    color: #212121 !important;
}

/* Mobile Adjustments */
@media (max-width: 575px) {
    .product-card {
        padding: 0.875rem 0.75rem;
        min-height: auto;
    }

    .product-image {
        width: 100px;
        height: 100px;
        /* Square fixed size */
        margin-right: 1rem;
    }

    .product-title {
        font-size: 0.9375rem;
        margin-bottom: 0.25rem;
    }

    .product-price {
        font-size: 1.125rem;
    }
}


/* ============================================
   NO PRODUCTS FOUND
   ============================================ */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.no-products i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-products h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-products p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   FILTER MODAL (Mobile)
   ============================================ */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 50, 0.6);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.filter-modal.open {
    opacity: 1;
    visibility: visible;
}

.filter-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.filter-modal.open .filter-modal-content {
    transform: translateY(0);
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    background: rgba(74, 144, 226, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
}

.close-btn:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

/* Filter Group */
.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.price-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.price-value {
    color: var(--primary-color);
}

.price-range {
    width: 100%;
    height: 6px;
    border-radius: var(--radius-sm);
    background: rgba(74, 144, 226, 0.15);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
}

.price-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
}

/* Filter Actions */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.btn-secondary {
    display: block;
    padding: 0.875rem 2rem;
    background: rgba(74, 144, 226, 0.08);
    color: var(--primary-color);
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    border-radius: var(--radius-pill);
    border: 2px solid rgba(74, 144, 226, 0.15);
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(74, 144, 226, 0.15);
}

.btn-primary {
    border: none;
    cursor: pointer;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile Specific Styles */
@media (max-width: 767px) {

    /* Hero Section Mobile */
    .products-hero {
        padding: 2rem 0 1.5rem;
    }

    .products-hero h1 {
        font-size: 1.75rem;
    }

    .products-hero p {
        font-size: 0.9375rem;
    }

    /* Filter Bar - Stack on Mobile */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem;
        gap: 0.625rem;
    }

    .filter-btn,
    .sort-btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
        /* iOS/Android touch target guideline */
    }

    /* Sort Dropdown Full Width on Mobile */
    .sort-dropdown {
        width: 100%;
    }

    .sort-menu {
        left: 0;
        right: 0;
        width: 100%;
    }

    /* Full-width dropdown on mobile */
    .category-filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .all-products-dropdown {
        max-width: 100%;
        width: 100%;
    }

    .all-products-btn {
        font-size: 0.9375rem;
        padding: 0.875rem 1.25rem;
        min-height: 44px;
        /* iOS/Android touch target guideline */
    }

    /* Active filter badge full width on mobile */
    .active-filter-badge {
        width: 100%;
        justify-content: space-between;
    }

    /* Dropdown menu adjustments for mobile */
    .category-dropdown-menu {
        max-height: 60vh;
    }

    .category-dropdown-item {
        padding: 1rem 1.25rem;
        font-size: 0.9375rem;
    }

    .category-dropdown-item:hover {
        padding-left: 1.25rem;
    }

    /* Ensure dropdown doesn't overflow on small screens */
    .category-dropdown-menu {
        left: 0;
        right: 0;
        width: 100%;
    }

    /* Product Grid Mobile */
    .products-grid {
        gap: 1.25rem;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .products-hero h1 {
        font-size: 2.75rem;
    }

    .products-hero p {
        font-size: 1.0625rem;
    }

    /* Filter Bar - Side by Side on Tablet */
    .filter-bar {
        flex-wrap: nowrap;
        flex-direction: row;
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .filter-btn,
    .sort-btn {
        width: auto;
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Sort Dropdown Positioning */
    .sort-dropdown {
        width: auto;
        position: relative;
    }

    .sort-menu {
        left: auto;
        right: 0;
        width: auto;
        min-width: 200px;
    }

    /* Dropdown adjustments for tablet */
    .all-products-dropdown {
        min-width: 300px;
        max-width: 350px;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .products-hero {
        padding: 4rem 0 3rem;
    }

    .main-content {
        padding: 3rem 1rem;
    }

    /* Hover effects only on desktop (not touch devices) */
    @media (hover: hover) {
        .category-dropdown-item:hover {
            padding-left: 1.5rem;
        }
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .products-hero h1 {
        font-size: 3.5rem;
    }

    .products-grid {
        gap: 2.5rem;
    }

    /* Wider dropdown on large screens */
    .all-products-dropdown {
        max-width: 450px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
/* Focus Styles for Accessibility */
*:focus-visible:not(.product-card-link) {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   LOADING STATES
   ============================================ */

/* Loading overlay for page transitions */
body.loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

body.loading::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 4px solid rgba(74, 144, 226, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: var(--z-modal);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Button loading state */
.btn-primary.loading,
.btn-secondary.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-primary.loading::after,
.btn-secondary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Pulse animation for active buttons */
@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(74, 144, 226, 0);
    }
}

.filter-btn.active,
.sort-btn.active {
    animation: pulse 1.5s infinite;
}

/* ============================================
   FIX: Product Image Alignment (Desktop & Tablet >= 769px)
   ============================================ */
@media (min-width: 769px) {
    .product-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        /* Vertically center all children */
        padding: 1.5rem;
        /* Proper padding */
        min-height: 200px;
        /* Consistent height for premium look */
        gap: 2rem;
        /* Proper spacing between image and text */
    }

    .product-image {
        width: 180px;
        /* Consistent large size for desktop */
        height: 180px;
        flex-shrink: 0;
        margin-right: 0;
        /* Reset margin as we use gap */
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        /* Vertically center the image container */
        position: static;
        /* Reset any positioning issues */
        top: auto;
        transform: none;
    }

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        /* Prevent distortion */
        max-width: 100%;
        max-height: 100%;
    }

    .product-details {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center details vertically */
    }
}

/* ============================================
   FEATURED PRODUCT CARD REDESIGN
   ============================================ */
.product-card.featured-card {
    flex-direction: column !important;
    /* Override horizontal layout */
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1.5rem !important;
    text-align: center !important;
    background: var(--bg-white) !important;
    border: 1px solid rgba(74, 144, 226, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
    min-height: 340px !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    gap: 1rem !important;
}

.product-card.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(74, 144, 226, 0.12) !important;
    border-color: var(--primary-color) !important;
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(245, 124, 0, 0.25);
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Image Container */
.featured-image-box {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fbff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.featured-image-box::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.featured-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.08));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.product-card.featured-card:hover .featured-image-box img {
    transform: scale(1.08);
}

/* Category Label */
.featured-category {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.8;
}

/* View Product Button */
.btn-view-product {
    background: var(--primary-color);
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 28px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 200px;
}

.btn-view-product:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.35);
}