:root {
  --paper: #f7f4ec;
  --paper-deep: #eee8da;
  --ink: #1f241f;
  --muted: #625f55;
  --line: #d9d1c1;
  --green: #354521;
  --green-dark: #182a19;
  --olive: #687142;
  --gold: #b39a5e;
  --shadow: 0 10px 28px rgba(47, 43, 31, .07);
  --radius: 7px;
  --shell: min(1460px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.4; }
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
button, input, select { font: inherit; }
.shell { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: #fff; padding: .75rem 1rem; border-radius: 4px; }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 30; background: rgba(247,244,236,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark { width: 46px; color: #493f2b; flex: 0 0 auto; }
.brand strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 2.2vw, 2.25rem); line-height: 1; font-weight: 600; letter-spacing: -.035em; }
.brand small { display: block; margin-top: 5px; color: #626633; text-transform: uppercase; letter-spacing: .105em; font-size: .68rem; }
.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav > a { font-size: .84rem; font-weight: 750; text-transform: uppercase; text-decoration: none; }
.primary-nav > a:not(.button):hover { color: var(--olive); }
.nav-toggle { display: none; border: 0; background: transparent; padding: 10px; }
.nav-toggle span:not(.sr-only) { width: 26px; height: 2px; background: var(--ink); display: block; margin: 5px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 0; border-radius: 4px; padding: .72rem 1.1rem; text-decoration: none; text-transform: uppercase; font-weight: 800; letter-spacing: .02em; cursor: pointer; }
.button-dark { background: var(--green-dark); color: #fff; }
.button-primary { background: linear-gradient(180deg,#4c5e2d,#354521); color: #fff; box-shadow: 0 6px 14px rgba(43,58,27,.16); }
.button-secondary { background: var(--green); color: #fff; padding-inline: 1.1rem; }
.button:hover { filter: brightness(1.06); }

.catalog-intro { padding: 14px 0 10px; background: radial-gradient(circle at 68% 25%, #fff 0, rgba(255,255,255,.2) 35%, transparent 60%); }
.intro-grid { display: grid; grid-template-columns: minmax(430px, .9fr) minmax(470px, 1.1fr); align-items: center; gap: 30px; }
.eyebrow { margin: 0 0 5px; color: var(--olive); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .145em; }
.intro-copy h1 { margin: 0; max-width: 690px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3vw, 3.05rem); font-weight: 500; line-height: 1.02; letter-spacing: -.035em; }
.intro-summary { max-width: 720px; margin: 8px 0 10px; font-size: .92rem; color: #3f423d; }
.intro-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.appointment-inline { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; }
.round-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1.5px solid var(--olive); border-radius: 50%; color: var(--green); font-size: .95rem; }
.hero-art { height: 178px; overflow: hidden; border-radius: 10px; }
.hero-art svg { width: 100%; height: 100%; object-fit: cover; filter: drop-shadow(0 8px 18px rgba(69,61,40,.06)); }

.catalog-section { padding: 5px 0 18px; }
.filters { display: grid; grid-template-columns: minmax(360px, 2.4fr) minmax(170px, .8fr) minmax(150px, .7fr) auto; gap: 10px; }
.filters input, .filters select { width: 100%; height: 43px; border: 1px solid #d0cabd; border-radius: 5px; background: #fff; padding: 0 13px; color: var(--ink); }
.search-field { position: relative; }
.search-field > span:not(.sr-only) { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #6d6b64; font-size: 1.15rem; }
.search-field input { padding-left: 39px; }

.category-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 9px; margin: 10px 0 8px; }
.category-card { min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.5); text-decoration: none; box-shadow: 0 3px 10px rgba(38,35,27,.025); transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.category-card:hover { background: #fff; border-color: #aaa387; transform: translateY(-1px); }
.category-card strong { text-align: center; text-transform: uppercase; font-size: .69rem; line-height: 1.15; }
.category-icon { color: var(--olive); font-size: 1.2rem; flex: 0 0 auto; }

.catalog-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 31px; padding: 4px 2px 6px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.catalog-meta > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.catalog-meta strong { color: var(--ink); text-transform: uppercase; white-space: nowrap; }
.catalog-meta a { color: var(--green); font-weight: 800; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--olive); flex: 0 0 auto; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 7px; }
.section-heading h2 { margin: 0; text-transform: uppercase; color: #66703f; font-size: .98rem; letter-spacing: .08em; }

.item-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.item-card { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.58); box-shadow: 0 4px 14px rgba(38,35,27,.04); }
.item-card a { text-decoration: none; }
.item-image { aspect-ratio: 4 / 2.35; background: var(--image,linear-gradient(135deg,#4d4638,#9c8764)); position: relative; }
.item-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg,transparent 20%,rgba(0,0,0,.28)); }
.item-badge { position: absolute; z-index: 2; top: 0; left: 0; padding: .34rem .6rem; background: var(--green); color: #fff; font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.item-body { padding: 8px 9px 10px; }
.item-number { color: #49463f; font-size: .68rem; }
.item-card h3 { min-height: 2.35em; margin: .12rem 0 .28rem; font-size: .9rem; line-height: 1.18; }
.item-description { min-height: 2.7em; margin: 0; font-size: .73rem; color: #45433d; }
.item-footer { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 6px; }
.price { font-size: 1.02rem; font-weight: 800; color: #2e4321; }
.status { font-size: .59rem; font-weight: 900; text-transform: uppercase; color: #315028; }
.status.pending { color: #bd5a00; }
.status.sold { color: #73716b; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }

.principles { padding: 14px 0 28px; }
.principles-grid { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.42); }
.principles article { display: flex; gap: 12px; padding: 14px 16px; }
.principles article + article { border-left: 1px solid var(--line); }
.principles article > span { display: grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid var(--ink); border-radius: 50%; flex: 0 0 auto; font-size: 1.1rem; }
.principles h3 { margin: 0; font-size: .82rem; text-transform: uppercase; }
.principles p { margin: 2px 0 0; font-size: .76rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--paper-deep); }
.footer-inner { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); font-size: .82rem; }

@media (max-width: 1200px) {
  .primary-nav { gap: 16px; }
  .category-strip { grid-template-columns: repeat(4,1fr); }
  .item-grid { grid-template-columns: repeat(3,1fr); }
  .intro-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .header-inner { min-height: 68px; }
  .brand small { display: none; }
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 18px; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { text-align: center; }
  .intro-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .principles-grid { grid-template-columns: 1fr 1fr; }
  .principles article:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .principles article:nth-child(4) { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  :root { --shell: min(100% - 24px,1460px); }
  .brand-mark { width: 40px; }
  .brand strong { font-size: 1.35rem; }
  .catalog-intro { padding-top: 10px; }
  .intro-copy h1 { font-size: 2rem; }
  .intro-summary { font-size: .86rem; }
  .intro-actions { align-items: stretch; }
  .button-primary { width: 100%; }
  .appointment-inline { justify-content: center; width: 100%; }
  .category-strip { grid-template-columns: repeat(2,1fr); }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .catalog-meta span:last-child { display: none; }
  .item-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .item-description { min-height: 0; }
  .principles-grid { grid-template-columns: 1fr; }
  .principles article + article { border-left: 0; border-top: 1px solid var(--line); }
  .footer-inner { flex-direction: column; justify-content: center; text-align: center; padding: 17px 0; }
}

@media (max-width: 430px) {
  .item-grid { grid-template-columns: 1fr; }
  .brand strong { font-size: 1.2rem; }
}

/* PHP foundation refinements */
.brand-mark { width: 54px; height: 54px; object-fit: contain; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.hero-art { display: flex; align-items: center; justify-content: center; background: transparent; }
.hero-art img { width: 100%; height: 100%; object-fit: contain; }
.category-strip.compact .category-card { min-height: 48px; }
.item-image { background-size: cover; background-position: center; }
.item-image.has-photo::after { background: linear-gradient(145deg,transparent 55%,rgba(0,0,0,.14)); }
.item-card[hidden] { display: none; }
.page-section { min-height: 55vh; padding: 48px 0; }
.page-section h1 { margin: 0 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem,4vw,3.4rem); font-weight: 500; }
.narrow { max-width: 820px; }
.setup-notice { padding: 14px 16px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.5); }
.detail-price { font-size: 1.5rem; }
