/* PixelSports - Main Stylesheet */

:root {
    --color-white: #ffffff;
    --color-grey-light: #f5f5f5;
    --color-grey: #888888;
    --color-grey-dark: #333333;
    --color-navy: #1a237e;
    --color-navy-dark: #0d1440;
    --color-primary: #1a237e;
    --color-secondary: #3f51b5;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    color: var(--color-grey-dark);
    line-height: 1.6;
    background-color: var(--color-white);
}

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

/* Header */
.main-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-grey-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

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

.logo img {
    max-height: 50px;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

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

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

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

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-grey-light);
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-btn {
    padding: 0.5rem 1rem;
    background: var(--color-navy);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.cart-icon {
    position: relative;
    text-decoration: none;
    color: var(--color-grey-dark);
    font-size: 1.5rem;
    padding: 0.5rem;
}

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

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

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

.btn-primary:hover {
    background: var(--color-navy-dark);
}

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

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

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

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

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger {
    background: #d32f2f;
    color: var(--color-white);
}

.btn-danger:hover {
    background: #b71c1c;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
    color: var(--color-white);
    padding: 4rem 0;
    text-align: center;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--color-navy);
}

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

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

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

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

.album-cover {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: var(--color-grey-light);
}

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

.album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 1rem;
    color: var(--color-white);
}

.photo-count {
    font-weight: 600;
}

.album-info {
    padding: 1.5rem;
}

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

.match-info {
    color: var(--color-grey);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.event-date {
    color: var(--color-grey);
    font-size: 0.85rem;
}

.view-gallery {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--color-navy);
    font-weight: 500;
}

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

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
}

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

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

.photo-title {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.photo-price {
    display: block;
    font-size: 0.9rem;
}

/* Gallery Page */
.gallery-header {
    margin-bottom: 2rem;
}

.gallery-header h1 {
    font-size: 2.5rem;
    color: var(--color-navy);
    margin-bottom: 1rem;
}

.match-title {
    font-size: 1.5rem;
    color: var(--color-grey-dark);
    margin-bottom: 0.5rem;
}

.league {
    color: var(--color-grey);
    margin-bottom: 0.5rem;
}

.photo-count {
    font-size: 1.1rem;
    color: var(--color-navy);
    font-weight: 600;
}

/* Photo Page */
.photo-viewer {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.photo-main {
    position: relative;
}

.photo-navigation {
    position: relative;
    margin-bottom: 1rem;
}

.main-photo {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

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

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

.nav-arrow.prev {
    left: 1rem;
}

.nav-arrow.next {
    right: 1rem;
}

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

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

.photo-thumbnails .thumb.active {
    border-color: var(--color-navy);
}

.photo-thumbnails .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-details h1 {
    font-size: 2rem;
    color: var(--color-navy);
    margin-bottom: 1rem;
}

.photo-meta {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--color-grey-light);
    border-radius: 8px;
}

.meta-item {
    margin-bottom: 0.75rem;
}

.meta-item strong {
    color: var(--color-navy);
}

.tag {
    display: inline-block;
    background: var(--color-navy);
    color: var(--color-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

/* Cart */
.cart-page {
    padding: 2rem 0;
}

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

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--color-white);
    border: 1px solid var(--color-grey-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.item-image {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.item-details {
    flex: 1;
}

.item-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-navy);
}

.cart-summary {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-box {
    background: var(--color-grey-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 600;
    padding-top: 1rem;
    border-top: 2px solid var(--color-grey);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-grey-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-grey-light);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ff9800;
}

/* Admin - Full Page Layout */
.admin-page,
.admin-dashboard {
    display: flex;
    min-height: calc(100vh - 80px);
    margin: 0;
    padding: 0;
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--color-navy-dark);
    color: var(--color-white);
    padding: 2rem 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
}

.admin-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-sidebar li {
    margin: 0;
}

.admin-sidebar a {
    display: block;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.admin-sidebar a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-left-color: var(--color-white);
}

.admin-sidebar a.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
    border-left-color: var(--color-white);
    font-weight: 600;
}

.admin-content {
    flex: 1;
    min-width: 0;
    background: var(--color-grey-light);
    padding: 2rem;
    overflow-y: auto;
}

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

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

.stat-card {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid var(--color-navy);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--color-grey);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-navy);
    margin: 0;
}

.dashboard-sections {
    margin-bottom: 2rem;
}

.dashboard-section {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.dashboard-section h2 {
    font-size: 1.5rem;
    color: var(--color-navy);
    margin-bottom: 1rem;
}

.quick-actions {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quick-actions h2 {
    font-size: 1.5rem;
    color: var(--color-navy);
    margin-bottom: 1rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    background: var(--color-grey-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.action-card:hover {
    background: var(--color-white);
    border-color: var(--color-navy);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.action-card h3 {
    font-size: 1.1rem;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.action-card p {
    color: var(--color-grey);
    font-size: 0.9rem;
    margin: 0;
}

/* Photos List Admin */
.upload-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.bulk-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-grey-light);
}

.photos-list-admin {
    margin-top: 2rem;
}

.photos-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.photo-row-admin {
    display: flex;
    gap: 1.5rem;
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid var(--color-grey-light);
}

.photo-row-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.photo-thumb {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--color-grey-light);
}

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

.photo-row-right {
    flex: 1;
    min-width: 0;
}

.photo-edit-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group-inline {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group-inline label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-navy);
    margin: 0;
}

.form-group-inline input,
.form-group-inline textarea {
    padding: 0.5rem;
    border: 1px solid var(--color-grey-light);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    width: 100%;
}

.form-group-inline input:focus,
.form-group-inline textarea:focus {
    outline: none;
    border-color: var(--color-navy);
    box-shadow: 0 0 0 2px rgba(26, 35, 126, 0.1);
}

.form-row-inline {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 1rem;
}

.photo-meta-info {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-grey-light);
}

.photo-meta-info small {
    color: var(--color-grey);
    font-size: 0.8rem;
}

.photo-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-grey-light);
}

table th {
    background: var(--color-grey-light);
    font-weight: 600;
    color: var(--color-navy);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-published,
.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-draft,
.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.status-failed {
    background: #ffebee;
    color: #c62828;
}

/* Footer */
.main-footer {
    background: var(--color-navy-dark);
    color: var(--color-white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

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

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

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

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1rem;
    color: var(--color-grey);
}

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

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

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--color-white);
    border-radius: 8px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-navy);
    color: var(--color-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s;
}

.modal-close:hover {
    background: var(--color-navy-dark);
}

.modal-photo-container {
    position: relative;
}

.modal-photo {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.modal-details {
    padding: 1rem 0;
}

.modal-details h2 {
    font-size: 1.75rem;
    color: var(--color-navy);
    margin-bottom: 1rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--color-white);
    color: var(--color-navy);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-title {
    color: var(--color-white);
    text-align: center;
    margin-top: 1rem;
    font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav {
        width: 100%;
    }
    
    .photo-viewer {
        grid-template-columns: 1fr;
    }
    
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    /* Admin responsive */
    .admin-page,
    .admin-dashboard {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    /* Photos list responsive */
    .photo-row-admin {
        flex-direction: column;
    }
    
    .photo-thumb {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .form-row-inline {
        grid-template-columns: 1fr;
    }
    
    .bulk-actions {
        flex-wrap: wrap;
    }
}

