/* Shared UI corrections for the storefront, account, and authentication screens. */
html { min-width: 320px; }
body { min-width: 320px; }

:focus-visible {
  outline: 2px solid #adc6ff;
  outline-offset: 3px;
}

button, input, select, textarea { font: inherit; }
button:disabled { cursor: not-allowed; opacity: .58; }
input, select, textarea { max-width: 100%; }
img { height: auto; }

/* Shared storefront navigation: fixed placement and identical type/icon sizing. */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(16, 19, 26, .94);
  border-bottom: 1px solid rgba(173,198,255,.14);
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}
.navbar-inner {
  min-height: 72px;
  gap: 24px;
  padding: 12px clamp(16px, 4vw, 32px);
}
.navbar .brand {
  flex: 0 0 auto;
  font-family: var(--font-display, Montserrat, sans-serif);
  font-size: clamp(23px, 2.5vw, 30px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
}
.navbar .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 4px 0;
  color: var(--on-surface-variant, #c2c6d6);
  font-family: var(--font-label, Inter, sans-serif);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: var(--primary, #adc6ff); }
.navbar .nav-link.active { border-bottom: 2px solid var(--primary, #adc6ff); }
.navbar .nav-actions,
.navbar .icon-buttons { display: flex; align-items: center; }
.navbar .icon-buttons { gap: 8px; }
.navbar .icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--on-surface, #e1e2ec);
}
.navbar .icon-btn .material-symbols-outlined {
  font-size: 22px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.navbar .icon-btn:hover,
.navbar .icon-btn.active {
  color: var(--primary, #adc6ff);
  background: rgba(173,198,255,.1);
  border-color: rgba(173,198,255,.16);
}
.navbar .menu-btn { display: none; }
.navbar .cart-dot,
.navbar .wishlist-dot {
  position: absolute;
  top: 0;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #10131a;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font: 700 10px/1 var(--font-body, Inter, sans-serif);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Keep the selected product page clear and consistent with the storefront. */
.pagination .page-btn {
  min-width: 40px;
  min-height: 40px;
  border-radius: 9px;
  font-weight: 700;
}
.pagination .page-num.active,
.pagination .page-btn[aria-current="page"] {
  color: var(--on-primary, #002e6a);
  background: var(--primary, #adc6ff);
  border-color: var(--primary, #adc6ff);
  box-shadow: 0 0 0 3px rgba(173,198,255,.2), 0 5px 16px rgba(0,0,0,.24);
  cursor: default;
}
.pagination .page-nav.disabled { opacity: .4; pointer-events: none; }

/* Fixed storefront navigation needs room on narrow viewports. */
@media (max-width: 767px) {
  .navbar-inner { min-height: 62px; gap: 10px; padding: 9px 14px; }
  .navbar .nav-links { display: none; }
  .navbar .brand { font-size: clamp(22px, 6vw, 28px); }
  .navbar .icon-buttons { gap: 3px; }
  .navbar .icon-btn { width: 36px; height: 36px; }
  .navbar .icon-btn .material-symbols-outlined { font-size: 21px; }
  .navbar .menu-btn { display: inline-flex; }
  .navbar .user-name { display: none; }
}

@media (min-width: 768px) {
  .navbar .menu-btn { display: none; }
}

/* Keep account pages scrollable when their content exceeds the viewport. */
.dashboard { min-height: 100vh; height: auto; overflow: visible; }
.dashboard > .panel { min-width: 0; }

@media (max-width: 820px) {
  .dashboard { flex-direction: column; }
  .dashboard > .sidebar { width: 100%; height: auto; }
  .dashboard > .sidebar .side-nav { flex-direction: row; overflow-x: auto; }
  .dashboard > .sidebar .nav-item { flex: 0 0 auto; }
  .dashboard > .panel { padding: 24px 20px; }
}

@media (max-width: 560px) {
  .dashboard > .panel { padding: 20px 14px; }
  .modal { width: min(100% - 28px, 440px); margin: 14px; }
  .otp-input-wrap, .otp-inputs { gap: clamp(5px, 2vw, 10px); }
  .otp-box { width: clamp(36px, 12vw, 48px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
