/* Ambassador Factories Filter v2.0.1 – COMMAR (commar.nl) */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --af-primary:   #1a1a2e;
    --af-accent:    #FF8F00;
    --af-accent-dk: #e07e00;
    --af-bg:        #f4f5f6;
    --af-card-bg:   #ffffff;
    --af-border:    #e2e4e7;
    --af-divider:   #eeeff1;
    --af-text:      #2b2b2b;
    --af-muted:     #6e7278;
    --af-icon:      #FF8F00;
    --af-shadow:    0 1px 4px rgba(0,0,0,.05);
}

.af-wrap { width: 100%; font-family: inherit; }

/* FILTER BAR */
.af-filters {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end;
    padding: 24px; background: var(--af-card-bg);
    border: 1px solid var(--af-border); box-shadow: var(--af-shadow); margin-bottom: 28px;
}
.af-filter-group { display: flex; flex-direction: column; flex: 1 1 180px; }
.af-filter-group label {
    font-size: 12px; font-weight: 700; color: var(--af-muted);
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px;
}
.af-filter-group select,
.af-filter-group input[type="text"] {
    width: 100%; padding: 10px 14px; font-size: 14px; font-family: inherit;
    color: var(--af-text); background: var(--af-bg);
    border: 1px solid var(--af-border); border-radius: 0;
    appearance: none; -webkit-appearance: none; box-sizing: border-box;
}
.af-filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e7278' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer;
}
.af-filter-group select:focus,
.af-filter-group input[type="text"]:focus {
    outline: none; border-color: var(--af-primary); box-shadow: 0 0 0 2px rgba(26,26,46,.08);
}

.af-btn-reset {
    padding: 10px 32px; font-size: 14px; font-weight: 700; font-family: inherit;
    text-transform: uppercase; letter-spacing: .05em;
    color: #fff; background: var(--af-accent); border: none; border-radius: 0;
    cursor: pointer; white-space: nowrap; align-self: flex-end; transition: background .2s;
}
.af-btn-reset:hover { background: var(--af-accent-dk); }

/* RESULTS */
.af-results-count { font-size: 14px; color: var(--af-muted); margin-bottom: 16px; min-height: 22px; }
.af-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 28px; }
.af-results--loading { opacity: .4; pointer-events: none; }

/* ================================================================
   CARD
   ================================================================ */
.af-card {
    display: flex; flex-direction: column; background: var(--af-card-bg);
    border: 1px solid var(--af-border); box-shadow: var(--af-shadow);
    overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.af-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.09); }

/* ================================================================
   SLIDER
   ================================================================ */
.af-slider {
    position: relative; width: 100%; overflow: hidden;
}
.af-slider-track {
    display: flex; transition: transform .35s ease; will-change: transform;
}
.af-slide {
    flex: 0 0 100%; width: 100%; height: 240px; overflow: hidden; background: #f0f0f0;
}
.af-slide img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Dots – orange */
.af-slider-dots {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 2;
}
.af-slider-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,143,0,.4); cursor: pointer;
    transition: background .2s;
}
.af-slider-dot--active {
    background: #FF8F00;
    box-shadow: 0 0 4px rgba(255,143,0,.5);
}

/* Body */
.af-card-body { flex: 1; padding: 20px 24px 24px; display: flex; flex-direction: column; }

.af-card-title {
    font-size: 18px; font-weight: 700; font-family: inherit;
    color: var(--af-primary); margin: 0 0 10px; line-height: 1.3;
}

.af-card-intro {
    font-size: 14px; font-family: inherit; color: var(--af-muted);
    line-height: 1.6; margin: 0 0 16px;
}

/* Address row */
.af-card-row {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 0; border-top: 1px solid var(--af-divider);
}
.af-card-icon {
    flex-shrink: 0; width: 16px; height: 22px;
    display: flex; align-items: center; justify-content: center; color: var(--af-icon);
}
.af-card-icon svg { display: block; }

.af-card .af-card-text,
.af-card a.af-card-text,
.af-card a.af-card-text:link,
.af-card a.af-card-text:visited {
    font-size: 14px; font-family: inherit; color: #2b2b2b !important;
    line-height: 1.45; text-decoration: none !important; word-break: break-word;
}
.af-card a.af-card-text:hover { color: #2b2b2b !important; text-decoration: underline !important; }

/* Button */
.af-card .af-card-btn,
.af-card a.af-card-btn,
.af-card a.af-card-btn:link,
.af-card a.af-card-btn:visited,
.af-card a.af-card-btn:active {
    display: inline-block; align-self: flex-start; margin-top: auto;
    padding: 12px 32px; font-size: 14px; font-weight: 700; font-family: inherit;
    text-align: center; text-transform: uppercase; letter-spacing: .03em;
    color: #ffffff !important; text-decoration: none !important;
    background: var(--af-accent); border: none; border-radius: 0;
    cursor: pointer; transition: background .2s;
}
.af-card a.af-card-btn:hover {
    background: var(--af-accent-dk); color: #ffffff !important; text-decoration: none !important;
}

/* LOADER */
.af-loader, .af-no-results { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--af-muted); font-size: 15px; }

/* MAP */
.af-map-section { margin-top: 48px; }
.af-map-heading { font-size: 22px; font-weight: 700; font-family: inherit; color: var(--af-primary); margin: 0 0 16px; }
#af-map { width: 100%; border: 1px solid var(--af-border); box-shadow: var(--af-shadow); z-index: 1; }

.leaflet-popup-content-wrapper { border-radius: 0 !important; box-shadow: 0 2px 12px rgba(0,0,0,.15) !important; padding: 0 !important; }
.leaflet-popup-tip { box-shadow: none !important; }
.leaflet-popup-content { margin: 0 !important; font-family: inherit; font-size: 14px; line-height: 1.5; min-width: 260px; }

.af-popup { overflow: hidden; }
.af-popup-img { width: 100%; height: 140px; overflow: hidden; }
.af-popup-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.af-popup-body { padding: 14px 16px; }
.af-popup-title { font-size: 15px; font-weight: 700; color: var(--af-primary); margin: 0 0 4px; }
.af-popup-intro { font-size: 12px; color: var(--af-muted); margin: 0 0 6px; line-height: 1.4; }
.af-popup-address { font-size: 13px; color: var(--af-text); margin: 0 0 8px; line-height: 1.5; }
.af-popup-meta { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.af-popup-meta a { font-size: 12px; color: var(--af-muted); text-decoration: none; }
.af-popup-meta a:hover { color: var(--af-accent); }

.af-popup-btn {
    display: block; width: 100%; padding: 10px 16px; font-size: 13px; font-weight: 700;
    font-family: inherit; text-align: center;
    text-decoration: none !important; color: #fff !important;
    background: var(--af-accent); border: none; border-radius: 0; transition: background .2s;
}
.af-popup-btn:hover { background: var(--af-accent-dk); }

/* ================================================================
   HOMEPAGE SECTION  [ambassador_homepage]
   ================================================================ */
.afh-section {
    width: 100%; font-family: inherit; padding: 60px 0;
}
.afh-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 32px; gap: 20px; flex-wrap: wrap;
}
.afh-heading {
    font-family: inherit; font-weight: 700;
    color: var(--af-primary); margin: 0 0 4px; line-height: 1.2;
}
.afh-subheading {
    font-family: inherit; color: var(--af-muted); margin: 0; line-height: 1.5;
}
.afh-link,
a.afh-link,
a.afh-link:link,
a.afh-link:visited {
    display: inline-block; padding: 10px 28px;
    font-family: inherit; font-weight: 700; font-size: 15px;
    letter-spacing: .03em;
    color: #fff !important; text-decoration: none !important;
    background: var(--af-accent); border: none; border-radius: 0;
    white-space: nowrap; transition: background .2s;
}
a.afh-link:hover { background: var(--af-accent-dk); color: #fff !important; }

.afh-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.afh-cards {
    display: flex; flex-direction: column; gap: 16px;
}
.afh-card {
    display: flex; background: var(--af-card-bg);
    border: 1px solid var(--af-border); box-shadow: var(--af-shadow);
    overflow: hidden; transition: transform .2s, box-shadow .2s; flex: 1; min-height: 0;
}
.afh-card:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(0,0,0,.08); }

.afh-card-img {
    flex: 0 0 180px; position: relative; overflow: hidden; align-self: stretch;
}
.afh-card-img img {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    width: 100% !important; height: 100% !important; object-fit: cover !important; display: block;
}

.afh-card-body {
    flex: 1; padding: 16px 20px; display: flex; flex-direction: column; justify-content: center;
}
.afh-card-title {
    margin: 0 0 4px; line-height: 1.3;
}
.afh-card-title a,
.afh-card-title a:link,
.afh-card-title a:visited {
    color: inherit !important; text-decoration: none !important;
}
.afh-card-title a:hover { color: var(--af-accent) !important; }

.afh-card-intro {
    font-family: inherit; color: var(--af-muted); line-height: 1.5; margin: 0 0 8px;
}
.afh-card-loc {
    display: flex; align-items: center; gap: 8px;
    font-family: inherit; color: var(--af-text);
}
.afh-card-icon {
    flex-shrink: 0; width: 14px; height: 14px;
    display: flex; align-items: center; justify-content: center; color: var(--af-icon);
}
.afh-card-icon svg { display: block; width: 14px; height: 14px; }

.afh-map-wrap {
    border: 1px solid var(--af-border); box-shadow: var(--af-shadow);
    position: relative; min-height: 350px;
}
#afh-map { width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 1; }

/* Homepage popup */
.afh-popup { padding: 16px 18px; }
.afh-popup-title { font-weight: 700; color: #1a1a2e; margin-bottom: 8px; font-size: 15px; }
.afh-popup-address { color: #6e7278; margin-bottom: 10px; font-size: 13px; line-height: 1.5; }
.afh-popup-link,
a.afh-popup-link,
a.afh-popup-link:link,
a.afh-popup-link:visited {
    display: inline-block; color: #FF8F00 !important; text-decoration: none !important;
    font-weight: 600; font-size: 13px;
}
a.afh-popup-link:hover { text-decoration: underline !important; }

#afh-map .leaflet-popup-content-wrapper { border-radius: 4px !important; padding: 0 !important; }
#afh-map .leaflet-popup-content { margin: 0 !important; }

/* MOBILE */
@media (max-width: 768px) {
    .af-filters { flex-direction: column; padding: 20px; }
    .af-filter-group { flex: 0 0 auto !important; width: 100% !important; min-width: 0 !important; }
    .af-filter-group select,
    .af-filter-group input[type="text"] { width: 100% !important; }
    .af-btn-reset { width: 100%; }
    .af-results { grid-template-columns: 1fr; }
    .af-slide { height: 200px; }
    #af-map { height: 360px !important; }
    /* Homepage */
    .afh-grid { grid-template-columns: 1fr; }
    .afh-map-wrap { min-height: 300px; height: 300px; }
    #afh-map { height: 300px; }
    .afh-header { flex-direction: column; align-items: flex-start; }
    .afh-card-img { flex: 0 0 120px; }
}
