/* Collections Page - Modern Design */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #ecf0f1;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-dark: 0 8px 30px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header Section */
.collections-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.collections-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: white;
}

.collections-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.collections-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Search and Filter Section */
.search-filter-section {
    background: var(--bg-white);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-filter-container {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1.5rem;
    align-items: center;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    z-index: 2;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.975rem;
    transition: var(--transition);
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-options {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-dark);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.filter-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.sort-options select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    color: var(--text-dark);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.sort-options select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Collections Stats */
.collections-stats {
    background: var(--bg-white);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collection-count {
    color: var(--text-light);
    font-weight: 400;
    font-size: 1.25rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-light);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.view-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

/* Collections Grid */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.collections-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Collection Card */
.collection-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
}

.collection-card.fade-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease-out;
}

.collection-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

/* Collection Image */
.collection-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--bg-light);
}

.collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.collection-card:hover .collection-image img {
    transform: scale(1.05);
}

/* Collection Badges */
.collection-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-featured {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    animation: pulse 2s infinite;
}

.badge-new {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.badge-sale {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

/* Quick Actions */
.quick-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
}

.collection-card:hover .quick-actions {
    opacity: 1;
}

.quick-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.quick-action-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.1);
}

/* Collection Info */
.collection-info {
    padding: 1.5rem;
}

.collection-header-info {
    margin-bottom: 1rem;
}

.collection-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.collection-slogan {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.collection-description {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Collection Stats */
.collection-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.collection-stat {
    text-align: center;
}

.stat-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
}

.stat-text {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Collection Price */
.collection-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.price-info {
    display: flex;
    flex-direction: column;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
}

.original-price {
    font-size: 0.875rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Collection Actions */
.collection-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    flex: 1;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: white;
}

/* List View Styles */
.collections-grid.list-view .collection-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    height: 150px;
}

.collections-grid.list-view .collection-image {
    height: 150px;
}

.collections-grid.list-view .collection-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
}

.collections-grid.list-view .collection-stats {
    display: flex;
    gap: 2rem;
    background: none;
    padding: 0;
    margin: 0;
}

.collections-grid.list-view .collection-actions {
    align-self: flex-end;
    width: auto;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-bottom: 3rem;
}

.btn-load-more {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-dark);
    transform: scale(0.9);
    opacity: 0;
    transition: var(--transition);
}

.modal-content.modal-large {
    max-width: 800px;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
}

.modal-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .collections-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .search-filter-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-options {
        order: 3;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .sort-options {
        order: 2;
    }
    
    .collections-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .collections-grid.list-view .collection-card {
        grid-template-columns: 120px 1fr;
        height: 120px;
    }
    
    .collections-grid.list-view .collection-image {
        height: 120px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .collections-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .collection-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .collection-actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .filter-options {
        gap: 0.25rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1a1a1a;
        --bg-white: #2d2d2d;
        --text-dark: #e0e0e0;
        --text-light: #a0a0a0;
        --border-color: #404040;
    }
}