@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/cormorant-garamond-italic.woff2') format('woff2');
}
@font-face {
    font-family: 'Great Vibes';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/great-vibes-400.woff2') format('woff2');
}

:root {
    --bg: #faf6f1;
    --fg: #2c2a26;
    --muted: #6b6660;
    --accent: #b07a52;
    --accent-dark: #8a5a38;
    --card-bg: #fff;
    --border: #e5ddd1;
    --err-bg: #fde8e4;
    --err-fg: #8a1f0a;
    --ok-bg: #e3f2e5;
    --ok-fg: #1f5a2a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.site-header .brand {
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--accent-dark);
}
.site-header nav a {
    margin-left: 1rem;
    text-decoration: none;
}

.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

h1 { margin-top: 0; }
.lead { color: var(--muted); }

.flash {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.flash-ok  { background: var(--ok-bg);  color: var(--ok-fg); }
.flash-err { background: var(--err-bg); color: var(--err-fg); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card.claimed { opacity: 0.65; }
.card-image {
    aspect-ratio: 4/3;
    background: #f0eae0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}
.card-body h2 { margin: 0; font-size: 1.1rem; }
.meta { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.price { font-weight: 600; color: var(--accent-dark); }
.ext { font-size: 0.9rem; }
.availability { font-size: 0.9rem; color: var(--muted); }

.claim-form {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.claim-form label {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--muted);
}
.claim-form input[type="number"] {
    width: 5rem;
}

button, .btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.55rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
button:hover, .btn-primary:hover { background: var(--accent-dark); }
button.danger { background: #b34a3b; }
button.danger:hover { background: #8a2d20; }
button.link-button {
    background: none;
    color: var(--accent-dark);
    padding: 0;
    text-decoration: underline;
}
button.link-button.danger { color: #b34a3b; background: none; }

input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="password"],
textarea {
    font: inherit;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    width: 100%;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 480px;
}
.form-stack label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.claims-table, .admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.claims-table th, .claims-table td,
.admin-table th, .admin-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.claims-table tr:last-child td,
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

body.admin { background: #f3f0eb; }

.sort-bar {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.sort-bar label {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--muted);
    font-size: 0.9rem;
}
.sort-bar select {
    font: inherit;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.current-image {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}
.thumb-large {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.inline-check {
    flex-direction: row !important;
    align-items: center;
    gap: 0.4rem !important;
    color: var(--fg) !important;
}
.inline-check input { width: auto; }

.save-the-date {
    max-width: 720px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    text-align: center;
}
.save-the-date .hero {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f0eae0;
    margin-bottom: 2rem;
}
.save-the-date .hero img {
    display: block;
    width: 100%;
    height: auto;
}
.save-the-date .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.8rem;
    color: var(--accent-dark);
    margin: 0 0 0.75rem;
}
.save-the-date h1 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 400;
    margin: 0 auto 1rem;
    letter-spacing: 0.02em;
    text-wrap: balance;
}
.save-the-date .names {
    font-family: "Great Vibes", "Cormorant Garamond", cursive;
    font-size: clamp(2rem, 7vw, 3.5rem);
    color: var(--accent-dark);
    margin: 0 0 0.6rem;
    line-height: 1.1;
}
.save-the-date .names .amp {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-size: 0.5em;
    color: var(--muted);
    display: inline-block;
    margin: 0.2em 0;
}
.save-the-date .date {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--muted);
    margin: 0 0 2rem;
}
.save-the-date .details {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.7;
    text-wrap: balance;
}
.save-the-date .details strong { color: var(--fg); font-weight: inherit; }
.save-the-date .divider {
    width: 60px;
    height: 1px;
    background: var(--border);
    margin: 1.5rem auto;
    border: 0;
}

@media (min-width: 940px) {
    .save-the-date {
        max-width: 1080px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }
    .save-the-date .hero {
        margin-bottom: 0;
    }
    .save-the-date h1 {
        font-size: 2.75rem;
        white-space: nowrap;
    }
}
