/* ============================================================
   modern-patch.css — Refined Lavender W21 cleanup
   Loaded AFTER modern.css. Uses --ego-* tokens defined upstream.
   Does NOT touch #mobil_mini (W19) or col-xs-6 grid rules (W18).
   ============================================================ */

/* ------------------------------------------------------------
   1) HOME 1-COLUMN HOTFIX (defensive CSS fallback)
   Primary fix is removing `defer` from swiper-bundle.min.js in
   header.tpl line 237. Until that ships, give the un-initialized
   .swiper-slide a sane width so the page doesn't render a giant
   1-column stack. Once Swiper.js initializes and writes inline
   width: XXXpx + margin-right, those inline styles win.
   ------------------------------------------------------------ */
.swiper-container.swiper-product:not(.swiper-container-initialized) {
  overflow: hidden;
}
.swiper-container.swiper-product:not(.swiper-container-initialized) .swiper-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px;
  transform: none !important;
}
.swiper-container.swiper-product:not(.swiper-container-initialized) .swiper-slide {
  width: calc((100% - 10px) / 2) !important;
  flex: 0 0 calc((100% - 10px) / 2) !important;
  height: auto !important;
}
@media (min-width: 500px) {
  .swiper-container.swiper-product:not(.swiper-container-initialized) .swiper-slide {
    width: calc((100% - 20px) / 3) !important;
    flex: 0 0 calc((100% - 20px) / 3) !important;
  }
}
@media (min-width: 1000px) {
  .swiper-container.swiper-product:not(.swiper-container-initialized) .swiper-slide {
    width: calc((100% - 30px) / 4) !important;
    flex: 0 0 calc((100% - 30px) / 4) !important;
  }
}
@media (min-width: 1600px) {
  .swiper-container.swiper-product:not(.swiper-container-initialized) .swiper-slide {
    width: calc((100% - 40px) / 5) !important;
    flex: 0 0 calc((100% - 40px) / 5) !important;
  }
}

/* ------------------------------------------------------------
   2) HEADER / FOOTER SHELL — kill legacy #dfd4e4 / #baa9c9
   ------------------------------------------------------------ */
.header-bg {
  background: var(--ego-accent-soft) !important;
  border-bottom: 1px solid var(--ego-border) !important;
}

footer {
  background: var(--ego-accent-soft) !important;
  border-top: 1px solid var(--ego-border) !important;
  color: var(--ego-text-soft) !important;
}
footer a,
#topmenu a {
  color: var(--ego-text-soft) !important;
}
footer a:hover,
#topmenu a:hover {
  color: var(--ego-accent) !important;
}
footer .h5 {
  border-bottom: 1px solid var(--ego-border) !important;
  color: var(--ego-text) !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
}
footer a::after,
#topmenu a::after {
  display: none !important;
}

/* Scrollbar + scroll-to-top FAB */
::-webkit-scrollbar-thumb {
  background-color: var(--ego-accent) !important;
  border-radius: 4px;
}
.scroll__top {
  background: var(--ego-accent) !important;
  color: #fff !important;
  border: none !important;
}

/* ------------------------------------------------------------
   3) NAVIGATION — breadcrumbs, pagination, megamenu, nav-pills
   ------------------------------------------------------------ */
.breadcrumb {
  background: transparent !important;
  font-size: 13px !important;
  color: var(--ego-text-soft) !important;
  padding: 12px 0 !important;
  margin-bottom: 12px !important;
}
.breadcrumb a { color: var(--ego-text-soft) !important; }
.breadcrumb a:hover { color: var(--ego-accent) !important; }

.pagination > li > a,
.pagination > li > span {
  color: var(--ego-text) !important;
  background: var(--ego-surface) !important;
  border: 1px solid var(--ego-border) !important;
  border-radius: var(--ego-radius, 4px) !important;
  min-width: 40px;
  padding: 8px 12px !important;
  margin: 0 2px;
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover {
  background: var(--ego-accent) !important;
  border-color: var(--ego-accent) !important;
  color: #fff !important;
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:focus,
.nav-pills > li.active > a:hover {
  background-color: var(--ego-accent) !important;
  color: #fff !important;
  border-radius: var(--ego-radius, 4px) !important;
}
.nav > li > a:focus,
.nav > li > a:hover {
  border-radius: var(--ego-radius, 4px) !important;
  background-color: var(--ego-accent-soft) !important;
  color: var(--ego-text) !important;
}

/* Megamenu vertical hover */
#menu-vertical #menu-vertical-list > li > a:hover,
#menu-vertical #menu-vertical-list > li > a.hover,
#menu-vertical #menu-vertical-list > li > a.parent-link.hover,
#menu-vertical #menu-vertical-list > li .dropdown-menu-simple .nsmenu-haschild > li > a.hover {
  background: var(--ego-accent-soft) !important;
  color: var(--ego-text) !important;
  transition: background .2s ease !important;
}

/* Mobile menu close button (also kills #dfd4e4b typo) */
#menu-mobile-ns .nav > li.btn-close-menu,
#menu-mobile-ns .nav > li.btn-close-menu .close-area {
  background: var(--ego-accent-soft) !important;
  color: var(--ego-text) !important;
}

/* menuprosheme widget */
#menuprosheme .title-menu-sheme {
  background: var(--ego-accent-soft) !important;
  color: var(--ego-text) !important;
}
#menuprosheme .nav > li > a:hover,
#menuprosheme .nav > li a > .show-sc-sheme:hover {
  background-color: var(--ego-accent-soft) !important;
}

/* ------------------------------------------------------------
   4) HERO SLIDER — title pill, arrows, pagination dots,
      module-title gradient kill
   ------------------------------------------------------------ */
@media (min-width: 768px) {
  .homeslide_title {
    background: var(--ego-accent-soft) !important;
    border: 1px solid var(--ego-border) !important;
    color: var(--ego-text) !important;
  }
}

.swiper-button-prev,
.swiper-button-next {
  color: var(--ego-accent) !important;
}
.swiper-button-next.swiper-new::after,
.swiper-button-prev.swiper-new::after {
  background: var(--ego-accent-soft) !important;
  color: var(--ego-accent) !important;
}
.swiper-pagination-bullet {
  background: var(--ego-text-soft) !important;
  opacity: .35;
}
.swiper-pagination-bullet-active {
  background: var(--ego-accent) !important;
  opacity: 1;
}

/* Kill legacy rainbow gradient on module titles */
.module-title,
.heading_title.rgb_title.module-title,
.heading_title.rgb_title {
  background: none !important;
  background-image: none !important;
  -webkit-text-fill-color: var(--ego-text) !important;
  color: var(--ego-text) !important;
  border-bottom: 1px solid var(--ego-border) !important;
  padding-bottom: 12px !important;
}

/* ------------------------------------------------------------
   5) SEARCH BOX — flat Boutique style (kills BS3 pill)
   ------------------------------------------------------------ */
#search.input-group {
  border: 1px solid var(--ego-border);
  border-radius: var(--ego-radius, 4px) !important;
  background: var(--ego-surface);
  overflow: hidden;
  box-shadow: none;
  transition: var(--ego-transition, all .2s ease);
}
#search.input-group:focus-within {
  border-color: var(--ego-accent);
  box-shadow: 0 0 0 3px var(--ego-accent-soft);
}
#search .form-control,
#search input.form-control.input-lg {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 44px;
  padding: 10px 14px;
  font-family: var(--ego-font, Manrope, sans-serif) !important;
  font-size: 14px;
  color: var(--ego-text);
}
#search .form-control::placeholder { color: var(--ego-text-soft); }
#search .form-control:focus {
  border: 0 !important;
  box-shadow: none !important;
}
#search .input-group-btn { font-size: 0; }
#search .input-group-btn > .btn,
#search .btn.btn-default.btn-lg {
  border: 0 !important;
  border-left: 1px solid var(--ego-border) !important;
  border-radius: 0 !important;
  background: var(--ego-surface) !important;
  height: 44px;
  padding: 0 16px;
  transition: var(--ego-transition, all .2s ease);
}
#search .input-group-btn > .btn:hover {
  background: var(--ego-accent-soft) !important;
}
#search .input-group-btn > .btn img {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* ------------------------------------------------------------
   6) PRODUCT SURFACES — PDP price, .btn-primary, cat-name,
      wishlist hover, nice-select, popupcart, simple checkout
   ------------------------------------------------------------ */
.product-price {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: var(--ego-text) !important;
  font-weight: 700 !important;
  font-size: 28px !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  display: inline-block;
  margin: 12px 0 18px !important;
}
.product-price .autocalc-product-price {
  color: var(--ego-text) !important;
  font-weight: 700 !important;
}
#product .old-price,
.product-info .old-price {
  font-weight: 300;
  color: #999;
  text-decoration: line-through;
  margin-left: 10px;
  font-size: 18px;
}

.btn-primary {
  color: #fff !important;
  background: var(--ego-accent) !important;
  border: 2px solid var(--ego-accent) !important;
  border-radius: var(--ego-radius, 4px) !important;
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.btn-primary:focus {
  background: var(--ego-text) !important;
  border-color: var(--ego-text) !important;
  color: #fff !important;
}

.cat-name {
  background: var(--ego-surface) !important;
  color: var(--ego-text) !important;
  border-top: 1px solid var(--ego-border) !important;
}

.product-thumb .wishlist:hover,
.thumbnails .wishlist:hover {
  background: var(--ego-accent-soft) !important;
  color: var(--ego-accent) !important;
}

.nice-select .option:hover,
.nice-select .option.focus,
.nice-select .option.selected.focus {
  background: var(--ego-accent-soft) !important;
  color: var(--ego-text) !important;
}

#popupcart_extended .head {
  background: var(--ego-accent) !important;
  color: #fff !important;
}

.simple-content .checkout-heading {
  background: var(--ego-accent) !important;
  color: #fff !important;
  border-radius: var(--ego-radius, 4px) var(--ego-radius, 4px) 0 0 !important;
}

/* Radios + helpers + blog thumbnails */
.radio label:hover,
.radio label:has(> input[type="radio"]:checked) {
  background: var(--ego-accent-soft) !important;
  color: var(--ego-text) !important;
}
.bg-gold { background: var(--ego-accent-soft) !important; }
.sc-widget-image,
.record_thumb,
.blog-image,
.blog-record-description img {
  background: var(--ego-accent-soft) !important;
}

/* Filter sidebar / VIER chips (style.css 1838-1861 region) */
[class*="filter"][class*="active"],
.filter-active,
.filter-chip.active {
  background-color: var(--ego-accent-soft) !important;
  border-color: var(--ego-accent) !important;
  color: var(--ego-text) !important;
}
