:root {
    --bg: #f6f1e8;
    --paper: #fbf7f0;
    --ink: #2d2a26;
    --muted: #6d655d;
    --line: #d8cfc4;
    --accent: #3f5f4a;
    --shadow: 0 16px 40px rgba(38, 31, 25, 0.08);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8f4ed 0%, #f3ede4 100%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(248, 244, 237, 0.75);
    border-bottom: 1px solid rgba(216, 207, 196, 0.7);
}

.nav-wrap,
.footer-wrap,
.hero-inner,
.section-head,
.about-grid,
.contact-grid,
.modal-content {
    display: flex;
    gap: 1.5rem;
}

.nav-wrap {
    justify-content: space-between;
    align-items: center;
    min-height: 78px;
}

.brand {
    font-family: Georgia, serif;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
}

.site-logo {
    height: 48px;
    width: auto;
    display: block;
}

nav {
    display: flex;
    gap: 1.25rem;
    color: var(--muted);
}

.hero { padding: 6rem 0 3rem; }
.hero-inner {
    flex-direction: column;
    max-width: 820px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.76rem;
    color: var(--accent);
    font-weight: 700;
    margin: 0 0 1rem;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
    font-family: Georgia, serif;
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    line-height: 1;
    margin-bottom: 1rem;
}

h2 {
    font-family: Georgia, serif;
    font-size: clamp(2rem, 3.4vw, 3rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero-copy,
.about-section p,
.contact-section p,
.card-copy p,
#modalDescription {
    color: var(--muted);
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn {
    border-radius: 999px;
    padding: 0.92rem 1.25rem;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.btn-dark { background: var(--ink); color: white; }
.btn-light { background: transparent; border-color: var(--line); }

.catalog-section,
.about-section,
.contact-section {
    padding: 2rem 0 4rem;
}

.section-head {
    justify-content: space-between;
    align-items: end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}
.filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.product-grid {
    column-count: 3;
    column-gap: 1rem;
}

.product-card {
    break-inside: avoid;
    margin-bottom: 1rem;
}

.card-button {
    width: 100%;
    background: var(--paper);
    border: 1px solid rgba(216, 207, 196, 0.8);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    text-align: left;
    padding: 0;
}

.image-wrap {
    position: relative;
    overflow: hidden;
}

.image-wrap img {
    width: 100%;
    height: auto;
    transition: transform 0.45s ease;
}

.card-button:hover .image-wrap img {
    transform: scale(1.03);
}

.status-pill {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(246, 241, 232, 0.92);
    color: var(--ink);
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.card-copy {
    padding: 1rem 1rem 1.1rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-top: 0.9rem;
    color: var(--muted);
}

.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
}

.contact-form {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: var(--shadow);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-bottom: 0.9rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: white;
}

.form-status { min-height: 1.2rem; margin: 0.75rem 0 0; }
.site-footer { padding: 2rem 0 3rem; color: var(--muted); }
.footer-wrap { justify-content: space-between; flex-wrap: wrap; }

.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 40;
}
.modal.open { display: block; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(34, 29, 24, 0.62);
    backdrop-filter: blur(10px);
}
.modal-panel {
    position: relative;
    width: min(1080px, calc(100% - 2rem));
    margin: 3rem auto;
    background: var(--paper);
    border-radius: 28px;
    box-shadow: 0 20px 70px rgba(0,0,0,0.22);
    overflow: hidden;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: none;
    background: rgba(45, 42, 38, 0.08);
    cursor: pointer;
    z-index: 2;
}
.modal-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}
.modal-gallery {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    background: #efe6da;
}
.modal-gallery img {
    width: 100%;
    border-radius: 18px;
}
.modal-copy {
    padding: 4rem 1.4rem 1.4rem;
}
.detail-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.25rem;
}
.detail-item {
    padding-top: 0.7rem;
    border-top: 1px solid var(--line);
}
.hidden { display: none !important; }

.admin-shell {
    min-height: 100vh;
    background: #f5efe6;
    padding: 2rem 0 4rem;
}
.admin-card {
    max-width: 860px;
    margin: 0 auto;
    background: var(--paper);
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    padding: 1.5rem;
}
.admin-grid {
    display: grid;
    gap: 1rem;
}
.admin-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.table-wrap { overflow: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.inline-form { display: inline; }
.notice { padding: 0.9rem 1rem; border-radius: 14px; margin-bottom: 1rem; }
.notice.success { background: #e6f3e9; color: #234b2c; }
.notice.error { background: #fae6e2; color: #7d2b20; }

@media (max-width: 980px) {
    .product-grid { column-count: 2; }
    .modal-content, .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .product-grid { column-count: 1; }
    nav { display: none; }
    .modal-panel { margin: 1rem auto; }
}
