:root {
    --bg: #faf7f7;
    --card: #ffffff;
    --text: #2a1c1c;
    --muted: #6d5e5e;
    --line: #eadada;
    --accent: #880000;
    --accent-dark: #660000;
    --soft: #f7eeee;
    --danger: #9f2a2a;
}

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

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.hero-card, .search-panel, .product-card, .disclaimer, .empty-state, .admin-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(136, 0, 0, 0.07);
}

.hero-card {
    padding: 34px;
    margin-bottom: 20px;
}
.hero-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 0 14px;
}
.brand-logo-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    border-radius: 999px;
}
.brand-logo-link:focus-visible {
    outline: 3px solid rgba(136, 0, 0, 0.28);
    outline-offset: 4px;
}
.brand-logo {
    width: 68px;
    max-width: 18vw;
    height: auto;
    display: block;
}
.hero-card h1 {
    margin: 0;
    text-align: left;
}
.hero-card .lead {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}
.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .82rem;
}
h1, h2 { line-height: 1.15; }
h1 { margin: 0 0 12px; font-size: clamp(2rem, 4vw, 3.25rem); }
.lead { max-width: 760px; font-size: 1.12rem; color: var(--muted); margin: 0 0 18px; }
.notice {
    margin: 0;
    padding: 14px 16px;
    background: var(--soft);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
}
.search-panel { padding: 22px; margin-bottom: 20px; }
.search-panel label { display: block; font-weight: 700; margin-bottom: 10px; }
.search-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px auto;
    gap: 10px;
}
input, select, textarea, button {
    font: inherit;
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 13px;
    background: #fff;
    color: var(--text);
}
textarea { min-height: 120px; resize: vertical; }
button, .button {
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
button:hover, .button:hover { background: var(--accent-dark); }
.button.secondary { background: #f4e8e8; color: var(--text); }
.button.secondary:hover { background: #ead6d6; }
.button.danger, button.danger { background: var(--danger); }
.result-summary { margin: 12px 0 0; color: var(--muted); }
.results { display: grid; gap: 16px; }
.product-card { padding: 24px; }
.product-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.product-heading h2 { margin: 0; font-size: 1.45rem; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.meta span, .status-pill {
    background: var(--soft);
    color: var(--accent-dark);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .85rem;
    font-weight: 700;
}
.status-pill.hidden { background: #f4e7e7; color: var(--danger); }
.product-field { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.product-field strong { color: var(--accent-dark); }
.product-field p { margin: 6px 0 0; }
.empty-state { padding: 26px; text-align: center; color: var(--muted); }
.disclaimer { padding: 22px; margin-top: 20px; }
.disclaimer h2 { margin-top: 0; }
.admin-nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-card { padding: 24px; margin-bottom: 18px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { background: var(--soft); }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.alert.success { background: #f7eeee; border: 1px solid #e1c2c2; }
.alert.error { background: #f7e4e4; border: 1px solid #e0b8b8; }
.small-text { color: var(--muted); font-size: .92rem; }
@media (max-width: 820px) {
    .page-shell { width: min(100% - 20px, 1120px); padding-top: 16px; }
    .hero-card, .search-panel, .product-card, .admin-card { padding: 18px; border-radius: 14px; }
    .hero-title-row { gap: 10px; justify-content: flex-start; }
    .brand-logo { width: 48px; max-width: none; }
    .search-grid, .form-grid.two { grid-template-columns: 1fr; }
    .product-heading { display: block; }
    .meta { justify-content: flex-start; margin-top: 10px; }
    .admin-table, .admin-table thead, .admin-table tbody, .admin-table th, .admin-table td, .admin-table tr { display: block; }
    .admin-table thead { display: none; }
    .admin-table tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
    .admin-table td { border-bottom: 0; }
    .admin-table td::before { content: attr(data-label); display: block; font-weight: 700; color: var(--muted); font-size: .8rem; margin-bottom: 2px; }
}
