/* ═══════════════════════════════════════════════════════════
   Affarinoro Store Locator  –  assets/afn-store-locator.css
════════════════════════════════════════════════════════════ */

.afn-locator {
    font-family: inherit;
    max-width: 100%;
    margin: 0 auto;
    color: #333;
}

/* ── TITOLO ──────────────────────────────────────────────── */
.afn-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a2e4a;
    margin: 0 0 16px;
}

/* ── SEARCH ──────────────────────────────────────────────── */
.afn-searchbar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.afn-searchbar input {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid #d0d8e4;
    border-radius: 5px;
    font-size: 0.88rem;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
}

.afn-searchbar input:focus { border-color: #2563eb; }

.afn-searchbar button {
    padding: 9px 18px;
    background: #1a2e4a;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
    white-space: nowrap;
}

.afn-searchbar button:hover { background: #2563eb; }

/* ── GRID ────────────────────────────────────────────────── */
.afn-grid {
    display: grid;
    gap: 14px;
}

.afn-cols-2 { grid-template-columns: 1fr 1fr; }
.afn-cols-1 { grid-template-columns: 1fr; }

@media (max-width: 640px) {
    .afn-cols-2 { grid-template-columns: 1fr; }
}

/* ── CARD ────────────────────────────────────────────────── */
.afn-card {
    display: flex;
    background: #fff;
    border: 1px solid #dde3ee;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}

.afn-card:hover {
    box-shadow: 0 4px 18px rgba(26,46,74,.1);
    transform: translateY(-2px);
}

/* ── THUMBNAIL MAPPA ─────────────────────────────────────── */
.afn-map-thumb {
    width: 200px;
    min-width: 200px;
    overflow: hidden;
    background: #ddeaf8;
    position: relative;
    align-self: stretch;   /* si estende per tutta l'altezza della card */
}

.afn-map-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .3s ease;
}

.afn-card:hover .afn-map-thumb img { transform: scale(1.04); }

.afn-map-placeholder {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8899aa;
    font-size: 0.72rem;
    gap: 4px;
    text-align: center;
    padding: 10px;
}

.afn-map-placeholder span { font-size: 1.6rem; }

@media (max-width: 640px) {
    .afn-map-thumb { width: 130px; min-width: 130px; }
}

@media (max-width: 480px) {
    .afn-card { flex-direction: column; }
    .afn-map-thumb { width: 100%; min-width: 100%; height: 160px; }
}

/* ── CARD BODY ───────────────────────────────────────────── */
.afn-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
    min-width: 0;
}

.afn-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a3a6b;
    line-height: 1.2;
}

.afn-card-address {
    font-size: 0.78rem;
    color: #667;
    margin-top: -2px;
}

.afn-divider {
    border: none;
    border-top: 1px dashed #e2e8f0;
    margin: 2px 0;
}

.afn-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.afn-text {
    font-size: 0.78rem;
    color: #555;
    line-height: 1.6;
}

.afn-closed { color: #dc2626; }
.afn-open   { color: #16a34a; }

/* ── ACTIONS ─────────────────────────────────────────────── */
.afn-actions {
    display: flex;
    gap: 7px;
    margin-top: auto;
    padding-top: 6px;
    flex-wrap: wrap;
}

.afn-btn {
    padding: 7px 13px;
    border-radius: 4px;
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all .2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
    white-space: nowrap;
}

.afn-btn-map {
    background: #2563eb;
    color: #fff !important;
}

.afn-btn-map:hover { background: #1d4ed8; }

.afn-btn-directions {
    background: #fff;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
}

.afn-btn-directions:hover {
    border-color: #2563eb;
    color: #2563eb !important;
}

/* ── STATES ──────────────────────────────────────────────── */
.afn-no-stores,
.afn-no-results {
    grid-column: 1 / -1;
    padding: 24px;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.afn-no-stores a { color: #2563eb; }
