html { background: var(--gf-outer-bg, #fff); }
body { background: var(--gf-outer-bg, #fff); color: var(--gf-text); font-family: var(--gf-font-body); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5 { font-family: var(--gf-font-heading); }
a { color: var(--gf-link); }
.text-muted, .text-secondary { color: var(--gf-muted) !important; }

/* Site shell: never wider than the max width (1800 px), content 90% of it */
.gf-shell { max-width: var(--gf-max-width, 1800px); margin-inline: auto; background: var(--gf-page-bg, #fff); min-height: 100vh; display: flex; flex-direction: column; }
.gf-container { width: var(--gf-inner-width, 90%); margin-inline: auto; }
.gf-main { flex: 1 0 auto; padding-bottom: 3rem; }

.gf-header { background: var(--gf-header-bg); border-bottom: 1px solid rgba(0,0,0,.06); position: sticky; top: 0; z-index: 1030; }
.gf-filterbar { background: var(--gf-page-bg, #fff); border-top: 1px solid rgba(0,0,0,.05); padding: .5rem 0 .6rem; }
.gf-filterbar .gf-filters { margin-bottom: 0; }
.gf-clear { font-size: .85rem; white-space: nowrap; align-self: center; }

/* CMS content pages */
.gf-page-body { font-size: 1.02rem; line-height: 1.7; }
.gf-page-body h2 { font-size: 1.35rem; margin: 1.8rem 0 .6rem; }
.gf-page-body h3 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
.gf-page-body p, .gf-page-body ul, .gf-page-body ol { margin-bottom: 1rem; }
.gf-page-body ul, .gf-page-body ol { padding-left: 1.4rem; }
.gf-page-body a { color: var(--gf-link); }
.gf-page-body hr { margin: 2rem 0; opacity: .3; }
.gf-header .navbar > .gf-container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.gf-header .nav-link, .gf-header .navbar-toggler { color: var(--gf-header-text); }
.gf-header .nav-link:hover { color: var(--gf-primary); }
.gf-header .navbar-toggler { border: 0; font-size: 1.75rem; }
.gf-logo { height: var(--gf-logo-h, 48px); width: auto; }

.gf-footer { background: var(--gf-footer-bg); color: var(--gf-footer-text); padding: 1.75rem 0; font-size: .95rem; }
.gf-footer a { color: var(--gf-footer-text); text-decoration: none; opacity: .9; }
.gf-footer a:hover { opacity: 1; text-decoration: underline; }

/* Buttons controlled by the Design settings */
.btn-gf { --bs-btn-bg: var(--gf-btn-bg); --bs-btn-color: var(--gf-btn-text); --bs-btn-border-color: var(--gf-btn-bg);
  --bs-btn-hover-bg: var(--gf-btn-hover); --bs-btn-hover-color: var(--gf-btn-text); --bs-btn-hover-border-color: var(--gf-btn-hover);
  --bs-btn-active-bg: var(--gf-btn-hover); --bs-btn-active-color: var(--gf-btn-text); --bs-btn-active-border-color: var(--gf-btn-hover);
  --bs-btn-disabled-bg: var(--gf-btn-bg); --bs-btn-disabled-border-color: var(--gf-btn-bg); --bs-btn-disabled-color: var(--gf-btn-text);
  border-radius: var(--gf-btn-radius); font-weight: 600; }
.btn { border-radius: var(--gf-btn-radius); }

/* Card grid: 1 column by default; theme_css() adds 2..6 columns at the configured breakpoints */
.gf-grid { display: grid; gap: var(--gf-gap, 24px); grid-template-columns: minmax(0, 1fr); }
.gf-card { background: var(--gf-card-bg); border: 1px solid var(--gf-card-border); border-radius: var(--gf-card-radius); box-shadow: var(--gf-card-shadow); overflow: hidden; display: flex; flex-direction: column; }

.gf-hero { padding: 3rem 0 2rem; text-align: center; }
.gf-hero h1 { font-weight: 700; }
.gf-auth { max-width: 460px; margin: 3rem auto; }
.gf-auth .card { background: var(--gf-card-bg); border-color: var(--gf-card-border); border-radius: var(--gf-card-radius); box-shadow: var(--gf-card-shadow); }
.gf-code-input { font-size: 1.75rem; letter-spacing: .5rem; text-align: center; font-weight: 600; }
.gf-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.gf-empty { border: 2px dashed var(--gf-card-border); border-radius: var(--gf-card-radius); padding: 3rem 1rem; text-align: center; color: var(--gf-muted); }

/* Business forms */
.gf-upload-preview { border: 1px dashed var(--gf-card-border, #ddd); border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fafafa; overflow: hidden; }
.gf-upload-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gf-logo-preview { height: 120px; padding: 8px; }
.gf-card-preview { max-width: 420px; }
.gf-card-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Listing cards */
.gf-card { position: relative; transition: transform .15s ease, box-shadow .15s ease; color: inherit; text-decoration: none; }
a.gf-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.12); color: inherit; }
.gf-card-media { position: relative; aspect-ratio: var(--gf-card-ratio, 16/10); background: #f3f4f5; }
.gf-card-media > img.gf-card-shot { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.gf-card-media.gf-card-media-logo { display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.gf-card-media.gf-card-media-logo img { max-width: 70%; max-height: 70%; object-fit: contain; }
.gf-card-logo { position: absolute; left: 12px; bottom: calc(var(--gf-card-logo-h, 72px) / -2.4); height: var(--gf-card-logo-h, 72px); min-width: var(--gf-card-logo-h, 72px); max-width: calc(100% - 24px); border-radius: 12px; background: #fff; border: 1px solid var(--gf-card-border); box-shadow: 0 2px 8px rgba(0,0,0,.08); display: flex; align-items: center; justify-content: center; padding: 5px; z-index: 2; }
.gf-card-logo img { height: auto; width: auto; max-height: 100%; max-width: 100%; object-fit: contain; }
.gf-card-body { padding: calc(var(--gf-card-logo-h, 72px) / 2.4 + .6rem) 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.gf-card-media-logo + .gf-card-body { padding-top: 1rem; }
.gf-card-title { font-size: 1.05rem; font-weight: 600; margin: 0; line-height: 1.3; }
.gf-card-teaser { font-size: .9rem; color: var(--gf-muted); margin: 0; flex: 1; }
.gf-card-meta { font-size: .8rem; color: var(--gf-muted); display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.gf-card-featured { position: absolute; top: 10px; right: 10px; z-index: 2; }
.gf-filters .form-control, .gf-filters .form-select { min-width: 0; }
.gf-biz-hero { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.gf-biz-logo { height: var(--gf-biz-logo-h, 160px); min-width: var(--gf-biz-logo-h, 160px); max-width: 100%; border: 1px solid var(--gf-card-border); border-radius: 16px; padding: 10px; background: #fff; display: flex; align-items: center; justify-content: center; }
.gf-biz-logo img { height: auto; width: auto; max-height: 100%; max-width: 100%; object-fit: contain; }
.gf-biz-shot { width: 100%; border-radius: var(--gf-card-radius); border: 1px solid var(--gf-card-border); }

.gf-ad-card { position: relative; display: block; aspect-ratio: 4 / 5; padding: 0; }
.gf-ad-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.gf-ad-label { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; font-weight: 600; letter-spacing: .03em; padding: .15rem .45rem; border-radius: 4px; z-index: 2; }
.gf-ad-side { max-width: 360px; }
.gf-ad-side .gf-ad-card { height: auto; }
.gf-flag { height: 1.4em; width: auto; vertical-align: -0.12em; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

/* Cookie notice (technically necessary cookies only) */
.gf-cookie-note { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1080; background: #1f1f1f; color: #fff; padding: .7rem 1rem; display: flex; gap: .75rem 1rem; align-items: center; justify-content: center; flex-wrap: wrap; font-size: .88rem; box-shadow: 0 -2px 10px rgba(0,0,0,.15); }
.gf-cookie-note[hidden] { display: none !important; }
.gf-cookie-note a { color: #fff; text-decoration: underline; }
.gf-cookie-ok { background: #fff; color: #1f1f1f; border: 0; border-radius: 6px; padding: .3rem 1.1rem; font-weight: 600; cursor: pointer; }
.gf-cookie-ok:hover { background: #e9ecef; }

/* Free-listings promo badge (homepage) */
.gf-free-badge { position: fixed; top: 84px; right: 16px; z-index: 1040; display: inline-flex; align-items: center; gap: .5rem; background: linear-gradient(135deg, #0d6efd, #6610f2); color: #fff; padding: .55rem 1rem; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.28); font-weight: 600; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.gf-free-badge:hover, .gf-free-badge:focus { color: #fff; text-decoration: none; }
.gf-free-badge-count { background: rgba(255,255,255,.28); border-radius: 999px; padding: .1rem .55rem; font-size: .72rem; font-weight: 700; }
@media (max-width: 576px) { .gf-free-badge { top: 70px; right: 10px; font-size: .8rem; padding: .45rem .8rem; } }
.gf-flag-lg { height: 1.9em; }
