/* ==========================================================================
   Karachi Laptop House - Mobile Navigation & Responsive Overrides
   ========================================================================== */

.mobile-menu {
  display: none;
}

.mobile-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #fff;
  padding: 80px 24px 30px;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.mobile-panel.show {
  display: flex !important;
}

.mobile-panel a {
  color: var(--ink);
  text-decoration: none;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.04em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.mobile-panel button {
  position: absolute;
  right: 18px;
  top: 18px;
  border: 0;
  background: var(--surface);
  border-radius: 9px;
  width: 38px;
  height: 38px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-chips {
  display: none;
  gap: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.brand-chips::-webkit-scrollbar {
  display: none;
}

.brand-chip {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: 500 12px Inter;
  color: #515966;
  cursor: pointer;
  white-space: nowrap;
  transition: .2s ease;
}

.brand-chip:hover, .brand-chip.active {
  border-color: #b9caf6;
  color: var(--blue);
  background: #f4f7ff;
}

.filter-toggle {
  display: none;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font: 600 11px Inter;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  gap: 6px;
}

.filter-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(20, 25, 33, .33);
}

.filter-backdrop.show {
  display: block;
}

.filter-sheet-handle, .filter-apply {
  display: none;
}

.sticky-buy-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(26, 36, 50, .06);
  gap: 9px;
  align-items: center;
}

.sticky-buy-bar .button {
  flex: 1;
  padding: 14px 17px;
}

.sticky-buy-bar .wishlist {
  width: 47px;
  height: 47px;
  flex-shrink: 0;
}

.sticky-checkout-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(26, 36, 50, .06);
}

.sticky-checkout-bar .button {
  width: 100%;
  padding: 14px 18px;
}

.empty-bag {
  text-align: center;
  padding: 60px 20px;
  border-top: 1px solid var(--line);
}

.empty-bag h2 {
  font-size: 20px;
  letter-spacing: -.05em;
  margin: 0 0 8px;
}

.empty-bag p {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 22px;
}

/* ==========================================================================
   Responsive Breakpoints: 1024px, 768px, 480px
   ========================================================================== */

/* ── 1024px Breakpoint ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Catalog / Shop layouts on large tablets */
  .catalog-layout {
    gap: 32px;
  }
}

/* ── 768px Breakpoint ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Mobile Hamburger Menu button */
  .mobile-menu {
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--surface);
    height: 36px;
    width: 36px;
    border-radius: 9px;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
  }
  
  .brand-chips {
    display: flex;
  }
  .filter-toggle {
    display: inline-flex;
  }
  .catalog-layout .filters {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px 18px 0 0;
    padding: 0 18px 28px;
    box-shadow: 0 -8px 40px rgba(26, 36, 50, .12);
    transform: translateY(100%);
    transition: transform .3s ease;
    border-top: 0;
  }
  .catalog-layout .filters.open {
    display: block;
    transform: translateY(0);
  }
  .catalog-layout .filters .filter-title {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    padding-top: 22px;
  }
  .filter-sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 4px;
    background: var(--line);
    margin: 12px auto 0;
    display: block;
  }
  .filter-apply {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 14px 18px;
  }
  .products-toolbar {
    align-items: center;
    gap: 10px;
  }
  .products-toolbar .toolbar-end {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .sticky-buy-bar {
    display: flex;
  }
  .product-page .buy-actions, .product-page .buy-note {
    display: none;
  }
  .product-page {
    padding-bottom: 90px;
  }
  .sticky-checkout-bar {
    display: block;
  }
  .checkout .place-order {
    display: none;
  }
  .checkout {
    padding-bottom: 90px;
  }
}

/* ── 480px Breakpoint ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .mobile-menu {
    height: 36px;
    width: 36px;
    font-size: 17px;
  }
}
