/**
 * Homepage hero / main slider — mobile-only polish (readability + modern card look).
 * Applies to themes using .slider-area-wrapper + .hero-slider.
 */

@media (max-width: 767.98px) {
  .slider-area-wrapper {
    margin-top: 6px;
    margin-bottom: 8px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .slider-area-wrapper > .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .hero-slider {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  }

  .hero-slider .item {
    position: relative;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end !important;
    align-items: stretch !important;
    min-height: 0;
    height: 220px !important;
    padding: 12px 12px max(20px, env(safe-area-inset-bottom, 0px)) !important;
    background-size: cover !important;
    background-position: center center !important;
  }

  .body_theme2 .hero-slider .item,
  .body_theme3 .hero-slider .item,
  .body_theme4 .hero-slider .item {
    min-height: 0;
    height: 220px !important;
  }

  /* Dark gradient so white text + CTA read clearly on any photo */
  .hero-slider .item::before {
    display: none;
  }

  .hero-slider .item > .container {
    position: relative;
    z-index: 2;
    width: 100%;
  }

  .hero-slider .item .item-inner {
    position: relative;
    z-index: 2;
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    padding-left: 8px;
  }

  .slider-area-wrapper .item-inner .from-bottom {
    margin-bottom: 6px;
  }

  .slider-area-wrapper .item-inner .brand-logo {
    margin-bottom: 12px !important;
    max-height: 38px;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
  }

  .slider-area-wrapper .item-inner .title {
    font-size: clamp(1.45rem, 6vw, 2rem) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
    color: #fff !important;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
  }

  .slider-area-wrapper .item-inner .subtitle {
    font-size: clamp(0.88rem, 3.6vw, 1.05rem) !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    margin-bottom: 18px !important;
    color: rgba(255, 255, 255, 0.96) !important;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
  }

  .hero-slider .item .text-body {
    color: #fff !important;
  }

  .hero-slider .item-inner .btn-primary {
    width: auto;
    max-width: 260px;
    margin-left: 0;
    margin-right: 0;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  }

  .hero-slider > .owl-carousel.dots-inside .owl-dots {
    bottom: 12px !important;
    z-index: 3;
  }

  .hero-slider > .owl-carousel.dots-inside .owl-dot span {
    background: rgba(255, 255, 255, 0.45);
    margin: 4px;
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .hero-slider > .owl-carousel.dots-inside .owl-dot.active span {
    background: #fff;
    transform: scale(1.15);
  }

  /* Mobile-only: hide slider text/cta */
  .slider-area-wrapper .item-inner .brand-logo,
  .slider-area-wrapper .item-inner .title,
  .slider-area-wrapper .item-inner .subtitle,
  .hero-slider .item-inner .btn-primary {
    display: none !important;
  }

}

@media (max-width: 576px) {
  .hero-slider .item {
    height: 190px !important;
    padding: 10px 10px max(16px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .body_theme2 .hero-slider .item,
  .body_theme3 .hero-slider .item,
  .body_theme4 .hero-slider .item {
    height: 190px !important;
  }
}

@media (max-width: 380px) {
  .hero-slider .item,
  .body_theme2 .hero-slider .item,
  .body_theme3 .hero-slider .item,
  .body_theme4 .hero-slider .item {
    height: 172px !important;
  }
}

/* Theme 3 / 4 — .hero-area3 + .heroarea-slider (split layout on desktop) */
@media (max-width: 767.98px) {
  .hero-area3 {
    margin-left: max(12px, env(safe-area-inset-left, 0px));
    margin-right: max(12px, env(safe-area-inset-right, 0px));
    margin-top: 6px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  }

  .hero-area3 .item {
    position: relative;
    height: auto !important;
    min-height: 360px;
    padding: 28px 16px 36px !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    background-size: cover !important;
    background-position: center center !important;
  }

  .hero-area3.hero-area4 .item {
    height: auto !important;
    min-height: 380px;
  }

  .hero-area3 .item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.08) 0%,
      rgba(0, 0, 0, 0.4) 50%,
      rgba(0, 0, 0, 0.72) 100%
    );
    z-index: 1;
    pointer-events: none;
  }

  .hero-area3 .item .container {
    position: relative;
    z-index: 2;
  }

  .hero-area3 .right-img,
  .hero-area3 .layer-4 {
    display: none !important;
  }

  .hero-area3 .left-content {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .hero-area3 .left-content .subtitle {
    font-size: clamp(0.9rem, 3.8vw, 1.05rem) !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
  }

  .hero-area3 .left-content .title {
    font-size: clamp(1.45rem, 6vw, 2rem) !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
  }

  .hero-area3 .left-content .btn-primary {
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  }

  .hero-area3 .background {
    border-radius: 16px;
  }
}

@media (max-width: 576px) {
  .hero-area3 .item {
    min-height: 320px;
    padding: 24px 14px 32px !important;
  }

  .hero-area3.hero-area4 .item {
    min-height: 340px;
  }
}

/* Theme 1: mobile only — two hero banners in one row under slider (d-lg-none in Blade) */
@media (max-width: 991.98px) {
  .hero-mobile-banners {
    margin-top: 10px;
  }

  .hero-mobile-banner-tile {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    height: 104px;
    background: #f5f5f5;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  }

  .hero-mobile-banner-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .hero-mobile-banner-tile .inner-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 7px 9px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.72) 100%);
  }

  .hero-mobile-banner-tile .inner-content p {
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #fff;
  }

  .hero-mobile-banner-tile .inner-content h4 {
    font-size: 12px;
    line-height: 1.2;
    margin: 0;
    color: #fff;
    font-weight: 600;
  }

  /* Mobile-only: hide mini-banner text overlay */
  .hero-mobile-banner-tile .inner-content {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .hero-mobile-banner-tile {
    height: 96px;
  }
}

/* Theme 1 mobile hero: keep slider + banners aligned like reference */
@media (max-width: 991.98px) {
  .slider-area-wrapper .row.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
  }

  .hero-mobile-banners {
    margin-top: 10px;
  }
}

/* Hide service cards on mobile */
@media (max-width: 991.98px) {
  .service-section {
    display: none !important;
  }
}

/* Mobile hamburger menu: accordion categories list */
@media (max-width: 991.98px) {
  .mobile-menu .mobile-menu-signin-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-menu .mobile-menu-signin-link i {
    font-size: 17px;
  }

  .mobile-menu .slideable-menu {
    padding: 0;
    border-top: 0;
  }

  .mobile-menu .mobile-accordion-menu {
    margin: 0;
    padding: 0;
  }

  .mobile-menu .mobile-accordion-menu > li {
    list-style: none;
  }

  .mobile-menu .mobile-accordion-menu a {
    display: block;
    padding: 13px 18px;
    border-bottom: 1px solid #e5e5e5;
    color: #505050;
    font-size: 16px;
    letter-spacing: 0.025em;
    text-decoration: none;
  }

  .mobile-menu .mobile-accordion-menu__divider {
    list-style: none;
    height: 1px;
    background: #e5e5e5;
    margin: 10px 0;
  }

  .mobile-menu .mobile-accordion-menu__row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    touch-action: manipulation;
  }

  .mobile-menu .mobile-accordion-menu__row > a {
    flex: 1;
    border-bottom: 0;
    padding-right: 8px;
  }

  .mobile-menu .mobile-accordion-menu__toggle {
    width: 56px;
    height: 100%;
    min-height: 52px;
    border: 0;
    background: transparent;
    border-left: 1px solid #e5e5e5;
    position: relative;
  }

  .mobile-menu .mobile-accordion-menu__toggle > i {
    font-size: 16px;
    line-height: 1;
    color: #505050;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .mobile-menu li.has-children.is-open > .mobile-accordion-menu__row .mobile-accordion-menu__toggle > i {
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .mobile-menu .mobile-accordion-menu__submenu {
    display: none;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
  }

  /* Visibility is controlled by jQuery slideDown/slideUp only — do not force display:block
     on .is-open or the first tap fights slideToggle/slideDown. */

  .mobile-menu .mobile-accordion-menu__submenu a {
    padding-left: 28px;
    font-size: 15px;
    border-bottom-color: rgba(0, 0, 0, 0.06);
  }

  .mobile-menu .mobile-accordion-menu__submenu .mobile-accordion-menu__submenu a {
    padding-left: 42px;
    font-size: 14px;
  }
}

/* Featured Categories — icon grid below service cards (theme1) */
.fc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.featured-categories-hero {
  background: transparent;
  padding-top: clamp(24px, 3vw, 44px);
  padding-bottom: clamp(24px, 3vw, 44px);
}

/* Title uses same .section-title + h2.h3 as Deals Of The Week (global styles.min.css) */

.featured-categories-hero__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

@media (min-width: 576px) {
  .featured-categories-hero__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 992px) {
  .featured-categories-hero__grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    justify-items: stretch;
    column-gap: 10px;
    row-gap: 10px;
  }
}

.featured-categories-hero__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #3c3c3c;
  min-height: 100%;
  padding: 2px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.featured-categories-hero__tile:hover {
  color: #1d2530;
  transform: translateY(-2px);
}

.featured-categories-hero__tile:hover .featured-categories-hero__img-wrap {
  box-shadow: 0 4px 14px color-mix(in srgb, var(--theme-primary) 22%, transparent);
}

.featured-categories-hero__tile:focus,
.featured-categories-hero__tile:focus-visible {
  outline: none;
  color: #1d2530;
}

.featured-categories-hero__tile:focus-visible .featured-categories-hero__img-wrap,
.featured-categories-hero__tile:focus .featured-categories-hero__img-wrap {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 32%, #fff);
}

.featured-categories-hero__img-wrap {
  width: 112px;
  height: 112px;
  max-width: 112px;
  flex-shrink: 0;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 6px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--theme-primary);
  box-shadow: none;
  transition: box-shadow 0.2s ease;
}

.featured-categories-hero__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.featured-categories-hero__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 4px;
  background: #eceef0;
}

.featured-categories-hero__label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #2f3a4a;
  max-width: 100%;
}

.featured_cat_sec__tabs-bar {
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 0;
  margin-bottom: 25px;
  justify-content: flex-end;
}

.featured_cat_sec__tabs-bar .links {
  margin-left: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.featured_cat_sec__tabs-bar .links a {
  margin-left: 0;
  margin-right: 20px;
}

.featured_cat_sec__tabs-bar .links a:last-child {
  margin-right: 0;
}

/* Top navbar categories: single-line row; horizontal scroll only on small screens.
   overflow-x: auto on desktop clips absolutely positioned .t-h-dropdown-menu (submenus never show). */
.site-header .site-menu > ul {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

@media (min-width: 992px) {
  .site-header .site-menu > ul {
    overflow: visible;
  }

  /* Category bar: use full container width; spread links so first/last sit at the edges
     and gaps shrink as more categories are added (justify-content: space-between). */
  .site-header .navbar .nav-inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .site-header .navbar .site-menu {
    width: 100%;
    max-width: 100%;
  }

  .site-header .navbar .site-menu > ul {
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
  }

  .site-header .navbar .site-menu > ul > li:last-child > a.main-link {
    padding-right: 0;
  }

  .site-header .site-menu > ul > li.t-h-dropdown {
    position: relative;
    z-index: 2;
  }

  .site-header .site-menu > ul > li.t-h-dropdown:hover {
    z-index: 1001;
  }
}

.site-header .site-menu > ul::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Let flyouts escape the horizontal scroller while a submenu is open */
.site-header .site-menu > ul:has(> li.t-h-dropdown.is-open),
.site-header .site-menu > ul:has(> li.t-h-dropdown:hover) {
  overflow: visible;
}

.site-header .site-menu > ul > li {
  display: block; /* override table-cell */
}

.site-header .site-menu > ul > li,
.site-header .site-menu a.main-link {
  white-space: nowrap;
}

.site-header .site-menu > ul > li > a {
  padding: 10px 14px;
  font-size: 13px;
}

.site-header .site-menu > ul > li > a:first-child {
  padding-left: 0;
}

.site-header .site-menu > ul > li > a i.icon-chevron-down {
  font-size: 12px;
  margin-left: 6px;
}

/* Primary hover for category row (navbar) — uses theme color from :root */
.site-header .navbar .site-menu > ul > li > a.main-link {
  border-radius: 6px;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.site-header .navbar .site-menu > ul > li:hover > a.main-link,
.site-header .navbar .site-menu > ul > li > a.main-link:hover {
  color: #ffffff !important;
  background-color: var(--theme-secondary, #ff8c00);
}

/* Keep active category visible on catalog/category pages */
.site-header .navbar .site-menu > ul > li.active > a.main-link {
  color: #ffffff !important;
  background-color: var(--theme-secondary, #ff8c00);
}

.site-header .navbar .site-menu .t-h-dropdown-menu .sub-menu > li > a {
  border-radius: 4px;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.site-header .navbar .site-menu .t-h-dropdown-menu .sub-menu > li > a:hover {
  color: #ffffff !important;
  background-color: var(--theme-secondary, #ff8c00);
}

/* Dropdown categories */
/* Mobile/touch: click-to-open (JS adds .is-open) */
@media (max-width: 991.98px) {
  .site-header .site-menu > ul > li.t-h-dropdown .t-h-dropdown-menu {
    opacity: 0;
    visibility: hidden;
  }

  .site-header .site-menu > ul > li.t-h-dropdown.is-open > .t-h-dropdown-menu,
  .site-header .site-menu > ul > li.t-h-dropdown:hover > .t-h-dropdown-menu {
    opacity: 1;
    visibility: visible;
  }
}

/* Desktop: hover open (no reliance on (hover:hover) — hybrid laptops often report hover: none) */
@media (min-width: 992px) {
  .site-header .site-menu > ul > li.t-h-dropdown > .t-h-dropdown-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .site-header .site-menu > ul > li.t-h-dropdown:hover > .t-h-dropdown-menu,
  .site-header .site-menu > ul > li.t-h-dropdown.is-open > .t-h-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* Make nested sub-menus inside the category dropdown work */
.site-header .site-menu > ul > li.t-h-dropdown > .t-h-dropdown-menu {
  padding: 10px 0;
}

.site-header .site-menu > ul > li.t-h-dropdown > .t-h-dropdown-menu > .sub-menu {
  position: static;
  display: block;
  opacity: 1;
  visibility: visible;
  width: auto;
  min-width: 220px;
  border-top: 0;
  box-shadow: none;
  background: transparent;
}

.site-header .site-menu > ul > li.t-h-dropdown > .t-h-dropdown-menu > .sub-menu > li > a {
  padding: 10px 16px;
  font-size: 13px;
}

.site-header .site-menu > ul > li.t-h-dropdown > .t-h-dropdown-menu .sub-menu .sub-menu {
  top: 0;
}

/* Catalog mobile: Sort / Filter controls like reference */
@media (max-width: 767.98px) {
  .catalog-page-title {
    margin-bottom: 10px;
  }

  .catalog-page-content {
    padding-top: 0 !important;
  }

  .shop-top-filter-wrapper {
    border: 0;
    box-shadow: none;
    padding: 0;
    margin-top: 0;
    margin-bottom: 8px;
  }

  .shop-top-filter-wrapper .quickFilter {
    display: none;
  }

  .shop-top-filter-wrapper .shop-view {
    display: none;
  }

  .shop-top-filter-wrapper .gd-text-sm-center .sptfl {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .shop-top-filter-wrapper .shop-sorting {
    display: flex;
    align-items: center;
    width: calc(50% - 5px);
    margin: 0;
    text-align: left;
  }

  .shop-top-filter-wrapper .shop-sorting label,
  .shop-top-filter-wrapper .shop-sorting span,
  .shop-top-filter-wrapper #catalog_showing_range {
    display: none !important;
  }

  .shop-top-filter-wrapper .shop-sorting #sorting {
    display: block;
    width: 100%;
    height: 40px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--theme-primary) 34%, #ffffff);
    background: color-mix(in srgb, var(--theme-primary) 8%, #ffffff);
    color: var(--theme-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 0 36px 0 14px;
    -webkit-appearance: none;
    appearance: none;
  }

  .catalog-mobile-sort-wrap {
    position: relative;
    width: 100%;
  }

  .catalog-mobile-sort-wrap > i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--theme-primary);
    pointer-events: none;
  }

  .catalog-mobile-filter-btn {
    width: calc(50% - 5px);
    height: 40px;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    border: 0;
    border-radius: 999px;
    background: var(--theme-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--theme-primary) 30%, transparent);
  }

  .catalog-mobile-filter-btn i {
    font-size: 14px;
  }

  .shop-top-filter-wrapper .shop-sorting #sorting:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-primary) 22%, #ffffff);
  }

  .catalog-mobile-filter-btn:hover,
  .catalog-mobile-filter-btn:focus {
    background: var(--theme-secondary);
    color: #fff;
  }
}

/* Theme1 product strips: 6 cols desktop (full row, no gap), 2 cols mobile — loads after responsive.css */
.newproduct-section .new-product-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.newproduct-section .new-product-grid__item {
  min-width: 0;
}

@media (max-width: 991.98px) {
  .newproduct-section .new-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
