/* Contact Lens Browse Page Styles */

:root {
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --background: #ffffff;
    --background-secondary: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #212529;
    --text-muted: #6c757d;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background-secondary);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header */
.page-header {
    padding: 40px 20px;
    background: var(--background);
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

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

.header-left {
    text-align: left;
}

.page-header h1 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 18px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-size: 14px;
    color: var(--text-muted);
    margin-right: 10px;
}

.header-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.header-btn:hover {
    background: var(--primary-hover);
}

.logout-btn {
    background: var(--secondary-color);
}

.logout-btn:hover {
    background: #5a6268;
}

.login-btn {
    background: var(--success-color);
    padding: 12px 24px;
    font-size: 15px;
}

.login-btn:hover {
    background: #218838;
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Sidebar */
.sidebar {
    background: var(--background);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: sticky;
    top: 20px;
}

.filter-section {
    margin-bottom: 30px;
}

.filter-section h3 {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 600;
}

/* Brand List */
.brand-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.brand-btn {
    padding: 12px 15px;
    background: var(--background-secondary);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: all 0.2s;
}

.brand-btn:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
}

.brand-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Filter Checkboxes */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-checkbox:hover span {
    color: var(--primary-color);
}

/* Reset Filters Button */
.reset-filters-btn {
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.reset-filters-btn:hover {
    background: #5a6268;
}

/* Content Area */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Search Section */
.search-section {
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Sections */
.bestsellers-section,
.all-products-section {
    background: var(--background);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 24px;
    color: var(--text-color);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    font-size: 14px;
    color: var(--text-muted);
}

.sort-controls select {
    padding: 8px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.sort-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.product-image-container {
    width: 100%;
    height: 220px;
    background: var(--background-secondary);
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    font-size: 64px;
    color: var(--text-muted);
}

.bestseller-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffd700;
    color: #000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.product-description {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-modality {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-lenstype {
    background: #f3e5f5;
    color: #7b1fa2;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.product-price-label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

.select-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.select-btn:hover {
    background: var(--primary-hover);
}

/* Empty State */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 18px;
}

.no-products-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading-spinner {
    font-size: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 28px;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}
