/* --- STYLE CSS --- */
:root {
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-light: #666666;
    --gap: 4px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 60px 50px;
    background: #fff;
}

.brand-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.3s;
}

.brand-link:hover {
    opacity: 0.7;
}

.brand h1,
.brand-name {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.brand span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
    font-weight: 300;
}

/* NAWIGACJA */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

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

/* GALERIA */
main {
    padding: 0 4px;
    margin-bottom: 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

.art-piece {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #f0f0f0;
    overflow: hidden;
    cursor: pointer;
}

.gallery-empty {
    padding: 40px;
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
}

/* MAINTENANCE PAGE */
.maintenance-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
}

.maintenance-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.maintenance-lead {
    font-size: 1.1rem;
    color: #666;
    max-width: 480px;
    line-height: 1.7;
}

.maintenance-contact {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #999;
}

.maintenance-contact a {
    color: #555;
}

.art-piece img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.art-piece:hover img {
    transform: scale(1.03);
}

/* Nakładka z tytułem */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay span {
    color: #fff;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.art-piece:hover .overlay {
    opacity: 1;
}

/* STOPKA */
footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid #f4f4f4;
    color: #888;
    font-size: 0.8rem;
}

footer a {
    color: #000;
    text-decoration: none;
}

/* MODAL (Lightbox) */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    /* Solid white background - no gallery visible behind */
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    /* Pozwala przewijać jeśli opis jest długi */
}

/* Kontener wewnątrz modala */
.modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    margin: auto;
    padding: 20px 0;
}

.modal-content {
    max-height: 80vh;
    max-width: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Opis pod zdjęciem w modalu */
#modalCaption {
    margin-top: 20px;
    text-align: center;
    max-width: 700px;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

#modalCaption h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#modalCaption p {
    font-weight: 300;
    color: #555;
    white-space: pre-wrap;
    /* Zachowuje entery z pliku txt */
}

.close-btn {
    position: fixed;
    top: 25px;
    right: 35px;
    font-size: 40px;
    color: #111;
    cursor: pointer;
    font-weight: 300;
    z-index: 10000;
}

/* RWD */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    header {
        padding: 40px 30px;
    }
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 30px 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-height: 60vh;
    }

    /* Mniejsze zdjęcie na telefonie, żeby tekst się zmieścił */
}

/* --- KONTAKT (editorial redesign) --- */
.contact-section {
    background: var(--paper-bg);
    padding: 100px 24px 110px;
    margin-top: 100px;
    border-top: 1px solid var(--rule);
    position: relative;
}

.contact-section::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: var(--sepia);
}

.contact-wrapper {
    max-width: 620px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    margin-bottom: 56px;
}

.contact-eyebrow {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--sepia);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 18px;
}

.contact-intro h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 18px;
}

.contact-lead {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 44ch;
    margin: 0 auto;
}

.contact-form {
    text-align: left;
}

.form-messages {
    margin-bottom: 28px;
}

.form-messages:empty {
    margin-bottom: 0;
}

.form-message {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 12px;
    padding: 14px 18px;
    border-radius: 2px;
    border-left: 3px solid currentColor;
}

.form-message:last-child {
    margin-bottom: 0;
}

.form-message--success {
    background: var(--success-bg);
    color: var(--success-ink);
}

.form-message--error {
    background: var(--error-bg);
    color: var(--error-ink);
}

.form-field {
    margin-bottom: 26px;
}

.form-field label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--sepia);
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin-bottom: 10px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 14px 0 12px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--rule);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink);
    outline: none;
    border-radius: 0;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    -webkit-appearance: none;
}

.form-field textarea {
    min-height: 140px;
    resize: vertical;
    padding-top: 14px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--ink-soft);
    opacity: 0.55;
    font-style: italic;
}

.form-field input:hover,
.form-field textarea:hover {
    border-bottom-color: var(--ink-soft);
}

.form-field input:focus,
.form-field textarea:focus {
    border-bottom-color: var(--sepia);
    box-shadow: 0 1px 0 0 var(--sepia);
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
    outline: none;
}

.form-error {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--error-ink);
    margin: 8px 0 0;
}

.btn-editorial {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 16px 32px;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 2px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.2px;
    transition: background 0.3s ease, color 0.3s ease;
}

.btn-editorial:hover,
.btn-editorial:focus-visible {
    background: var(--ink);
    color: var(--paper-bg);
}

.btn-editorial:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.btn-editorial-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-editorial:hover .btn-editorial-arrow {
    transform: translateX(4px);
}

.form-notice {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    line-height: 1.65;
    color: var(--ink-soft);
}

.form-notice a {
    color: var(--sepia);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    transition: color 0.25s ease, border-color 0.25s ease;
}

.form-notice a:hover,
.form-notice a:focus-visible {
    color: var(--sepia-deep);
    border-bottom-color: var(--sepia-deep);
}

@media (max-width: 600px) {
    .contact-section {
        padding: 64px 20px 70px;
        margin-top: 60px;
    }

    .contact-intro {
        margin-bottom: 36px;
    }

    .contact-intro h2 {
        font-size: 1.9rem;
    }

    .btn-editorial {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .form-field input,
    .form-field textarea,
    .btn-editorial,
    .btn-editorial-arrow,
    .form-notice a {
        transition: none;
    }
}

/* Hide gallery when modal is open */
body.modal-open main,
body.modal-open footer,
body.modal-open header {
    visibility: hidden;
}

/* ABOUT PAGE */
.about-page {
    max-width: 900px;
    margin: 60px auto 100px;
    padding: 0 40px;
}

.about-header {
    text-align: center;
    margin-bottom: 60px;
}

.about-header h1 {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -1px;
    margin-bottom: 30px;
}

.profile-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.about-page section {
    margin: 50px 0;
}

.about-page h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.bio-content,
.education-content,
.exhibitions-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    font-weight: 300;
}

.social-section {
    margin: 60px 0 40px;
    padding: 40px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.social-section h2 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    text-transform: none;
    border: none;
    padding: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.social-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: #f8f8f8;
    color: #333;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.social-link svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
}

.social-link:hover {
    background: #111;
    color: #fff;
    border-color: #111;
    transform: translateY(-2px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.about-footer {
    margin-top: 80px;
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #f0f0f0;
}

.last-updated {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #111;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: background 0.3s;
    border-radius: 4px;
}

.cta-button:hover {
    background: #333;
}

/* RWD for About Page */
@media (max-width: 768px) {
    .about-page {
        padding: 0 20px;
        margin: 40px auto 60px;
    }

    .about-header h1 {
        font-size: 2rem;
    }

    .profile-image {
        max-width: 100%;
    }

    .about-page h2 {
        font-size: 1.3rem;
    }
}

/* =====================================================================
   EDITORIAL DESIGN TOKENS
   Scoped tokens for the Polityka prywatności page and the Kontakt
   form redesign. Gallery surfaces continue to use the original
   monochrome variables defined at :root above.
   ===================================================================== */
:root {
    --paper-bg: #FDFBF7;
    --paper-bg-alt: #F5F1E8;
    --ink: #1A1A1A;
    --ink-soft: #4A4543;
    --sepia: #8B6F47;
    --sepia-deep: #6B5535;
    --rule: #E8E0D1;
    --focus-ring: rgba(139, 111, 71, 0.35);
    --success-bg: #EDF5EE;
    --success-ink: #2D5E3E;
    --error-bg: #F8E8E4;
    --error-ink: #8A3F2F;
    --serif: 'Playfair Display', 'Source Serif 4', Georgia, serif;
}

/* =====================================================================
   LEGAL PAGE — Polityka prywatności
   ===================================================================== */
.legal-page {
    background: var(--paper-bg);
    color: var(--ink);
    padding: 80px 24px 100px;
    margin-top: -1px; /* defeat the 1px gap below the header */
}

.legal-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

.legal-hero {
    text-align: left;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rule);
}

.legal-eyebrow {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--sepia);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 18px;
}

.legal-hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 14px;
}

.legal-hero .legal-updated {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.legal-wash {
    display: block;
    width: 100%;
    height: 40px;
    color: var(--sepia);
    opacity: 0.55;
}

.legal-wash svg {
    width: 100%;
    height: 100%;
}

.legal-toc {
    padding: 24px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    font-family: 'Inter', sans-serif;
}

.legal-toc-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--sepia);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin: 0 0 16px;
}

.legal-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 32px;
}

.legal-toc li {
    margin: 0;
}

.legal-toc a {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.4;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
    color: var(--sepia);
}

.legal-toc a:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
    border-radius: 2px;
}

.legal-toc .toc-num {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--sepia);
    letter-spacing: 1.5px;
    min-width: 20px;
}

.legal-toc .toc-text {
    flex: 1;
}

.legal-content {
    font-family: 'Inter', sans-serif;
    color: var(--ink);
    max-width: 68ch;
}

.legal-section {
    margin: 0 0 44px;
}

.legal-section:last-of-type {
    margin-bottom: 0;
}

.legal-section h2 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.55rem;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 18px;
    text-transform: none;
    letter-spacing: -0.005em;
    border: none;
    padding: 0;
}

.legal-section h2 .legal-section-num {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: var(--sepia);
    vertical-align: middle;
    margin-right: 14px;
    padding: 4px 10px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--paper-bg-alt);
}

.legal-section p,
.legal-section ul {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--ink-soft);
    margin: 0 0 14px;
}

.legal-section ul {
    list-style: none;
    padding-left: 0;
}

.legal-section ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}

.legal-section ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.85em;
    width: 12px;
    height: 1px;
    background: var(--sepia);
}

.legal-section a {
    color: var(--sepia);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    transition: color 0.25s ease, border-color 0.25s ease;
}

.legal-section a:hover,
.legal-section a:focus {
    color: var(--sepia-deep);
    border-bottom-color: var(--sepia-deep);
}

.legal-section a:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
    border-radius: 2px;
}

.legal-section strong {
    color: var(--ink);
    font-weight: 600;
}

.legal-back {
    margin-top: 64px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
}

.legal-back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ink);
    text-decoration: none;
    padding: 14px 22px;
    border: 1px solid var(--ink);
    border-radius: 2px;
    transition: background 0.25s ease, color 0.25s ease;
}

.legal-back-link:hover,
.legal-back-link:focus-visible {
    background: var(--ink);
    color: var(--paper-bg);
}

.legal-back-link:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.legal-back-link .arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}

.legal-back-link:hover .arrow {
    transform: translateX(-3px);
}

@media (min-width: 1024px) {
    .legal-wrapper {
        grid-template-columns: 220px 1fr;
        gap: 80px;
        align-items: start;
    }

    .legal-hero,
    .legal-wash,
    .legal-content,
    .legal-back {
        grid-column: 2;
    }

    .legal-toc {
        grid-column: 1;
        grid-row: 2 / span 3;
        position: sticky;
        top: 40px;
        padding: 0;
        border: none;
    }

    .legal-toc ol {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .legal-toc a {
        padding: 9px 0;
        font-size: 0.88rem;
    }
}

@media (max-width: 600px) {
    .legal-page {
        padding: 48px 20px 60px;
    }

    .legal-wrapper {
        gap: 36px;
    }

    .legal-toc ol {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .legal-section {
        margin-bottom: 36px;
    }

    .legal-section h2 {
        font-size: 1.35rem;
    }

    .legal-section p,
    .legal-section ul {
        font-size: 0.98rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .legal-section a,
    .legal-back-link,
    .legal-back-link .arrow,
    .legal-toc a {
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}

html {
    scroll-behavior: smooth;
}


/* ============================================================
   STATUS PILLS — used on detail page + gallery card overlay
   ============================================================ */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
    border: 1px solid currentColor;
    line-height: 1;
    white-space: nowrap;
}

.status-pill--sold {
    color: #6B5535;
    background-color: #F5F1E8;
    border-color: rgba(139, 111, 71, 0.35);
}

.status-pill--available {
    color: #4A5C3F;
    background-color: #EFF2EA;
    border-color: rgba(74, 92, 63, 0.30);
}

/* On the gallery card the pill floats top-LEFT over the image. */
.art-piece .status-pill {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 2;
    font-size: 0.68rem;
    padding: 0.32rem 0.8rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(245, 241, 232, 0.88);
    box-shadow: 0 2px 8px rgba(43, 35, 22, 0.12);
}

/* Price badge — serif italic, more elegant than the all-caps "Sprzedana"
   stripe. Same corner position so they never both render (the template
   enforces one OR the other via {% if/elif %}). */
.status-pill--price {
    color: #1A1A1A;
    background-color: rgba(253, 251, 247, 0.92);
    border-color: rgba(26, 26, 26, 0.18);
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    font-feature-settings: "tnum" 1;
}

.art-piece .status-pill--price {
    font-size: 0.92rem;
    padding: 0.3rem 0.85rem;
}

/* On the gallery card the "Sprzedana" pill morphs into a thick diagonal
   ribbon across the top-left corner — chip → banner. Detail page + panel
   keep the chip style (specificity-scoped via `.art-piece` parent). */
.art-piece .status-pill--sold {
    /* Wipe chip styling */
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    /* Anchor the band so a 45° rotation lands centered across the corner.
       The band straddles the corner symmetrically:
         visible centerline runs from (0, 80) to (80, 0) in card space, and
         the band's geometric center sits at (40, 40). */
    top: 22px;
    left: -50px;
    width: 180px;
    padding: 12px 0;

    /* The base .status-pill is inline-flex; force the text to centre on the
       MAIN axis so it lands at the visible centre of the ribbon after rotation.
       Without this the text pins to flex-start (left edge) and disappears off
       the card the moment the band rotates. */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    /* Sepia-deep banner on paper — editorial, not commercial red. */
    background: #6B5535;
    color: #FDFBF7;
    box-shadow: 0 4px 14px rgba(43, 35, 22, 0.32);

    /* Typography: condensed sans for legibility at small size. */
    font-family: 'Inter', sans-serif;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;

    transform: rotate(-45deg);
    transform-origin: center;
    pointer-events: none;
}

/* Make sure the ribbon never causes a horizontal scroll inside the card. */
.art-piece { overflow: hidden; }

/* The card itself is now an <a>. Strip the underline + inherit color cleanly. */
.art-piece {
    text-decoration: none;
    color: inherit;
}


/* ============================================================
   ARTWORK DETAIL PAGE (/prace/<slug>/)
   ============================================================ */
.artwork-detail {
    background-color: #FDFBF7;
    padding: 4rem 1.5rem 6rem;
    min-height: 80vh;
}

.artwork-detail-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.artwork-detail-figure {
    margin: 0 0 3rem;
    padding: 1.25rem;
    background-color: #ffffff;
    border: 1px solid #E8E0D1;
    box-shadow: 0 4px 30px rgba(43, 35, 22, 0.06);
}

.artwork-detail-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.artwork-detail-header {
    margin-bottom: 1.5rem;
}

.artwork-detail-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: #8B6F47;
    margin-bottom: 0.85rem;
    font-weight: 500;
}

.artwork-detail-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 500;
    line-height: 1.15;
    color: #1A1A1A;
    margin: 0;
    letter-spacing: -0.01em;
}

.artwork-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin: 0 0 2.5rem;
}

.artwork-price {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 1.5rem;
    font-feature-settings: "tnum" 1;
    color: #6B5535;
    line-height: 1;
}

.artwork-detail-description {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #4A4543;
    max-width: 65ch;
    margin-bottom: 2.5rem;
}

.artwork-detail-back {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #E8E0D1;
}

.artwork-detail-back-link {
    color: #8B6F47;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.artwork-detail-back-link:hover {
    color: #6B5535;
    border-bottom-color: #6B5535;
}

.artwork-detail-back-link .arrow {
    display: inline-block;
    margin-right: 0.4rem;
    transition: transform 0.2s ease;
}

.artwork-detail-back-link:hover .arrow {
    transform: translateX(-3px);
}

@media (max-width: 600px) {
    .artwork-detail {
        padding: 2.5rem 1rem 4rem;
    }
    .artwork-detail-figure {
        padding: 0.75rem;
        margin-bottom: 2rem;
    }
    .artwork-price {
        font-size: 1.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .artwork-detail-back-link,
    .artwork-detail-back-link .arrow {
        transition: none;
    }
}

/* ============================================================
   BUTTON VARIANTS — filled (primary) + ghost alias
   ============================================================ */
.btn-editorial--filled {
    background: #6B5535;
    color: #FDFBF7;
    border-color: #6B5535;
}

.btn-editorial--filled:hover,
.btn-editorial--filled:focus-visible {
    background: #1A1A1A;
    color: #FDFBF7;
    border-color: #1A1A1A;
}

/* .btn-editorial--ghost is the same as the base button — alias for clarity
   when reading templates. */


/* ============================================================
   AUTH PAGE (/zaloguj/)
   ============================================================ */
.auth-page {
    background-color: #FDFBF7;
    padding: 5rem 1.5rem;
    min-height: 80vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.auth-card {
    max-width: 440px;
    width: 100%;
    padding: 3rem 2.5rem;
    background-color: #ffffff;
    border: 1px solid #E8E0D1;
    box-shadow: 0 4px 30px rgba(43, 35, 22, 0.06);
}

.auth-header {
    margin-bottom: 2.25rem;
    text-align: center;
}

.auth-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.72rem;
    color: #8B6F47;
    margin-bottom: 0.85rem;
    font-weight: 500;
}

.auth-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 500;
    color: #1A1A1A;
    margin: 0 0 0.75rem;
    line-height: 1.15;
}

.auth-lead {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4A4543;
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-form .btn-editorial {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
}

.auth-error {
    background-color: #F8E8E4;
    color: #8A3F2F;
    padding: 0.85rem 1rem;
    border-left: 3px solid #8A3F2F;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

.auth-back {
    text-align: center;
    margin: 2rem 0 0;
}

.auth-back a {
    color: #8B6F47;
    text-decoration: none;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.auth-back a:hover { border-bottom-color: #8B6F47; }


/* ============================================================
   ARTWORK DETAIL — login-gated Edytuj button block
   ============================================================ */
.artwork-detail-edit {
    margin: -0.5rem 0 2.5rem;
}

.artwork-detail-edit .btn-editorial {
    margin-top: 0;
    padding: 10px 22px;
    font-size: 0.7rem;
}


/* ============================================================
   NAV — Panel + Wyloguj (only when authenticated)
   ============================================================ */
.nav-logout-form {
    margin: 0;
    display: inline;
}

.nav-logout-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.nav-logout-btn:hover { color: #8B6F47; }


/* ============================================================
   PANEL — list view (Phase 4 skeleton; phase 5 fills the chrome)
   ============================================================ */
.panel-page {
    background-color: #FDFBF7;
    padding: 4rem 1.5rem 6rem;
    min-height: 80vh;
}

.panel-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.panel-header {
    margin-bottom: 2.5rem;
}

.panel-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: #8B6F47;
    margin-bottom: 0.85rem;
    font-weight: 500;
}

.panel-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    color: #1A1A1A;
    margin: 0 0 0.5rem;
    line-height: 1.15;
}

.panel-lead {
    color: #4A4543;
    max-width: 60ch;
    line-height: 1.65;
    margin: 0;
}

.panel-actions {
    margin: 0 0 2.5rem;
    display: flex;
    justify-content: flex-end;
}

.panel-actions .btn-editorial { margin-top: 0; }

.panel-list {
    border-top: 1px solid #E8E0D1;
}

.panel-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid #E8E0D1;
}

.panel-row-thumb {
    display: block;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border: 1px solid #E8E0D1;
    background-color: #F5F1E8;
}

.panel-row-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-row-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: #1A1A1A;
    margin: 0 0 0.4rem;
}

.panel-row-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    font-size: 0.9rem;
}

.panel-row-price {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    color: #6B5535;
    font-feature-settings: "tnum" 1;
}

.panel-row-actions {
    display: flex;
    gap: 0.5rem;
}

.panel-action {
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    transition: background 0.2s ease, color 0.2s ease;
    border-radius: 2px;
}

.panel-action--edit {
    color: #6B5535;
}

.panel-action--edit:hover {
    background: #6B5535;
    color: #FDFBF7;
}

.panel-action--delete {
    color: #8A3F2F;
}

.panel-action--delete:hover {
    background: #8A3F2F;
    color: #FDFBF7;
}

.panel-empty {
    padding: 3rem 0;
    text-align: center;
    color: #4A4543;
}

.panel-empty a {
    color: #6B5535;
    border-bottom: 1px solid currentColor;
    text-decoration: none;
}

@media (max-width: 600px) {
    .panel-row {
        grid-template-columns: 60px 1fr;
    }
    .panel-row-actions {
        grid-column: 1 / -1;
        margin-left: 76px;
    }
    .panel-row-thumb { width: 60px; height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
    .panel-action,
    .nav-logout-btn,
    .auth-back a {
        transition: none;
    }
}


/* ============================================================
   PANEL FORM (/panel/nowa/ + /panel/<slug>/edytuj/)
   ============================================================ */
.panel-form-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.panel-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2.5rem;
}

.panel-form .form-control {
    width: 100%;
    padding: 0.65rem 0;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #C9BFA8;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #1A1A1A;
    transition: border-color 0.2s ease;
}

.panel-form .form-control:focus {
    outline: none;
    border-bottom-color: #6B5535;
}

.panel-form select.form-control {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 1.5rem;
    background-image: linear-gradient(45deg, transparent 50%, #8B6F47 50%),
                      linear-gradient(135deg, #8B6F47 50%, transparent 50%);
    background-position: calc(100% - 14px) center, calc(100% - 8px) center;
    background-size: 6px 6px;
    background-repeat: no-repeat;
}

.panel-form textarea.form-control {
    border: 1px solid #C9BFA8;
    padding: 0.85rem 1rem;
    resize: vertical;
    min-height: 100px;
}

.panel-form textarea.form-control:focus {
    border-color: #6B5535;
}

.panel-form input[type="file"] {
    padding: 0.65rem 0;
    font-family: 'Inter', sans-serif;
    color: #4A4543;
    font-size: 0.92rem;
}

.panel-form label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #8B6F47;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-help {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    color: #6B6358;
    line-height: 1.5;
}

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

.panel-form-thumb {
    margin-bottom: 0.85rem;
    padding: 0.75rem;
    background-color: #ffffff;
    border: 1px solid #E8E0D1;
    max-width: 240px;
}

.panel-form-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.panel-form-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E8E0D1;
}

.panel-form-actions .btn-editorial { margin-top: 0; }

.panel-form-cancel {
    color: #8B6F47;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.panel-form-cancel:hover { border-bottom-color: #8B6F47; }

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
    .panel-form-actions { flex-direction: column; align-items: stretch; }
    .panel-form-actions .btn-editorial { width: 100%; justify-content: center; }
}


/* ============================================================
   PANEL CONFIRM DELETE
   ============================================================ */
.panel-confirm-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    margin: 2.5rem 0 2rem;
    background-color: #ffffff;
    border: 1px solid #E8E0D1;
}

.panel-confirm-thumb {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border: 1px solid #E8E0D1;
    overflow: hidden;
    margin: 0;
}

.panel-confirm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.panel-confirm-meta h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
    color: #1A1A1A;
}

.panel-confirm-desc {
    color: #4A4543;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

.panel-confirm-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-editorial--danger {
    background: #8A3F2F;
    color: #FDFBF7;
    border-color: #8A3F2F;
}

.btn-editorial--danger:hover,
.btn-editorial--danger:focus-visible {
    background: #6B2C1F;
    color: #FDFBF7;
    border-color: #6B2C1F;
}

@media (max-width: 600px) {
    .panel-confirm-card { flex-direction: column; }
    .panel-confirm-thumb { width: 100%; height: 220px; }
    .panel-confirm-actions { flex-direction: column; align-items: stretch; }
    .panel-confirm-actions .btn-editorial { width: 100%; justify-content: center; }
}
