/* IconSport - Main Stylesheet */

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --accent-color: #ff6b35;
    --text-color: #ffffff;
    --text-muted: #b0b0b0;
    --border-color: #333;
    --bg-dark: #0a0a0a;
    --bg-light: #1a1a1a;
    --success-color: #4caf50;
    --error-color: #f44336;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
.main-header {
    background-color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

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

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--accent-color);
}

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

.search-box {
    position: relative;
}

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

.search-box input {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    width: 250px;
    font-size: 0.9rem;
}

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

.search-box button {
    background: var(--accent-color);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    cursor: pointer;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.autocomplete-results.active {
    display: block;
}

.autocomplete-results a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
}

.autocomplete-results a:hover {
    background: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #e55a2a;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

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

.btn-cart {
    position: relative;
    background: var(--secondary-color);
    padding: 0.5rem 1rem;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--bg-dark) 100%);
    padding: 6rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-dark {
    background: var(--bg-light);
}

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

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.view-all {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Albums Grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.album-card {
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.album-card a {
    text-decoration: none;
    color: inherit;
}

.album-cover {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: var(--bg-dark);
}

.album-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.album-card:hover .album-cover img {
    transform: scale(1.1);
}

.album-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

.album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.photo-count {
    color: white;
    font-weight: 500;
}

.album-info {
    padding: 1.5rem;
}

.album-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.album-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Photos Grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.photo-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    background: var(--secondary-color);
    cursor: pointer;
}

.photo-item a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* Allow clicks to pass through to link */
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.photographer {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.price {
    color: var(--accent-color);
    font-weight: 600;
}

/* Album Header */
.album-header {
    padding: 3rem 0 2rem;
    background: var(--bg-light);
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.album-title-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.album-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.album-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Photo Page */
.photo-page {
    padding: 2rem 0;
}

.photo-viewer {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.photo-main {
    position: relative;
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
}

.photo-container {
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
}

.photo-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    z-index: 10;
    transition: background 0.3s;
}

.nav-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
}

.nav-prev {
    left: 1rem;
}

.nav-next {
    right: 1rem;
}

.photo-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0; /* Prevent flexbox overflow */
}

.photo-info-card {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.photo-info-card h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.photo-caption {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.photo-details {
    margin-bottom: 0;
    flex-grow: 1;
}

.detail-item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: var(--text-color);
    font-size: 1rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    background: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.social-share {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s;
}

.social-btn:hover {
    transform: scale(1.1);
}

.social-btn.facebook {
    background: #3b5998;
    color: white;
}

.social-btn.twitter {
    background: #1da1f2;
    color: white;
}

.social-btn.linkedin {
    background: #0077b5;
    color: white;
}

.photo-purchase {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--primary-color);
    border-radius: 6px;
}

.price-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.btn-add-cart {
    margin-top: 0;
}

.album-details {
    margin-top: 1rem;
}

.album-info {
    margin-top: 0.75rem;
}

.info-row {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 0.5rem;
}

.info-row.description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.photo-thumbnails {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.thumbnails-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumbnail.active {
    border-color: var(--accent-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CTA Box */
.cta-box {
    background: var(--secondary-color);
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
}

.cta-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.search-form-large {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-form-large input {
    flex: 1;
    padding: 1rem;
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 1rem;
}

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

/* Footer */
.main-footer {
    background: var(--primary-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

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

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    border-radius: 50%;
    color: var(--text-color);
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--accent-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .photo-viewer {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .photo-sidebar {
        order: -1;
        width: 100%;
    }
    
    .photo-info-card {
        padding: 1.5rem;
    }
}

