:root {
    --bg: #f6f3ee;
    --card: #ffffff;
    --text: #1e1e1e;
    --muted: #686868;
    --accent: #8a5a35;
    --accent-dark: #604026;
    --border: #ded6cd;
    --soft: #eee4db;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; }
.header { background: rgba(255,255,255,.9); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.nav { max-width: 1180px; margin: 0 auto; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-weight: 900; font-size: 22px; text-decoration: none; letter-spacing: -.03em; }
.nav-links { display: flex; gap: 14px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 700; }
.nav-links a:hover { color: var(--accent); }
.container { max-width: 1180px; margin: 0 auto; padding: 38px 22px 70px; }
.hero { padding: 44px 0 28px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 900; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
.hero h1 { font-size: clamp(38px, 7vw, 78px); line-height: .94; margin: 0 0 20px; letter-spacing: -.06em; max-width: 840px; }
.hero p { font-size: 20px; color: var(--muted); max-width: 720px; line-height: 1.55; }

.slideshow { position: relative; border-radius: 28px; overflow: hidden; min-height: 390px; background: #111; margin: 10px 0 30px; box-shadow: 0 18px 50px rgba(0,0,0,.12); }
.slides { position: relative; height: min(62vw, 540px); min-height: 390px; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .55s ease; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.72); }
.slide-caption { position: absolute; left: 34px; right: 34px; bottom: 32px; color: #fff; max-width: 680px; }
.slide-caption span { display: inline-block; padding: 7px 12px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; font-weight: 800; margin-bottom: 12px; }
.slide-caption h2 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 52px); letter-spacing: -.04em; }
.slide-caption p { margin: 0; color: rgba(255,255,255,.86); line-height: 1.5; font-size: 18px; }
.slide-control { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; padding: 0; margin: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: #1e1e1e; font-size: 32px; line-height: 1; }
.slide-control:hover { background: #fff; }
.slide-control.prev { left: 18px; }
.slide-control.next { right: 18px; }

.toolbar { display: flex; gap: 18px; justify-content: space-between; align-items: flex-start; margin: 28px 0 18px; flex-wrap: wrap; }
.category-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 10px 14px; background: var(--card); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; text-decoration: none; font-weight: 800; }
.pill small { color: var(--accent); }
.pill.active, .pill:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.pill.active small, .pill:hover small { color: #fff; }
.search { display: flex; gap: 10px; min-width: min(100%, 360px); }
.search input { margin: 0; }
.search button { margin: 0; white-space: nowrap; }
.section-title { margin-top: 28px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.04); }
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #ddd; transition: transform .25s ease; }
.card a:hover .photo { transform: scale(1.035); }
.card-body { padding: 18px; }
.card-body h2, .card-body h3 { margin: 8px 0 8px; font-size: 20px; }
.card-body p { color: var(--muted); line-height: 1.5; margin: 0; }
.tag { display: inline-flex; color: var(--accent-dark); background: var(--soft); padding: 5px 9px; border-radius: 999px; font-weight: 800; font-size: 12px; }

.cms-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.cms-heading h1 { margin: 0; font-size: 48px; letter-spacing: -.04em; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stats span { background: var(--card); border: 1px solid var(--border); padding: 10px 14px; border-radius: 999px; font-weight: 800; color: var(--muted); }
.admin-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: start; }
.form-card { background: var(--card); border: 1px solid var(--border); padding: 26px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.035); }
.form-card h2 { margin-top: 0; }
label { display: block; font-weight: 800; margin: 16px 0 8px; }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 700; }
input[type="text"], input[type="password"], input[type="number"], textarea, input[type="file"], select {
    width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; font: inherit; background: #fff;
}
textarea { min-height: 112px; resize: vertical; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--accent); color: white; padding: 12px 18px; border-radius: 999px; font-weight: 900; cursor: pointer; text-decoration: none; margin-top: 18px; }
button:hover, .button:hover { background: var(--accent-dark); }
.button.secondary { background: var(--soft); color: var(--accent-dark); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions form { margin: 0; }
.pad { padding: 0 18px 18px; }
.notice { padding: 14px 16px; border-radius: 14px; background: #edf7ed; border: 1px solid #bfdfbf; margin-bottom: 20px; }
.error { padding: 14px 16px; border-radius: 14px; background: #fff0f0; border: 1px solid #f1b9b9; margin-bottom: 20px; }
.empty { color: var(--muted); padding: 30px; background: var(--card); border-radius: 18px; border: 1px solid var(--border); }
.muted { color: var(--muted); font-weight: 700; }

.category-list { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.category-row { display: grid; grid-template-columns: 1fr 1.6fr auto auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--border); padding: 12px; border-radius: 16px; }
.category-row button, .inline-delete button { margin-top: 0; }
.inline-delete { align-self: stretch; display: flex; align-items: center; }

.photo-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(315px, 1fr)); gap: 22px; }
.admin-photo-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.035); }
.admin-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: #ddd; }
.admin-photo-form { padding: 18px; }
.admin-photo-form textarea { min-height: 82px; }
.admin-photo-form button { width: 100%; }

.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 16px; overflow: hidden; }
.table th, .table td { padding: 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.thumb { width: 92px; height: 68px; object-fit: cover; border-radius: 10px; display: block; }

@media (max-width: 850px) {
    .admin-layout, .category-list { grid-template-columns: 1fr; }
    .category-row { grid-template-columns: 1fr; }
    .inline-delete { display: block; }
    .search { width: 100%; }
    .slides { height: 420px; }
}
@media (max-width: 640px) {
    .container { padding-left: 16px; padding-right: 16px; }
    .nav { padding-left: 16px; padding-right: 16px; }
    .slideshow, .slides { min-height: 310px; }
    .slides { height: 310px; }
    .slide-caption { left: 22px; right: 22px; bottom: 22px; }
    .slide-caption p { display: none; }
    .slide-control { width: 38px; height: 38px; }
}
