/* =========================================
   Our Dealers Page (Premium) — FINAL (Fixes)
   File: /assets/css/our-dealers-page.css
   Purpose:
   - Our Dealers premium UI (hero + tabs + dealer cards)
   - Fix:
     1) Hero/title cut + black bar when image missing
     2) Verified badge visibility
   - NO blur effects, NO heavy filters, performance-first
   - Supports admin page background option: grey/white
   Related PHP:
   - /inc/features/pages/our-dealers/templates/our-dealers.php
   Linkage/Loader:
   - Enqueued by /inc/features/pages/our-dealers/our-dealers.php (only on Our Dealers page)
========================================= */

/* =============================
   Page + Container
============================= */
.stm-dealers-page{
  background: #fff;
}

.stm-dealers-page.stm-dealers-bg-grey{
  background: #f6f7fb;
}

.stm-dealers-page.stm-dealers-bg-white{
  background: #ffffff;
}

.stm-dealers-container{
  max-width: var(--stm-dealers-max, 1200px);
  margin: 0 auto;
  padding: 0 18px;
}

/* =============================
   HERO (Always Render)
============================= */
.stm-dealers-hero{
  margin: 18px 0 18px;
}

.stm-dealers-hero-frame{
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  background: #0f172a;
}

/* when banner image missing -> keep stable hero height */
.stm-dealers-hero-frame.is-noimg{
  min-height: 110px;
}

.stm-dealers-hero-img{
  display: block;
  width: 100%;
  height: auto;
}

.stm-dealers-hero-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2,6,23,.92), rgba(2,6,23,.35));
  z-index: 1;
}

.stm-dealers-hero-caption{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 22px 24px;
  z-index: 2;
}

.stm-dealers-title{
  margin: 0;
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  letter-spacing: .01em;
  line-height: 1.15;
  max-width: 92%;
  overflow: visible;
  word-break: break-word;
}

/* =============================
   Section
============================= */
.stm-dealers-section{
  padding: 18px 0 70px;
}

.stm-dealers-heading{
  text-align: center;
  margin: 0 0 18px;
}

.stm-dealers-section-title{
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 900;
  color: #ff7a00;
}

.stm-dealers-section-subtitle{
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  opacity: .92;
}

/* =============================
   Tabs
============================= */
.stm-dealers-tabs{
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
}

.stm-dealers-tab{
  appearance: none;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  color: #0f172a;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}

.stm-dealers-tab:hover{
  transform: translateY(-1px);
}

.stm-dealers-tab.is-active{
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

/* =============================
   Panels / Empty
============================= */
.stm-dealers-panel{
  margin-top: 6px;
}

.stm-dealers-empty{
  background: #fff;
  border: 1px dashed rgba(15,23,42,.20);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  color: #0f172a;
  font-weight: 700;
}

/* =============================
   Grid
============================= */
.stm-dealers-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* =============================
   Dealer Card (Premium, Clean)
============================= */
.stm-dealer-card{
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  padding: 14px 14px 12px;
  color: #0f172a;
  transition: transform .14s ease, border-color .14s ease;
}

.stm-dealer-card:hover{
  transform: translateY(-2px);
  border-color: rgba(15,23,42,.18);
}

.stm-dealer-head{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
  padding-right: 44px;
  margin-bottom: 10px;
}

.stm-dealer-mark{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.stm-dealer-dot{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ff7a00;
}

.stm-dealer-headtext{
  min-width: 0;
  flex: 1 1 auto;
}

.stm-dealer-shop{
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #0f172a;
}

.stm-dealer-person{
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  opacity: .92;
}

/* ✅ verified badge visibility */
.stm-dealer-badge{
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  display: block;
  z-index: 3;
  object-fit: contain;
  pointer-events: none;
}

.stm-dealer-body{
  margin-top: 6px;
}

.stm-dealer-row{
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6f7fb;
  border: 1px solid rgba(15,23,42,.06);
  margin-top: 10px;
}

.stm-dealer-label{
  flex: 0 0 62px;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  opacity: .85;
}

.stm-dealer-value{
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.45;
  min-width: 0;
}

/* =============================
   Location Badge (Bottom Right)
============================= */
.stm-dealer-foot{
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.stm-dealer-loc{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  background: #0f172a;
  color: #fff;
  border: 1px solid rgba(15,23,42,.10);
  transition: transform .12s ease;
}

.stm-dealer-loc:hover{
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.stm-dealer-loc__icon{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff7a00;
}

.stm-dealer-loc__text{
  line-height: 1;
}

/* =============================
   Responsive
============================= */
@media (max-width: 1024px){
  .stm-dealers-title{ font-size: 28px; }
  .stm-dealers-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px){
  .stm-dealers-hero-caption{ padding: 18px 16px; }
  .stm-dealers-title{ font-size: 22px; }
  .stm-dealers-hero-frame.is-noimg{ min-height: 92px; }
  .stm-dealers-section{ padding: 16px 0 56px; }
  .stm-dealers-grid{ grid-template-columns: 1fr; }
  .stm-dealer-head{ padding-right: 40px; }
  .stm-dealer-badge{ width: 26px; height: 26px; }
}
/* No-image cover (About-Us-like) */
.stm-dealers-hero-frame.is-noimg{
  background: linear-gradient(180deg, #8a8a8a 0%, #6f6f6f 100%);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stm-dealers-hero-frame.is-noimg .stm-dealers-hero-overlay{
  background: rgba(0,0,0,.18);
}

.stm-dealers-hero-frame.is-noimg .stm-dealers-hero-caption{
  justify-content: center;
  text-align: center;
  padding: 22px 18px;
}
