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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

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

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

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo svg {
    transition: transform 0.3s ease;
}

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

.nav-desktop {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #007BFF;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #007BFF;
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.action-btn:hover {
    background: #f1f5f9;
    color: #007BFF;
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

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

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: #64748b;
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 20px 0;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #007BFF;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-overlay.active {
    display: flex;
}

.search-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007BFF;
}

.search-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-close:hover {
    background: #f1f5f9;
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 14px;
}

.breadcrumb-link {
    text-decoration: none;
    color: #64748b;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #007BFF;
}

.breadcrumb-separator {
    color: #cbd5e1;
}

.breadcrumb-current {
    color: #007BFF;
    font-weight: 500;
}

/* Page Header */
.page-header {
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #64748b;
}

/* Content Layout */
.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.filter-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1e293b;
}

.filter-group {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #374151;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    transition: color 0.3s ease;
}

.filter-option:hover {
    color: #007BFF;
}

.filter-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.filter-option input[type="checkbox"]:checked + .checkmark {
    background: #007BFF;
    border-color: #007BFF;
}

.filter-option input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* Size Options */
.size-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.size-option {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.size-option input[type="checkbox"] {
    display: none;
}

.size-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.size-option input[type="checkbox"]:checked + .size-label {
    background: #007BFF;
    border-color: #007BFF;
    color: white;
}

.size-option:hover .size-label {
    border-color: #007BFF;
}

/* Color Options */
.color-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.color-option input[type="checkbox"]:checked + .color-swatch {
    border: 3px solid #007BFF;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #007BFF;
}

/* Price Range */
.price-range {
    padding: 10px 0;
}

.price-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    margin-bottom: 15px;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #007BFF;
    border-radius: 50%;
    cursor: pointer;
}

.price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #007BFF;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.price-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 5px;
}

.price-value {
    font-size: 14px;
    font-weight: 500;
    color: #007BFF;
}

/* Clear Filters */
.clear-filters-btn {
    width: 100%;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Product Area */
.product-area {
    min-height: 100vh;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.toolbar-left {
    font-size: 14px;
    color: #64748b;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.view-options {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s ease;
}

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

.sort-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    transition: border-color 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: #007BFF;
}

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

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.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-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ef4444;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.product-badge.new {
    background: #10b981;
}

.product-badge.bestseller {
    background: #f59e0b;
}

.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-action-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.product-action-btn:hover {
    background: white;
    color: #007BFF;
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
    line-height: 1.4;
}

.product-category {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #fbbf24;
    font-size: 14px;
}

.star.empty {
    color: #e5e7eb;
}

.rating-text {
    font-size: 12px;
    color: #64748b;
}

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

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

.price-original {
    font-size: 1rem;
    color: #64748b;
    text-decoration: line-through;
}

.price-discount {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.product-actions-bottom {
    display: flex;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions-bottom {
    opacity: 1;
    transform: translateY(0);
}

.btn-secondary {
    flex: 1;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-primary {
    flex: 2;
    padding: 10px;
    background: #007BFF;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #0056b3;
}

/* Load More */
.load-more-container {
    text-align: center;
    padding: 40px 0;
}

.load-more-btn {
    padding: 15px 40px;
    background: #007BFF;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.load-more-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 15px 20px;
    z-index: 1000;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 12px;
}

.mobile-nav-btn:hover {
    background: #f1f5f9;
    color: #007BFF;
}

/* Mobile Filter Modal */
.mobile-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 2000;
    display: none;
    flex-direction: column;
}

.mobile-filter-modal.active {
    display: flex;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.modal-btn-secondary {
    flex: 1;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
}

.modal-btn-primary {
    flex: 2;
    padding: 12px;
    background: #007BFF;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
}

/* Quick View Modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quick-view-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.quick-view-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.quick-view-modal .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

/* Loading Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #007BFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.skeleton-image {
    height: 280px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-content {
    padding: 20px;
}

.skeleton-text {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .toolbar-right {
        justify-content: space-between;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 20px 0 80px 0;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-actions {
        gap: 10px;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .product-card {
        margin-bottom: 10px;
    }
    
    .product-image {
        height: 250px;
    }
}

/* Print Styles */
@media print {
    .header,
    .mobile-bottom-nav,
    .sidebar,
    .toolbar,
    .load-more-container {
        display: none;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000;
    }
    
    .nav-link.active::after {
        background: #000;
    }
    
    .btn-primary {
        background: #000;
    }
    
    .btn-primary:hover {
        background: #333;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}