/* ==========================================================================
   Our Network Across India — premium logistics network map
   Header + Google/Leaflet map + floating legend + horizontal location rail
   + city filter pills. All markup is driven by admin → Location Master.
   ========================================================================== */

.gg-net {
    --net-blue: #2563eb;
    --net-blue-dark: #1d4ed8;
    --net-blue-soft: #eff5ff;
    --net-orange: #f97316;
    --net-orange-soft: #fff3e8;
    --net-gold: #ca8a04;
    --net-gold-soft: #fef9e7;
    --net-ink: #0f172a;
    --net-body: #475569;
    --net-muted: #64748b;
    --net-line: #e6ebf3;
    --net-green: #22c55e;
    --net-bg: #f8fafc;

    padding: 56px 0 72px;
    background: var(--gg-bg, #f8f9ff);
}

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

.gg-net__shell {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .1);
}

/* ============================================================== HEADER === */

.gg-net__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 22px 28px;
    background: #fff;
    border-bottom: 1px solid var(--net-line);
}

.gg-net__title {
    margin: 0;
    font-family: var(--gg-font-display, inherit);
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--net-ink);
}

.gg-net__subtitle {
    margin: 4px 0 0;
    font-size: 14.5px;
    color: var(--net-muted);
}

.gg-net__tools {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 480px;
    justify-content: flex-end;
    min-width: 0;
}

.gg-net__search {
    position: relative;
    flex: 1 1 340px;
    max-width: 480px;
    min-width: 0;
}

.gg-net__search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: var(--net-muted);
    pointer-events: none;
}

.gg-net__search-input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 1px solid var(--net-line);
    border-radius: 14px;
    background: var(--net-bg);
    font-family: inherit;
    font-size: 15px;
    color: var(--net-ink);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.gg-net__search-input::placeholder { color: #94a3b8; }

.gg-net__search-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--net-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.gg-net__select {
    position: relative;
    flex: 0 0 auto;
}

.gg-net__select select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 210px;
    padding: 14px 44px 14px 18px;
    border: 1px solid var(--net-line);
    border-radius: 14px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--net-ink);
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.gg-net__select select:focus {
    outline: none;
    border-color: var(--net-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.gg-net__select svg {
    position: absolute;
    right: 16px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: var(--net-muted);
    pointer-events: none;
}

/* ================================================================= MAP === */

.gg-net__mapwrap {
    position: relative;
    height: 600px;
    background: #dbeafe;
}

.gg-net__map {
    position: absolute;
    inset: 0;
}

/* Leaflet paints its own controls / attribution — ours replace them. */
.gg-net__map .leaflet-control-container .leaflet-top,
.gg-net__map .leaflet-control-container .leaflet-bottom.leaflet-left {
    display: none;
}

.gg-net__map .leaflet-control-attribution {
    background: rgba(255, 255, 255, .8);
    border-radius: 8px 0 0 0;
    font-size: 10px;
}

/* ------------------------------------------------------------- legend --- */

.gg-net__legend {
    position: absolute;
    left: 28px;
    top: 26px;
    z-index: 500;
    padding: 18px 22px 18px 18px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
}

.gg-net__legend h3 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 700;
    color: var(--net-ink);
}

.gg-net__legend p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--net-body);
}

.gg-net__legend p:last-child { margin-bottom: 0; }

.gg-net__legend-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
}

.gg-net__legend-icon svg { width: 17px; height: 17px; }

.gg-net__legend-icon--office { background: var(--net-blue); }
.gg-net__legend-icon--yard { background: var(--net-orange); }
.gg-net__legend-icon--head_office { background: var(--net-gold); }

/* ----------------------------------------------------------- controls --- */

.gg-net__zoom {
    position: absolute;
    right: 26px;
    top: 50%;
    z-index: 500;
    display: flex;
    flex-direction: column;
    transform: translateY(-115%);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .16);
}

.gg-net__zoom button {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    background: #fff;
    color: var(--net-ink);
    cursor: pointer;
    transition: background-color .16s ease;
}

.gg-net__zoom button + button { border-top: 1px solid var(--net-line); }
.gg-net__zoom button:hover { background: var(--net-blue-soft); color: var(--net-blue); }
.gg-net__zoom svg { width: 20px; height: 20px; }

.gg-net__locate {
    position: absolute;
    right: 26px;
    top: 50%;
    z-index: 500;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    transform: translateY(30%);
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: var(--net-ink);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .16);
    transition: background-color .16s ease, color .16s ease;
}

.gg-net__locate:hover { background: var(--net-blue-soft); color: var(--net-blue); }
.gg-net__locate svg { width: 22px; height: 22px; }

.gg-net__fit {
    position: absolute;
    right: 26px;
    bottom: 26px;
    z-index: 500;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 22px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: var(--net-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .16);
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.gg-net__fit:hover {
    background: var(--net-blue);
    color: #fff;
    transform: translateY(-1px);
}

.gg-net__fit svg { width: 20px; height: 20px; }

.gg-net__mapnote {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 400;
    padding: 14px 24px;
    background: rgba(15, 23, 42, .82);
    color: #fff;
    font-size: 13.5px;
    text-align: center;
}

/* ------------------------------------------------------------ markers --- */

/* Leaflet wraps each marker in a divIcon — strip its default chrome. */
.gg-net-divicon {
    background: transparent;
    border: 0;
    overflow: visible;
}

.gg-net-marker {
    position: relative;
    width: 38px;
    height: 48px;
    cursor: pointer;
    transform-origin: 50% 100%;
    transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}

.gg-net-marker:hover { transform: scale(1.12); }

.gg-net-marker__pin {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    filter: drop-shadow(0 4px 8px rgba(15, 23, 42, .3));
}

/* Teardrop body drawn with a rotated square + circle */
.gg-net-marker__pin::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 3px;
    width: 34px;
    height: 34px;
    margin-left: -17px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--marker-color, #2563eb);
}

.gg-net-marker__pin svg {
    position: relative;
    width: 17px;
    height: 17px;
    margin-top: -6px;
}

.gg-net-marker--yard { --marker-color: #f97316; }
.gg-net-marker--office { --marker-color: #2563eb; }
.gg-net-marker--head_office { --marker-color: #ca8a04; }

/* Featured / selected halo */
.gg-net-marker__halo {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 96px;
    height: 96px;
    margin: -48px 0 0 -48px;
    border-radius: 50%;
    background: var(--marker-color, #2563eb);
    opacity: .14;
    pointer-events: none;
    transform: scale(.55);
    transition: transform .3s ease, opacity .3s ease;
}

.gg-net-marker--featured .gg-net-marker__halo,
.gg-net-marker.is-active .gg-net-marker__halo {
    transform: scale(1);
    animation: gg-net-pulse 2.2s ease-out infinite;
}

.gg-net-marker.is-active {
    transform: scale(1.22);
    z-index: 900;
}

@keyframes gg-net-pulse {
    0%   { transform: scale(.62); opacity: .3; }
    70%  { transform: scale(1.15); opacity: .05; }
    100% { transform: scale(.62); opacity: .3; }
}

.gg-net-marker__label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--net-ink);
    text-shadow: 0 1px 3px rgba(255, 255, 255, .95), 0 0 6px rgba(255, 255, 255, .9);
    white-space: nowrap;
    pointer-events: none;
}

/* ------------------------------------------------------------- popup ---- */

.gg-net-popup {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    z-index: 1000;
    width: 220px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 6px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    text-align: left;
    cursor: default;
}

.gg-net-marker.is-active .gg-net-popup {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.gg-net-popup__name {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--net-ink);
}

.gg-net-popup__addr {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--net-muted);
}

/* ============================================================== PANEL === */

.gg-net__panel {
    position: relative;
    z-index: 600;
    margin-top: -24px;
    padding: 14px 28px 26px;
    border-radius: 24px 24px 0 0;
    background: #fff;
}
.gg-net__panel--split { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(0, 2.25fr); gap: 24px; }
.gg-net__office-panel, .gg-net__locations-panel { min-width: 0; }
.gg-net__panel--split .gg-net__rail { display: grid; grid-template-columns: 1fr; overflow: visible; }
.gg-net__locations-panel .gg-net__rail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gg-net-card--location-button { min-height: 50px; padding: 12px 10px; border: 1px solid #93c5fd; border-radius: 9px; background: #eff6ff; color: #1d4ed8; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.25; text-align: center; cursor: pointer; box-shadow: 0 2px 5px rgba(37, 99, 235, .08); }
.gg-net-card--location-button:hover, .gg-net-card--location-button:focus-visible, .gg-net-card--location-button.is-active { border-color: var(--net-blue); background: #eff6ff; color: var(--net-blue); outline: none; }
@media (max-width: 1050px) { .gg-net__locations-panel .gg-net__rail { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) { .gg-net__panel--split { grid-template-columns: 1fr; } .gg-net__locations-panel .gg-net__rail { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .gg-net__locations-panel .gg-net__rail { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.gg-net__grabber {
    display: block;
    width: 74px;
    height: 5px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: #dbe2ec;
}

.gg-net__panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.gg-net__panel-title {
    margin: 0;
    font-family: var(--gg-font-display, inherit);
    font-size: 22px;
    font-weight: 800;
    color: var(--net-ink);
}

.gg-net__count { color: var(--net-blue); }

.gg-net__panel-sub {
    margin: 3px 0 0;
    font-size: 13.5px;
    color: var(--net-muted);
}

.gg-net__nav {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.gg-net__nav button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--net-line);
    border-radius: 50%;
    background: #fff;
    color: var(--net-ink);
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease,
                color .16s ease, transform .16s ease;
}

.gg-net__nav button:hover {
    background: var(--net-blue);
    border-color: var(--net-blue);
    color: #fff;
    transform: translateY(-1px);
}

.gg-net__nav svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------- rail --- */

.gg-net__rail {
    display: flex;
    gap: 18px;
    padding: 4px 4px 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.gg-net__rail::-webkit-scrollbar { height: 6px; }
.gg-net__rail::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.gg-net__rail::-webkit-scrollbar-track { background: transparent; }

.gg-net__none {
    padding: 34px 0 26px;
    text-align: center;
    color: var(--net-muted);
    font-size: 15px;
}

/* --------------------------------------------------------------- card --- */

.gg-net-card {
    position: relative;
    flex: 0 0 50%;
    max-width: 480px;
    scroll-snap-align: start;
    padding: 14px;
    border: 1.5px solid var(--net-line);
    border-radius: 16px;
    background: #fff;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.gg-net-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .12);
}

.gg-net-card.is-active {
    border-color: var(--net-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12), 0 14px 32px rgba(15, 23, 42, .1);
}

.gg-net-card__top {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.gg-net-card__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    flex-shrink: 0;
}

.gg-net-card__icon svg { width: 18px; height: 18px; }

.gg-net-card--office .gg-net-card__icon { background: var(--net-blue); }
.gg-net-card--yard .gg-net-card__icon { background: var(--net-orange); }
.gg-net-card--head_office .gg-net-card__icon { background: var(--net-gold); }

.gg-net-card__badge {
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.gg-net-card--office .gg-net-card__badge { background: var(--net-blue-soft); color: var(--net-blue-dark); }
.gg-net-card--yard .gg-net-card__badge { background: var(--net-orange-soft); color: #c2410c; }
.gg-net-card--head_office .gg-net-card__badge { background: var(--net-gold-soft); color: #92660a; }

.gg-net-card__img {
    display: block;
    width: 100%;
    height: 92px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
    background: var(--net-bg);
}

.gg-net-card__img--empty {
    display: grid;
    place-items: center;
    color: #cbd5e1;
}

.gg-net-card__img--empty svg { width: 30px; height: 30px; }

.gg-net-card__name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.gg-net-card__name {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--net-ink);
}

.gg-net-card__status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--net-muted);
}

.gg-net-card__status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--net-green);
}

.gg-net-card__addr {
    margin: 0 0 12px;
    min-height: 38px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--net-muted);
}

.gg-net-card__cap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    margin-bottom: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: var(--net-muted);
}

.gg-net-card__cap svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.gg-net-card__cap b {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.gg-net-card--office .gg-net-card__cap b { color: var(--net-blue); }
.gg-net-card--yard .gg-net-card__cap b { color: var(--net-orange); }
.gg-net-card--head_office .gg-net-card__cap b { color: var(--net-gold); }

.gg-net-card__dir {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: filter .16s ease;
}

.gg-net-card__dir svg { width: 15px; height: 15px; }
.gg-net-card__dir:hover { filter: brightness(.96); }

.gg-net-card--office .gg-net-card__dir { background: var(--net-blue-soft); color: var(--net-blue); }
.gg-net-card--yard .gg-net-card__dir { background: var(--net-orange-soft); color: #ea580c; }
.gg-net-card--head_office .gg-net-card__dir { background: var(--net-gold-soft); color: #92660a; }

/* ------------------------------------------------------------ filters --- */

.gg-net__filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 66.666%;
    max-width: 66.666%;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

.gg-net__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid var(--net-line);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--net-ink);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .16s ease, background-color .16s ease,
                color .16s ease, transform .16s ease;
}

.gg-net__chip svg { width: 17px; height: 17px; }

.gg-net__chip:hover {
    border-color: var(--net-blue);
    transform: translateY(-1px);
}

.gg-net__chip--office svg { color: var(--net-blue); }
.gg-net__chip--yard svg { color: var(--net-orange); }

.gg-net__chip--all { gap: 9px; }

.gg-net__chip.is-active {
    background: var(--net-blue);
    border-color: var(--net-blue);
    color: #fff;
}

.gg-net__chip.is-active svg { color: #fff; }

.gg-net__more {
    position: relative;
    margin-left: auto;
}

.gg-net__more-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 30;
    min-width: 190px;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    margin: 0;
    list-style: none;
    border: 1px solid var(--net-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
}

.gg-net__more-menu button {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    color: var(--net-ink);
    cursor: pointer;
}

.gg-net__more-menu button:hover { background: var(--net-blue-soft); color: var(--net-blue); }

/* ========================================================= RESPONSIVE === */

@media (max-width: 1100px) {
    .gg-net__head { padding: 20px 22px; }
    .gg-net__title { font-size: 26px; }
    .gg-net__mapwrap { height: 480px; }
    .gg-net__legend { left: 18px; top: 18px; padding: 14px 18px 14px 14px; }
    .gg-net__legend h3 { font-size: 15px; }
    .gg-net__legend p { font-size: 14px; }
}

@media (max-width: 860px) {
    .gg-net { padding: 40px 0 56px; }
    .gg-net__tools { flex: 1 1 100%; justify-content: stretch; }
    .gg-net__search { flex: 1 1 auto; max-width: none; }
    .gg-net__select select { min-width: 0; width: 100%; }
    .gg-net__mapwrap { height: 420px; }
    .gg-net__panel { padding: 14px 20px 24px; }
    .gg-net__filters { width: 100%; max-width: none; }
}

@media (max-width: 560px) {
    .gg-net__shell { border-radius: 18px; }
    .gg-net__head { padding: 18px 16px; }
    .gg-net__title { font-size: 22px; }
    .gg-net__tools { flex-direction: column; align-items: stretch; gap: 10px; }
    .gg-net__mapwrap { height: 360px; }
    .gg-net__legend { left: 12px; top: 12px; padding: 11px 14px 11px 11px; }
    .gg-net__legend h3 { font-size: 14px; margin-bottom: 8px; }
    .gg-net__legend p { font-size: 13px; gap: 9px; margin-bottom: 7px; }
    .gg-net__legend-icon { width: 25px; height: 25px; }
    .gg-net__zoom { right: 14px; }
    .gg-net__locate { right: 14px; }
    .gg-net__fit { right: 14px; bottom: 16px; padding: 11px 16px; font-size: 13.5px; }
    .gg-net__panel { padding: 12px 14px 20px; }
    .gg-net__panel-title { font-size: 19px; }
    .gg-net-card { flex-basis: 100%; max-width: none; }
    .gg-net__filters { width: 100%; max-width: none; }
    .gg-net__more { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .gg-net-marker,
    .gg-net-card,
    .gg-net__chip,
    .gg-net-popup { transition: none; }

    .gg-net-marker__halo { animation: none; }
    .gg-net__rail { scroll-behavior: auto; }
}
