/*
 * Avada Child – WCFM Storelist Additions
 * Lädt nur auf Seiten mit [wcfm_stores] (per functions.php enqueue)
 */

/* Fallback: Map-Container sicher verstecken, falls ein Page-Builder-Fragment sie injiziert */
#wcfmmp-stores-lists .wcfmmp-stores-map-wrap,
#wcfmmp-stores-lists .wcfmmp-stores-map-holder { display: none !important; }

/* Sidebar optisch harmonisieren (Avada) */
#wcfmmp-store-lists-sidebar.widget-area.sidebar {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0,0,0,.06);
	padding: 16px;
}

/* Top-Filter-Leiste (wenn Sidebar deaktiviert ist) */
.kb-storelist-filters{padding-left:30px}
.kb-storelist-filters .kb-filter-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:12px 0 18px}
.kb-storelist-filters .kb-filter-item{min-width:220px}
.kb-storelist-filters input[type="search"],
.kb-storelist-filters input[type="text"]{height:40px;border-radius:8px;border:1px solid #e1e5ea;padding:8px 12px}
/* Erzwinge identische Optik wie Select2 */
.kb-storelist-filters #search.wcfmmp-store-search,
.kb-storelist-filters input#wcfmmp_store_city{
  height:44px !important;
  border:1px solid #e1e5ea !important;
  border-radius:4px !important;
  padding:8px 12px !important;
  background:#fff !important;
  box-shadow:none !important;
  color:#334155 !important;
}
/* Original Select (wird von select2 ersetzt) ohne Rahmen lassen -> keine Doppel-Border */
.kb-storelist-filters select.wcfm-select{border:0 !important;background:transparent !important;padding:0 !important;height:auto}
/* plugin-weite 23%-Breiten überschreiben und Platzhalter/Fonts vereinheitlichen */
.kb-storelist-filters input[type="search"],
.kb-storelist-filters input[type="text"],
.kb-storelist-filters select,
.kb-storelist-filters .select2-container{width:auto !important; min-width:220px; font-size:14px; font-family:inherit}
.kb-storelist-filters input::placeholder{opacity:.8}
.kb-storelist-filters input,
.kb-storelist-filters select{font-size:14px; font-family:inherit}

/* Select2 inner alignment */
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li a{ text-decoration:none !important; border-bottom:none !important; box-shadow:none !important; background-image:none !important }
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-content a,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-content a *,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-wrapper a{ text-decoration:none !important; border:0 !important; background-image:none !important; box-shadow:none !important }
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-content a img{ border:0 !important; outline:0 !important }
.kb-storelist-filters .select2-container .select2-selection__rendered{line-height:40px; color:#334155 !important; font-weight:400 !important; font-family:inherit !important}
.kb-storelist-filters .select2-container .select2-selection__arrow{height:40px}
/* zentrierte Ausrichtung entfernen */
.kb-storelist-filters{ text-align:left !important }

/* Seitliche Schattierungen/Gutters neutralisieren */
#wcfmmp-stores-lists,
#wcfmmp-stores-wrap-holder,
.wcfmmp-stores-listing,
.right_side,
.right_side_full,
.wcfmmp-store-search-form,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-wrapper{box-shadow:none !important;background:transparent !important;border:0 !important}

/* Force our styles to win against plugin late injections */
.kb-storelist-filters .select2-container *{font-family:inherit !important}

/* Kartenrahmen + Button-Stil wie Produktkarte */
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-wrapper{
  border:1px solid #e5e7eb !important; border-radius:12px !important; background:#fff !important; box-shadow:none !important; overflow:hidden; padding:10px !important;
}
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-footer{border-top:0 !important; padding:16px 18px 18px !important; background:#fff !important}
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-data h2,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-data h2 a:hover{color:#011a27 !important; opacity:.9; text-decoration:none !important; border-bottom:none !important}
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-data h2 *,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-data h2 a *{text-decoration:none !important; border-bottom:none !important}
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .kb-card__actions .kb-btn{width:100% !important; justify-content:center; border:1px solid #e1e5ea !important; background:#011a27 !important; color:#fff !important; border-radius:8px !important}
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .kb-card__actions .kb-btn:hover{background:#f0810f !important; border-color:#f0810f !important; color:#fff !important}

/* Hide rating completely */
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .bd_rating,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .wcfmmp-store-rating,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .woocommerce-review-link,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .wcfmmp-store-rating-count,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .star-rating{display:none !important}


/* Grid via Plugin (per_row=4); nur Innenabstände steuern */
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap{margin-top:12px}


/* Card base elements (moved from style.css) */
.kb-card__media{position:relative;overflow:hidden}
.kb-card__media img{width:100%;height:auto;object-fit:cover;display:block}
.kb-card__logo{position:absolute;left:20px;bottom:20px;width:110px;height:110px;border-radius:50%;overflow:hidden;border:4px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.25);z-index:2}
.kb-card__logo img{width:100%;height:100%;object-fit:cover}
.kb-card__body{padding:16px 20px 20px}
.kb-card__title{margin:6px 0 4px;line-height:1.25;display:flex;align-items:center;gap:10px}
.kb-badge{display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;font-size:12px;font-weight:700}
.kb-badge--verified{background:#0ea5a0;color:#fff}
.kb-card__meta{margin:0 0 10px}
.kb-card__actions{display:flex;gap:8px;margin-top:12px}
.kb-btn{display:inline-flex;align-items:center;justify-content:center;padding:9px 14px;border-radius:8px;font-weight:700;border:0;transition:color .15s ease,background-color .15s ease,filter .15s ease;text-decoration:none !important;background-image:none}
.kb-card__actions .kb-btn--primary{background:#ff8a1f;color:#fff}
.kb-card__actions .kb-btn--primary:hover{color:#011a27;filter:brightness(.95)}
.kb-card__actions .kb-btn--ghost{background:#011a27;color:#fff}
.kb-card__actions .kb-btn--ghost:hover{filter:brightness(1.05)}
.kb-card__title--large{font-size:30px !important;font-family:'Sen',sans-serif;color:#011a27}
.kb-card__media--portrait{overflow:hidden}
.kb-card__media--portrait img{width:100%;aspect-ratio:4/3;height:auto;object-fit:cover;}

/* Hide legacy WCFM avatar circle */
.wcfmmp-single-store .store-avatar{display:none !important}

/* Sidebar sticky (if enabled) */
.wcfmmp-store-list-sidebar{position:sticky;top:120px;z-index:999;background:#fff;padding:15px;box-shadow:0 2px 8px rgba(0,0,0,.1);border-radius:12px}

/* ========= WCFM – Store Profilseite (Header, Tabs, Buttons) ========= */
body.is-wcfm-store #wcfmmp-store,
body.is-wcfm-store #wcfmmp-store-content { max-width:none !important; padding:0 !important }
body.is-wcfm-store #wcfmmp-store .wcfm_banner_area,
body.is-wcfm-store #wcfmmp-store .banner_area,
body.is-wcfm-store #wcfmmp-store .wcfm_slider_area,
body.is-wcfm-store #wcfmmp-store .wcfm_slideshow_container,
body.is-wcfm-store #wcfmmp-store .banner_img { width:100vw !important; max-width:100vw !important; margin-left:calc(50% - 50vw) !important; padding:0 !important }
body.is-wcfm-store #wcfmmp-store .banner_img img{ width:100% !important; height:auto !important; display:block !important }
body.is-wcfm-store .wcfmmp-store-header,
body.is-wcfm-store .wcfmmp-store-wrap,
body.is-wcfm-store .wcfmmp-store-tab-wrap{ max-width:1200px !important; margin:0 auto !important; padding:0 20px !important }
body.is-wcfm-store #footer ~ *{ display:none !important }
/* Max-Breite an Avada angleichen */
.wcfmmp-store-wrap,
.wcfmmp-store-header,
.wcfmmp-store-page-wrap,
.wcfmmp-store-tab-wrap {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Rating im Header ausblenden */
.wcfmmp-store-header .wcfmmp-store-rating,
.wcfmmp-store-header .wcfmmp-store-rating * { display: none !important; }

/* Store-Titel und Info */
.wcfmmp-store-header .wcfmmp-store-name,
.wcfmmp-store-header .wcfmmp-store-name a {
  font-family: inherit;
  color: #011a27;
  text-decoration: none;
}

/* Action-Buttons im Header (Inquiry/Follow) */
.wcfmmp-store-header [class*="enquiry"],
.wcfmmp-store-header [class*="inquiry"],
.wcfmmp-store-header [class*="follow"],
.wcfmmp-store-header .wcfm_button,
.wcfmmp-store-header .wcfm_btn {
  border: 1px solid #e1e5ea !important;
  background: #fff !important;
  color: #011a27 !important;
  border-radius: 10px !important;
  padding: 10px 16px !important;
  box-shadow: none !important;
  line-height: 1 !important;
  font-weight: 600 !important;
}
.wcfmmp-store-header [class*="enquiry"]:hover,
.wcfmmp-store-header [class*="inquiry"]:hover,
.wcfmmp-store-header [class*="follow"]:hover,
.wcfmmp-store-header .wcfm_button:hover,
.wcfmmp-store-header .wcfm_btn:hover {
  background: #f0810f !important;
  border-color: #f0810f !important;
  color: #fff !important;
}

#wcfmmp-stores-lists * {
    border-radius: 8px;
}


