/* AHI Dealer Locator - Enhanced Styles */
.ahi-top-search,
.ahi-top-search *,
.ahi-dealer-wrap,
.ahi-dealer-wrap *,
.ahi-container,
.ahi-container * {
    font-family: inherit;
}

/* Ensure Dashicons render correctly in frontend locator UI */
.ahi-top-search .dashicons,
.ahi-dealer-wrap .dashicons,
.ahi-container .dashicons {
    font-family: "dashicons" !important;
}

.ahi-top-search, .ahi-dealer-wrap {
    font-family: 'Montserrat';
}

.ahi-top-search {

}

.ahi-container {
    max-width: 1200px;
    margin: 0 auto;
	background: #fafafa;
    padding: 60px;
    border-bottom: 1px solid #eee;
    margin-bottom: 50px;
}

.ahi-top-search h2 {
    margin: 0 0 30px 0;
    font-size: 17px;
    color: #333;
}

.ahi-sub {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.ahi-filters {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    align-items: center;
}

.ahi-search-input {
    flex: 1;
    min-width: 250px;
    padding: 10px 15px;
    border: 1px solid #fff;
    border-radius: 4px;
    font-size: 14px;
}

.ahi-filters select,
.ahi-pincode-input {
    padding: 10px 15px;
    border: 1px solid #fff;
    border-radius: 4px;
    min-width: 180px;
    font-size: 14px;
    background: #fff;
}

.ahi-pincode-input {
    width: 140px;
    max-width: 180px;
}

.ahi-btn {
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.ahi-btn:hover {
    background: #555;
}

.ahi-btn-secondary {
    background: #666;
}

.ahi-btn-secondary:hover {
    background: #888;
}

.ahi-dealer-wrap {
    display: flex;
    gap: 0;
    max-width: 100%;
    margin: 20px auto;
    min-height: 600px;
}

.ahi-left {
    width: 40%;
    background: #f9f9f9;
    border-right: 1px solid #eaeaea;
    box-sizing: border-box;
    overflow-y: auto;
    max-height: 700px;
    overflow-x: hidden;
}

.ahi-map {
    flex: 1;
    height: 700px;
    min-height: 600px;
}

.ahi-tabs {
    display: flex;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: space-between;
    background: #666666;
}

.ahi-dealer-search-wrapper {
    position: relative;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ahi-dealer-search-input {
    flex: 1;
    padding: 16px 50px 16px 15px !important;
    border: 1px solid transparent !important;
    font-size: 14px;
    background: #fff;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    border-radius: 5px;
}

.ahi-dealer-search-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.ahi-dealer-search-input::placeholder {
    color: #999;
}

.ahi-dealer-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.ahi-dealer-search-btn {
    line-height: 0;
    background: #163865 !important;
    color: #fff !important;
    border: none !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.3s;
}

.ahi-dealer-search-btn:hover {
    background: #135e96;
}

.ahi-dealer-search-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.ahi-tab {
    background: #666;
    color: #fff;
    padding: 15px 28px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.3s;
}

.ahi-tab:hover {
    background: #555;
}

.ahi-tab.active {
    background: #333 !important;
}

.ahi-results-count .results-info {
    margin: 0;
    color: #333;
    font-size: 14px;
}

.ahi-results-count .results-info strong {
    color: #000;
}

#ahi_dealer_list {
    margin-top: 0;
    color: #393a3b;
}

.dealer-card {
    padding: 25px 25px 25px 45px;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
}

.dealer-card h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.dealer-field {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    display: flex;
    gap: 10px;
    font-weight: 500;
    font-family: 'Montserrat';
}

.dealer-field strong {
    color: #393a3b;
    margin-right: 5px;
    font-family: 'Montserrat';
}

.dealer-field a {
    text-decoration: none;
    color: #393a3b;
}

.dealer-field a:hover {
    text-decoration: underline;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.service-badge {
    display: inline-block;
    background: #e8e8e8;
    color: #333;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Hidden by default */
.view-on-map-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: #606060;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: 0.3s ease;
    position: absolute;
    transform: rotate(270deg) translateY(50%);
    transform-origin: center;
    top: 35%;
    right: -40px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.dealer-card:hover .view-on-map-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.view-on-map-btn:hover {
    background: #163865;
}

.no-results {
    color: #777;
    padding: 20px;
    text-align: center;
    font-size: 14px;
}

/* Map popup styles */
.dealer-popup {
    font-size: 13px;
    line-height: 1.6;
}

.dealer-popup h3 {
    font-size: 16px;
    color: #fff !important;
}

.dealer-popup p {
    margin: 8px 0;
    color: #555;
}

.dealer-popup strong {
    color: #333;
    margin-right: 5px;
}

.dealer-popup a {
    color: #0066cc;
    text-decoration: none;
}

.dealer-popup a:hover {
    text-decoration: underline;
}

/* Map popup styles - Enhanced for better visibility */
.dealer-map-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}

.dealer-map-popup .leaflet-popup-content {
    margin: 0;
    min-width: 350px;
    max-width: 450px;
    max-height: 500px;
    overflow-y: auto;
}

.dealer-popup-header {
    background: #163865;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
}

.dealer-popup-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dealer-popup-body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.dealer-popup-field {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f1;
}

.dealer-popup-field:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.dealer-popup-label {
    min-width: 100px;
    font-weight: 600;
    color: #1d2327;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dealer-popup-label strong {
    color: #1d2327;
    font-weight: 600;
}

.dealer-popup-value {
    flex: 1;
    color: #50575e;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.6;
}

.dealer-popup-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.dealer-popup-link:hover {
    color: #135e96;
    text-decoration: underline;
}

.dealer-popup-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dealer-popup-service-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e8e8e8;
    color: #333;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Scrollbar Styling */
.ahi-dealer-list::-webkit-scrollbar,
.dealer-popup-body::-webkit-scrollbar {
    width: 8px;
}

.ahi-dealer-list::-webkit-scrollbar-track,
.dealer-popup-body::-webkit-scrollbar-track {
    background: #f6f7f7;
    border-radius: 4px;
}

.ahi-dealer-list::-webkit-scrollbar-thumb,
.dealer-popup-body::-webkit-scrollbar-thumb {
    background: #c3c4c7;
    border-radius: 4px;
}

.ahi-dealer-list::-webkit-scrollbar-thumb:hover,
.dealer-popup-body::-webkit-scrollbar-thumb:hover {
    background: #8c8f94;
}

/* Popup tip styling */
.dealer-map-popup .leaflet-popup-tip {
    background: #2271b1;
}

/* Responsive design */
@media (max-width: 768px) {
    .ahi-dealer-wrap {
        flex-direction: column;
    }
    
    .ahi-left {
        width: 100%;
        max-height: 400px;
        border-right: none;
        border-bottom: 1px solid #eaeaea;
    }
    
    .ahi-map {
        width: 100%;
        height: 400px;
    }
    
    .ahi-filters {
        flex-direction: column;
    }
    
    .ahi-search-input,
    .ahi-filters select {
        width: 100%;
        min-width: 100%;
    }
    
    .ahi-btn {
        width: 100%;
    }
    
    .dealer-map-popup .leaflet-popup-content {
        min-width: 280px;
        max-width: 320px;
    }
    
    .dealer-popup-field {
        flex-direction: column;
        gap: 4px;
    }
    
    .dealer-popup-label {
        min-width: auto;
    }
    
    .ahi-dealer-search-input {
        padding-right: 45px;
    }
    
    .ahi-dealer-search-btn {
        width: 32px;
        height: 32px;
    }
    
    .ahi-dealer-search-btn svg {
        width: 18px;
        height: 18px;
    }

    .ahi-location-card {
        flex: 0 0 260px;
        min-width: 260px;
        width: 260px;
    }
}


.ahi-tab {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ahi-tab img {
    width: 20px;
    height: 20px;
}
.ahi-tab:focus,
.ahi-tab:focus-visible,
.ahi-tab.active:focus,
.ahi-tab.active:focus-visible {
    outline: none !important;
    box-shadow: none !important; /* optional */
}

.dealer-wrapper {
    padding: 25px 15px 15px 15px;
}

.dealer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.dealer-title {
    font-size: 22px;
    color: #163d73; /* Dark blue like your design */
    margin: 0;
}

.dealer-icon-location,
.dealer-icon-phone,
.dealer-icon-email,
.dealer-icon-globe {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: contain;
}

.dealer-icon-location {
    background-image: url(../icons/location.png);
    position: absolute;
    left: -40px;
    top: 0;
}

.ahi-location-pin-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background-image: url(../icons/location.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.ahi-location-pin-btn:hover {
    opacity: 0.8;
}

.dealer-header .ahi-location-pin-btn {
    position: absolute;
    left: -40px;
    top: 0;
}

/* Connect buttons (split Email / Call) */
.ahi-connect-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.ahi-connect-btn {
    display: inline-block;
    padding: 10px 18px;
    background: #606060;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    letter-spacing: 0.5px;
}

.ahi-connect-btn:hover {
    background: #163865;
    color: #fff;
}

.ahi-connect-email,
.ahi-connect-phone {
    font-family: inherit;
}

.dealer-icon-phone {
    background-image: url('../icons/phone.png');
}

.dealer-icon-email {
    background-image: url('../icons/email.png');
}

.dealer-icon-globe {
    background-image: url('../icons/globe.png');
}
 
.dealer-contact-row {
    display: inline-block;
    margin: 6px 0;
    font-weight: 500;
    line-height: 35px;
}

.dealer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dealer-contact-item a {
    font-size: 15px;
    text-decoration: auto;
    color: #393a3b;
}

.leaflet-container a.leaflet-popup-close-button {
    font: 23px / 23px Tahoma, Verdana, sans-serif !important;
    color: #fff !important;
}


.ahi-required-note {
	color: #d0312d;
    font-weight: 500;
    font-size: 13px;
    align-self: center;
    position: absolute;
    right: 220px;
    top: 20px;
}
.ahi-filter-surface {
    position: relative;
}
button:focus {
    background: #333333 !important;
}

/* Our Global Locations (office locator) */
.ahi-global-locations {
    padding: 0px 0 40px;
    margin-bottom: 0;
}

.ahi-global-locations .ahi-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    background: #fff;
    font-family: var(--e-global-typography-text-font-family), Sans-serif;
}

.ahi-location-card-head button {
    border: 1px solid transparent;
}

.ahi-global-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.ahi-global-subtitle {
    margin: 0 0 30px;
    font-size: 15px;
    color: #666;
    text-align: center;
}

.ahi-flag-carousel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.ahi-flag-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ahi-flag-item:hover {
    border-color: #163865;
    box-shadow: 0 2px 8px rgba(22, 56, 101, 0.15);
}

.ahi-flag-item img {
    display: block;
    width: 40px;
    height: 30px;
    object-fit: cover;
}

.ahi-flag-placeholder {
    width: 40px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    background: #f0f0f0;
}

.ahi-no-flags,
.ahi-no-cards {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin: 0;
}

.ahi-location-cards {
    position: relative;
}

.ahi-location-cards-viewport {
    position: relative;
    overflow: hidden;
    padding: 0;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    container-type: inline-size;
    container-name: ahi-carousel;
}

.ahi-location-cards-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
}

.ahi-location-cards-track.ahi-carousel-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.ahi-location-cards-track.ahi-carousel-dragging * {
    pointer-events: none;
}

.ahi-location-cards-track.ahi-carousel-dragging a.ahi-connect-btn,
.ahi-location-cards-track.ahi-carousel-dragging .ahi-location-card-pin {
    pointer-events: auto;
}

.ahi-location-cards-track::-webkit-scrollbar {
    display: none;
}

.ahi-location-card {
    flex: 0 0 300px;
    width: 300px;
    min-width: 280px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Exactly 4 slides: card width = (viewport − 3×gap) / 4, no fixed viewport width */
@container ahi-carousel (min-width: 1px) {
    .ahi-location-cards-viewport .ahi-location-card {
        flex: 0 0 calc((100cqw - 72px) / 4);
        width: calc((100cqw - 72px) / 4);
        min-width: 0;
    }
}

.ahi-location-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #e0e0e0;
}

.ahi-location-card-image {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    overflow: hidden;
}

.ahi-location-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ahi-location-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
}

.ahi-location-card-body {
    padding: 24px 10px 10px;
    font-family: var(--e-global-typography-text-font-family), Sans-serif;
}

.ahi-location-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ahi-location-card-flag {
    width: 40px;
    height: 28px;
    object-fit: cover;
    border-radius: 2px;
}

.ahi-location-card-pin {
    width: 32px;
    height: 32px;
    background: url(../icons/location.png) center / 20px no-repeat;
    background-color: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    flex-shrink: 0;
}

.ahi-location-card-pin:hover {
    opacity: 0.85;
}

.ahi-location-card-country {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.ahi-location-card-name {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.3;
}

.ahi-location-card-address-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
}

.ahi-location-card-address-wrap .ahi-location-card-address {
    flex: 1;
    margin: 0;
}

.ahi-location-card-address {
    font-size: 14px;
    color: #50575e;
    line-height: 1.6;
    min-height: 90px;
}

.ahi-location-card-icon {
    display: inline-block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.ahi-location-card-icon-address {
    background-image: url(../icons/location.png);
    margin-top: 3px;
}

.ahi-location-card-icon-email {
    background-image: url('../icons/email.png');
}

.ahi-location-card-icon-phone {
    background-image: url('../icons/phone.png');
}

.ahi-location-card-contact {
    margin-top: 12px;
    font-size: 14px;
    color: #50575e;
    line-height: 1.6;
}

.ahi-location-card-contact-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ahi-location-card-contact-line:last-child {
    margin-bottom: 0;
}

.ahi-location-card-contact a {
    color: #163865;
    text-decoration: none;
}

.ahi-location-card-contact a:hover {
    text-decoration: underline;
}

.ahi-location-card .ahi-connect-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.ahi-location-card .ahi-connect-buttons .ahi-connect-btn:only-child {
    flex: 1 1 100%;
}

.ahi-location-card .ahi-connect-btn {
    display: block;
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    padding: 14px 16px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: #333;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
    box-sizing: border-box;
}

.ahi-location-card .ahi-connect-buttons .ahi-connect-btn:only-child {
    padding: 14px 20px;
    font-size: 13px;
}

.ahi-location-card .ahi-connect-btn:hover {
    background: #163865;
    color: #fff;
}
.ahi-location-card-image img {
    min-height: 200px;
}
.ahi-location-card-head [type=button]:hover, button:hover {
    opacity: 1;
    background-color: #fff;
}
.dealer-header button.dealer-icon-location.ahi-location-pin-btn {
    border: none;
}
#ahi_dealer_list .ahi-connect-buttons {
    display: none;
}

.ahi-career-nav--prev {
    left: 0;
}
.ahi-career-nav--next {
    right: 0;
}

.ahi-career-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 48px !important;
    height: 48px;
    padding: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background: #111 !important;
    color: #fff !important;
    font-size: 26px !important;
    line-height: 1;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, opacity 0.2s ease !important;
}

.ahi-location-cards-viewport {
    position: relative;
    margin-bottom: 20px;
    padding: 0 52px;
}