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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: bold;
    font-size: 1.25rem;
    color: #1e40af;
    text-decoration: none;
}

.logo-text {
    font-weight: 700;
    letter-spacing: -0.025em;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
    background-color: #eff6ff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    width: 280px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
}

.search-box button {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.search-box button:hover {
    color: #2563eb;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.cart-icon:hover {
    background-color: #f3f4f6;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.125rem 0.375rem;
    border-radius: 50%;
    min-width: 1.25rem;
    text-align: center;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: #374151;
    border-radius: 1px;
    transition: all 0.2s ease;
}

/* Breadcrumb */
.breadcrumb {
    background: #f9fafb;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-nav a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: #2563eb;
}

.separator {
    color: #9ca3af;
}

.current {
    color: #1f2937;
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.category-list {
    list-style: none;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    text-decoration: none;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.category-link:hover,
.category-link.active {
    color: #2563eb;
    background-color: #eff6ff;
    padding-left: 0.5rem;
    border-radius: 6px;
}

.category-link span {
    font-size: 0.875rem;
    color: #9ca3af;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
    transition: color 0.2s ease;
}

.checkbox-label:hover {
    color: #2563eb;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.checkbox-label .count {
    margin-left: auto;
    color: #9ca3af;
    font-size: 0.75rem;
}

.price-range {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    text-align: center;
}

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

.price-separator {
    color: #6b7280;
    font-weight: 500;
}

.apply-price-btn {
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.apply-price-btn:hover {
    background: #1d4ed8;
}

/* Product Section */
.product-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.product-count {
    color: #6b7280;
    font-size: 0.875rem;
}

.product-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.view-btn:hover,
.view-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
}

.sort-select:focus {
    outline: none;
    border-color: #2563eb;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #1f2937;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-view-btn:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
}

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

.add-to-cart-btn {
    width: 100%;
    padding: 0.75rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #2563eb;
    color: #2563eb;
}

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

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-number {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-number:hover,
.pagination-number.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.pagination-dots {
    color: #9ca3af;
    padding: 0 0.5rem;
}

/* Footer */
.footer {
    background: #1f2937;
    color: #d1d5db;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    padding: 3rem 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.footer-description {
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: #374151;
    color: #d1d5db;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

.footer-section h4 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #2563eb;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #9ca3af;
}

.contact-item svg {
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #2563eb;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 250px 1fr;
        gap: 1.5rem;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .search-box {
        display: none;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .product-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .logo {
        order: 1;
    }
    
    .mobile-menu-btn {
        order: 2;
    }
    
    .header-actions {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .pagination-numbers {
        display: none;
    }
}

/* List View */
.product-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: center;
}

.product-grid.list-view .product-image {
    aspect-ratio: 1;
    width: 200px;
    height: 200px;
}

.product-grid.list-view .product-info {
    padding: 2rem;
}

@media (max-width: 768px) {
    .product-grid.list-view .product-card {
        grid-template-columns: 1fr;
    }
    
    .product-grid.list-view .product-image {
        width: 100%;
        height: 250px;
        aspect-ratio: auto;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Focus Styles */
*:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline-offset: 4px;
}