/* =============================================================
   suppliers.css  –  Suppliers page styles
   Design: Dark teal/green theme matching the design mockup
   BEM naming convention for easy future updates
   ============================================================= */

/* ── CSS Custom Properties (easy to theme-change) ── */
:root {
    --color-bg:           #0a2a2a;       /* page background deep teal */
    --color-bg-mid:       #0d3535;       /* section mid bg */
    --color-card-bg:      #ffffff;       /* vendor card background */
    --color-card-border:  #e8e8e8;       /* card border */
    --color-card-shadow:  rgba(0,0,0,0.18);

    --color-primary:      #00c896;       /* teal accent (links, active heart) */
    --color-green-dot:    #4caf50;       /* open status dot */
    --color-heart-fav:    #00c896;       /* favorited heart teal */
    --color-heart-idle:   #b0bec5;       /* unfavorited heart grey */

    --color-name:         #1a2e2e;       /* vendor name text */
    --color-address:      #4a5568;       /* address / phone text */
    --color-website:      #009BAA;       /* visit website link */

    --color-view-more:    #00c896;       /* "View More >>" link */

    --color-qa-bg:        #0d3535;
    --color-qa-accent:    #4ade80;       /* hex badge / "leg work" highlight */

    --color-cta-bg:       #0a2a2a;
    --color-cta-text:     #e2f8f0;
    --color-cta-btn-bg:   #f0d000;       /* yellow CTA button */
    --color-cta-btn-text: #1a2e2e;

    --radius-card:        10px;
    --transition-fast:    0.2s ease;
    --transition-med:     0.35s ease;

    --grid-cols:          4;             /* change here = whole layout changes */
    --grid-gap:           1rem;
    --card-padding:       1rem;
    --suppliers-max:      1280px;
}

/* ── Reset / Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.suppliers-page {
    font-family: 'Roboto', sans-serif;
    /* background:
      radial-gradient(120% 30% at 52% 18%, rgba(27, 244, 203, 0.78) 0%, rgba(27, 244, 203, 0.24) 32%, rgba(27, 244, 203, 0) 60%),
      radial-gradient(28% 65% at 0% 78%, rgba(61, 244, 214, 0.62) 0%, rgba(61, 244, 214, 0.18) 44%, rgba(61, 244, 214, 0) 78%),
      linear-gradient(180deg, #041f45 0%, #0a6e79 21%, #0b666e 34%, #09505a 58%, #084952 100%); */
    min-height: 100%;
    position: relative;
}

body.homepage:has(.suppliers-page) {
    background-position: center top;
}

.suppliers-page,
.suppliers-search-filters > div,
.suppliers-section,
.qa-banner,
.cta-bar {
    width: 100%;
    max-width: var(--suppliers-max);
    margin-left: auto;
    margin-right: auto;
}


.suppliers-page .hero-strip {
    /* background: radial-gradient(circle at 20% 20%, rgba(0, 255, 190, .15) 0%, rgba(0, 255, 190, 0) 40%), linear-gradient(180deg, #066270 0%, #045260 100%); */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.suppliers-page .hero-strip-inner {
    max-width: var(--suppliers-max);
    margin: 0 auto;
    padding: 48px 30px 48px;
    text-align: left;
}
.suppliers-page .hero-title {
    font-family: 'Wix Madefor Display', sans-serif;
    font-size: clamp(2rem, 2.8vw, 3.1rem);
    font-weight: 700;
    color: #ecfeff;
    letter-spacing: 0.01em;
    line-height: 1.1;
    text-align: center;
}

.suppliers-page .solved-text {
    color: #e5ff14;
    font-family: 'Permanent Marker', cursive;
    font-size: 1.08em;
    margin-left: 8px;
    font-style: normal;
    font-weight: 400;
}

/* ── Page wrapper (suppliers section) ── */
.suppliers-section {
    background: transparent;
    padding: 2rem 5rem 1rem;
    min-height: 20vh;
}

/* ── Grid ── */
.suppliers-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), 1fr);
    /* gap: var(--grid-gap); */
    column-gap: 16px;
    row-gap: 28px;
}

/* ── Hidden cards (shown by View More jQuery) ── */
.vendor-card--hidden {
    display: none;    /* jQuery toggles this */
}

/* ── Vendor Card ── */
.vendor-card {
    background: #fff;
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-card);
    padding: var(--card-padding);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 2px 8px var(--color-card-shadow);
    transition: transform var(--transition-fast),
                box-shadow var(--transition-fast);
    position: relative;
}

.vendor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px var(--color-card-shadow);
}

/* Card Header: name + badges row */
.vendor-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.vendor-card__name {
    font-family: 'URWDIN-Bold', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #0e5862;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
    flex: 1;
}

/* Badges container (status dot + heart) */
.vendor-card__badges {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    padding-top: 2px;
}

/* ── Status dot ── */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot--open   { background: #00FFB5; }
.status-dot--closed { background: #e53935; }

/* ── Favorite / Heart Button ── */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
    line-height: 1;
}

.favorite-btn:hover {
    transform: scale(1.25);
}

.favorite-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    border-radius: 50%;
}

.heart-icon {
    width: 16px;
    height: 16px;
    color: var(--color-heart-idle);
    transition: color var(--transition-fast), fill var(--transition-fast);
}

/* Filled / active state */
.favorite-btn.favorited .heart-icon {
    color: var(--color-heart-fav);
    fill: var(--color-heart-fav);
}

/* Pop animation on toggle */
.favorite-btn.pop {
    animation: heartPop 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.suppliers-search-fields input::placeholder {
    font-weight: 600;  /* weight change */
}

@keyframes heartPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.45); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* ── Card Body: info + logo row ── */
.vendor-card__body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.15rem;
}

.vendor-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.vendor-card__address,
.vendor-card__city,
.vendor-card__phone {
    font-size: 0.72rem;
    color: var(--color-address);
    line-height: 1.5;
}

.vendor-card__website {
    font-size: 0.72rem;
    color: var(--color-website);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color var(--transition-fast);
    width: fit-content;
    text-decoration: underline;
}

.vendor-card__website:hover {
    text-decoration-color: var(--color-website);
}

/* ── Vendor Logo ── */
.vendor-card__logo-wrap {
    flex-shrink: 0;
    width: 108px;
    /* height: 48px; */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: absolute;
    right: 12px;
    bottom: 8px;
}

.vendor-card__logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.vendor-card__distance {
    font-size: 0.68rem;
    color: #0e5862;
    font-weight: 600;
    margin-top: 0.15rem;
}

.vendor-card__website--muted {
    color: #94a3af;
    text-decoration: none;
    cursor: default;
    pointer-events: none;
}

.vendor-card__logo-wrap--placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(0, 255, 181, 0.35), rgba(0, 155, 170, 0.25));
    display: flex;
    align-items: center;
    justify-content: center;
    position: static;
    margin-left: auto;
}

.vendor-card__logo-letter {
    font-family: 'URWDIN-Bold', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0e5862;
}

/* ── Map + directory chrome ── */
.suppliers-section--map {
    padding-top: 0;
    min-height: unset;
}

.suppliers-map-panel {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 181, 0.25);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    background: #042a2e;
}

.suppliers-map {
    width: 100%;
    height: min(52vh, 420px);
    min-height: 280px;
    z-index: 1;
}

.suppliers-map-hint {
    margin: 0;
    padding: 0.65rem 1rem 0.85rem;
    font-size: 0.8rem;
    color: rgba(226, 248, 240, 0.85);
    background: rgba(4, 42, 46, 0.95);
}

.suppliers-results-meta {
    font-size: 0.85rem;
    color: rgba(226, 248, 240, 0.92);
    margin: 0 0 1rem;
    min-height: 1.25rem;
    font-weight: 500;
}

.suppliers-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 1.5rem;
    color: rgba(226, 248, 240, 0.9);
    font-size: 0.95rem;
    line-height: 1.55;
    border: 1px dashed rgba(0, 255, 181, 0.35);
    border-radius: var(--radius-card);
    background: rgba(4, 42, 46, 0.35);
}

/* Google Maps fills #suppliersMap; roadmap styling comes from Google */
.gm-style .gm-style-iw.gm-style-iw-c .gm-style-iw-d,
.gm-style .gm-style-iw.gm-style-iw-c .gm-style-iw-d > div,
.gm-style .gm-style-iw.gm-style-iw-c strong {
    color: #000000 !important;
}

/* ── View More Link ── */
.view-more-wrap {
    margin-top: 1.25rem;
    padding-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.view-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #00FFB5;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity var(--transition-fast),
                letter-spacing var(--transition-fast);
    text-decoration: underline;
}

.view-more-link:hover {
    opacity: 0.8;
    letter-spacing: 0.06em;
}

/* ── Quality Assurance Banner ── */
.qa-banner {
    background: transparent;
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: center;
}

.qa-banner__inner {
    display: flex;
    align-items: center;
    gap: 3.25rem;
    max-width: 860px;
}

.qa-hex {
    width: 130px;
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(74,222,128,0.35));
}

.qa-banner__text {
    flex: 1;
}

.qa-banner__title {
    font-family: 'Wix Madefor Display', sans-serif;
    font-size: 26px;
    font-weight: 400;
    color: #e2f8f0;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.qa-banner__highlight {
    color: #00FFB5;
    /* font-style: italic; */
}

.qa-banner__desc {
    font-size: 15px;
    color: #fff;
    line-height: 1.7;
    font-weight: 400;
}

/* ── CTA Bar ── */
.cta-bar {
    background: transparent;
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    /* border-top: 1px solid rgba(255,255,255,0.06); */
}

.cta-bar__text {
    font-size: 22px;
    color: #fff;
    font-weight: 400;
}

.cta-bar__btn {
    display: inline-block;
    background: var(--color-cta-btn-bg);
    color: var(--color-cta-btn-text);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.65rem 1.4rem;
    border-radius: 4px;
    white-space: nowrap;
    transition: background var(--transition-fast), transform var(--transition-fast);
    flex-shrink: 0;
}

.cta-bar__btn:hover {
    background: #ffe033;
    transform: translateY(-1px);
}


/* =============================================================
   RESPONSIVE BREAKPOINTS
   Adjust --grid-cols per breakpoint so nothing else needs changing
   ============================================================= */

/* Large desktop (default): 4 columns */

/* Medium desktop / laptop */
@media (max-width: 1100px) {
    .suppliers-section { padding: 1.5rem 1.5rem 1rem; }
    :root { --grid-cols: 3; }
}

/* Tablet landscape */
@media (max-width: 860px) {
    :root { --grid-cols: 2; }

    .qa-banner { padding: 2rem 1.5rem; }
    .cta-bar   { padding: 1.25rem 1.5rem; flex-wrap: wrap; text-align: center; }
}

/* Tablet portrait / large phone */
@media (max-width: 600px) {
    :root {
        --grid-cols: 1;
        --grid-gap: 0.85rem;
    }

    .suppliers-section { padding: 1rem; }

    .vendor-card__name { font-size: 0.85rem; }

    .qa-banner__inner {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }

    .qa-hex { width: 100px; }

    .qa-banner__title { font-size: 1.15rem; }

    .cta-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem 1rem;
    }

    .cta-bar__text { text-align: center; }
}
