/* =========================================================
   Aperto Gallery – Public Frontend
   ========================================================= */

:root {
    --g-bg:       #0f0f0f;
    --g-surface:  #181818;
    --g-border:   #2a2a2a;
    --g-text:     #e0e0e0;
    --g-muted:    #808080;
    --g-accent:   #7c6af7;
    --g-radius:   10px;
    --g-font:     'Inter', system-ui, -apple-system, sans-serif;
    --g-max-w:    1400px;
}

/* Site-eigene Übersteuerung per settings */
:root {
    --primary-color: var(--g-accent);
    --background:    var(--g-bg);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--g-font);
    background: var(--background, var(--g-bg));
    color: var(--g-text);
    min-height: 100vh;
}

/* ── Site Header ──────────────────────────────────────── */
.site-header {
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: .9rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 200;
    backdrop-filter: blur(16px) saturate(1.4);
    background: rgba(15,15,15,.8);
}

.site-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--g-text);
    text-decoration: none;
    letter-spacing: -.4px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.site-nav a {
    color: rgba(255,255,255,.45);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    transition: color .15s;
    letter-spacing: .01em;
}

.site-nav a:hover { color: rgba(255,255,255,.9); }

/* ── Container ────────────────────────────────────────── */
.container {
    max-width: var(--g-max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Home Hero ────────────────────────────────────────── */
.home-hero {
    position: relative;
    min-height: 52vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,106,247,.18) 0%, transparent 70%);
    border-bottom: 1px solid var(--g-border);
}

.home-hero-inner {
    padding: 5rem 1.5rem 4rem;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.home-hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 1.1rem;
    background: linear-gradient(135deg, #fff 40%, rgba(255,255,255,.55));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero-subtitle {
    color: var(--g-muted);
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}

.home-hero-scroll {
    display: inline-flex;
    color: rgba(255,255,255,.25);
    animation: heroScrollBounce 2s ease-in-out infinite;
}

@keyframes heroScrollBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(6px); }
}

/* ── Galleries Section ────────────────────────────────── */
.galleries-section {
    padding: 3rem 0 5rem;
    max-width: var(--g-max-w);
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.galleries-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.galleries-section-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--g-muted);
}

.galleries-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--g-border);
}

/* ── Gallery Cards (Cropped Grid) ────────────────────── */
.galleries-grid-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 260px;
    gap: 6px;
}

.gallery-card-new {
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    background: var(--g-surface);
}

.gallery-card-featured {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-card-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.25,.46,.45,.94), filter .4s;
    filter: brightness(.9);
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.gallery-card-new:hover img {
    transform: scale(1.04);
    filter: brightness(.7);
}

.gallery-card-placeholder {
    width: 100%;
    height: 100%;
    background: var(--g-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 40%, transparent 65%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem 1.35rem;
    transition: background .3s;
}

.gallery-card-new:hover .gallery-card-overlay,
.gallery-card-new:focus-visible .gallery-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.2) 50%, transparent 75%);
}

.gallery-card-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .35rem;
}

.gallery-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    color: rgba(255,255,255,.8);
}

.gallery-card-count-new {
    font-size: .7rem;
    color: rgba(255,255,255,.5);
    letter-spacing: .05em;
}

.gallery-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.gallery-card-featured .gallery-card-name { font-size: 1.5rem; }

.gallery-card-desc {
    margin-top: .3rem;
    font-size: .78rem;
    color: rgba(255,255,255,.5);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-card-arrow {
    position: absolute;
    top: .9rem;
    right: .9rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.7);
    opacity: 0;
    transform: translate(4px, -4px);
    transition: opacity .25s, transform .25s, background .15s;
    backdrop-filter: blur(4px);
}

.gallery-card-new:hover .gallery-card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

.gallery-card-arrow:hover { background: rgba(255,255,255,.18); }

/* ── Empty State ──────────────────────────────────────── */
.galleries-empty {
    text-align: center;
    padding: 6rem 1.5rem;
    color: var(--g-muted);
}

.galleries-empty svg { margin-bottom: 1.25rem; display: block; margin-left: auto; margin-right: auto; }

/* ── Home Page Gallery Overview (legacy, kept for compat) */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 2.5rem 0 .5rem;
}

.page-subtitle {
    color: var(--g-muted);
    margin-bottom: 2rem;
}

/* old card styles kept for template pages */
.galleries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    padding-bottom: 3rem;
}

.gallery-card {
    background: var(--g-surface);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--g-text);
    display: block;
    transition: transform .2s, box-shadow .2s;
}

.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
}

.gallery-card-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--g-border);
    position: relative;
}

.gallery-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.gallery-card:hover .gallery-card-thumb img { transform: scale(1.04); }

.gallery-card-lock {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: rgba(0,0,0,.6);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-card-body { padding: 1rem 1.1rem; }

.gallery-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-card-count { font-size: .8rem; color: var(--g-muted); }

/* ── Password Gate ────────────────────────────────────── */
.pw-gate {
    max-width: 400px;
    margin: 6rem auto;
    background: var(--g-surface);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    padding: 2rem;
    text-align: center;
}

.pw-gate-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.pw-gate h2 { margin-bottom: .5rem; }
.pw-gate p  { color: var(--g-muted); font-size: .9rem; margin-bottom: 1.5rem; }

.pw-form {
    display: flex;
    gap: .5rem;
}

.pw-input {
    flex: 1;
    padding: .55rem .85rem;
    background: var(--g-border);
    border: 1px solid var(--g-border);
    border-radius: 6px;
    color: var(--g-text);
    font-size: .9rem;
}

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

.pw-btn {
    padding: .55rem 1.1rem;
    background: var(--g-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
}

.pw-error {
    color: #e05252;
    font-size: .85rem;
    margin-top: .75rem;
}

/* ── Gallery Page ─────────────────────────────────────── */
.gallery-header {
    padding: 2rem 0 1.5rem;
}

.gallery-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.gallery-meta {
    color: var(--g-muted);
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-desc {
    margin-top: .75rem;
    color: var(--g-muted);
    max-width: 700px;
    font-size: .9rem;
    line-height: 1.6;
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

/* ── Photo Grid (default template) ────────────────────── */
.photo-grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .75rem;
    padding-bottom: 3rem;
}

.photo-item-gallery {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: var(--g-border);
    position: relative;
}

.photo-item-gallery img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

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

.photo-item-overlay-gallery {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background .2s;
    display: flex;
    align-items: flex-end;
    padding: .75rem;
    pointer-events: all; /* fängt Rechtsklick ab, bevor img erreicht wird */
}

.photo-item-gallery:hover .photo-item-overlay-gallery {
    background: rgba(0,0,0,.4);
}

.photo-download-btn {
    opacity: 0;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    padding: .35rem .65rem;
    border-radius: 6px;
    font-size: .78rem;
    cursor: pointer;
    transition: opacity .2s, background .15s;
    text-decoration: none;
}

.photo-item-gallery:hover .photo-download-btn { opacity: 1; }
.photo-download-btn:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ── Lightbox ─────────────────────────────────────────── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-inner {
    position: relative;
    max-width: min(90vw, 1200px);
    max-height: 90vh;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lightbox-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: min(80vw, 1000px);
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    transition: opacity .25s;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.lightbox-btn {
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    flex-shrink: 0;
}

.lightbox-btn:hover { background: rgba(255,255,255,.2); }

.lightbox-close {
    position: absolute;
    top: -1rem;
    right: -1rem;
    z-index: 10;
}

.lightbox-info {
    position: absolute;
    bottom: -3rem;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.lightbox-caption {
    font-size: .875rem;
    color: rgba(255,255,255,.7);
}

.lightbox-counter {
    font-size: .8rem;
    color: rgba(255,255,255,.4);
    white-space: nowrap;
}

.lightbox-exif-toggle {
    background: rgba(255,255,255,.1);
    border: none;
    color: rgba(255,255,255,.6);
    border-radius: 6px;
    padding: .3rem .65rem;
    font-size: .78rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.lightbox-exif-toggle:hover { background: rgba(255,255,255,.2); color: #fff; }

/* EXIF Panel */
.exif-panel {
    position: absolute;
    right: -260px;
    top: 0;
    width: 240px;
    background: rgba(20,20,20,.95);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    padding: 1rem;
    font-size: .8rem;
    color: rgba(255,255,255,.7);
    display: none;
    max-height: 85vh;
    overflow-y: auto;
}

.exif-panel.open { display: block; }
.exif-row { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.exif-row:last-child { border-bottom: none; }
.exif-label { color: rgba(255,255,255,.4); }
.exif-val   { text-align: right; }

/* ── Home Content Sections ────────────────────────────── */
.home-section-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.home-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.5px;
    margin-bottom: 1rem;
    color: var(--g-text);
}

/* Intro */
.home-intro {
    border-bottom: 1px solid var(--g-border);
    padding: 2.5rem 0;
}

.home-intro-inner {
    text-align: center;
}

.home-intro-inner p {
    color: var(--g-muted);
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 640px;
    margin: 0 auto .5rem;
}

/* About */
.home-about {
    padding: 5rem 0;
    border-bottom: 1px solid var(--g-border);
}

.home-about-inner {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3.5rem;
    align-items: center;
    max-width: 860px;
}

.home-about-photo-wrap {
    flex-shrink: 0;
}

.home-about-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--g-border);
    display: block;
}

.home-about-text p {
    color: var(--g-muted);
    line-height: 1.8;
    font-size: .95rem;
    margin-bottom: .75rem;
}

.home-about-text p:last-child { margin-bottom: 0; }

/* Bottom text */
.home-bottom {
    padding: 5rem 0;
    border-bottom: 1px solid var(--g-border);
}

.home-bottom-inner {
    text-align: center;
}

.home-bottom-inner .home-section-title {
    margin-bottom: 1.25rem;
}

.home-bottom-inner p {
    color: var(--g-muted);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto .5rem;
}

/* Contact */
.home-contact {
    padding: 5rem 0 6rem;
}

.home-contact-inner {
    text-align: center;
}

.home-contact-text {
    color: var(--g-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: .5rem auto 2rem;
    max-width: 500px;
}

.home-contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}

.home-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.35rem;
    border: 1px solid var(--g-border);
    border-radius: 999px;
    color: var(--g-text);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: border-color .15s, background .15s, color .15s;
    background: var(--g-surface);
}

.home-contact-btn:hover {
    border-color: var(--g-accent);
    background: rgba(124,106,247,.08);
    color: #fff;
}

/* ── Legal Pages ──────────────────────────────────────── */
.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.legal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.legal-content {
    color: var(--g-muted);
    line-height: 1.8;
    font-size: .95rem;
}

/* ── Contact Form ─────────────────────────────────────── */
.contact-page {
    max-width: 680px;
}
.contact-intro {
    color: var(--g-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: .95rem;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 560px) {
    .contact-row { grid-template-columns: 1fr; }
}
.contact-field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.contact-label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--g-muted);
    letter-spacing: .02em;
}
.contact-input {
    background: var(--g-surface);
    border: 1px solid var(--g-border);
    border-radius: 8px;
    color: var(--g-text);
    font-family: var(--g-font);
    font-size: .95rem;
    padding: .65rem .9rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}
.contact-input:focus {
    border-color: var(--g-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--g-accent) 20%, transparent);
}
.contact-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}
.contact-submit {
    align-self: flex-start;
    background: var(--g-accent);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-family: var(--g-font);
    font-size: .95rem;
    font-weight: 600;
    padding: .7rem 1.75rem;
    transition: opacity .15s, transform .1s;
}
.contact-submit:hover  { opacity: .88; }
.contact-submit:active { transform: scale(.97); }
.contact-flash {
    border-radius: 8px;
    font-size: .93rem;
    line-height: 1.6;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.contact-flash--success {
    background: color-mix(in srgb, #4caf80 12%, transparent);
    border: 1px solid #4caf80;
    color: #4caf80;
}
.contact-flash--error {
    background: color-mix(in srgb, #e05252 12%, transparent);
    border: 1px solid #e05252;
    color: #e05252;
}
/* Honeypot verstecken */
.contact-hp {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

/* ── Cookie Banner ────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--g-surface);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 9000;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    max-width: min(600px, calc(100vw - 2rem));
    width: 100%;
}

.cookie-banner-text {
    font-size: .875rem;
    color: var(--g-muted);
    flex: 1;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}

.cookie-banner-link {
    font-size: .8rem;
    color: var(--g-muted);
    text-decoration: underline;
    white-space: nowrap;
}

.cookie-banner-link:hover { color: var(--g-text); }

.cookie-banner-btn {
    padding: .5rem 1.25rem;
    background: var(--g-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.cookie-banner-btn:hover { opacity: .9; }

/* ── Site Footer ──────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--g-border);
    padding: 1.5rem;
    text-align: center;
    font-size: .8rem;
    color: var(--g-muted);
}

.site-footer a {
    color: var(--g-muted);
    text-decoration: none;
}

.site-footer a:hover { color: var(--g-text); }

.footer-update-hint {
    color: #f0a732 !important;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.footer-update-hint:hover { color: #f5c06a !important; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
    .galleries-grid-new {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 220px;
    }
    .gallery-card-featured {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 680px) {
    .home-about-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .home-about-photo {
        width: 140px;
        height: 140px;
        margin: 0 auto;
    }
}

/* ── Sale overlay badge (grid/masonry/etc.) ───────────── */
.photo-item { position: relative; }
.sale-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(224,168,64,.92);
    color: #1a1200;
    font-size: .65rem;
    font-weight: 700;
    padding: .18rem .45rem;
    border-radius: 20px;
    letter-spacing: .03em;
    pointer-events: none;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* ── Buy page ─────────────────────────────────────────── */
.buy-page {
    max-width: 860px;
    margin: 2.5rem auto;
    padding: 0 1.25rem;
}
.buy-page h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.buy-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
.buy-preview-col img.buy-photo {
    width: 100%;
    border-radius: 10px;
    display: block;
    border: 1px solid rgba(255,255,255,.08);
}
.buy-sale-badge-lg {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: rgba(224,168,64,.18);
    color: #e0a840;
    border: 1px solid rgba(224,168,64,.35);
    font-size: .78rem;
    font-weight: 700;
    padding: .3rem .75rem;
    border-radius: 20px;
    margin-top: .75rem;
}
.buy-price-box {
    margin: 1.1rem 0;
    padding: .9rem 1rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
}
.buy-price-label {
    font-size: .75rem;
    color: var(--g-muted);
    margin-bottom: .25rem;
}
.buy-price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e0a840;
}
.buy-sale-info {
    font-size: .8rem;
    color: var(--g-muted);
    margin-top: .35rem;
}
.buy-license-text {
    font-size: .78rem;
    color: var(--g-muted);
    margin-top: 1rem;
    line-height: 1.6;
}
.buy-form-col { display: flex; flex-direction: column; gap: 1rem; }
.buy-form-col h2 { font-size: 1.05rem; font-weight: 700; }
.buy-form-col .buy-intro { font-size: .85rem; color: var(--g-muted); margin-top: -.25rem; }
.buy-form-group { display: flex; flex-direction: column; gap: .3rem; }
.buy-form-group label { font-size: .8rem; color: var(--g-muted); }
.buy-form-group input,
.buy-form-group textarea {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    color: var(--g-text);
    font-family: var(--g-font);
    font-size: .9rem;
    padding: .55rem .8rem;
    width: 100%;
}
.buy-form-group input:focus,
.buy-form-group textarea:focus { outline: none; border-color: var(--g-accent); }
.buy-confirm-check {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .82rem;
    color: var(--g-muted);
    cursor: pointer;
}
.buy-confirm-check input[type=checkbox] { margin-top: .15rem; flex-shrink: 0; }
.buy-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .65rem 1.5rem;
    background: var(--g-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.buy-submit:hover { opacity: .85; }
.buy-back {
    display: inline-block;
    margin-top: .5rem;
    font-size: .82rem;
    color: var(--g-muted);
    text-decoration: none;
}
.buy-back:hover { color: var(--g-text); }
.buy-flash {
    padding: .65rem .9rem;
    border-radius: 6px;
    font-size: .85rem;
    margin-bottom: 1.25rem;
}
.buy-flash-success { background: rgba(76,175,128,.15); border: 1px solid #4caf80; color: #4caf80; }
.buy-flash-error   { background: rgba(224,82,82,.15);  border: 1px solid #e05252; color: #e05252; }

@media (max-width: 680px) {
    .buy-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .galleries-grid-new {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
    .gallery-card-featured {
        grid-column: span 2;
        grid-row: span 1;
    }
    .gallery-card-arrow   { display: none; }
    .galleries-grid { grid-template-columns: 1fr 1fr; }
    .photo-grid-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .exif-panel { display: none !important; }
    .lightbox-img { max-width: 95vw; }
    .home-hero { min-height: 40vh; }
}
