/*
Theme Name: SrcParts
Description: A clean, modern WordPress theme built from scratch
Author: Jurgis
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: srcparts
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Header */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e1e1e1;
    padding: 1rem 0;
}

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

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo .custom-logo-link {
    display: block;
    text-decoration: none;
}

.site-logo .custom-logo {
    max-height: 60px;
    width: auto;
    display: block;
}

.site-title {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.site-title a {
    color: #333;
    text-decoration: none;
}

.site-description {
    color: #666;
    margin: 0.5rem 0 0 0;
}

/* Navigation */
.main-navigation {
    margin: 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}

.main-navigation a:hover {
    color: #007cba;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.search-field {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-submit {
    background: #007cba;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit:hover {
    background: #005a87;
}

/* Main content */
.site-main {
    padding: 2rem 0;
}

/* Posts */
.post {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e1e1e1;
}

.post-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.post-title a {
    color: #333;
    text-decoration: none;
}

.post-title a:hover {
    color: #007cba;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    background-color: #007cba;
    color: #fff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

.read-more:hover {
    background-color: #005a87;
}

/* Single post/page */
.single-post .post-content,
.page .page-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media screen and (max-width: 768px) {
    .product-page {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Metadata Table Styles */
.metadata-table {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.metadata-table h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.urls-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.urls-table th {
    background-color: #007cba;
    color: #fff;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.urls-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e1e1e1;
}

.urls-table tr:last-child td {
    border-bottom: none;
}

.urls-table tr:hover {
    background-color: #f8f9fa;
}

.urls-table a {
    color: #007cba;
    text-decoration: none;
    word-break: break-all;
}

.urls-table a:hover {
    text-decoration: underline;
}

.metadata-disclaimer {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-left: 4px solid #666;
    border-radius: 4px;
}

.metadata-disclaimer p {
    margin: 0;
    color: #666;
    font-style: italic;
}

/* Gallery Styles */
.post-gallery {
    /* margin: 2rem 0; */
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.post-gallery h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

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

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

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

/* Responsive gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .gallery-item img {
        height: 150px;
    }
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox.active {
    display: flex;
}

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

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-close {
    top: -50px;
    right: 0;
}

.lightbox-prev {
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}

.single-post .post-content p,
.page .page-content p {
    margin-bottom: 1.5rem;
}

.single-post .post-content h1,
.single-post .post-content h2,
.single-post .post-content h3,
.page .page-content h1,
.page .page-content h2,
.page .page-content h3 {
    margin: 2rem 0 1rem 0;
}

/* Search results */
.search-results .post {
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 1.5rem;
}

.search-results .post-title {
    font-size: 1.5rem;
}

/* Footer */
.site-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e1e1e1;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
}