﻿@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg: #f6f1e9;
    --ink: #1f1a14;
    --muted: #6b5f52;
    --card: #ffffff;
    --line: #e6d6c4;
    --accent: #ff8a3d;
    --accent-2: #2f7c73;
    --shadow: 0 24px 50px rgba(31, 26, 20, 0.12);
    --target-w: 1000px;
    --target-h: 750px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top, #fff3e4 0%, #f6f1e9 45%, #efe7db 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(0px);
    opacity: 0.6;
    z-index: 0;
    pointer-events: none;
}

body::before {
    top: -140px;
    left: -120px;
    background: radial-gradient(circle, rgba(255, 193, 120, 0.55), rgba(255, 193, 120, 0));
}

body::after {
    top: -120px;
    right: -120px;
    background: radial-gradient(circle, rgba(88, 187, 170, 0.45), rgba(88, 187, 170, 0));
}

.page {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(280px, 0.9fr);
    gap: 36px;
    align-items: center;
    margin-bottom: 56px;
}

.hero-panel {
    padding: 24px;
    display: grid;
    gap: 12px;
}

.hero-panel h2 {
    font-family: 'Space Grotesk', sans-serif;
    margin: 0;
    font-size: 1.4rem;
}

.hero-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.hero-text h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.4rem, 4vw, 3.5rem);
    margin: 12px 0 12px;
    letter-spacing: -0.02em;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.26em;
    font-size: 0.72rem;
    color: var(--accent-2);
    margin: 0;
    font-weight: 600;
}

.lede {
    font-size: 1.05rem;
    color: var(--muted);
    margin: 0 0 20px;
    max-width: 38ch;
}

.hero-notes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.note {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff8f0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.upload-form {
    padding: 24px;
    display: grid;
    gap: 16px;
}

.form-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    margin: 0 0 6px;
    font-size: 1.4rem;
}

.form-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.field {
    display: grid;
    gap: 8px;
}

label {
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 0.98rem;
    font-family: inherit;
    background: #fff;
}

input[type="text"]:focus,
input[type="file"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.18);
    border-color: var(--accent);
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: none;
    background: #ffe2cc;
    color: var(--ink);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

button[type="submit"] {
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.98rem;
    color: #fff;
    background: linear-gradient(120deg, var(--accent), #f25f2d 55%, var(--accent-2));
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(242, 95, 45, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(242, 95, 45, 0.25);
}

.gallery-section {
    display: grid;
    gap: 24px;
}

.section-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    margin: 0 0 6px;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.photo-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}


.photo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 46px rgba(31, 26, 20, 0.16);
}

.image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3efe9;
}

.image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.35s ease;
}

.photo-card:hover img {
    transform: scale(1.06);
}

.meta {
    padding: 16px 16px 18px;
}

.meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.meta h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    margin: 0 0 6px;
}

.meta p {
    margin: 0;
    color: var(--muted);
    line-height: 1.4;
}

.meta-foot {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge.sold {
    background: rgba(242, 95, 45, 0.12);
    color: #d04c24;
}

.badge.live {
    background: rgba(47, 124, 115, 0.12);
    color: var(--accent-2);
}

.admin-status {
    margin-top: 32px;
    padding: 22px;
    display: grid;
    gap: 16px;
}

.admin-gallery {
    display: grid;
    gap: 14px;
}

.admin-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fffdfa;
}

.admin-card img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    background: #f1ece5;
}

.admin-card-body {
    display: grid;
    gap: 8px;
}

.admin-card h3 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
}

.admin-card p {
    margin: 6px 0 6px;
    color: var(--muted);
}

.admin-title,
.admin-desc {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 0.95rem;
}

.admin-desc {
    resize: vertical;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-actions input[type="file"] {
    flex: 1 1 220px;
}

.admin-save,
.admin-delete {
    border: none;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

.admin-save {
    background: rgba(47, 124, 115, 0.16);
    color: var(--accent-2);
}

.admin-delete {
    background: rgba(242, 95, 45, 0.16);
    color: #d04c24;
}

.admin-card small {
    color: var(--muted);
    font-weight: 600;
}

.admin-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.empty {
    margin: 0;
    color: var(--muted);
}

.lightbox {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(16, 13, 10, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 10;
    backdrop-filter: blur(14px) saturate(120%);
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.lightbox.is-open .lightbox-dialog {
    transform: scale(1);
    opacity: 1;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
}

.lightbox-dialog {
    position: relative;
    max-width: 95vw;
    width: auto;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transform: scale(0.97);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.lightbox-dialog img {
    width: min(var(--target-w), 92vw);
    height: min(var(--target-h), 88vh);
    object-fit: cover;
    background: transparent;
    display: block;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(16, 13, 10, 0.25);
}

.lightbox-meta {
    margin: 14px auto 0;
    width: min(680px, 90vw);
    padding: 14px 18px 16px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
}

.lightbox-meta h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.lightbox-meta p {
    margin: 0;
    color: var(--muted);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -6px;
    border: none;
    background: rgba(16, 13, 10, 0.6);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(16, 13, 10, 0.55);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.lightbox-nav.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-nav.prev {
    left: -24px;
}

.lightbox-nav.next {
    right: -24px;
}

.lightbox-thumbs {
    display: flex;
    gap: 10px;
    padding: 10px 0 0;
    flex-wrap: wrap;
    margin: 12px auto 0;
    width: min(680px, 90vw);
}

.thumb {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.thumb img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.thumb.is-active {
    border-color: var(--accent);
}

body.lightbox-open {
    overflow: hidden;
}

/* Entrance animations removed to avoid refresh flicker. */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .upload-form {
        order: 2;
    }
}

@media (max-width: 600px) {
    .page {
        padding: 40px 18px 64px;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .upload-form {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
