/* =========================================================
   AL-AQSA — Premium Layout Fix
   Root-cause responsive overflow repair (not a cheat hide)
   ========================================================= */

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: inherit; }

html, body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

body.aq-premium {
  overflow-x: hidden; /* Safari fallback */
  overflow-x: clip;
  position: relative;
  min-width: 0 !important;
  width: 100% !important;
}

/* Kill legacy min-widths / fixed desktop shells that leak sideways */
body.aq-premium .container_top,
body.aq-premium .modal-view {
  width: 100% !important;
  max-width: 100% !important;
}
body.aq-premium .modal-view {
  max-width: min(960px, calc(100vw - 24px)) !important;
  left: 50% !important;
  right: auto !important;
}

/* Consistent page containers */
body.aq-premium .container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
body.aq-premium .container-fluid {
  width: 100%;
  max-width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}
@media (min-width: 768px) {
  body.aq-premium .container,
  body.aq-premium .container-fluid {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (min-width: 1200px) {
  body.aq-premium .container {
    max-width: 1240px;
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (min-width: 1400px) {
  body.aq-premium .container {
    max-width: 1320px;
  }
}

/* Full-bleed chrome: backgrounds edge-to-edge, content in container */
body.aq-premium .aq-topbar,
body.aq-premium .aq-header,
body.aq-premium .aq-nav,
body.aq-premium .aq-mobile-header,
body.aq-premium .aq-footer {
  width: 100%;
  max-width: 100%;
}

/* Content shell */
body.aq-premium #content {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  min-width: 0;
}

/* Header / nav containment */
body.aq-premium .aq-header,
body.aq-premium .aq-mobile-header,
body.aq-premium .aq-nav,
body.aq-premium .aq-topbar {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}
body.aq-premium .aq-header-main,
body.aq-premium .aq-nav-inner {
  min-width: 0;
}
body.aq-premium .aq-search {
  min-width: 0;
  flex: 1 1 auto;
}
body.aq-premium .aq-search input {
  width: 100%;
  max-width: 100%;
}
body.aq-premium .aq-nav-primary {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}
body.aq-premium .aq-nav-primary::-webkit-scrollbar { display: none; }

/* Product grids / carousels: internal scroll only */
body.aq-premium .aq-products-wrap,
body.aq-premium .owl-carousel,
body.aq-premium .owl-stage-outer {
  max-width: 100%;
  overflow: hidden;
}
body.aq-premium .owl-carousel .owl-item {
  min-width: 0;
}
body.aq-premium .aq-product-card,
body.aq-premium .aq-cat-card,
body.aq-premium .aq-promo-card {
  max-width: 100%;
  min-width: 0;
}
body.aq-premium .aq-product-actions--dual {
  width: 100%;
}
body.aq-premium .aq-product-body h3,
body.aq-premium .aq-product-body h3 a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Hero */
body.aq-premium .aq-hero,
body.aq-premium .aq-hero-grid,
body.aq-premium .aq-hero-main {
  max-width: 100%;
  min-width: 0;
}
body.aq-premium .aq-hero-main img,
body.aq-premium .aq-hero-main > img {
  width: 100%;
  max-width: 100%;
  display: block;
}

/* Legacy mobile menu off-canvas must not expand document width */
body.aq-premium .mobile-menu {
  display: none !important;
  left: 0 !important;
  transform: none !important;
  width: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Footer */
body.aq-premium .aq-footer,
body.aq-premium footer,
body.aq-premium .aq-footer-grid {
  max-width: 100%;
  overflow-x: clip;
}
body.aq-premium .aq-footer a,
body.aq-premium .aq-footer p,
body.aq-premium .aq-footer li {
  overflow-wrap: anywhere;
}

/* =========================================================
   Floating action stack — keep fully inside viewport
   ========================================================= */
body.aq-premium .aq-float-stack {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
}
body.aq-premium .aq-float-stack > * {
  pointer-events: auto;
}
body.aq-premium .whatbtn,
body.aq-premium .cartbtn {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  margin: 0 !important;
}
body.aq-premium .whatbtn a,
body.aq-premium .whaticon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: #25d366 !important;
  color: #fff !important;
  font-size: 24px !important;
  box-shadow: 0 8px 20px rgba(11,28,44,.18);
  text-decoration: none;
}
@media (min-width: 992px) {
  /* Desktop header already has cart */
  body.aq-premium .aq-float-stack .cartbtn {
    display: none !important;
  }
}
body.aq-premium .cartbtn a h3,
body.aq-premium .cartbtn .mobilecart-qty,
body.aq-premium .carticon h3 {
  margin: 0 !important;
  min-width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: #0b1c2c !important;
  color: #c4a574 !important;
  font-size: 14px !important;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(11,28,44,.18);
  padding: 0 10px !important;
}
body.aq-premium .backtop,
body.aq-premium a.backtop {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  animation: none !important;
  -webkit-animation: none !important;
  box-shadow: 0 8px 20px rgba(11,28,44,.18) !important;
  width: 48px !important;
  height: 48px !important;
  line-height: 48px !important;
  background: #0b1c2c !important;
}
@media (max-width: 767px) {
  body.aq-premium .aq-float-stack {
    right: 10px;
    bottom: 14px;
  }
  /* Avoid covering sticky checkout bar */
  body.aq-premium.aq-qo-open .aq-float-stack,
  body.aq-premium.aq-drawer-open .aq-float-stack {
    display: none;
  }
}

/* Drawer / modal viewport safety */
body.aq-premium .aq-drawer {
  width: min(400px, 92%) !important;
  max-width: 92% !important;
}
body.aq-premium .aq-drawer-root,
body.aq-premium .aq-qo {
  max-width: 100vw;
}
body.aq-premium .aq-qo__sheet {
  max-width: min(560px, 100%) !important;
  width: 100%;
}

/* Checkout / forms */
body.aq-premium .aq-co,
body.aq-premium .aq-co-grid,
body.aq-premium .aq-co-card {
  max-width: 100%;
  min-width: 0;
}
body.aq-premium input,
body.aq-premium select,
body.aq-premium textarea,
body.aq-premium button {
  max-width: 100%;
}

/* Bootstrap rows must not create negative-margin overflow beyond padding */
body.aq-premium .row {
  margin-left: -8px;
  margin-right: -8px;
}
body.aq-premium .row > [class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
  min-width: 0;
}
@media (max-width: 575px) {
  body.aq-premium .row {
    margin-left: -6px;
    margin-right: -6px;
  }
  body.aq-premium .row > [class*="col-"] {
    padding-left: 6px;
    padding-right: 6px;
  }
}

/* Category page chips wrap */
body.aq-premium .aq-child-cats {
  max-width: 100%;
}

body.aq-premium .aq-cat-img {
  background: linear-gradient(145deg, #efe8dc, #e4d9c8);
  position: relative;
}
body.aq-premium .aq-cat-img img[src=""],
body.aq-premium .aq-cat-img img[src$="/"],
body.aq-premium .aq-cat-img img[src$="alaqsaborka.com/"] {
  opacity: 0;
}
