/* ============================================================
   Shops: map markers, shop page extras, affiliated shops list
   ------------------------------------------------------------
   Loaded together with home_sport_center.css on the shop pages
   (layout, cards and contacts reuse its .sch-* components and
   tokens) and on its own on the sport centers map (markers only).
   Same theming rule: dark styles hang off [data-theme="dark"].
   ============================================================ */

/* Shops are bright green across the site: every colour derives from the global
   --color-shop* tokens of gioca_html/css/theme.css (light and dark already). */
:root {
    --shop-affiliate: var(--color-shop);
    --shop-affiliate-strong: var(--color-shop-strong);
    --shop-affiliate-soft: rgba(34, 197, 94, 0.14);
    --shop-text: var(--color-shop-text);
    /* The map popup is dark in both themes (sport_centers_map.css): light green reads on it. */
    --shop-popup-accent: #86efac;
}

[data-theme="dark"] {
    --shop-affiliate-soft: rgba(74, 222, 128, 0.16);
}

/* ---------- Map marker (Leaflet divIcon wrapping img/leaflet-markers/shop.svg) ---------- */
.shop-marker {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.35));
}

/* Affiliates: bigger (set by the JS) and a green halo that makes them pop out. */
.shop-marker--affiliate {
    box-shadow: 0 0 0 5px var(--shop-affiliate-soft), 0 0 14px 2px rgba(34, 197, 94, 0.55);
}

/* Leaflet sets a white square background on divIcons by default. */
.leaflet-div-icon.shop-marker-icon {
    background: transparent;
    border: 0;
}

.shop-cluster-count {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 20px;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    color: var(--color-on-shop);
    background: var(--shop-affiliate-strong);
}

.shop-popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--shop-popup-accent);
}

.shop-popup-promo {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--shop-popup-accent);
}

/* ---------- Shop page ---------- */
.shop-affiliate-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-on-shop);
    background: var(--shop-affiliate-strong);
}


/* "Buy online" / owner call to action: the shop green button */
.sch-action.shop-action--buy {
    background: var(--color-shop-strong);
    border-color: var(--color-shop-strong);
    color: var(--color-on-shop);
}

.sch-action.shop-action--buy:hover,
.sch-action.shop-action--buy:focus-visible {
    background: var(--color-shop-strong-hover);
    border-color: var(--color-shop-strong-hover);
    color: var(--color-on-shop);
}

.sch-action.shop-action--whatsapp {
    background: transparent;
    border: 1px solid var(--color-shop-strong);
    color: var(--color-shop-text);
}

.sch-action.shop-action--whatsapp:hover,
.sch-action.shop-action--whatsapp:focus-visible {
    background: var(--color-shop-soft);
    color: var(--color-shop-text);
}

.shop-subtitle {
    margin: 16px 0 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sch-text-muted);
}

.shop-subtitle:first-of-type {
    margin-top: 0;
}

.shop-chips,
.shop-services,
.shop-nearby {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop-chip {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-shop-text);
    background: var(--color-shop-soft);
}

.shop-chip:hover,
.shop-chip:focus-visible {
    color: var(--color-on-shop);
    background: var(--color-shop-strong);
}

.shop-services li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--sch-border);
    font-size: 14px;
    color: var(--sch-text);
}

.shop-services i {
    color: var(--color-shop-strong);
}

[data-theme="dark"] .shop-services i {
    color: var(--color-shop);
}

.shop-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.shop-gallery-item {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: var(--sch-surface-muted);
}

.shop-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.shop-gallery-item:hover img {
    transform: scale(1.04);
}

.shop-nearby {
    flex-direction: column;
    gap: 0;
}

.shop-nearby-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--sch-border);
    text-decoration: none;
    color: var(--sch-text);
}

.shop-nearby li:last-child .shop-nearby-item {
    border-bottom: 0;
}

.shop-nearby-name {
    font-weight: 600;
}

.shop-nearby-item:hover .shop-nearby-name {
    text-decoration: underline;
}

.shop-nearby-meta {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--sch-text-muted);
}

.shop-promo {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px dashed var(--shop-affiliate);
    background: var(--shop-affiliate-soft);
    color: var(--sch-text);
}

.shop-promo i {
    font-size: 24px;
    color: var(--shop-affiliate-strong);
}

.shop-promo-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--shop-affiliate-strong);
}

.shop-promo-text {
    font-size: 17px;
    font-weight: 600;
}

.shop-owner-cta {
    border: 1px dashed var(--color-shop);
    background: var(--shop-affiliate-soft);
}

.shop-osm-credit {
    font-size: 12px;
    color: var(--sch-text-muted);
}

.shop-osm-credit a {
    color: inherit;
}

/* ---------- Affiliated shops list ---------- */
.shop-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--sch-border);
    background: var(--sch-surface);
    box-shadow: var(--sch-shadow-sm);
    color: var(--sch-text);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shop-card:hover,
.shop-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--sch-shadow);
    color: var(--sch-text);
}

.shop-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.shop-card-logo {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--sch-surface-muted);
}

.shop-card-logo--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--shop-affiliate-strong);
    background: var(--shop-affiliate-soft);
}

.shop-card-name {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.shop-card-city {
    font-size: 13px;
    color: var(--sch-text-muted);
}

.shop-card-promo {
    margin-top: auto;
    padding-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--shop-text);
}


/* Shop layer toggle of the map control */
.shop-layer-icon {
    color: var(--color-shop);
}
