/* ==========================================================================
   Shimio Customer Shopping OS Stylesheet (Vanilla CSS Design System)
   ========================================================================== */

/* Disable user selection globally across the app */
*, *::before, *::after {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* Allow text selection inside inputs, textareas, and select elements */
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* 1. Theme Configuration & Variables */
:root {
  /* System font families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Outfit', Georgia, Cambria, "Times New Roman", Times, serif;

  /* Default Light Theme Tokens */
  --bg-app: #f5f5f7;
  --bg-card: #ffffff;
  --bg-header: rgba(245, 245, 247, 0.85);
  --bg-nav: rgba(255, 255, 255, 0.8);
  --text-primary: #111111;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeae;
  --accent: #000000;
  --accent-light: #eaeaea;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  
  --glass-blur: blur(16px) saturate(120%);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);

  --color-success: #34c759;
  --color-error: #ff3b30;
  --color-warning: #ff9500;
  --color-info: #007aff;
  --color-sale: #ff3b30;

  /* Animation Speeds */
  --transition-spring: cubic-bezier(0.175, 0.885, 0.32, 1.175);
  --transition-fluid: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 0.2s;
  --duration-medium: 0.35s;
}

/* Dark Mode Tokens Override */
.theme-dark {
  --bg-app: #080808;
  --bg-card: #141414;
  --bg-header: rgba(8, 8, 8, 0.85);
  --bg-nav: rgba(20, 20, 20, 0.8);
  --text-primary: #f5f5f7;
  --text-secondary: #8e8e93;
  --text-tertiary: #4c4c4c;
  --accent: #ffffff;
  --accent-light: #2c2c2e;
  --border-color: rgba(255, 255, 255, 0.08);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.7);
  
  --glass-bg: rgba(20, 20, 20, 0.6);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/* Accessibility overrides */
.accessibility-large-text {
  font-size: 1.15em !important;
}
.accessibility-high-contrast {
  --text-secondary: #000000;
  --border-color: #000000;
  --text-tertiary: #111111;
}
.theme-dark.accessibility-high-contrast {
  --text-secondary: #ffffff;
  --border-color: #ffffff;
  --text-tertiary: #f1f1f1;
}

/* Disable blur on low-end devices */
.low-performance .glass-support {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--bg-card) !important;
  box-shadow: var(--shadow-sm) !important;
}
.low-performance * {
  animation-duration: 0.1s !important;
  transition-duration: 0.1s !important;
}

/* 2. Global Resets & App Base Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

body.shimio-app-body {
  font-family: var(--font-sans);
  background-color: #f0f0f2;
  color: var(--text-primary);
  overflow-x: hidden;
  height: 100vh;
}

/* Centering framework for desktops & tablets */
.app-desktop-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 10% 20%, rgb(239, 246, 249) 0%, rgb(206, 239, 253) 90%);
}

.theme-dark .app-desktop-frame {
  background: radial-gradient(circle at 10% 20%, rgb(18, 18, 18) 0%, rgb(8, 8, 8) 90%);
}

.app-viewport {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 100vh;
  background-color: var(--bg-app);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

@media (min-width: 480px) {
  .app-viewport {
    height: 92vh;
    border-radius: 40px;
    border: 8px solid #000000;
  }
}

/* 3. Splash & Loading Screen */
.splash-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  color: #ffffff;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.splash-content {
  text-align: center;
}

.splash-logo {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 4px;
  margin-bottom: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-sub {
  font-size: 0.65rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 2rem;
  font-weight: 500;
}

.splash-shimmer-bar {
  width: 120px;
  height: 2px;
  background-color: #222222;
  border-radius: 1px;
  overflow: hidden;
  margin: 0 auto;
}

.splash-shimmer-progress {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  transform: translateX(-100%);
  animation: splashProgress 0.8s forwards ease-in-out;
}

@keyframes splashProgress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0%); }
}

.splash-screen.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

/* 4. App Header */
.app-header {
  padding: calc(16px + env(safe-area-inset-top)) 20px 8px;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-greeting {
  font-size: 0.9rem;
}

.greet-hello {
  color: var(--text-secondary);
}

.greet-name {
  font-weight: 600;
}

.delivery-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--accent-light);
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  max-width: 160px;
}

#delivery-location-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.delivery-badge svg {
  width: 12px;
  height: 12px;
}

.header-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.header-right-actions {
  display: flex;
  gap: 12px;
}

.header-action-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--accent-light);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s var(--transition-spring);
}

.header-action-btn:active {
  transform: scale(0.9);
}

.header-action-btn svg {
  width: 18px;
  height: 18px;
}

.cart-badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--color-error);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: bounce-badge 0.3s var(--transition-spring);
}

@keyframes bounce-badge {
  0% { transform: scale(0); }
  75% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* 5. Main App views structure */
.app-main-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.app-main-content::-webkit-scrollbar {
  display: none;
}

.app-view {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s cubic-bezier(0.25, 1, 0.5, 1), transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

.app-view.hidden {
  display: none !important;
}

.app-view.active {
  opacity: 1;
  transform: translateY(0);
}

/* Common Section Layouts */
.section-container {
  margin: 1.5rem 0;
  padding: 0 20px;
}

.section-label {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header-row .section-label {
  margin-bottom: 0;
}

/* 6. Navigation Dock */
.app-navbar {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  height: 64px;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-md);
  z-index: 999;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease, transform 0.2s var(--transition-spring);
  width: 55px;
  height: 100%;
  justify-content: center;
}

.nav-item:active {
  transform: scale(0.9);
}

.nav-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
  transition: transform 0.2s var(--transition-spring);
}

.nav-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.nav-item.active {
  color: var(--text-primary);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
  stroke-width: 2.5px;
}

/* 7. Home view slider and portal list */
.promo-banner-slider {
  margin: 8px 20px 16px;
  height: 140px;
  border-radius: var(--border-radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, #111111 0%, #2a2a2a 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.promo-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.promo-subtitle {
  font-size: 0.8rem;
  color: #aeaeae;
  margin-top: 4px;
}

.markets-pill-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 20px;
  margin: 0 -20px;
  scrollbar-width: none;
}

.markets-pill-container::-webkit-scrollbar {
  display: none;
}

.market-pill {
  flex: 0 0 auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--transition-spring);
}

.market-pill:active {
  transform: scale(0.95);
}

.market-pill.active {
  background-color: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent);
}

/* Horizontal Scroll for Cards */
.product-scroll-container {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 20px;
  margin: 0 -20px;
  scrollbar-width: none;
}

.product-scroll-container::-webkit-scrollbar {
  display: none;
}

/* 8. Products UI (Cards, Grid) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s var(--transition-spring), box-shadow 0.3s ease;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.product-card:active {
  transform: scale(0.97);
}

.product-card-horizontal-wrapper {
  flex: 0 0 150px;
  width: 150px;
}

.product-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--accent-light);
  overflow: hidden;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--accent);
  color: var(--bg-card);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.product-wish-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.85);
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  color: #111;
  transition: transform 0.2s var(--transition-spring), color 0.2s ease;
}

.theme-dark .product-wish-btn {
  background-color: rgba(30,30,30,0.85);
  color: #fff;
}

.product-wish-btn:active {
  transform: scale(0.85);
}

.product-wish-btn.favorited {
  color: var(--color-error);
}

.product-wish-btn.favorited svg {
  fill: var(--color-error) !important;
}

.product-info-box {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.prod-market-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.prod-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em;
}

.prod-price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.prod-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.prod-reg-price {
  font-size: 0.75rem;
  text-decoration: line-through;
  color: var(--text-tertiary);
}

.prod-discount {
  font-size: 0.7rem;
  color: var(--color-sale);
  font-weight: 700;
}

/* Spotlight Card Banner */
.spotlight-card {
  margin: 1.5rem 20px;
  height: 200px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.spotlight-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(360deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 70%);
  z-index: 1;
}

.spotlight-info {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

.spotlight-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #aeaeae;
  margin-bottom: 6px;
  font-weight: 700;
}

.spotlight-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

/* Countdown Clock */
.countdown-timer {
  background-color: var(--accent);
  color: var(--bg-card);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: monospace;
}

/* Skeleton Shimmer States */
.shimmer {
  background: linear-gradient(90deg, var(--accent-light) 25%, var(--border-color) 50%, var(--accent-light) 75%);
  background-size: 200% 100%;
  animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  aspect-ratio: 0.8;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-sm);
}

.skeleton-title {
  width: 80%;
  height: 12px;
  border-radius: 4px;
}

.skeleton-price {
  width: 40%;
  height: 16px;
  border-radius: 4px;
  margin-top: auto;
}

/* 9. Categories View Components */
.categories-header-panel {
  padding: 24px 20px 12px;
}

.view-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.view-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.markets-vertical-list {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  padding: 0 20px;
  margin: 1rem 0;
}

.market-card-v {
  height: 100px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  cursor: pointer;
  border: none !important;
}

.market-card-v-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.85) 100%) !important;
  z-index: 1;
}

.market-card-v-title {
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.categories-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.category-tag-chip {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.category-tag-chip:active {
  transform: scale(0.95);
}

/* 10. Search View Components */
.search-input-wrapper {
  padding: 8px 20px 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-app);
}

.glass-search-bar {
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 20px;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

#search-input-field {
  flex: 1;
  background: none;
  border: none;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.voice-search-trigger, .barcode-search-trigger {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.voice-search-trigger:active, .barcode-search-trigger:active {
  background-color: var(--accent-light);
  color: var(--text-primary);
}

.voice-search-trigger svg, .barcode-search-trigger svg {
  width: 16px;
  height: 16px;
}

.search-context-panel {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.context-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.recent-searches-list, .trending-searches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-chip {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.search-suggestions-container {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

.suggestion-item {
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.suggestion-item span {
  font-weight: 500;
}

.suggestion-item::after {
  content: '↗';
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.search-results-panel {
  padding: 0 20px;
}

.search-filter-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--accent-light);
  border: none;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.no-results-panel {
  text-align: center;
  padding: 4rem 20px;
}

.no-results-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.no-results-panel h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.no-results-panel p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.suggestions-chips-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* 11. Wishlist View Components */
.wishlist-header-panel {
  padding: 24px 20px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wishlist-folders-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 20px;
  scrollbar-width: none;
}

.wishlist-folders-bar::-webkit-scrollbar {
  display: none;
}

.wishlist-folder-pill {
  flex: 0 0 auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wishlist-folder-pill.active {
  background-color: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent);
}

.wishlist-folder-pill .count {
  font-size: 0.65rem;
  opacity: 0.7;
}

.empty-state-panel {
  text-align: center;
  padding: 5rem 20px;
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.empty-state-panel h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.empty-state-panel p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* 12. Profile View Components */
.apple-profile-card {
  margin: 16px 20px;
  padding: 20px;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.profile-avatar-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--bg-card);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-serif);
}

.profile-meta-info {
  display: flex;
  flex-direction: column;
}

.profile-username {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-user-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.profile-guest-tag {
  background-color: var(--accent-light);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 4px;
  text-transform: uppercase;
}

.profile-menu-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 16px 20px 6px;
}

.profile-menu-group {
  margin: 0 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.profile-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}

.bg-graphite {
  background-color: #2c2c2e;
}

.bg-red {
  background-color: var(--color-error);
}

.item-icon-box svg {
  width: 14px;
  height: 14px;
}

.profile-menu-item .chevron {
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
}

.menu-select-btn {
  background: none;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  cursor: pointer;
}

.menu-value-static {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.logout-item:active {
  background-color: rgba(255, 59, 48, 0.05);
}

.txt-red {
  color: var(--color-error);
  font-weight: 600;
}

.app-info-footer {
  text-align: center;
  padding: 24px 20px;
  color: var(--text-tertiary);
  font-size: 0.7rem;
  line-height: 1.4;
}

/* 13. Overlay Screens UI (Base styles) */
.app-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  visibility: hidden;
}

#modal-product, #drawer-cart, #view-checkout, #view-cart-page {
  z-index: 2200 !important;
}

#panel-profile-details {
  z-index: 2100 !important;
}

#view-order-details {
  z-index: 2300 !important;
}

#modal-order-invoice {
  z-index: 2400 !important;
}

#modal-order-return {
  z-index: 2500 !important;
}

.app-overlay:not(.hidden) {
  visibility: visible;
  pointer-events: auto;
  animation: fadeIn 0.4s ease forwards !important;
}

.app-overlay.hidden {
  visibility: hidden;
  pointer-events: none;
}

.app-overlay.closing-sheet, .app-overlay.closing-cart {
  pointer-events: none !important;
  animation: fadeOut 0.4s ease forwards !important;
}

/* Keyframe animations for smooth transitions */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideRightOut {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

@keyframes slideDownOut {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

/* Open state animations */
.app-overlay:not(.hidden) .action-sheet {
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: none !important;
}

.app-overlay:not(.hidden) .side-drawer {
  animation: slideLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: none !important;
}

.app-overlay:not(.hidden) .fullscreen-page-overlay {
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: none !important;
}

/* Closing state animations */
.app-overlay.closing-cart .side-drawer {
  animation: slideRightOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: none !important;
}

.app-overlay.closing-sheet .action-sheet {
  animation: slideDownOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: none !important;
}

.app-overlay.closing-sheet .fullscreen-page-overlay {
  animation: slideDownOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: none !important;
}



.action-sheet {
  position: relative;
  background-color: var(--bg-card);
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
  max-height: 85%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform var(--duration-medium) var(--transition-fluid);
}

.app-overlay:not(.hidden) .action-sheet {
  transform: translateY(0);
}

.sheet-close-btn {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 20px;
  font-size: 1.5rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 100;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--accent-light);
  border-radius: 50%;
}

.sheet-scroll-body {
  padding: 24px 20px;
  overflow-y: auto;
}

.sheet-scroll-body::-webkit-scrollbar {
  display: none;
}

.sheet-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.sheet-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.4;
}

/* Product Detail Action Sheet */
.product-details-sheet {
  max-height: 90%;
  height: 90%;
}

.sticky-action-footer {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-card);
}

.price-indicator {
  display: flex;
  flex-direction: column;
}

.curr-price {
  font-size: 1.25rem;
  font-weight: 800;
}

.tax-note {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.action-buttons-group {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 12px 20px;
  border-radius: var(--border-radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  border: none;
  transition: transform 0.2s var(--transition-spring), opacity 0.2s ease;
  font-family: var(--font-sans);
}

.btn:active {
  transform: scale(0.95);
}

.btn-block {
  width: 100%;
  display: block;
}

.btn-dark {
  background-color: var(--accent);
  color: var(--bg-card);
}

.btn-outline {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-xs {
  padding: 6px 12px;
  font-size: 0.7rem;
  border-radius: 12px;
}

.btn-sm {
  padding: 10px 16px;
  font-size: 0.8rem;
  border-radius: 12px;
}

/* 14. Product Details Modal Content */
.detail-gallery-box {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background-color: var(--accent-light);
  margin-bottom: 20px;
  position: relative;
}

.detail-gallery-scroll {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.detail-gallery-scroll::-webkit-scrollbar {
  display: none;
}

.detail-gallery-img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}

.gallery-bullets {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  background-color: rgba(0,0,0,0.3);
  padding: 4px 8px;
  border-radius: 10px;
  z-index: 10;
}

.bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.4);
}

.bullet.active {
  background-color: #ffffff;
}

.detail-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 6px 0 12px;
  color: var(--text-primary);
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-curr-price {
  font-size: 1.3rem;
  font-weight: 800;
}

.detail-reg-price {
  font-size: 0.9rem;
  text-decoration: line-through;
  color: var(--text-tertiary);
}

.detail-discount {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-sale);
  background-color: rgba(255, 59, 48, 0.08);
  padding: 2px 8px;
  border-radius: 8px;
}

.divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 16px 0;
}

.detail-meta-pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-pill {
  background-color: var(--accent-light);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.detail-desc-box {
  margin: 16px 0;
}

.detail-desc-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.detail-desc-body {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Attributes Selector */
.attribute-sec {
  margin-bottom: 16px;
}

.attrib-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.attrib-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attrib-chip-label {
  position: relative;
  cursor: pointer;
}

.attrib-chip-label input {
  position: absolute;
  opacity: 0;
}

.attrib-chip-label span {
  display: block;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  background-color: var(--bg-card);
  transition: all 0.2s ease;
}

.attrib-chip-label input:checked + span {
  border-color: var(--accent);
  background-color: var(--accent);
  color: var(--bg-card);
}

.attrib-chip-label input:disabled + span {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  border-style: dashed;
}
/* Spec and review list */
.review-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
  border-bottom: none;
}

.review-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.reviewer-name {
  font-size: 0.8rem;
  font-weight: 700;
}

.review-stars {
  font-size: 0.75rem;
  color: #ffcc00;
}

.review-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 15. Side Drawers (Shopping Cart Drawer) */
.side-drawer {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--bg-card);
  width: 80%;
  max-width: 360px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform var(--duration-medium) var(--transition-fluid);
}

.app-overlay:not(.hidden) .side-drawer {
  transform: translateX(0);
}

.drawer-header {
  padding: calc(20px + env(safe-area-inset-top)) 20px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
}

.drawer-close-btn {
  font-size: 1.5rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.drawer-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.drawer-scroll-body::-webkit-scrollbar {
  display: none;
}

.drawer-footer {
  padding: 20px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-color);
}

/* Cart Item Layout */
.cart-list-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  background-color: var(--accent-light);
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-meta {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.cart-item-price {
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 2px;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.cart-remove-btn {
  background: none;
  border: none;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-error);
  cursor: pointer;
}

/* Numeric Qty Controls */
.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  height: 26px;
  overflow: hidden;
  background-color: var(--bg-app);
}

.qty-step-btn {
  background: none;
  border: none;
  width: 26px;
  height: 100%;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--text-primary);
}

.qty-step-btn:active {
  background-color: var(--accent-light);
}

.qty-value {
  width: 22px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.cart-summary-row.total-row {
  font-weight: 800;
  font-size: 1.05rem;
}

/* 16. Fullscreen Overlay Page (Checkout & Profile Details) */
.fullscreen-page-overlay {
  width: 100%;
  height: 100%;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--duration-medium) var(--transition-fluid);
}

.app-overlay:not(.hidden) .fullscreen-page-overlay {
  transform: translateY(0);
}

.overlay-page-header {
  padding: calc(16px + env(safe-area-inset-top)) 16px 16px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-btn-overlay {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.overlay-page-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
}

.checkout-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.checkout-scroll-body::-webkit-scrollbar {
  display: none;
}

/* Forms Styling */
.form-section-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.input-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  width: 100%;
}

.input-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.input-group input, .input-group select, .input-group textarea {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--border-radius-md);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  width: 100%;
  box-sizing: border-box;
}

.input-group input:focus, .input-group select:focus {
  border-color: var(--accent);
}

/* Payment selection grid */
.payment-selector-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.pay-card-option {
  position: relative;
  cursor: pointer;
}

.pay-card-option input {
  position: absolute;
  opacity: 0;
}

.pay-card-option .option-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background-color: var(--bg-card);
  transition: all 0.2s ease;
}

.pay-card-option input:checked + .option-box {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.pay-opt-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pay-icon {
  width: 24px;
  height: 24px;
}

.pay-label {
  font-size: 0.85rem;
  font-weight: 700;
}

.pay-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.pay-radio-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  position: relative;
}

.pay-card-option input:checked + .option-box .pay-radio-indicator {
  border-color: var(--accent);
}

.pay-card-option input:checked + .option-box .pay-radio-indicator::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px; width: 8px; height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

.order-review-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.price-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.price-item-row.total {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
  margin-top: 8px;
  margin-bottom: 0;
}

/* 17. Locations sheet & location items */
.locations-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.location-option-item {
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background-color: var(--bg-card);
  transition: all 0.2s ease;
}

.location-option-item:active {
  background-color: var(--accent-light);
}

.location-option-item strong {
  font-size: 0.85rem;
  font-weight: 700;
}

.location-option-item span {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* 18. Voice Search Overlay visuals */
.voice-screen-body {
  height: 100%;
  background-color: rgba(0,0,0,0.92);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 20px;
  z-index: 3000;
}

.voice-close-row {
  display: flex;
  justify-content: flex-end;
}

.voice-close-btn {
  font-size: 2rem;
  border: none;
  background: none;
  color: #888;
  cursor: pointer;
  padding: 10px;
}

.voice-visuals {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 200px;
}

.mic-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: #fff;
  color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.voice-waves {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wave-circle {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: rippleWaves 2s infinite ease-out;
}

.wave-1 { width: 100px; height: 100px; animation-delay: 0s; }
.wave-2 { width: 150px; height: 150px; animation-delay: 0.6s; }
.wave-3 { width: 200px; height: 200px; animation-delay: 1.2s; }

@keyframes rippleWaves {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.voice-headline {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  text-align: center;
}

.voice-transcript {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  max-width: 80%;
  margin: 0 auto 3rem;
  font-style: italic;
  min-height: 2.4em;
}

/* 19. Scanner visual details */
.scanner-screen-body {
  height: 100%;
  background-color: #000;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 20px;
}

.scanner-close-btn {
  align-self: flex-end;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 100;
}

.scanner-target-zone {
  width: 250px;
  height: 180px;
  align-self: center;
  position: relative;
}

.scanner-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 4px solid #fff;
}

.scanner-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.scanner-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.scanner-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.scanner-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

.scanner-laser-line {
  position: absolute;
  left: 5%;
  width: 90%;
  height: 2px;
  background-color: var(--color-error);
  box-shadow: 0 0 8px var(--color-error);
  animation: laserScan 2s infinite ease-in-out;
}

@keyframes laserScan {
  0% { top: 5%; }
  50% { top: 95%; }
  100% { top: 5%; }
}

.scanner-controls {
  text-align: center;
  color: #fff;
  z-index: 10;
}

.scanner-heading {
  font-size: 1rem;
  margin-bottom: 4px;
}

.scanner-subtext {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 20px;
}

.scanner-simulator-box {
  background-color: rgba(255,255,255,0.1);
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
}

.scanner-simulator-box select {
  background-color: #222;
  border: 1px solid #444;
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
}

/* 20. Profile Detailed panels contents (Order timeline, Addresses, etc.) */
.order-tracking-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.tracking-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.tracking-order-no {
  font-weight: 700;
  color: var(--text-primary);
}

.tracking-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0;
  position: relative;
  padding-left: 20px;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  top: 4px; left: 5px; width: 2px; height: calc(100% - 20px);
  background-color: var(--border-color);
}

.timeline-step {
  position: relative;
}

.timeline-step::before {
  content: '';
  position: absolute;
  top: 4px; left: -19px; width: 10px; height: 10px;
  border-radius: 50%;
  background-color: var(--text-tertiary);
  border: 2px solid var(--bg-card);
}

.timeline-step.completed::before {
  background-color: var(--text-primary);
}

.timeline-step.active::before {
  background-color: var(--color-success);
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.2);
}

.step-title {
  font-size: 0.8rem;
  font-weight: 700;
}

.step-date {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Accessibility & Info */
.accessibility-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toggle-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-card);
  padding: 14px 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-title {
  font-size: 0.85rem;
  font-weight: 700;
}

.toggle-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--accent-light);
  transition: .2s;
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: var(--bg-card);
  transition: .2s;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

input:checked + .slider-round {
  background-color: var(--accent);
  border-color: var(--accent);
}

input:checked + .slider-round:before {
  transform: translateX(20px);
}

/* 21. Toast Popup design */
.toast-popup {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent);
  color: var(--bg-card);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 10000;
  box-shadow: var(--shadow-md);
  text-align: center;
  white-space: nowrap;
  animation: toastEntrance 0.35s var(--transition-spring);
}

@keyframes toastEntrance {
  0% { transform: translate(-50%, -20px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

.toast-popup.hidden {
  display: none !important;
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

/* Glassmorphic & Premium UI Tweaks */
.glass-card {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
}

/* Auth Modal Styles (Spacious & Clean Layout) */
.auth-sheet, .location-sheet {
  max-height: 92% !important;
  height: auto;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom)) !important;
  border-top-left-radius: 32px !important;
  border-top-right-radius: 32px !important;
}

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  gap: 20px;
}

.auth-tab-btn {
  background: none;
  border: none;
  padding: 8px 4px 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.auth-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.auth-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: -8px;
  margin-bottom: 12px;
}

.oauth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.7rem;
  font-weight: 700;
  margin: 16px 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.oauth-divider::before, .oauth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.oauth-divider:not(:empty)::before {
  margin-right: .8em;
}

.oauth-divider:not(:empty)::after {
  margin-left: .8em;
}

.oauth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600 !important;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.auth-sub-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.remember-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.forgot-pwd-link {
  cursor: pointer;
  font-weight: 500;
  color: var(--accent);
}

/* Ensure auth buttons have vertical margins and clean paddings */
.auth-sheet form button[type="submit"] {
  margin-top: 12px;
  padding: 14px 20px;
}

/* Shimmer Placeholder effect */
@keyframes placeholderShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer-placeholder {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--border-color) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: placeholderShimmer 1.5s infinite linear;
}

/* Image Fade-In Animation */
.fade-in-img {
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in-img.loaded {
  opacity: 1;
}

/* Tab Icon Micro-interactions */
.nav-item {
  position: relative;
  transition: all 0.2s ease;
}

.nav-item.active .nav-icon {
  transform: scale(1.18);
  color: var(--accent) !important;
}

.nav-icon {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
}

/* Hide action sheet close button as user can swipe down or tap backdrop to close */
.sheet-close-btn {
  display: none !important;
}

/* Center folder creation modal with custom pop-in spring transitions */
#modal-create-folder {
  justify-content: center !important;
  align-items: center !important;
}

#modal-create-folder .action-sheet {
  border-radius: 28px !important;
  width: 90% !important;
  max-width: 360px !important;
  margin: 0 auto !important;
  transform: scale(0.9) translateY(0) !important;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease !important;
}

#modal-create-folder:not(.hidden) .action-sheet {
  transform: scale(1) translateY(0) !important;
  opacity: 1;
}

/* Filter Action Sheet styling */
.filter-sheet {
  padding: 24px;
  border-radius: 32px 32px 0 0 !important;
  text-align: left;
}

.filter-group-sec {
  margin-bottom: 24px;
}

.filter-sub-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.filter-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}



.filter-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Center theme picker modal with spring transitions */
#sheet-theme-picker {
  justify-content: center !important;
  align-items: center !important;
}

#sheet-theme-picker .action-sheet {
  border-radius: 28px !important;
  width: 90% !important;
  max-width: 360px !important;
  margin: 0 auto !important;
  transform: scale(0.9) translateY(0) !important;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease !important;
}

#sheet-theme-picker:not(.hidden) .action-sheet {
  transform: scale(1) translateY(0) !important;
  opacity: 1;
}

/* Mobile full-viewport styling override to remove side margin white-bars */
@media (max-width: 767px) {
  .app-viewport {
    max-width: 100% !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
  }
  .app-desktop-frame {
    background: none !important;
    width: 100% !important;
    height: 100% !important;
  }
}



/* Disable keyframe animations during touch dragging to allow inline styles/transitions */
.app-overlay:not(.hidden) .action-sheet.swiping, 
.app-overlay:not(.hidden) .side-drawer.swiping, 
.app-overlay:not(.hidden) .fullscreen-page-overlay.swiping {
  animation: none !important;
  transition: none !important;
}

.app-overlay:not(.hidden) .action-sheet.swiping-released, 
.app-overlay:not(.hidden) .side-drawer.swiping-released, 
.app-overlay:not(.hidden) .fullscreen-page-overlay.swiping-released {
  animation: none !important;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Premium circular theme-switching zoom transition */
.theme-transition-circle {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin-left: -15px;
  margin-top: -15px;
  border-radius: 50%;
  z-index: 99999;
  pointer-events: none;
  transform: scale(0);
  opacity: 1;
  transition: transform 1.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.theme-transition-circle.active {
  transform: scale(50); /* Covers viewport completely */
}

/* ==========================================
   Apple-Style Glass Pull-to-Refresh Overlay
   ========================================== */
#glass-refresh-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}
.theme-dark #glass-refresh-overlay {
  background: rgba(8, 8, 8, 0.45);
}
#glass-refresh-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.glass-refresh-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-left: 20%;
  width: 100%;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
}
.refresh-word {
  font-size: 3.8rem;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: #3b3e5b;
  margin: 0;
  opacity: 0;
}
.theme-dark .refresh-word {
  color: #e2e4f0;
}
.refresh-word.visible {
  animation: slamWord 0.28s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}
.refresh-word-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.refresh-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  opacity: 0;
  color: #3b3e5b;
}
.theme-dark .refresh-dots {
  color: #e2e4f0;
}
.refresh-dots.visible {
  opacity: 1;
  transition: opacity 0.3s ease;
}
.refresh-dots .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: currentColor;
  animation: applePulse 2.4s infinite ease-in-out;
  will-change: opacity, transform;
}
.refresh-dots .dot:nth-child(1) {
  animation-delay: 0s;
}
.refresh-dots .dot:nth-child(2) {
  animation-delay: 0.4s;
}
.refresh-dots .dot:nth-child(3) {
  animation-delay: 0.8s;
}
@keyframes slamWord {
  0% {
    opacity: 0;
    transform: scale(2.2) translateY(-70px);
    filter: blur(8px);
  }
  70% {
    opacity: 1;
    transform: scale(0.92) translateY(3px);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes slamDots {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes applePulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ==========================================================================
   19. Tablet & Native App Shell Responsive Layouts
   ========================================================================== */

/* Native App Shell: Always fill screen on mobile/tablet devices when running as built APK */
body.is-native .app-viewport {
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

body.is-native .app-desktop-frame {
  background: none !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Adaptive Products Grid: 2 columns on mobile, scaling up to 4+ columns on tablets */
.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
}

/* Centered content containers to prevent stretching too wide on tablet viewports */
.header-top-row, .header-main-row {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 480px) {
  /* Keep floating navbar compact and centered at the bottom */
  .app-navbar {
    max-width: 480px;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: calc(100% - 40px);
  }

  /* Center the bottom action sheets nicely */
  .action-sheet {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (min-width: 500px) {
  /* Convert single-column vertical market cards to multi-column grid list */
  .markets-vertical-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

@media (min-width: 768px) {
  /* Increase banner heights on tablet viewports for better proportions */
  .promo-banner-slider {
    height: 220px !important;
  }
  .spotlight-card {
    height: 300px !important;
  }
}

/* Center sub-page overlay contents (Checkout, Profile details) on large viewports */
@media (min-width: 1040px) {
  .app-view > * {
    max-width: 1000px;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .fullscreen-page-overlay > * {
    max-width: 600px;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Password eye visibility toggle */
.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper input {
  padding-right: 44px !important;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  z-index: 10;
}

.password-toggle-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
  transition: stroke 0.2s ease;
}

.password-toggle-btn:hover svg {
  stroke: var(--text-primary);
}

.password-toggle-btn .eye-closed-icon {
  display: none;
}

.password-toggle-btn.toggled .eye-open-icon {
  display: none;
}

.password-toggle-btn.toggled .eye-closed-icon {
  display: block;
}

/* Pull to refresh background S trace */
.pull-to-refresh-reveal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  background-color: #000000 !important;
  overflow: hidden;
}

.refresh-trace-svg {
  display: block;
}

.trace-path-s {
  transition: stroke-dashoffset 0.08s linear;
}

@keyframes trace-write-loop {
  0% {
    stroke-dashoffset: 1500;
  }
  50% {
    stroke-dashoffset: 0;
  }
  80% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 1500;
  }
}

.trace-path-s.looping-trace {
  animation: trace-write-loop 1.8s infinite ease-in-out !important;
}

/* Gender Portal Catalog Tabs Styling */
.gender-category-tabs {
  display: flex;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.gender-category-tabs::-webkit-scrollbar {
  display: none;
}

.gender-tab {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.gender-tab.active {
  background-color: var(--text-primary);
  color: var(--bg-card);
}
