/**
 * Archive Product Page Styles
 * 
 * @package DenLED_Vinhomes
 */

/* Override smooth scroll for instant jump */
html {
    scroll-behavior: auto !important;
}

/* Responsive Styles */
@media (min-width: 1024px) {
    .product-sidebar {
        display: block !important;
    }

    .shop-layout {
        grid-template-columns: 280px 1fr !important;
    }

    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: flex !important;
    }
}

@media (max-width: 1023px) {
    .product-sidebar {
        display: none !important;
    }

    .shop-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 2rem 1rem !important;
    }

    .page-title {
        font-size: 2rem !important;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: stretch !important;
    }

    .shop-toolbar>div {
        width: 100%;
    }

    .shop-toolbar>div:first-child {
        order: 1;
    }

    .shop-toolbar>div:last-child {
        order: 2;
        display: flex;
        justify-content: space-between;
        margin-top: 0.75rem;
    }

    #products-container.products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    #products-container.products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .shop-toolbar {
        padding: 0.75rem !important;
    }

    #sort-select {
        font-size: 0.8rem !important;
        padding: 0.5rem 2rem 0.5rem 0.75rem !important;
    }

    #sort-select+svg {
        right: 0.5rem !important;
        width: 0.875rem !important;
        height: 0.875rem !important;
    }

    #mobile-filter-btn {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
    }
}

/* Select Hover Effect */
#sort-select:hover {
    border-color: hsl(var(--primary));
}

#sort-select:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

/* View Toggle Hover Effects */
.view-toggle:hover {
    background: hsl(var(--secondary)) !important;
}

.view-toggle[data-view="grid"][style*="hsl(var(--primary))"]:hover,
.view-toggle[data-view="list"][style*="hsl(var(--primary))"]:hover {
    background: hsl(var(--primary-glow)) !important;
}

/* Pagination */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s;
}

.page-numbers:not(.current) {
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--foreground));
}

.page-numbers:not(.current):hover {
    background: hsl(var(--secondary));
}

.page-numbers.current {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: var(--shadow-card);
}

.prev,
.next {
    padding: 0.5rem 1rem !important;
    width: auto !important;
    border-radius: 9999px !important;
}

@media (max-width: 640px) {
    .page-numbers {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }

    .prev,
    .next {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.75rem !important;
    }

    .pagination .page-numbers.dots {
        padding: 0 0.25rem;
    }
}

/* Mobile Filter Drawer */
.drawer-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.drawer-content {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Search input responsive */
@media (max-width: 640px) {
    .product-sidebar input[type="text"] {
        font-size: 0.875rem;
        height: 2.25rem;
    }
}