/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #121212;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Canvas Background */
canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    padding: 1rem 2rem;
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #eab308;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a, .nav-right a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 1rem;
}

.nav-links a:hover, .nav-right a:hover {
    color: #eab308;
}

.nav-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Main Content Layout */
.main-content {
    max-width: 1440px;
    margin: 80px auto 0;
    padding: 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    min-height: calc(100vh - 80px);
}

/* Filters Sidebar */
.filters {
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-title {
    color: #eab308;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Checkbox Styles */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #d1d5db;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
    accent-color: #eab308;
    width: 16px;
    height: 16px;
}

/* Price Range Inputs */
.price-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.price-input {
    width: 100px;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 0.875rem;
}

.price-input:focus {
    outline: none;
    border-color: #eab308;
}

.apply-btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background-color: #eab308;
    color: black;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.apply-btn:hover {
    background-color: #ca9703;
}

/* Sort Dropdown */
.sort-dropdown {
    width: 100%;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
}

.sort-dropdown:focus {
    outline: none;
    border-color: #eab308;
}

.sort-dropdown option {
    background-color: #121212;
    color: white;
    padding: 0.5rem;
}

/* Product Grid */
.products-container {
    width: 100%;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
}

/* Product Card Styles */
.product-card {
    background: rgba(18, 18, 18, 0.8);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: calc(25% - 1.5rem);
    min-width: 280px;
    flex-grow: 0;
    flex-shrink: 0;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image-wrapper {
    position: relative;
    padding-top: 133.33%;
    overflow: hidden;
    width: 100%;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.discount-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4d4d;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
}

.quick-view-button {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    transition: bottom 0.3s ease;
    cursor: pointer;
    font-size: 0.875rem;
    white-space: nowrap;
}

.product-card:hover .quick-view-button {
    bottom: 16px;
}

.product-details {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #eab308;
}

.original-price {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    color: #eab308;
    font-size: 0.875rem;
}

.rating-value {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(234, 179, 8, 0.1);
    border-left-color: #eab308;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 32px 0;
}

.pagination-button {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.pagination-button:hover:not(.disabled):not(.active) {
    background: rgba(234, 179, 8, 0.2);
    border-color: #eab308;
}

.pagination-button.active {
    background: #eab308;
    color: black;
    border-color: #eab308;
}

.pagination-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: #9ca3af;
    padding: 0 4px;
}

/* Footer Styles */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 4rem 2rem;
    margin-top: auto;
    backdrop-filter: blur(8px);
}

.footer-content {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: #eab308;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section a {
    display: block;
    color: #d1d5db;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #eab308;
}

/* Error Message */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

/* Responsive Design */
@media (max-width: 1440px) {
    .product-card {
        width: calc(33.333% - 1.33rem);
    }
}

@media (max-width: 1024px) {
    .main-content {
        padding: 1rem;
        grid-template-columns: 240px 1fr;
    }

    .product-card {
        width: calc(50% - 1rem);
        min-width: 240px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .filters {
        position: relative;
        top: 0;
    }

    .product-grid {
        gap: 1.5rem;
    }

    .product-card {
        width: calc(50% - 0.75rem);
        min-width: 200px;
    }

    .product-title {
        font-size: 0.875rem;
    }

    .current-price {
        font-size: 1rem;
    }

    .pagination-button {
        min-width: 36px;
        height: 36px;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .product-grid {
        gap: 1rem;
    }

    .product-card {
        width: 100%;
        min-width: 160px;
    }

    .quick-view-button {
        display: none;
    }
}

.search-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
   
  
    padding: 1rem;
    animation: slideDown 0.3s ease-out;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #eab308;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #fbbf24;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-submit,
.search-close {
    background: #eab308;
    border: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.search-submit:hover,
.search-close:hover {
    background: #fbbf24;
    transform: scale(1.05);
}

.search-close {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .search-container {
        padding: 0.5rem;
    }
    
    .search-input {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .search-submit,
    .search-close {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}
/* No Products Message */
.no-products-message {
    width: 100%;
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(18, 18, 18, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-products-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.no-products-message h2 {
    color: #eab308;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-products-message p {
    color: #9ca3af;
    font-size: 1rem;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .no-products-message {
        padding: 3rem 1.5rem;
    }
    
    .no-products-icon {
        font-size: 2.5rem;
    }
    
    .no-products-message h2 {
        font-size: 1.25rem;
    }
    
    .no-products-message p {
        font-size: 0.875rem;
    }
}
/* Custom Scrollbar Styles */
/* For Webkit browsers (Chrome, Safari, etc.) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
    background-color: #121212;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: rgba(234, 179, 8, 0.3);
    border-radius: 6px;
    border: 3px solid #121212;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(234, 179, 8, 0.5);
}

::-webkit-scrollbar-corner {
    background: #121212;
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(234, 179, 8, 0.3) rgba(0, 0, 0, 0.3);
}

/* For elements with custom scrollbars */
.custom-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(234, 179, 8, 0.3) rgba(0, 0, 0, 0.3);
}

.custom-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(234, 179, 8, 0.3);
    border-radius: 4px;
    border: 2px solid #121212;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(234, 179, 8, 0.5);
}