:root {
    --bg: #f7f5f2;
    --surface: #ffffff;
    --surface-soft: #fff8f2;
    --text: #222326;
    --muted: #72747a;
    --line: #e7e1da;
    --primary: #d84f45;
    --primary-dark: #a73731;
    --accent: #16856a;
    --warning: #f6b33f;
    --shadow: 0 18px 45px rgba(48, 39, 32, 0.10);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    transition: padding-left 0.24s ease;
}

body.has-sidebar {
    padding-left: 286px;
}

body.sidebar-collapsed {
    padding-left: 88px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(231, 225, 218, 0.85);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.nav-links,
.footer-inner,
.action-row,
.detail-meta,
.card-meta {
    display: flex;
    align-items: center;
}

.brand {
    flex: 0 0 auto;
    width: auto;
    min-width: 150px;
    overflow: hidden;
    gap: 10px;
    font-weight: 900;
    font-size: 1.22rem;
}

.brand img {
    width: 46px !important;
    height: 46px !important;
    max-height: 46px !important;
    object-fit: contain;
    object-position: left center;
    border-radius: 12px;
}

.brand span {
    line-height: 1;
}

.nav-links {
    gap: 12px;
    color: #3b3d42;
}

.nav-links a,
.nav-user,
.link-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-links a:hover,
.link-button:hover {
    color: var(--primary-dark);
    background: #fff0ed;
    transform: translateY(-1px);
}

.nav-user {
    color: var(--muted);
    background: #f7f5f2;
}

.nav-toggle {
    width: 42px;
    min-height: 42px;
    display: inline-grid;
    place-items: center;
    order: -1;
    padding: 0;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 0;
    box-shadow: 0 10px 24px rgba(48, 39, 32, 0.08);
    cursor: pointer;
}

.nav-toggle::before {
    content: "";
    width: 18px;
    height: 12px;
    display: block;
    background:
        linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
        linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
        linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
    border-radius: 2px;
}

.nav-toggle:hover {
    color: var(--primary);
    border-color: rgba(216, 79, 69, 0.35);
}

.button,
.link-button {
    border: 0;
    cursor: pointer;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
    font-weight: 750;
    box-shadow: 0 12px 28px rgba(216, 79, 69, 0.24);
}

.button:hover {
    background: var(--primary-dark);
}

.button-small {
    min-height: 36px;
    padding-inline: 14px;
    font-size: 0.92rem;
}

.button.ghost {
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: none;
}

.full {
    width: 100%;
}

.link-button {
    padding: 0;
    color: var(--primary);
    background: transparent;
    font-weight: 700;
}

.hero {
    padding: 76px 0 54px;
    background:
        linear-gradient(120deg, rgba(255, 248, 242, 0.94), rgba(247, 245, 242, 0.98)),
        url("../images/market-pattern.svg");
    background-size: cover;
    border-bottom: 1px solid var(--line);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 42px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(2.15rem, 4vw, 4.1rem);
    line-height: 1.02;
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.hero-copy p,
.page-hero p {
    max-width: 660px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.65;
}

.search-panel,
.filters-panel,
.form-card,
.reviews-panel,
.info-block,
.empty-state {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 30px;
    padding: 14px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
}

input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    appearance: none;
    display: inline-grid;
    place-items: center;
    border: 1px solid #d8cec3;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(-45deg) scale(0);
    transition: transform 0.14s ease;
}

input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

input[type="checkbox"]:checked::before {
    transform: rotate(-45deg) scale(1);
}

.check-row {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(216, 79, 69, 0.7);
    box-shadow: 0 0 0 4px rgba(216, 79, 69, 0.12);
}

.hero-preview {
    display: grid;
    gap: 16px;
}

.mini-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 16px;
    align-items: center;
    min-height: 132px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.mini-card:nth-child(2) {
    transform: translateX(28px);
}

.mini-card img {
    width: 112px;
    height: 108px;
    object-fit: cover;
    border-radius: 8px;
}

.mini-card strong,
.mini-card small {
    display: block;
}

.mini-card strong {
    margin-bottom: 8px;
    font-size: 1.08rem;
}

.mini-card small {
    color: var(--muted);
}

.section {
    padding: 54px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading.tight {
    margin-bottom: 14px;
}

.section-heading a {
    color: var(--primary);
    font-weight: 800;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.category-tile {
    min-height: 142px;
    display: grid;
    align-content: center;
    gap: 9px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.category-tile:hover,
.business-card:hover {
    border-color: rgba(216, 79, 69, 0.5);
    transform: translateY(-2px);
}

.category-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: white;
    background: var(--accent);
    border-radius: 8px;
    font-weight: 900;
}

.category-tile small,
.muted {
    color: var(--muted);
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.business-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 14px 30px rgba(48, 39, 32, 0.07);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.business-card:hover,
.category-tile:hover,
.mini-card:hover {
    box-shadow: 0 22px 46px rgba(48, 39, 32, 0.12);
}

.business-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.business-card-body {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.business-card h2,
.business-card h3 {
    margin-bottom: 0;
    font-size: 1.12rem;
    line-height: 1.25;
}

.business-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.business-card.horizontal a {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.business-card.horizontal img {
    height: 100%;
    min-height: 178px;
    aspect-ratio: auto;
}

.pill {
    width: fit-content;
    padding: 5px 9px;
    color: var(--primary-dark);
    background: #fff0ed;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 850;
}

.card-meta {
    flex-wrap: wrap;
    gap: 8px;
    color: #4a4d52;
    font-size: 0.9rem;
}

.card-meta span,
.detail-meta span {
    padding: 6px 9px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: 286px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    padding: 18px 14px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(167, 55, 49, 0.96), rgba(43, 41, 39, 0.98)),
        radial-gradient(circle at 80% 8%, rgba(246, 179, 63, 0.24), transparent 34%),
        radial-gradient(circle at 18% 48%, rgba(22, 133, 106, 0.24), transparent 30%);
    box-shadow: 18px 0 46px rgba(48, 39, 32, 0.18);
    transition: width 0.24s ease, transform 0.24s ease;
}

.side-head,
.side-link,
.side-user,
.side-logout {
    display: flex;
    align-items: center;
}

.side-head {
    gap: 12px;
    min-height: 58px;
    padding: 8px 10px;
    font-weight: 900;
    font-size: 1.15rem;
}

.side-head img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 14px;
}

.side-nav {
    display: grid;
    align-content: start;
    gap: 8px;
}

.side-link,
.side-user,
.side-logout {
    gap: 12px;
    min-height: 52px;
    padding: 9px 10px;
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid transparent;
    border-radius: 14px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.side-link:hover,
.side-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateX(2px);
}

.side-icon,
.user-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 900;
}

.side-label,
.side-user-text,
.side-head span {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.18s ease, width 0.18s ease;
}

.side-foot {
    display: grid;
    gap: 8px;
}

.side-user {
    background: rgba(255, 255, 255, 0.10);
}

.side-user-text strong,
.side-user-text small {
    display: block;
}

.side-user-text small {
    color: rgba(255, 255, 255, 0.68);
}

.side-logout {
    width: 100%;
    border: 0;
    cursor: pointer;
    background: transparent;
    text-align: left;
    font-weight: 800;
}

.side-logout:hover {
    background: rgba(255, 255, 255, 0.10);
}

body.sidebar-collapsed .app-sidebar {
    width: 88px;
}

body.sidebar-collapsed .side-head,
body.sidebar-collapsed .side-link,
body.sidebar-collapsed .side-user,
body.sidebar-collapsed .side-logout {
    justify-content: center;
}

body.sidebar-collapsed .side-label,
body.sidebar-collapsed .side-user-text,
body.sidebar-collapsed .side-head span {
    width: 0;
    opacity: 0;
}

.sidebar-scrim {
    display: none;
}

.page-hero {
    padding: 46px 0;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.directory-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 32px 0 58px;
}

.filters-panel {
    position: sticky;
    top: 92px;
    align-self: start;
    padding: 18px;
}

.filters-panel form,
.stack-form,
.review-form {
    display: grid;
    gap: 14px;
}

.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.pagination a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 800;
}

.pagination a.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

.business-cover {
    padding: 42px 0;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
}

.business-cover-grid {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 32px;
    align-items: center;
}

.business-cover img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.detail-meta,
.action-row {
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta {
    margin: 18px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    padding: 34px 0 58px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 20px;
}

.info-block,
.reviews-panel,
.form-card {
    padding: 22px;
}

.info-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.info-list div {
    display: grid;
    gap: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.info-list dt {
    color: var(--muted);
    font-weight: 800;
}

.info-list dd {
    margin: 0;
}

.product-list,
.review-list {
    display: grid;
    gap: 12px;
}

.product-row {
    display: grid;
    grid-template-columns: 82px 1fr auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: #fbfaf8;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.product-row p,
.review p {
    margin: 4px 0 0;
    color: var(--muted);
}

.product-row img {
    width: 82px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.product-row small,
.reservation-row small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.is-muted {
    opacity: 0.68;
}

.reply {
    margin-top: 10px;
    padding: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.reply p {
    margin-bottom: 0;
}

.inline-reply {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 10px;
}

.reservation-list,
.delivery-grid {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.reservation-row,
.delivery-card {
    padding: 16px;
    background: #fbfaf8;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.delivery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.delivery-card {
    display: grid;
    gap: 10px;
}

.delivery-card h2,
.delivery-card p {
    margin-bottom: 0;
}

.icon-danger {
    width: 32px;
    height: 32px;
    border: 1px solid #f0c5c0;
    color: var(--primary-dark);
    background: #fff5f3;
    border-radius: 8px;
    cursor: pointer;
}

.text-action {
    color: var(--primary);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.inline-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.review {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.review div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.notice {
    padding: 12px;
    color: var(--accent);
    background: #eef9f4;
    border: 1px solid #cfeade;
    border-radius: 8px;
}

.narrow-page {
    max-width: 760px;
    padding: 46px 0 64px;
}

.form-card {
    max-width: 720px;
    margin-inline: auto;
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.delete-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.delete-form button {
    color: var(--primary-dark);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.form-note {
    margin: 16px 0 0;
    color: var(--muted);
}

.form-note a {
    color: var(--primary);
    font-weight: 800;
}

.flash {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 750;
}

.flash-success {
    color: #12614f;
    background: #e9f8f3;
    border: 1px solid #bfe6d8;
}

.flash-error {
    color: #8d2d27;
    background: #fff0ed;
    border: 1px solid #f0c5c0;
}

.empty-state {
    padding: 28px;
    text-align: center;
}

.is-hidden {
    display: none !important;
}

.flash-area:empty {
    display: none;
}

.site-footer {
    padding: 44px 0 22px;
    color: #d9d4ce;
    background: #2b2927;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 28px;
    align-items: start;
}

.footer-grid h2 {
    margin-bottom: 14px;
    color: #fff;
    font-size: 0.98rem;
}

.footer-grid a,
.footer-grid span,
.footer-grid p,
.footer-brand strong {
    display: block;
    margin-bottom: 10px;
    color: #d9d4ce;
    line-height: 1.55;
}

.footer-grid a:hover {
    color: #fff;
}

.footer-brand img {
    width: 172px;
    height: 50px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 12px;
    filter: brightness(1.12);
}

.footer-brand p {
    max-width: 340px;
}

.footer-brand strong,
.social-link {
    color: #fff !important;
    font-weight: 800;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 30px;
    padding-top: 18px;
    color: #bcb5ad;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
}

.complaint-hero {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.complaint-note,
.complaint-side {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.complaint-note span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.complaint-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    padding: 38px 0 60px;
    align-items: start;
}

.complaint-side {
    position: sticky;
    top: 92px;
}

.complaint-side p {
    color: var(--muted);
    line-height: 1.65;
}

.complaint-side a {
    color: var(--primary);
    font-weight: 800;
}

@media (max-width: 920px) {
    body.has-sidebar,
    body.sidebar-collapsed {
        padding-left: 0;
    }

    .app-sidebar {
        transform: translateX(-105%);
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-scrim {
        position: fixed;
        inset: 0;
        z-index: 45;
        display: block;
        opacity: 0;
        pointer-events: none;
        background: rgba(34, 35, 38, 0.36);
        border: 0;
        transition: opacity 0.2s ease;
    }

    body.sidebar-open .sidebar-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links {
        display: none;
    }

    .hero-grid,
    .directory-layout,
    .business-cover-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .category-grid,
    .business-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters-panel {
        position: static;
    }

    .inline-form,
    .footer-grid,
    .complaint-hero,
    .complaint-layout,
    .delivery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .complaint-side {
        position: static;
    }
}

@media (max-width: 680px) {
    .nav {
        min-height: 64px;
    }

    .brand {
        min-width: 0;
    }

    .brand img {
        width: 42px !important;
        height: 42px !important;
        max-height: 42px !important;
    }

    .nav-toggle {
        min-height: 42px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding-top: 48px;
    }

    .search-panel,
    .category-grid,
    .business-grid,
    .business-card.horizontal a,
    .two-cols,
    .inline-form {
        grid-template-columns: 1fr;
    }

    .mini-card:nth-child(2) {
        transform: none;
    }

    .mini-card {
        grid-template-columns: 96px 1fr;
    }

    .mini-card img {
        width: 96px;
        height: 92px;
    }

    .section-heading,
    .results-bar,
    .footer-bottom {
        align-items: start;
        flex-direction: column;
    }

    .business-card.horizontal img {
        min-height: auto;
        aspect-ratio: 16 / 10;
    }

    .product-row,
    .footer-grid,
    .complaint-hero,
    .complaint-layout,
    .delivery-grid {
        grid-template-columns: 1fr;
    }

    .product-row img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
