/* ============================================================
   LISTING PAGES — shared styles
   /Public/Businesses, /Public/Services, /Public/CreativeSpaces,
   town business lists, favorites grid (tt-results-grid)
   Loaded after public.css via _Layout.cshtml
   ============================================================ */

/* ------------------------------------------------------------
   1. Page header (.tt-page-header)
   ------------------------------------------------------------ */

.tt-page-header {
    padding: 36px 0 32px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.tt-page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: 0;
}

.tt-page-header__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}

.tt-page-header__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.tt-page-header__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.15;
}

.tt-page-header__sub {
    font-size: 0.88rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.tt-page-header__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: inherit;
}

.tt-page-header--businesses {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 60%, #bbf7d0 100%);
}

.tt-page-header--services {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 60%, #bfdbfe 100%);
}

.tt-page-header--creative {
    background: linear-gradient(135deg, #fdf4ff 0%, #f3e8ff 60%, #e9d5ff 100%);
}

.tt-page-header--explore {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 60%, #bae6fd 100%);
}

.tt-page-header--events {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 60%, #fed7aa 100%);
}

.tt-page-header--businesses .tt-page-header__pill {
    color: #15803d;
}

.tt-page-header--services .tt-page-header__pill {
    color: #1d4ed8;
}

.tt-page-header--creative .tt-page-header__pill {
    color: #7e22ce;
}

.tt-page-header--explore .tt-page-header__pill {
    color: #0369a1;
}

.tt-page-header--events .tt-page-header__pill {
    color: #c2410c;
}

.tt-page-header--businesses .tt-page-header__icon {
    color: #16a34a;
}

.tt-page-header--services .tt-page-header__icon {
    color: #2563eb;
}

.tt-page-header--creative .tt-page-header__icon {
    color: #9333ea;
}

.tt-page-header--explore .tt-page-header__icon {
    color: #0ea5e9;
}

.tt-page-header--events .tt-page-header__icon {
    color: #ea580c;
}

.tt-page-header--properties {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 55%, #a5f3fc 100%);
}

.tt-page-header--properties .tt-page-header__pill {
    color: #0f766e;
}

.tt-page-header--properties .tt-page-header__icon {
    color: #0d9488;
}

/* ------------------------------------------------------------
   1b. Quick category tiles (Businesses / Services / Creative listings)
   ------------------------------------------------------------ */

.tt-quick-categories {
    padding: 1.25rem 0 1.75rem;
    margin-top: 0;
    border-top: 1px solid #e2e8f0;
}

.tt-quick-categories--businesses {
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.85) 0%, #ffffff 55%);
}

.tt-quick-categories--services {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.9) 0%, #ffffff 55%);
}

.tt-quick-categories--creative {
    background: linear-gradient(180deg, rgba(253, 244, 255, 0.9) 0%, #ffffff 55%);
}

.tt-quick-categories > .container > h2 {
    font-size: 1.125rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.tt-quick-categories > .container > p {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.tt-quick-categories .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.tt-quick-categories .category-card {
    position: relative;
    text-align: center;
    padding: 12px 10px 11px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    text-decoration: none;
    color: #0f172a;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
}

.tt-quick-categories .category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--tt-qcat-accent, #94a3b8);
    border-radius: 12px 12px 0 0;
}

.tt-quick-categories .category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.12);
    text-decoration: none;
    color: #0f172a;
}

.tt-quick-categories .category-icon {
    font-size: 1.28rem;
    margin-bottom: 6px;
    color: var(--tt-qcat-accent, #64748b);
    line-height: 1;
}

.tt-quick-categories .category-icon .category-fallback-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    background: color-mix(in srgb, var(--tt-qcat-accent, #64748b) 14%, #ffffff);
    color: var(--tt-qcat-accent, #64748b);
}

.tt-quick-categories .category-card h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #0f172a;
    line-height: 1.25;
}

.tt-quick-categories .category-card p {
    font-size: 0.6875rem;
    line-height: 1.35;
    color: #64748b;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Accent rotation — businesses (greens & teals) */
.tt-quick-categories--businesses .category-card:nth-child(6n + 1) { --tt-qcat-accent: #16a34a; }
.tt-quick-categories--businesses .category-card:nth-child(6n + 2) { --tt-qcat-accent: #059669; }
.tt-quick-categories--businesses .category-card:nth-child(6n + 3) { --tt-qcat-accent: #0d9488; }
.tt-quick-categories--businesses .category-card:nth-child(6n + 4) { --tt-qcat-accent: #15803d; }
.tt-quick-categories--businesses .category-card:nth-child(6n + 5) { --tt-qcat-accent: #22c55e; }
.tt-quick-categories--businesses .category-card:nth-child(6n + 6) { --tt-qcat-accent: #047857; }

.tt-quick-categories--businesses .category-card:nth-child(6n + 1) { background: linear-gradient(165deg, rgba(240, 253, 244, 0.9) 0%, #ffffff 70%); }
.tt-quick-categories--businesses .category-card:nth-child(6n + 2) { background: linear-gradient(165deg, rgba(236, 253, 245, 0.85) 0%, #ffffff 70%); }
.tt-quick-categories--businesses .category-card:nth-child(6n + 3) { background: linear-gradient(165deg, rgba(204, 251, 241, 0.55) 0%, #ffffff 72%); }
.tt-quick-categories--businesses .category-card:nth-child(6n + 4) { background: linear-gradient(165deg, rgba(220, 252, 231, 0.85) 0%, #ffffff 70%); }
.tt-quick-categories--businesses .category-card:nth-child(6n + 5) { background: linear-gradient(165deg, rgba(187, 247, 208, 0.45) 0%, #ffffff 72%); }
.tt-quick-categories--businesses .category-card:nth-child(6n + 6) { background: linear-gradient(165deg, rgba(209, 250, 229, 0.75) 0%, #ffffff 70%); }

/* Services — blues */
.tt-quick-categories--services .category-card:nth-child(6n + 1) { --tt-qcat-accent: #2563eb; }
.tt-quick-categories--services .category-card:nth-child(6n + 2) { --tt-qcat-accent: #1d4ed8; }
.tt-quick-categories--services .category-card:nth-child(6n + 3) { --tt-qcat-accent: #0ea5e9; }
.tt-quick-categories--services .category-card:nth-child(6n + 4) { --tt-qcat-accent: #0369a1; }
.tt-quick-categories--services .category-card:nth-child(6n + 5) { --tt-qcat-accent: #4f46e5; }
.tt-quick-categories--services .category-card:nth-child(6n + 6) { --tt-qcat-accent: #0284c7; }

.tt-quick-categories--services .category-card:nth-child(6n + 1) { background: linear-gradient(165deg, rgba(239, 246, 255, 0.95) 0%, #ffffff 70%); }
.tt-quick-categories--services .category-card:nth-child(6n + 2) { background: linear-gradient(165deg, rgba(219, 234, 254, 0.75) 0%, #ffffff 72%); }
.tt-quick-categories--services .category-card:nth-child(6n + 3) { background: linear-gradient(165deg, rgba(224, 242, 254, 0.85) 0%, #ffffff 70%); }
.tt-quick-categories--services .category-card:nth-child(6n + 4) { background: linear-gradient(165deg, rgba(186, 230, 253, 0.5) 0%, #ffffff 72%); }
.tt-quick-categories--services .category-card:nth-child(6n + 5) { background: linear-gradient(165deg, rgba(238, 242, 255, 0.9) 0%, #ffffff 70%); }
.tt-quick-categories--services .category-card:nth-child(6n + 6) { background: linear-gradient(165deg, rgba(191, 219, 254, 0.65) 0%, #ffffff 72%); }

/* Creative — purples & magentas */
.tt-quick-categories--creative .category-card:nth-child(6n + 1) { --tt-qcat-accent: #9333ea; }
.tt-quick-categories--creative .category-card:nth-child(6n + 2) { --tt-qcat-accent: #7c3aed; }
.tt-quick-categories--creative .category-card:nth-child(6n + 3) { --tt-qcat-accent: #c026d3; }
.tt-quick-categories--creative .category-card:nth-child(6n + 4) { --tt-qcat-accent: #a855f7; }
.tt-quick-categories--creative .category-card:nth-child(6n + 5) { --tt-qcat-accent: #6d28d9; }
.tt-quick-categories--creative .category-card:nth-child(6n + 6) { --tt-qcat-accent: #db2777; }

.tt-quick-categories--creative .category-card:nth-child(6n + 1) { background: linear-gradient(165deg, rgba(253, 244, 255, 0.95) 0%, #ffffff 70%); }
.tt-quick-categories--creative .category-card:nth-child(6n + 2) { background: linear-gradient(165deg, rgba(243, 232, 255, 0.9) 0%, #ffffff 70%); }
.tt-quick-categories--creative .category-card:nth-child(6n + 3) { background: linear-gradient(165deg, rgba(250, 232, 255, 0.85) 0%, #ffffff 72%); }
.tt-quick-categories--creative .category-card:nth-child(6n + 4) { background: linear-gradient(165deg, rgba(233, 213, 255, 0.55) 0%, #ffffff 72%); }
.tt-quick-categories--creative .category-card:nth-child(6n + 5) { background: linear-gradient(165deg, rgba(237, 233, 254, 0.9) 0%, #ffffff 70%); }
.tt-quick-categories--creative .category-card:nth-child(6n + 6) { background: linear-gradient(165deg, rgba(252, 231, 243, 0.65) 0%, #ffffff 72%); }

/* ------------------------------------------------------------
   2. Filter bar (.tt-filter-bar / .tt-filter-form)
   ------------------------------------------------------------ */

.tt-filter-bar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 24px 0 20px;
    margin-bottom: 32px;
}

.tt-filter-form {
    max-width: 800px;
    margin: 0 auto;
}

.tt-filter-form__fields {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tt-filter-form__field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 160px;
}

.tt-filter-form__field--search {
    flex: 2;
}

.tt-filter-form__field--subcategory.d-none {
    display: none !important;
}

.tt-filter-form__label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tt-filter-form__select-wrap {
    width: 100%;
    position: relative;
}

.tt-filter-form__input,
.tt-filter-form__select {
    height: 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 0.875rem;
    color: #0f172a;
    background: #f8fafc;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.tt-filter-form__select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
}

.tt-filter-form__input:focus,
.tt-filter-form__select:focus {
    border-color: #0ea5e9;
    background-color: #ffffff;
    outline: none;
}

.tt-filter-form__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.tt-filter-form__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 44px;
    padding: 0 24px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.tt-filter-form__btn--search {
    background: #f59e0b;
    color: #ffffff;
    min-width: 120px;
}

.tt-filter-form__btn--search:hover {
    background: #d97706;
}

.tt-filter-form__btn--clear {
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}

.tt-filter-form__btn--clear:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ------------------------------------------------------------
   3. Results header (.tt-results-header)
   Listing pages ONLY — scoped so base.css h2 / Bootstrap reboot cannot
   override margins; flex gap controls spacing (not h2 margin-bottom).
   ------------------------------------------------------------ */

.business-search-page .tt-results-header,
.services-search-page .tt-results-header,
.creative-spaces-search-page .tt-results-header,
.town-businesses-page .tt-results-header {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 14px;
    margin: 0 0 1rem;
    padding: 10px 16px;
    background: linear-gradient(180deg, #f0f9ff 0%, #e8f6fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.business-search-page .tt-results-header > h2.tt-results-header__title,
.services-search-page .tt-results-header > h2.tt-results-header__title,
.creative-spaces-search-page .tt-results-header > h2.tt-results-header__title,
.town-businesses-page .tt-results-header > h2.tt-results-header__title {
    margin: 0;
    padding: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    flex: 1 1 auto;
    min-width: 0;
}

.business-search-page .tt-results-header > h2.tt-results-header__title span,
.services-search-page .tt-results-header > h2.tt-results-header__title span,
.creative-spaces-search-page .tt-results-header > h2.tt-results-header__title span,
.town-businesses-page .tt-results-header > h2.tt-results-header__title span {
    display: inline;
}

.business-search-page .tt-results-header > .tt-results-header__count,
.services-search-page .tt-results-header > .tt-results-header__count,
.creative-spaces-search-page .tt-results-header > .tt-results-header__count,
.town-businesses-page .tt-results-header > .tt-results-header__count {
    margin: 0;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0284c7;
    line-height: 1.2;
    flex-shrink: 0;
}

.business-search-page .search-results .tt-results-grid,
.services-search-page .search-results .tt-results-grid,
.creative-spaces-search-page .search-results .tt-results-grid,
.town-businesses-page .business-results .tt-results-grid {
    margin-bottom: 1.75rem;
}

.business-search-page .search-results-section,
.services-search-page .search-results-section,
.creative-spaces-search-page .search-results-section,
.town-businesses-page .results-section {
    padding-bottom: 2rem;
}

/* Active filters (listing search pages) */
.active-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background-color: var(--light-gray);
    border-radius: var(--radius-md);
}

.filters-label {
    font-weight: var(--font-medium);
    color: var(--charcoal);
    white-space: nowrap;
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background-color: var(--carolina-blue);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--body-small);
}

.remove-filter {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    padding: 0;
    margin-left: 0.25rem;
}

.remove-filter:hover {
    opacity: 0.8;
}

/* ------------------------------------------------------------
   4. Card grid (.tt-results-grid)
   ------------------------------------------------------------ */

.tt-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 0;
    margin-bottom: 2rem;
}

/* ------------------------------------------------------------
   5. Listing card (.tt-listing-card)
   ------------------------------------------------------------ */

.tt-listing-card {
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    min-height: 0;
    position: relative;
    padding: 0;
}

.service-card.tt-listing-card,
.creative-space-card.tt-listing-card,
.property-listing-card.tt-listing-card {
    height: 100%;
}

.tt-listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
    border-color: #cbd5e1;
}

.tt-listing-card__image-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    background: #e2e8f0;
    position: relative;
}

.tt-listing-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.tt-listing-card__image-wrap--fallback {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tt-listing-card__image-wrap--fallback::after {
    content: '\f54e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2rem;
    color: #bae6fd;
}

.tt-listing-card__image-wrap--service.tt-listing-card__image-wrap--fallback::after {
    content: '\f0ad';
}

.tt-listing-card__image-wrap--creative.tt-listing-card__image-wrap--fallback::after {
    content: '\f53f';
}

.tt-listing-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 2;
    max-width: calc(100% - 56px);
}

.tt-listing-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tt-listing-card__badge--featured {
    background: #f59e0b;
    color: #ffffff;
}

.tt-listing-card__badge--outdated {
    background: #ef4444;
    color: #ffffff;
}

.tt-listing-card__badge--needs-update {
    background: #f97316;
    color: #ffffff;
}

.tt-listing-card__badge--verified {
    background: #0ea5e9;
    color: #ffffff;
}

.tt-listing-card__badge--neutral {
    background: #64748b;
    color: #ffffff;
}

.tt-listing-card__body {
    padding: 16px 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tt-listing-card__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

h3.tt-listing-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin: 0;
    flex: 1;
    min-width: 0;
}

h3.tt-listing-card__title a {
    font-size: inherit;
    color: #0f172a;
    text-decoration: none;
}

h3.tt-listing-card__title a:hover {
    color: #0ea5e9;
}

.tt-listing-card__stars {
    margin-bottom: 4px;
}

.tt-listing-card__stars .rating-stars {
    display: flex;
    gap: 0.125rem;
    justify-content: flex-start;
}

.tt-listing-card__stars .star.filled {
    color: var(--hunyadi-yellow);
}

.tt-listing-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    margin-bottom: 0;
    align-items: center;
}

.tt-listing-card__tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 2px 8px;
    text-transform: lowercase;
}

.tt-listing-card__tags .category-pills-marketing {
    flex: 1;
    min-width: 0;
    margin: 0;
    justify-content: flex-start;
}

.tt-listing-card__location {
    padding: 0 !important;
    margin-top: 0 !important;
    display: block !important;
}

.tt-listing-card__location .location-pill {
    font-size: 0.78rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-top: 1px solid #f1f5f9;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    justify-content: flex-start;
}

.tt-listing-card__location .location-pill i {
    color: #94a3b8;
}

.tt-listing-card__amenities {
    padding: 0 !important;
    margin-top: 0 !important;
}

.tt-listing-card__amenities .business-services,
.tt-listing-card__amenities .service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 16px;
    justify-content: flex-start;
}

.tt-listing-card__amenity,
.tt-listing-card__amenities .service-tag,
.tt-listing-card__amenities .feature-tag {
    font-size: 0.72rem !important;
    color: #475569 !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 2px 7px !important;
}

.tt-listing-card__contact {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px;
    padding: 8px 16px !important;
    justify-content: flex-start !important;
}

.tt-listing-card__contact .contact-icons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.tt-listing-card__contact .tt-listing-card__contact-btn,
.tt-listing-card__contact-btn.contact-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f1f5f9;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: none;
}

.tt-listing-card__contact .tt-listing-card__contact-btn:hover,
.tt-listing-card__contact-btn.contact-icon:hover {
    background: #e0f2fe;
    color: #0ea5e9;
    transform: none;
}

.tt-listing-card__owner-active-wrap {
    padding: 0 !important;
    display: block !important;
}

.tt-listing-card__owner-active,
.tt-listing-card__owner-active-wrap .owner-activity-pill {
    margin: 8px 16px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #64748b;
    background: #f8fafc;
    border-radius: 999px;
    padding: 4px 10px;
    box-shadow: none;
}

.tt-listing-card__description {
    padding: 0 16px 12px !important;
    background: transparent !important;
    border: none !important;
    text-align: left !important;
}

.tt-listing-card__description .business-description,
.tt-listing-card__description .service-description {
    text-align: left;
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
}

.tt-listing-card .view-details-section {
    padding: 12px 16px 16px;
    margin-top: auto;
    background: transparent;
    border-top: 1px solid #f1f5f9;
}

.tt-listing-card .view-details-button {
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    background: #0ea5e9;
    color: #fff;
    box-shadow: none;
}

.tt-listing-card .view-details-button:hover {
    background: #0284c7;
    color: #fff;
    transform: none;
    box-shadow: none;
}

.tt-listing-card__image-wrap .favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--medium-gray);
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tt-listing-card__image-wrap .favorite-btn:hover {
    border-color: var(--orange-pantone);
    background-color: var(--orange-pantone);
    color: white;
}

.tt-listing-card__image-wrap .favorite-btn.is-favorite i {
    color: var(--orange-pantone);
}

.category-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

.tt-listing-card .category-pills-marketing {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    overflow: visible;
}

.tt-listing-card .category-pills-marketing .tt-listing-card__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.64rem;
    padding: 0.15rem 0.42rem;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word;
    line-height: 1.15;
    max-width: 100%;
    text-align: center;
}

.tt-listing-card .category-pills-marketing-static .tt-listing-card__tag {
    flex: 0 1 auto;
    max-width: calc(100% - 0.25rem);
}

.tt-listing-card .category-pills-marketing-marquee {
    flex-wrap: nowrap;
    overflow: hidden;
    width: 100%;
}

.tt-listing-card .category-pills-marketing-marquee .subcategory-marquee {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.tt-listing-card .category-pills-marketing-marquee .subcategory-marquee-inner {
    display: flex;
    width: max-content;
    animation: ttListingCardSubcategoryMarquee 48s linear infinite;
}

.tt-listing-card .category-pills-marketing-marquee .subcategory-marquee-track {
    display: flex;
    align-items: center;
    min-width: 100%;
    gap: 0.35rem;
    padding-inline: 0.2rem;
}

@keyframes ttListingCardSubcategoryMarquee {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tt-listing-card .category-pills-marketing-marquee .subcategory-marquee-inner {
        animation: none;
    }
}

/* ------------------------------------------------------------
   6. Pagination (.tt-pagination)
   ------------------------------------------------------------ */

.tt-pagination {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tt-pagination__inner {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tt-pagination__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.tt-pagination__btn:hover:not(.is-disabled) {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0ea5e9;
}

.tt-pagination__btn.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.tt-pagination__pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tt-pagination__page {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.tt-pagination__page:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.tt-pagination__page.is-active {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #ffffff;
    cursor: default;
    box-sizing: border-box;
}

.tt-pagination__ellipsis {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.tt-pagination__context {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ------------------------------------------------------------
   8. Tablet @media (max-width: 1024px)
   ------------------------------------------------------------ */

@media (max-width: 1024px) {
    .tt-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ------------------------------------------------------------
   Listing pages — max-width 768px (results strip + compact cards)
   ------------------------------------------------------------ */

@media (max-width: 768px) {
    .business-search-page .search-results-section,
    .services-search-page .search-results-section,
    .creative-spaces-search-page .search-results-section,
    .properties-search-page .search-results-section {
        padding-top: 0.5rem;
    }

    .town-businesses-page .results-section {
        padding-top: 0.5rem;
    }

    /* Slightly tighter strip on tablet; mobile refinements in 767px block */
    .business-search-page .tt-results-header,
    .services-search-page .tt-results-header,
    .creative-spaces-search-page .tt-results-header,
    .properties-search-page .tt-results-header,
    .town-businesses-page .tt-results-header {
        margin: 0 0 0.75rem;
        padding: 9px 14px;
        gap: 5px 10px;
        border-radius: 11px;
    }

    .business-search-page .tt-results-header > h2.tt-results-header__title,
    .services-search-page .tt-results-header > h2.tt-results-header__title,
    .creative-spaces-search-page .tt-results-header > h2.tt-results-header__title,
    .properties-search-page .tt-results-header > h2.tt-results-header__title,
    .town-businesses-page .tt-results-header > h2.tt-results-header__title {
        font-size: 1rem;
    }

    .tt-results-grid h3.tt-listing-card__title,
    .tt-results-grid h3.tt-listing-card__title a {
        font-size: 0.875rem;
        line-height: 1.28;
    }

    .tt-results-grid .tt-listing-card__body {
        padding: 8px 12px 10px;
    }

    .tt-results-grid .tt-listing-card__title-row {
        margin-bottom: 3px;
    }

    .tt-results-grid .tt-listing-card__tags {
        gap: 4px;
        margin-top: 5px;
    }

    .tt-results-grid .tt-listing-card__tag {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

/* ------------------------------------------------------------
   7. Mobile @media (max-width: 767px)
   ------------------------------------------------------------ */

@media (max-width: 767px) {
    .tt-filter-bar {
        padding: 16px 0 14px;
        margin-bottom: 20px;
    }

    .tt-filter-form__fields {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
    }

    .tt-filter-form__field,
    .tt-filter-form__field--search {
        flex: unset;
        width: 100%;
        min-width: unset;
    }

    .tt-filter-form__input,
    .tt-filter-form__select {
        height: 46px;
        font-size: 0.9rem;
    }

    .tt-filter-form__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .tt-filter-form__actions > .tt-filter-form__btn:only-child {
        grid-column: 1 / -1;
    }

    .tt-filter-form__btn {
        height: 46px;
        font-size: 0.85rem;
        padding: 0 12px;
        width: 100%;
        min-width: 0;
    }

    .tt-quick-categories .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 12px;
    }

    .tt-quick-categories .category-card {
        padding: 10px 8px 9px;
    }

    .tt-quick-categories .category-icon {
        font-size: 1.15rem;
    }

    .tt-results-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tt-listing-card__image-wrap {
        height: 160px;
    }

    .tt-listing-card__body {
        padding: 12px 12px 10px;
    }

    h3.tt-listing-card__title,
    h3.tt-listing-card__title a {
        font-size: 0.9rem;
        font-weight: 700;
    }

    .tt-listing-card__title-row {
        margin-bottom: 4px;
    }

    .tt-listing-card__tags {
        gap: 4px;
        margin-top: 4px;
        margin-bottom: 6px;
    }

    .tt-page-header {
        padding: 18px 0 14px;
    }

    .tt-page-header__inner {
        gap: 12px;
        align-items: center;
    }

    .tt-page-header__title {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }

    .tt-page-header__sub {
        font-size: 0.78rem;
    }

    .tt-page-header__icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .tt-page-header__pill {
        font-size: 0.63rem;
        padding: 3px 9px;
        margin-bottom: 5px;
    }

    /* Results strip: column stack, tight gap, modest radius (scoped — wins over tablet) */
    .business-search-page .tt-results-header,
    .services-search-page .tt-results-header,
    .creative-spaces-search-page .tt-results-header,
    .town-businesses-page .tt-results-header {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 3px;
        margin: 2px 0 10px;
        padding: 8px 12px;
        border-radius: 10px;
    }

    .business-search-page .tt-results-header > h2.tt-results-header__title,
    .services-search-page .tt-results-header > h2.tt-results-header__title,
    .creative-spaces-search-page .tt-results-header > h2.tt-results-header__title,
    .town-businesses-page .tt-results-header > h2.tt-results-header__title {
        font-size: 0.9375rem;
        line-height: 1.22;
        width: 100%;
    }

    .business-search-page .tt-results-header > .tt-results-header__count,
    .services-search-page .tt-results-header > .tt-results-header__count,
    .creative-spaces-search-page .tt-results-header > .tt-results-header__count,
    .town-businesses-page .tt-results-header > .tt-results-header__count {
        font-size: 0.72rem;
        width: 100%;
    }

    .tt-pagination__btn span {
        display: none;
    }

    .tt-pagination__btn {
        padding: 8px 10px;
    }

    .tt-pagination__page {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
    }

    .tt-pagination__inner {
        gap: 4px;
    }
}
