/*
 * JENARZEWSKA STUDIO - Premium Vanilla CSS
 * Oparte na wytycznych projektu, wykorzystujące Hanken Grotesk i Playfair Display.
 */

:root {
    /* Colors (from Prototype) */
    --surface-lowest: #ffffff;
    --surface-bright: #f9f9f9;
    --surface-low: #f3f3f3;
    --surface-container: #eeeeee;
    
    --primary: #000000;
    --on-primary: #ffffff;
    --secondary: #5f5e5e;
    --secondary-dim: #c8c6c6;
    
    --outline: #7e7576;
    --outline-variant: #cfc4c5;
    
    --error: #ba1a1a;
    
    /* Spacing */
    --margin-mobile: 24px;
    --margin-desktop: 80px;
    --gutter: 32px;
    --section-gap: 120px;
    --element-gap: 16px;
    
    /* Typography settings */
    --font-display: 'League Spartan', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--surface-lowest);
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customization */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e2e2; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Typography Classes */
.font-display-lg { font-family: var(--font-display); font-size: 40px; line-height: 1.2; font-weight: 400; }
.font-headline-sm { font-family: var(--font-display); font-size: 24px; line-height: 1.4; font-weight: 400; margin-bottom: 4px; }
.font-headline-md { font-family: var(--font-display); font-size: 32px; line-height: 1.3; font-weight: 400; }
.font-label-caps { font-family: var(--font-body); font-size: 12px; line-height: 1; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; }
.font-price { font-family: var(--font-body); font-size: 20px; line-height: 1; font-weight: 500; }

@media (min-width: 768px) {
    .font-display-lg { font-size: 64px; line-height: 1.1; letter-spacing: -0.02em; }
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    padding-left: var(--margin-mobile);
    padding-right: var(--margin-mobile);
}
@media (min-width: 768px) {
    .container {
        padding-left: var(--margin-desktop);
        padding-right: var(--margin-desktop);
    }
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--surface-bright);
    border-bottom: 1px solid var(--outline-variant);
    padding: 24px 0;
}
.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* Mobile Menu Button */
.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--primary);
    cursor: pointer;
    z-index: 100;
    margin-left: auto;
}

.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-bright);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 90;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    visibility: hidden;
}
.nav-wrapper.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.nav-links { 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px; 
}
.nav-links a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 24px;
    font-family: var(--font-display);
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}
.nav-links a.active { border-bottom: 1px solid var(--primary); padding-bottom: 4px; }

.logo {
    text-decoration: none;
    color: var(--primary);
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 0.1em;
    z-index: 100;
}

@media (min-width: 768px) {
    .mobile-menu-btn { display: none; }
    .nav-wrapper {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background-color: transparent;
        flex-direction: row;
        gap: 32px;
    }
    .nav-links { 
        flex-direction: row;
        gap: var(--element-gap);
    }
    .nav-links a {
        font-size: 14px;
        font-family: var(--font-body);
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }
    .logo { position: static; transform: none; z-index: 1; }
}

/* Header Section */
header.page-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--section-gap);
    border-bottom: 1px solid var(--outline-variant);
    padding-bottom: 32px;
    margin-top: var(--section-gap);
}
@media (min-width: 768px) {
    header.page-header {
        flex-direction: row;
        align-items: flex-end;
    }
}

/* Art Grid */
.art-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 100px var(--gutter);
}
@media (min-width: 768px) { .art-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .art-grid { grid-template-columns: repeat(3, 1fr); } }

/* Art Card */
.art-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.art-card-image-wrapper {
    width: 100%;
    background-color: var(--surface-bright);
    margin-bottom: var(--element-gap);
    overflow: hidden;
    position: relative;
    /* Domyślny aspect-ratio jak w prototypie */
    aspect-ratio: 4 / 5;
}
.art-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}
.art-card:hover .art-card-img {
    transform: scale(1.02);
}

/* Status Badge */
.status-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    border: 1px solid var(--outline-variant);
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    text-transform: uppercase;
}
.status-Available { color: var(--primary); }
.status-Sold { color: var(--secondary); text-decoration: line-through; }
.status-Reserved { color: var(--primary); }

/* Art Meta Info */
.art-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.art-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.text-secondary {
    color: var(--secondary);
}
.price-sold {
    color: var(--secondary);
    text-decoration: line-through;
}

/* Button */
.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 12px 32px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
    display: inline-block;
}
.btn-outline:hover {
    background-color: var(--primary);
    color: var(--on-primary);
}

/* Footer */
footer {
    background-color: var(--surface-low);
    border-top: 1px solid var(--outline-variant);
    padding: var(--section-gap) 0;
    margin-top: auto;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
@media (min-width: 768px) { .footer-inner { flex-direction: row; } }
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 48px;
}
@media (min-width: 768px) {
    .footer-links { flex-direction: row; gap: 96px; margin-top: 0; }
}
.footer-col { display: flex; flex-direction: column; gap: 16px; }
.footer-col a { color: var(--secondary-dim); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }

/* Description Overlay */
.art-description-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    color: #ffffff;
    padding: 60px 20px 20px 20px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}
.art-description-text {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    font-family: var(--font-body);
}
.art-card:hover .art-description-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Lightbox Dialog */
dialog#lightbox {
    margin: auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    background-color: var(--surface-lowest);
    color: var(--primary);
    max-width: 95vw;
    max-height: 90dvh;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    overflow: hidden;
}
dialog#lightbox::backdrop {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}
.lightbox-container {
    display: flex;
    flex-direction: column;
    max-height: 90dvh;
    overflow-y: auto; /* Allow scrolling on mobile */
}
@media (min-width: 768px) {
    .lightbox-container {
        flex-direction: row;
        height: 85vh;
        overflow-y: hidden;
    }
}
.lightbox-image-wrapper {
    flex: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    position: relative;
}
@media (min-width: 768px) {
    .lightbox-image-wrapper {
        flex: 1;
        height: 100%;
        overflow: hidden;
    }
}
.lightbox-img {
    max-width: 100%;
    max-height: 50dvh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .lightbox-img {
        max-width: 100%;
        max-height: 100%;
    }
}
.lightbox-sidebar {
    width: 100%;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    flex: none;
}
@media (min-width: 768px) {
    .lightbox-sidebar {
        width: 400px;
        min-width: 400px;
        padding: 40px;
        overflow-y: auto;
    }
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--surface-bright);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: var(--primary);
    transition: transform 0.3s ease;
    z-index: 10;
}
.lightbox-close:hover {
    transform: scale(1.1) rotate(90deg);
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface-bright);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: var(--primary);
    transition: transform 0.3s ease;
    z-index: 10;
}
.lightbox-nav:hover {
    transform: scale(1.1);
}
.lightbox-prev {
    left: 20px;
}
.lightbox-next {
    right: 20px;
}
