/* ================================================================
   INVENTORY, LISTING PAGE, FORMS, AND GENERAL PAGE PARTS
   Uses only tokens and type classes from brand.css.
   ================================================================ */

/* ACCESSIBILITY */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--color-green); color: var(--color-charcoal-deep); font-weight: 700; padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--color-green); outline-offset: 2px; }

/* MOBILE MENU PANEL */
.mobile-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--color-charcoal-deep); color: var(--color-text-on-dark); padding: 20px 0 28px; box-shadow: 0 18px 30px rgba(0,0,0,.3); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.mobile-nav[hidden] { display: none; }
.mobile-nav__list li a { display: block; padding: 12px 0; font-size: var(--ui-large-size); font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.1); }
.mobile-nav__label { margin: 22px 0 8px; color: var(--color-text-on-dark-secondary); }
.mobile-nav__types { columns: 2; column-gap: 20px; }
.mobile-nav__types li a { display: block; padding: 8px 0; color: var(--color-text-on-dark-secondary); }
@media (min-width: 901px) { .mobile-nav { display: none !important; } }

/* PAGE HEAD */
.page-head { background: var(--color-charcoal); color: var(--color-white); padding: calc(var(--space-lg) + 24px) 0 var(--space-md); }
.page-head .eyebrow { margin-bottom: 10px; color: var(--color-text-on-dark-secondary); }
.page-head .p-small { color: var(--color-text-on-dark-secondary); margin-top: 8px; }
.section--tight { padding: var(--space-md) 0 var(--space-xl); }
.section--below-badge { padding-top: 36px; }

/* TYPE CHIPS AND FILTER */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { display: inline-block; padding: 9px 16px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-white); font-weight: 600; font-size: var(--p-small-size); transition: background .15s ease, border-color .15s ease; }
.chip:hover { border-color: var(--color-charcoal); }
.chip.is-active { background: var(--color-charcoal); border-color: var(--color-charcoal); color: var(--color-white); }
.filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: var(--space-md); }
.filter__input, .filter__select { font: inherit; font-size: var(--input-size); padding: 13px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-white); color: var(--color-text); }
.filter__input { flex: 1 1 260px; }
.filter .btn { padding-top: 14px; padding-bottom: 14px; }
.empty { padding: var(--space-lg) 0; max-width: var(--reading-max); }
.empty .p-small { margin: 10px 0 20px; }

/* PAGINATION */
.pagination { margin-top: var(--space-lg); }
.pagination ul { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination a, .pagination span { display: inline-block; padding: 10px 16px; border: 1px solid var(--color-border); border-radius: var(--radius); font-weight: 700; background: var(--color-white); }
.pagination .current { background: var(--color-charcoal); border-color: var(--color-charcoal); color: var(--color-white); }
.pagination a:hover { border-color: var(--color-charcoal); }

/* LISTING PAGE */
.listing { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
.gallery__main { background: var(--color-light-grey); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.gallery__thumb { display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 4px; background: var(--color-charcoal); cursor: pointer; overflow: hidden; aspect-ratio: 1; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--color-green); }
.listing__body { margin-top: var(--space-md); }
.listing__body .h3 { margin: var(--space-md) 0 10px; }
.listing__body .h3:first-child { margin-top: 0; }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2, .entry-content h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.1; margin-top: 1.4em; }
.entry-content h2 { font-size: var(--h3-size); }
.entry-content h3 { font-size: var(--h4-size); }
.entry-content ul { list-style: disc; padding-left: 1.3em; }
.entry-content ol { list-style: decimal; padding-left: 1.3em; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--color-green); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.listing__side { position: sticky; top: calc(var(--header-h) + 24px); }
.panel { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.panel__title { margin: 8px 0 6px; }
.panel__loc { display: flex; align-items: center; gap: 6px; }
.panel__loc svg { width: 14px; height: 14px; color: var(--color-charcoal); }
.panel__price { margin: 18px 0 4px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.panel__price .price { font-size: var(--price-large-size); color: var(--color-charcoal); }
.panel__was { text-decoration: line-through; }
.panel__actions { display: grid; gap: 10px; margin: 20px 0; }
.panel__actions .btn { width: 100%; }
.facts { border-top: 1px solid var(--color-border); margin-top: 6px; }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--color-border); }
.facts dt { color: var(--color-text-secondary); font-weight: 600; }
.facts dd { font-weight: 700; text-align: right; }
.panel__form { margin-top: 20px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.panel__form summary { cursor: pointer; padding: 14px 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.panel__form summary::-webkit-details-marker { display: none; }
.panel__form summary::after { content: '+'; font-size: var(--h3-size); line-height: 1; }
.panel__form[open] summary::after { content: '\2212'; }
.panel__form > :not(summary) { padding: 0 16px 16px; }

/* CONTACT FORM 7 (the two existing forms, styled to the brand) */
.wpcf7 form { display: grid; gap: 14px; }
.wpcf7 .row { display: grid; gap: 14px; }
.wpcf7 label { display: block; font-size: var(--p-small-size); font-weight: 700; margin-bottom: 4px; }
.wpcf7 .form-control, .wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea { width: 100%; font: inherit; font-size: var(--input-size); padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-white); color: var(--color-text); }
.wpcf7 textarea { min-height: 110px; }
.wpcf7 .btn, .wpcf7 input[type="submit"] { width: 100%; background: var(--color-green); color: var(--color-charcoal-deep); font-family: var(--font-display); font-size: var(--button-size); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 14px 24px; border: 2px solid transparent; border-radius: var(--radius); cursor: pointer; }
.wpcf7-not-valid-tip, .wpcf7-response-output { font-size: var(--p-small-size); margin-top: 6px; }
.wpcf7-response-output { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 12px; margin: 0; }

/* RESPONSIVE */
@media (max-width: 1080px) { .listing { gap: var(--space-md); } }
@media (max-width: 900px) {
  .listing { grid-template-columns: 1fr; }
  .listing__side { position: static; order: -1; }
  .gallery__thumbs { grid-template-columns: repeat(4, 1fr); }
  .panel { padding: 22px; }
  .filter .btn { width: 100%; }
  .filter__select { flex: 1 1 100%; }
}

@media (max-width: 520px) { .panel__actions .btn { font-size: var(--ui-large-size); padding: 15px 12px; gap: 8px; } }

@media (max-width: 900px) { .section--below-badge { padding-top: 24px; } }

/* BACK LINK: top right of a listing page, beside the logo badge instead of under it */
.listing__back { display: flex; justify-content: flex-end; margin-bottom: 36px; }
.link-arrow--back .dot svg { transform: rotate(180deg); }
.link-arrow--back:hover .dot { transform: translateX(-3px); }
@media (max-width: 900px) { .listing__back { margin-bottom: 20px; } }
