/* Production device architecture override layer.
   Loaded after page-level styles so desktop/laptop can never inherit the webapp shell. */

body.ekasha-device-pending .mobile-bottom-nav,
body.ekasha-device-pending .mobile-nav,
body.ekasha-device-pending .mobile-nav-overlay,
body.ekasha-device-pending .mobile-search-panel,
body:not(.ekasha-device-mobile):not(.ekasha-device-tablet) .mobile-bottom-nav,
body:not(.ekasha-device-mobile):not(.ekasha-device-tablet) .mobile-nav,
body:not(.ekasha-device-mobile):not(.ekasha-device-tablet) .mobile-nav-overlay,
body:not(.ekasha-device-mobile):not(.ekasha-device-tablet) .mobile-search-panel,
body:not(.ekasha-device-mobile):not(.ekasha-device-tablet) .mobile-filter-footer,
body:not(.ekasha-device-mobile):not(.ekasha-device-tablet) .mobile-filter-close,
body.ekasha-device-desktop .quick-view-touch-trigger,
body.ekasha-device-desktop .catalog-mobile-controls,
body.ekasha-device-desktop .catalog-mobile-overlay,
body.ekasha-device-desktop .catalog-sort-sheet,
body.ekasha-device-desktop .mobile-filter-footer,
body.ekasha-device-desktop .mobile-filter-close,
body.ekasha-device-desktop .ekasha-route-loader,
body.ekasha-device-desktop .ekasha-refresh-indicator {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.ekasha-device-desktop {
  padding-bottom: 0 !important;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto !important;
}

body.ekasha-device-desktop.page-ready:not(.mobile-ui-open):not(.header-search-open):not(.tablet-search-open):not(.catalog-sheet-open):not(.ekasha-qv-open):not(.modal-open) {
  overflow-y: auto !important;
}

body.ekasha-device-desktop.mobile-ui-open,
body.ekasha-device-desktop.header-search-open,
body.ekasha-device-desktop.tablet-search-open,
body.ekasha-device-desktop.catalog-sheet-open {
  overflow: auto !important;
  touch-action: auto !important;
}

body.ekasha-device-desktop .ekasha-app-view {
  padding: 0 !important;
  transform: none !important;
  transition: none !important;
}

body.ekasha-device-desktop .ekasha-navbar {
  background: #FAF7F2 !important;
  border-bottom: 1px solid rgba(201,169,98,0.15) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
}

body.ekasha-device-desktop .navbar-inner {
  max-width: 1400px !important;
  height: 72px !important;
  min-height: 72px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 2rem !important;
}

body.ekasha-device-desktop .brand-logo {
  grid-column: auto !important;
  justify-self: auto !important;
  margin: 0 !important;
  gap: 0.9rem !important;
  font-size: 1.75rem !important;
}

body.ekasha-device-desktop .brand-logo-image,
body.ekasha-device-desktop .ekasha-navbar > .navbar-inner > .brand-logo .brand-logo-image {
  width: 48px !important;
  height: 48px !important;
}

body.ekasha-device-desktop .nav-links {
  display: flex !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(1rem, 2.4vw, 2.2rem) !important;
}

body.ekasha-device-desktop .nav-actions {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 1.25rem !important;
  margin-left: auto !important;
}

body.ekasha-device-desktop .search-bar {
  display: block !important;
  width: min(430px, 42vw) !important;
  margin: 0 !important;
}

body.ekasha-device-desktop .ekasha-navbar .nav-actions > .search-bar:not(.mobile-search-bar),
body.ekasha-device-desktop .ekasha-navbar .nav-actions .search-bar#search-bar-wrap {
  display: block !important;
  position: relative !important;
  width: min(430px, 42vw) !important;
  max-width: 430px !important;
  min-width: 260px !important;
  margin: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.ekasha-device-desktop .search-bar input {
  min-height: auto !important;
  border-radius: 999px !important;
  padding: 0.75rem 3rem 0.75rem 1.5rem !important;
  font-size: 0.9375rem !important;
}

body.ekasha-device-desktop .ekasha-navbar .nav-actions > .search-bar:not(.mobile-search-bar) input,
body.ekasha-device-desktop .ekasha-navbar .nav-actions .search-bar#search-bar-wrap input {
  display: block !important;
  width: 100% !important;
}

body.ekasha-device-desktop .nav-account-pill {
  display: inline-flex !important;
}

body.ekasha-device-desktop .mobile-search-btn,
body.ekasha-device-desktop .mobile-wishlist-btn,
body.ekasha-device-desktop .mobile-menu-btn {
  display: none !important;
}

body.ekasha-device-desktop .container,
body.ekasha-device-desktop .container-narrow {
  max-width: 1280px !important;
}

body.ekasha-device-desktop .container-narrow {
  margin: 0 auto !important;
  padding: 0 1.5rem !important;
}

body.ekasha-device-desktop .home-slider {
  margin: 0 !important;
  border-radius: 0 !important;
}

.home-slider,
.home-slider__track,
.home-slider__slide {
  touch-action: pan-y pinch-zoom !important;
}

.home-slider {
  overscroll-behavior-x: contain !important;
  overscroll-behavior-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

body.ekasha-device-desktop .home-slider__track {
  height: clamp(620px, 86vh, 850px) !important;
  min-height: 80vh !important;
  max-height: 850px !important;
}

body.ekasha-device-desktop .home-slider__content {
  min-height: clamp(620px, 86vh, 850px) !important;
  max-height: 850px !important;
  padding: 5.5rem 0 !important;
}

body.ekasha-device-desktop .home-slider__nav {
  top: 50% !important;
  bottom: auto !important;
  width: 52px !important;
  height: 52px !important;
  transform: translateY(-50%) !important;
}

body.ekasha-device-desktop .home-slider__nav--prev {
  left: 1.5rem !important;
}

body.ekasha-device-desktop .home-slider__nav--next {
  right: 1.5rem !important;
}

body.ekasha-device-desktop .home-slider__dots {
  left: 50% !important;
  right: auto !important;
  bottom: 1.5rem !important;
  transform: translateX(-50%) !important;
}

body.ekasha-device-desktop .section-padding {
  padding: 5rem 0 !important;
}

body.ekasha-device-desktop .section-header {
  text-align: center !important;
  margin-bottom: 3.5rem !important;
}

body.ekasha-device-desktop .category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1.5rem !important;
  overflow: visible !important;
  margin-inline: 0 !important;
  padding: 0 !important;
}

body.ekasha-device-desktop .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  gap: 1.5rem !important;
  align-items: stretch !important;
}

body.ekasha-device-desktop .product-card {
  border-radius: 16px !important;
  box-shadow: var(--shadow-sm) !important;
  content-visibility: visible !important;
  contain-intrinsic-size: auto !important;
}

body.ekasha-device-desktop .product-image-wrap {
  aspect-ratio: 3 / 4 !important;
}

body.ekasha-device-desktop .product-actions {
  display: flex !important;
}

body.ekasha-device-desktop .product-actions .quick-view-trigger span {
  display: none !important;
}

body.ekasha-device-desktop .catalog-toolbar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 2rem !important;
  padding-bottom: 1rem !important;
}

body.ekasha-device-desktop .catalog-toolbar > div:last-child,
body.ekasha-device-desktop .products-toolbar-controls {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 1rem !important;
  width: auto !important;
}

body.ekasha-device-desktop .catalog-toolbar .sort-dropdown,
body.ekasha-device-desktop .products-toolbar-per-page {
  display: flex !important;
}

body.ekasha-device-desktop [data-catalog-app] .catalog-toolbar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  border-bottom: 1px solid var(--gray-200) !important;
  background: transparent !important;
}

body.ekasha-device-desktop [data-catalog-app] .catalog-toolbar > .d-flex.align-items-center.gap-3.flex-wrap,
body.ekasha-device-desktop [data-catalog-app] .products-toolbar-controls,
body.ekasha-device-desktop .new-arrival-catalog .catalog-toolbar > .d-flex.align-items-center.gap-3.flex-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 1rem !important;
  width: auto !important;
  flex-wrap: wrap !important;
}

body.ekasha-device-desktop [data-catalog-app] .products-toolbar-controls .sort-dropdown,
body.ekasha-device-desktop [data-catalog-app] .catalog-toolbar > .d-flex.align-items-center.gap-3.flex-wrap .sort-dropdown,
body.ekasha-device-desktop .new-arrival-catalog .catalog-toolbar > .d-flex.align-items-center.gap-3.flex-wrap .sort-dropdown {
  display: flex !important;
}

body.ekasha-device-desktop [data-catalog-app] .products-toolbar-per-page,
body.ekasha-device-desktop [data-catalog-app] .catalog-toolbar > .d-flex.align-items-center.gap-3.flex-wrap > .d-flex.align-items-center.gap-2,
body.ekasha-device-desktop .new-arrival-catalog .catalog-toolbar > .d-flex.align-items-center.gap-3.flex-wrap > .d-flex.align-items-center.gap-2 {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.ekasha-device-desktop .filter-sidebar {
  display: block !important;
  position: sticky !important;
  top: 90px !important;
  max-height: calc(100vh - 110px) !important;
  width: auto !important;
  height: auto !important;
  padding: 1.5rem !important;
  border-radius: 16px !important;
  transform: none !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.ekasha-device-desktop [data-catalog-app] .filter-sidebar,
body.ekasha-device-desktop .new-arrival-catalog .filter-sidebar {
  display: block !important;
  position: sticky !important;
  top: 90px !important;
  max-height: calc(100vh - 110px) !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 1.5rem !important;
  border: 1px solid var(--gray-200) !important;
  border-radius: 16px !important;
  background: var(--white) !important;
  box-shadow: var(--shadow-sm) !important;
  transform: none !important;
  visibility: visible !important;
  pointer-events: auto !important;
  overflow-y: auto !important;
}

body.ekasha-device-desktop .products-layout {
  display: flex !important;
  flex-wrap: wrap !important;
}

body.ekasha-device-desktop .products-layout > .col-lg-3,
body.ekasha-device-desktop .products-layout > .col-md-4 {
  display: block !important;
  flex: 0 0 auto !important;
  width: 25% !important;
}

body.ekasha-device-desktop [data-catalog-app] .products-layout > .col-lg-3,
body.ekasha-device-desktop [data-catalog-app] .products-layout > .col-md-4,
body.ekasha-device-desktop .new-arrival-catalog .products-layout > .col-lg-3,
body.ekasha-device-desktop .new-arrival-catalog .products-layout > .col-md-4 {
  display: block !important;
  flex: 0 0 auto !important;
  width: 25% !important;
  max-width: 25% !important;
}

body.ekasha-device-desktop .products-layout > .col-lg-9,
body.ekasha-device-desktop .products-layout > .col-md-8 {
  flex: 0 0 auto !important;
  width: 75% !important;
}

body.ekasha-device-desktop [data-catalog-app] .products-layout > .col-lg-9,
body.ekasha-device-desktop [data-catalog-app] .products-layout > .col-md-8,
body.ekasha-device-desktop .new-arrival-catalog .products-layout > .col-lg-9,
body.ekasha-device-desktop .new-arrival-catalog .products-layout > .col-md-8 {
  display: block !important;
  flex: 0 0 auto !important;
  width: 75% !important;
  max-width: 75% !important;
}

body.ekasha-device-desktop .footer-grid {
  grid-template-columns: 1.4fr repeat(3, 1fr) !important;
  gap: 1.5rem !important;
}

body.ekasha-device-desktop .footer-bottom {
  flex-direction: row !important;
}

body.ekasha-device-tablet .mobile-bottom-nav,
body.ekasha-device-mobile .mobile-bottom-nav {
  display: grid !important;
}

/* Frontend global scroll contract.
   Overlays may scroll inside their own panels, but the document root must never
   remain locked after a mobile/search/filter/quick-view state changes. */
html,
body {
  min-height: 100%;
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-y pinch-zoom !important;
  -webkit-overflow-scrolling: touch;
}

body.page-preload,
body.page-ready,
body.mobile-ui-open,
body.header-search-open,
body.tablet-search-open,
body.catalog-sheet-open,
body.ekasha-qv-open,
body.ekasha-product-modal-open,
body.modal-open {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  touch-action: pan-y pinch-zoom !important;
}

.page-shell,
#ekashaAppView,
.ekasha-app-view {
  min-height: 100%;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  touch-action: pan-y pinch-zoom !important;
}

.mobile-search-shell,
.filter-sidebar.mobile-panel,
.catalog-sort-sheet,
.ekasha-qv,
.ekasha-qv-info,
.modal,
.modal-dialog {
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-overlay:not(.is-open),
.catalog-mobile-overlay:not(.is-open),
.mobile-search-panel:not(.is-open),
.catalog-sort-sheet:not(.is-open),
.filter-sidebar.mobile-panel:not(.is-open),
.ekasha-qv-backdrop:not(.is-open) {
  pointer-events: none !important;
}
