/**
 * Sanaky performance / CLS / mobile layout fixes
 * Loaded after style.css — overrides only; does not rewrite the theme.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   Hero carousel — Pureit-like full-bleed banner + side arrows + CLS-safe
   -------------------------------------------------------------------------- */
.slider-area,
.sanaky-banner {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #e9eef2;
}

.header-area-wrapper.header-carousel-two,
.header-area-wrapper.header-carousel-two.owl-carousel {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: var(--sanaky-hero-ratio, 1900 / 600);
  min-height: 0;
  max-height: none;
  background-color: #e9eef2;
  overflow: hidden;
  position: relative !important;
}

.header-area-wrapper.header-carousel-two:not(.owl-loaded) .product-home-header-area:not(:first-child) {
  display: none;
}

/* Keep stage below controls so dots/arrows stay visible on image */
.header-area-wrapper.header-carousel-two .owl-stage-outer {
  position: relative;
  z-index: 1;
  height: 100%;
}

.header-area-wrapper.header-carousel-two .owl-stage,
.header-area-wrapper.header-carousel-two .owl-item {
  height: 100%;
}

.header-area-wrapper.header-carousel-two .owl-nav {
  margin: 0;
  z-index: 12;
}

.header-area-wrapper.header-carousel-two .owl-nav button,
.header-area-wrapper.header-carousel-two .owl-nav [class*="owl-"] {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  width: 44px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(60, 70, 80, 0.45) !important;
  color: #fff !important;
  font-size: 1.4rem !important;
  line-height: 56px !important;
  text-align: center;
  transition: background-color 0.2s ease;
}

.header-area-wrapper.header-carousel-two .owl-nav .owl-prev {
  left: 12px;
}

.header-area-wrapper.header-carousel-two .owl-nav .owl-next {
  right: 12px;
}

.header-area-wrapper.header-carousel-two .owl-nav button:hover,
.header-area-wrapper.header-carousel-two .owl-nav [class*="owl-"]:hover {
  background: rgba(40, 50, 60, 0.72) !important;
}

/* Dots float on image, bottom-center — always visible */
.header-area-wrapper.header-carousel-two .owl-dots,
.header-area-wrapper.header-carousel-two.owl-carousel .owl-dots {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 16px !important;
  transform: translateX(-50%) !important;
  z-index: 15 !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  width: auto !important;
  height: auto !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.4) !important;
  border-radius: 999px;
  line-height: 0;
}

.header-area-wrapper.header-carousel-two .owl-dots.disabled {
  display: flex !important;
}

.header-area-wrapper.header-carousel-two .owl-dots .owl-dot {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  outline: none;
  border: 0;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  float: none !important;
  width: auto !important;
  height: auto !important;
}

.header-area-wrapper.header-carousel-two .owl-dots .owl-dot span {
  display: block !important;
  width: 10px !important;
  height: 10px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 0 !important;
  box-shadow: none !important;
  transition: width 0.2s ease, background-color 0.2s ease, border-radius 0.2s ease;
}

.header-area-wrapper.header-carousel-two .owl-dots .owl-dot.active span {
  background: #3272BA !important;
  width: 22px !important;
  border-radius: 999px !important;
}

.header-area-wrapper.header-carousel-two .product-home-header-area,
.header-area-wrapper.header-carousel-two .hero-slide {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.hero-slide__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.header-area-wrapper.header-carousel-two .hero-slide__img,
.header-area-wrapper.header-carousel-two .product-home-header-area img,
.header-area-wrapper.header-carousel-two .hero-slide__video {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 991px) {
  .header-area-wrapper.header-carousel-two,
  .header-area-wrapper.header-carousel-two.owl-carousel {
    aspect-ratio: var(--sanaky-hero-ratio, 1900 / 600);
    min-height: 0;
  }

  .header-area-wrapper.header-carousel-two .owl-nav button,
  .header-area-wrapper.header-carousel-two .owl-nav [class*="owl-"] {
    width: 36px;
    height: 48px;
    line-height: 48px !important;
    font-size: 1.15rem !important;
  }
}

@media (max-width: 575px) {
  .header-area-wrapper.header-carousel-two,
  .header-area-wrapper.header-carousel-two.owl-carousel {
    aspect-ratio: var(--sanaky-hero-ratio, 1900 / 600);
    min-height: 0;
    max-height: none;
  }

  .header-area-wrapper.header-carousel-two .owl-nav .owl-prev {
    left: 6px;
  }

  .header-area-wrapper.header-carousel-two .owl-nav .owl-next {
    right: 6px;
  }
}

@media (max-width: 425px) {
  .header-area-wrapper {
    width: 100% !important;
    height: auto !important;
  }

  .product-home-header-area img {
    width: 100% !important;
    height: 100% !important;
  }
}

/* --------------------------------------------------------------------------
   Product cards — fixed image box (featured products CLS ~0.21)
   -------------------------------------------------------------------------- */
.single-feature-product .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f6f8;
}

.single-feature-product .thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.single-feature-product .thumb img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.single-feature-product .content.content-compact {
  width: 100%;
}

@media (max-width: 575px) {
  .featured-products-grid .cart-btn .boxed-btn {
    font-size: 12px;
    padding: 6px 10px;
    min-width: 0;
  }
}

/* --------------------------------------------------------------------------
   Brand logos — reserved square, no layout jump
   -------------------------------------------------------------------------- */
.brand-logo-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-brands-area .brand-item {
  width: 95px;
  height: 95px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.trust-brands-area .brand-item img {
  width: 95px;
  height: 95px;
  object-fit: contain;
}

@media (max-width: 575px) {
  .brand-logo-col {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    width: auto !important;
    height: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Testimonials avatars
   -------------------------------------------------------------------------- */
.testimonial-carousel-08 .thumb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.testimonial-carousel-08 .thumb img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Blog cards
   -------------------------------------------------------------------------- */
.single-blog-grid-01 .img {
  aspect-ratio: 740 / 480;
  overflow: hidden;
  background: #f3f6f8;
}

.single-blog-grid-01 .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Mobile header / bottom nav
   -------------------------------------------------------------------------- */
.search-toggle-btn {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
  line-height: 1;
}

.bottom-menu {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
}

.bottom-menu__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
}

.cart-icon-label {
  position: absolute;
  font-size: 40%;
  width: 100%;
  left: 0;
  bottom: 0;
  height: 18px;
  line-height: 18px;
  font-weight: 600;
}

/* Prevent horizontal overflow site-wide on small screens */
@media (max-width: 991px) {
  .product-home-header-wrapper,
  .slider-area,
  .navbar-area,
  .container {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-area-wrapper.header-carousel-two .owl-item,
  .hover-box-shadow {
    transition: none !important;
    animation: none !important;
  }
}
