/* ========== HIDE TAG FILTER BAR ========== */
#filterBar {
    display: none !important;
}

/* ========== BANNER IMAGE – square on mobile, widescreen with height limit ========== */
.banner-container {
    max-width: 1400px;
    margin: 1rem auto;
    padding: 0 0.75rem;
}

.banner-image-wrapper {
    width: 100%;
    max-height: 400px;           /* limit height on all screens */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image-wrapper img {
    width: 100%;
    height: auto;                /* maintain aspect ratio */
    max-height: 400px;           /* same as container */
    object-fit: contain;         /* show full image without cropping */
    display: block;
}

/* ====== Banner title + subtitle underneath banner image ====== */
.banner-copy {
    max-width: 1400px;
    margin: 0.6rem auto 0;
    padding: 0 0.75rem;
    text-align: center;
}
.page-title {
    font-size: 1.6rem;
    margin: 0.5rem 0 0.2rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
}
.page-subtitle {
    font-size: 1rem;
    margin: 0;
    color: var(--text-light);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

@media (min-width: 768px) {
    .page-title { font-size: 2rem; }
    .page-subtitle { font-size: 1.125rem; }
}

.banner-cta {
    width: 90%;
    max-width: 680px;
    margin: 1.2rem auto 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.banner-cta-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.8rem 0.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.3;
    text-decoration: none;
    color: white;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    text-align: center;
}

/* Primary – muted red */
.banner-cta-btn:first-child {
    background: #b71c1c;
}
.banner-cta-btn:first-child:hover {
    background: #8e0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(183,28,28,0.25);
}

/* Secondary – muted blue */
.banner-cta-btn:last-child {
    background: #3b82f6;
}
.banner-cta-btn:last-child:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59,130,246,0.25);
}

.banner-cta-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .banner-image-wrapper {
        max-height: 500px;       /* slightly taller on desktop */
    }
    .banner-image-wrapper img {
        max-height: 500px;
    }
    .banner-cta-btn {
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    .search-sort-row {
        display: block;
    }
    .search-sort-row .search-bar {
        width: 80%;
        margin: 0 auto;
    }
    .search-sort-row .search-bar input {
        width: 100%;
        display: block;
    }
    .sort-bar {
        display: none !important;
    }
    .zone-filter {
        display: none !important;
    }
}

/* ========== VIEW TOGGLE BUTTONS (icons) ========== */
.view-toggle .view-btn {
    background: none;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
    border-radius: 8px;
}
.view-toggle .view-btn.active {
    opacity: 1;
    background: var(--primary-red);
    border-radius: 8px;
}
.view-toggle .view-btn img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* ========== STORE GRID ========== */
.stores-grid {
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 0 0.75rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}
@media (min-width: 480px) {
    .stores-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .stores-grid { grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
}

/* ========== STORE CARD ========== */
.store-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    align-self: flex-start;
}
.store-card:active { transform: scale(0.98); }
@media (hover: hover) {
    .store-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 20px -8px rgba(0,0,0,0.15);
    }
}

/* ========== CARD IMAGE (1:1) ========== */
.card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
    flex-shrink: 0;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== CARD CONTENT ========== */
.card-content { 
    padding: 1rem;
    flex: 1 0 auto;            /* takes remaining space, top‑aligned */
    width: 100%;  
}
.store-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.store-name small {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--text-light);
}
.store-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}
.tag {
    background: var(--tag-bg);
    color: var(--primary-red);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-weight: 500;
}
.tag.category-tag {
    background: var(--primary-red);
    color: white;
    font-weight: 600;
}
.store-desc-wrap {
    margin: 0.5rem 0;
    min-height: 4.8em;
}
.store-desc {
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre-line;
    word-break: break-word;
}
.store-desc-collapsed {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}
.store-desc.expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}
.store-desc br {
    line-height: 1.5;
}
.store-desc p,
.store-desc ul,
.store-desc ol,
.store-desc li,
.store-desc strong,
.store-desc em,
.store-desc b,
.store-desc i,
.store-desc u {
    margin: 0;
    display: inline;
}
.store-desc a {
    color: var(--primary-red);
    text-decoration: underline;
}
.store-desc-toggle {
    display: inline-flex;
    align-items: center;
    margin-top: 0.35rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--primary-red);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}
.store-desc-toggle:hover,
.store-desc-toggle:focus-visible {
    text-decoration: underline;
}
.member-info {
    font-size: 0.75rem;
    color: var(--primary-red);
    margin-top: 0.5rem;
    border-top: 1px solid #eef2ff;
    padding-top: 0.5rem;
}

/* ========== LIST VIEW OVERRIDE ========== */
.stores-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}
.store-card.list-view {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}
.store-card.list-view .card-img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    padding: 0; /* remove padding so image fills the box */
    background: #f1f5f9;
    overflow: hidden;
}
.store-card.list-view .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* fill the box, crop if needed */
}
.store-card.list-view .card-content {
    flex: 1;
    padding: 0;
}
.store-card.list-view .store-name { font-size: 1.1rem; }
@media (max-width: 640px) {
    .store-card.list-view {
        flex-direction: column;
        text-align: center;
    }
    .store-card.list-view .card-img { margin: 0 auto; }
}

/* ========== MAP SECTION ========== */
.map-section {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 0.75rem;
}
.map-section h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}
.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--border-light);
}
.map-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
    display: block;
}
@media (min-width: 768px) {
    .map-container iframe { height: 400px; }
}

/* ========== CATEGORY FILTER ========== */
.category-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.category-filter label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dark);
}
.category-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.category-btn {
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    opacity: 0.7;
    white-space: nowrap;
}
.category-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}
.category-btn.active {
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .category-filter {
        justify-content: center;
        width: 100%;
    }
}


/* ========== MOBILE OVERRIDES ========== */
@media (max-width: 640px) {
    /* Grid view on mobile: 3 columns, only images */
    .stores-grid:not(.list-view) .store-card .card-content {
        display: none; /* hide all content */
    }
    .stores-grid:not(.list-view) .store-card {
        aspect-ratio: 1 / 1;
        padding: 0.25rem;
        background: transparent;
        box-shadow: none;
        border-radius: 8px;
        overflow: hidden;
    }
    .stores-grid:not(.list-view) .card-img {
        padding: 0;
        border-radius: 8px;
        background: #ffffff;
    }
    .stores-grid:not(.list-view) .card-img img {
        max-width: 100%;
        max-height: 100%;
        object-fit: cover;
    }
    .stores-grid:not(.list-view) {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    /* List view on mobile: revert to normal grid (with all details) */
    .stores-grid.list-view {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 0.8rem;
    }
    .stores-grid.list-view .store-card {
        display: block;
        flex-direction: column;
        padding: 0;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        border-radius: 16px;
        overflow: hidden;
        aspect-ratio: auto;
    }
    .stores-grid.list-view .store-card .card-img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        padding: 0.5rem;
        background: #ffffff;
    }
    .stores-grid.list-view .store-card .card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        max-width: 100%;
        max-height: 100%;
    }
    .stores-grid.list-view .store-card .card-content {
        display: block;
        padding: 0.5rem;
    }
    .stores-grid.list-view .store-card .store-name {
        font-size: 0.85rem;
        font-weight: 600;
    }
    .stores-grid.list-view .store-card .store-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.2rem;
    }
    .stores-grid.list-view .store-card .tag {
        font-size: 0.825rem;
        padding: 0.15rem 0.6rem;
    }
    .stores-grid.list-view .store-card .store-desc {
        display: block;
        font-size: .8rem;
        margin: 0.2rem 0;
    }
    .stores-grid.list-view .store-card .member-info {
        display: block;
        font-size: 1rem;
        padding-top: 0.2rem;
        margin-top: 0.2rem;
    }

    .stores-grid.list-view .store-card .store-name {
        display: block;
        font-size: 1rem;
        padding-top: 0.2rem;
        margin-top: 0.2rem;
    }

    .stores-grid.list-view .store-card .store-desc {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-height: none !important;
        display: block !important;
    }
}

/* ====== EVENTS ACCORDION (mobile-first) ====== */
.events-section {
    max-width: 1400px;
    margin: 0.75rem auto;
    padding: 0 0.75rem;
}
.events-accordion {
    display: block;
    width: 100%;
}
.accordion-empty {
    text-align: center;
    color: var(--text-light);
    padding: 0.75rem 0.5rem;
    font-size: 0.95rem;
}
.accordion-item {
    border-radius: 12px;
    overflow: hidden;
    margin: 0.5rem 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--border-light);
}
.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
}
.accordion-title { flex: 1; }
.accordion-meta {
    color: var(--text-light);
    font-weight: 500;
    margin-left: 0.6rem;
    white-space: nowrap;
}
.accordion-chevron {
    margin-left: 0.6rem;
    color: var(--text-light);
    transform-origin: center;
    transition: transform 220ms ease;
}
.accordion-header[aria-expanded="true"] .accordion-chevron { transform: rotate(-180deg); }

.accordion-panel {
    max-height: 0px;
    overflow: hidden;
    transition: max-height 260ms ease;
    background: #fff;
}
.accordion-panel-inner {
    padding: 0.75rem 1rem 1rem;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 639px) {
    .accordion-header {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: start;
        gap: 0.2rem 0.5rem;
    }
    .accordion-title {
        grid-column: 1 / -1;
        width: 100%;
        line-height: 1.35;
    }
    .accordion-meta {
        grid-column: 1;
        margin-left: 0;
        white-space: normal;
        font-size: 0.8rem;
        line-height: 1.35;
    }
    .accordion-chevron {
        grid-column: 2;
        margin-left: 0;
        align-self: center;
    }
}

@media (min-width: 640px) {
    .accordion-header { padding: 1rem 1.2rem; font-size: 1.05rem; }
    .accordion-panel-inner { padding: 1rem 1.2rem; font-size: 1rem; }
}


.contact-btn.primary {
    background: #0f766e;  /* teal – primary action */
}
.contact-btn.secondary {
    background: #6b7280;  /* grey – secondary action */
    margin-top: 0.5rem;
}
.contact-btn.primary:hover {
    background: #0d5c54;
}
.contact-btn.secondary:hover {
    background: #4b5563;
}