/* ==========================================
   MS Electronics Shop - Global Stylesheet
   Liquid Glass UI + iOS 26 Design System
   ========================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Myanmar:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   CSS VARIABLES - Design Tokens
   ========================================== */
:root {
  /* Brand Colors */
  --brand-primary: #0A84FF;
  --brand-secondary: #30D158;
  --brand-accent: #FF9F0A;
  --brand-danger: #FF453A;

  /* Light Mode */
  --bg-primary: #F2F2F7;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #E5E5EA;
  --bg-overlay: rgba(255, 255, 255, 0.72);

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: rgba(0, 0, 0, 0.08);
  --glass-shadow-strong: rgba(0, 0, 0, 0.15);

  --text-primary: #1C1C1E;
  --text-secondary: #3A3A3C;
  --text-tertiary: #6C6C70;
  --text-placeholder: #AEAEB2;
  --text-on-accent: #FFFFFF;

  --divider: rgba(60, 60, 67, 0.12);
  --divider-strong: rgba(60, 60, 67, 0.25);

  /* Gradient Mesh Background */
  --mesh-color-1: #c8e6ff;
  --mesh-color-2: #e8f5e9;
  --mesh-color-3: #fff3e0;
  --mesh-color-4: #f3e5f5;
}

[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #1C1C1E;
  --bg-tertiary: #2C2C2E;
  --bg-overlay: rgba(28, 28, 30, 0.75);

  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-bg-strong: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shadow: rgba(0, 0, 0, 0.4);
  --glass-shadow-strong: rgba(0, 0, 0, 0.6);

  --text-primary: #FFFFFF;
  --text-secondary: #EBEBF5;
  --text-tertiary: #AEAEB2;
  --text-placeholder: #6C6C70;

  --divider: rgba(84, 84, 88, 0.6);
  --divider-strong: rgba(84, 84, 88, 0.8);

  --mesh-color-1: #0a1628;
  --mesh-color-2: #0a1a0f;
  --mesh-color-3: #1a1200;
  --mesh-color-4: #130a1a;
}

/* ==========================================
   RESET & BASE
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Outfit', 'Noto Sans Myanmar', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Animated Gradient Mesh Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, var(--mesh-color-1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 10%, var(--mesh-color-4) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 90%, var(--mesh-color-2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 80% 60%, var(--mesh-color-3) 0%, transparent 60%),
    var(--bg-primary);
  animation: meshShift 15s ease-in-out infinite alternate;
}

@keyframes meshShift {
  0%   { opacity: 1; }
  50%  { opacity: 0.85; }
  100% { opacity: 1; }
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: opacity 0.2s;
}
a:hover { opacity: 0.75; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { list-style: none; }

/* ==========================================
   LIQUID GLASS MIXINS (Utility Classes)
   ========================================== */

/* Base Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow:
    0 8px 32px var(--glass-shadow),
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 -1px 0 rgba(0,0,0,0.05) inset;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.glass-card:hover {
  box-shadow:
    0 16px 48px var(--glass-shadow-strong),
    0 1px 0 rgba(255,255,255,0.6) inset;
  transform: translateY(-2px);
}

/* Strong Glass (Navbar, Modals) */
.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px var(--glass-shadow);
}

/* ==========================================
   iOS 26 BUTTON SYSTEM
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Outfit', 'Noto Sans Myanmar', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border: none;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* iOS 26 Squircle shape */
  border-radius: 14px;

  /* Prevent text selection */
  user-select: none;
  -webkit-user-select: none;
}

/* Tap/Press Animation */
.btn:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* Shimmer effect on hover */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.25) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn:hover::before {
  transform: translateX(100%);
}

/* Primary Button - Liquid Glass Blue */
.btn-primary {
  background: linear-gradient(135deg, #0A84FF 0%, #0066CC 100%);
  color: #FFFFFF;
  box-shadow:
    0 4px 16px rgba(10, 132, 255, 0.4),
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 -1px 0 rgba(0,0,80,0.2) inset;
}
.btn-primary:hover {
  box-shadow:
    0 8px 24px rgba(10, 132, 255, 0.55),
    0 1px 0 rgba(255,255,255,0.4) inset;
  transform: translateY(-1px) scale(1.02);
}

/* Secondary Button - Glass */
.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 4px 16px var(--glass-shadow),
    0 1px 0 rgba(255,255,255,0.5) inset;
}
.btn-secondary:hover {
  background: var(--glass-bg-strong);
  box-shadow:
    0 8px 24px var(--glass-shadow-strong),
    0 1px 0 rgba(255,255,255,0.6) inset;
  transform: translateY(-1px);
}

/* Success Button - Green */
.btn-success {
  background: linear-gradient(135deg, #30D158 0%, #25A244 100%);
  color: #FFFFFF;
  box-shadow:
    0 4px 16px rgba(48, 209, 88, 0.4),
    0 1px 0 rgba(255,255,255,0.3) inset;
}
.btn-success:hover {
  box-shadow: 0 8px 24px rgba(48, 209, 88, 0.55);
  transform: translateY(-1px) scale(1.02);
}

/* Danger Button - Red */
.btn-danger {
  background: linear-gradient(135deg, #FF453A 0%, #CC2B22 100%);
  color: #FFFFFF;
  box-shadow:
    0 4px 16px rgba(255, 69, 58, 0.4),
    0 1px 0 rgba(255,255,255,0.3) inset;
}
.btn-danger:hover {
  box-shadow: 0 8px 24px rgba(255, 69, 58, 0.55);
  transform: translateY(-1px) scale(1.02);
}

/* Icon-only Button */
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
}

/* Small Button */
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 10px;
}

/* Large Button */
.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: 18px;
}

/* Full Width */
.btn-block {
  width: 100%;
}

/* ==========================================
   NAVBAR
   ========================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-glass {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 20px var(--glass-shadow);
  transition: background 0.3s ease;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0A84FF, #30D158);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: white;
  box-shadow: 0 4px 12px rgba(10,132,255,0.4);
}

.navbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  display: flex;
  flex-direction: column;
}

/* Main shop name - always bold and prominent */
.navbar-shop-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Tagline - smaller, muted */
.navbar-tagline {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
}

/* Legacy span inside navbar-title (fallback) */
.navbar-title > span:not(.navbar-shop-name):not(.navbar-tagline) {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: var(--glass-bg);
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--brand-primary);
  background: rgba(10, 132, 255, 0.1);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: all 0.2s;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ==========================================
   THEME & LANGUAGE TOGGLE BUTTONS
   ========================================== */

.toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 12px var(--glass-shadow), 0 1px 0 rgba(255,255,255,0.4) inset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--text-primary);
}

.toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px var(--glass-shadow-strong), 0 1px 0 rgba(255,255,255,0.5) inset;
}

.toggle-btn:active {
  transform: scale(0.92);
}

/* Language Toggle - Pill style */
.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
  box-shadow: 0 2px 8px var(--glass-shadow);
}

.lang-option {
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  transition: all 0.2s ease;
  font-family: inherit;
}

.lang-option.active {
  background: var(--brand-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(10,132,255,0.4);
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */

.input-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  box-shadow: 0 2px 8px var(--glass-shadow) inset;
  transition: all 0.25s ease;
  outline: none;
  -webkit-appearance: none;
}

.input-field::placeholder {
  color: var(--text-placeholder);
}

.input-field:focus {
  border-color: var(--brand-primary);
  box-shadow:
    0 0 0 3px rgba(10, 132, 255, 0.18),
    0 2px 8px var(--glass-shadow) inset;
  background: var(--glass-bg-strong);
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  padding-left: 4px;
}

.input-group {
  margin-bottom: 16px;
}

/* Select */
.select-field {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236C6C70' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* ==========================================
   PRODUCT CARD
   ========================================== */

.product-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 8px 32px var(--glass-shadow),
    0 1px 0 rgba(255,255,255,0.5) inset;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 20px 60px var(--glass-shadow-strong),
    0 1px 0 rgba(255,255,255,0.6) inset;
}

.product-card-image {
  width: calc(100% - 24px);
  aspect-ratio: 1/1;
  object-fit: contain;
  background: var(--bg-tertiary);
  margin: 12px 12px 0 12px;
  border-radius: 14px;
}

.product-card-image-placeholder {
  width: calc(100% - 24px);
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--text-placeholder);
  margin: 12px 12px 0 12px;
  border-radius: 14px;
}

.product-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

/* Category + Stock badge on same row */
.product-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.product-card-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-primary);
  background: rgba(10, 132, 255, 0.1);
  padding: 3px 6px;
  border-radius: 6px;
  display: inline-block;
  /* Allow shrinking when text is long */
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badge inside meta row — never wrap, never shrink */
.product-card-meta-row .badge {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
}

.product-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.product-card-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-top: auto;
}

.product-card-price .original-price {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
  text-decoration: line-through;
  margin-left: 6px;
}

/* ==========================================
   BADGE & TAGS
   ========================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.badge-primary { background: rgba(10,132,255,0.15); color: var(--brand-primary); }
.badge-success { background: rgba(48,209,88,0.15); color: var(--brand-secondary); }
.badge-warning { background: rgba(255,159,10,0.15); color: var(--brand-accent); }
.badge-danger  { background: rgba(255,69,58,0.15); color: var(--brand-danger); }
.badge-neutral { background: var(--bg-tertiary); color: var(--text-secondary); }

/* ==========================================
   PAGE LAYOUT
   ========================================== */

.page-wrapper {
  min-height: 100vh;
  padding-top: 62px; /* mobile navbar height */
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px; /* mobile-first: 16px */
}

.section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-title {
  font-size: clamp(22px, 5vw, 42px); /* fluid: 22px mobile → 42px desktop */
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--text-tertiary);
  max-width: 520px;
  margin: 0 auto;
}

/* Product Grid — mobile-first: 2 columns */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ==========================================
   LOADING STATE
   ========================================== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--bg-secondary) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}

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

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--divider);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: 0 8px 32px var(--glass-shadow-strong);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 340px;
  pointer-events: all;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.hide {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(10px) scale(0.95); }
}

.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-message { font-size: 14px; font-weight: 500; color: var(--text-primary); }

/* ==========================================
   MODAL
   ========================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(60px) saturate(200%);
  -webkit-backdrop-filter: blur(60px) saturate(200%);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.3),
    0 1px 0 rgba(255,255,255,0.6) inset;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--divider);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ==========================================
   EMPTY STATE
   ========================================== */

.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-tertiary);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  max-width: 320px;
  margin: 0 auto 24px;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
  background: var(--glass-bg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-top: 1px solid var(--glass-border);
  padding: 40px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-brand-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-brand-desc {
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--brand-primary); }

.footer-bottom {
  border-top: 1px solid var(--divider);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ==========================================
   SCROLLBAR
   ========================================== */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--divider-strong);
  border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-placeholder); }

/* ==========================================
   UTILITIES
   ========================================== */

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-accent    { color: var(--brand-primary); }
.text-success   { color: var(--brand-secondary); }
.text-warning   { color: var(--brand-accent); }
.text-danger    { color: var(--brand-danger); }

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.hidden   { display: none !important; }
.visible  { display: block !important; }

.w-full   { width: 100%; }
.h-full   { height: 100%; }

.rounded  { border-radius: 14px; }
.rounded-lg { border-radius: 20px; }
.rounded-xl { border-radius: 28px; }

/* Divider */
.divider {
  height: 1px;
  background: var(--divider);
  margin: 16px 0;
}

/* ==========================================
   RESPONSIVE - MOBILE FIRST
   375px → 768px → 1024px → 1280px
   ========================================== */

/* ── BASE (Mobile First: 375px+) ── */

/* Container fluid */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Section — top/bottom padding only, preserve container left/right */
.section {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Navbar — mobile base */
.navbar {
  padding: 8px 12px;
  gap: 8px;
}

/* Brand — shrink to fit on mobile */
.navbar-brand {
  min-width: 0;
  flex-shrink: 1;
  gap: 8px;
}

/* Logo — smaller on mobile */
.navbar-logo {
  width: 32px;
  height: 32px;
  font-size: 13px;
  border-radius: 9px;
  flex-shrink: 0;
}

/* Shop name — smaller on mobile, allow 2 lines */
.navbar-title {
  max-width: 110px;
}

.navbar-shop-name {
  font-size: 13px;
  font-weight: 700;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

/* Hide tagline on mobile */
.navbar-tagline {
  display: none;
}

/* Fallback: hide any other span inside navbar-title on mobile */
.navbar-title > span:not(.navbar-shop-name) {
  display: none;
}

/* Hide desktop nav on mobile */
.navbar-nav {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  flex-direction: column;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px var(--glass-shadow);
  padding: 10px 12px 16px;
  gap: 4px;
  z-index: 999;
}

.navbar-nav.open {
  display: flex;
}

/* Hamburger always visible on mobile */
.menu-toggle {
  display: flex;
  width: 36px;
  height: 36px;
}

/* Hamburger animation when open */
.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-link {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
}

/* Navbar actions — compact on mobile */
.navbar-actions {
  gap: 5px;
  flex-shrink: 0;
}

/* Smaller toggle buttons on mobile */
.toggle-btn {
  width: 36px;
  height: 36px;
  font-size: 15px;
  border-radius: 11px;
}

/* Lang toggle compact */
.lang-toggle {
  padding: 2px;
  border-radius: 10px;
}

.lang-option {
  padding: 5px 8px;
  font-size: 11px;
}

/* Products grid — 2 columns on mobile */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Product card compact on mobile */
.product-card-name {
  font-size: 13px;
}

.product-card-price {
  font-size: 14px;
  margin-top: auto;
}

.product-card-category {
  font-size: 10px;
  padding: 2px 6px;
}

/* Buttons compact on mobile */
.btn-lg {
  padding: 13px 20px;
  font-size: 14px;
}

/* Footer — single column on mobile */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-bottom {
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

/* Toast — full width on mobile */
.toast-container {
  bottom: 16px;
  right: 12px;
  left: 12px;
}

.toast {
  max-width: 100%;
}

/* Modal — bottom sheet on mobile */
.modal-overlay {
  padding: 0;
  align-items: flex-end;
}

.modal {
  border-radius: 28px 28px 0 0;
  max-height: 88vh;
  width: 100%;
}

/* Page wrapper top padding for fixed navbar */
.page-wrapper {
  min-height: 100vh;
  padding-top: 58px;
}

/* ── SMALL MOBILE FIX (max 375px) ── */
@media (max-width: 374px) {
  .navbar-actions {
    gap: 4px;
  }

  .toggle-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
    border-radius: 10px;
  }

  .lang-option {
    padding: 4px 7px;
    font-size: 10px;
  }

  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .product-card-name {
    font-size: 12px;
  }

  .product-card-price {
    font-size: 13px;
  }
}

/* ── TABLET (768px+) ── */
@media (min-width: 768px) {

  .container {
    padding: 0 24px;
  }

  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .navbar {
    padding: 12px 24px;
    gap: 16px;
  }

  /* Restore navbar brand */
  .navbar-brand {
    flex-shrink: 0;
    gap: 10px;
  }

  /* Restore logo size */
  .navbar-logo {
    width: 38px;
    height: 38px;
    font-size: 16px;
    border-radius: 10px;
  }

  /* Restore shop name */
  .navbar-title {
    max-width: none;
  }

  .navbar-shop-name {
    font-size: 18px;
    font-weight: 700;
    white-space: normal;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
  }

  /* Show tagline again */
  .navbar-tagline {
    display: block;
  }

  /* Restore any legacy spans */
  .navbar-title > span:not(.navbar-shop-name) {
    display: block;
  }

  .navbar-nav {
    display: flex;
    position: static;
    flex-direction: row;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 4px;
  }

  .menu-toggle {
    display: none;
  }

  /* Restore toggle button size */
  .toggle-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 14px;
  }

  .lang-toggle {
    padding: 3px;
    border-radius: 12px;
  }

  .lang-option {
    padding: 6px 12px;
    font-size: 12px;
  }

  .navbar-actions {
    gap: 8px;
  }

  /* Products grid — 3 columns on tablet */
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .product-card-name {
    font-size: 15px;
  }

  .product-card-price {
    font-size: 16px;
  }

  .product-card-category {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* Footer — 2 columns on tablet */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: row;
    text-align: left;
  }

  /* Modal — center on tablet */
  .modal-overlay {
    padding: 24px;
    align-items: center;
  }

  .modal {
    border-radius: 28px;
    max-height: 90vh;
    max-width: 480px;
  }

  .btn-lg {
    padding: 16px 32px;
    font-size: 17px;
  }

  .page-wrapper {
    padding-top: 72px;
  }
}

/* ── DESKTOP (1024px+) ── */
@media (min-width: 1024px) {

  .section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  /* Products grid — 4 columns on desktop */
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
  }

  .product-card-name {
    font-size: 16px;
  }

  .product-card-price {
    font-size: 18px;
  }

  /* Footer — 3 columns on desktop */
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
  }

  /* Toast */
  .toast-container {
    bottom: 24px;
    right: 24px;
    left: auto;
  }

  .toast {
    max-width: 340px;
  }
}

/* ── LARGE DESKTOP (1280px+) ── */
@media (min-width: 1280px) {
  .container {
    padding: 0 32px;
  }
}

/* ==========================================
   PAGE TRANSITION
   ========================================== */

.page-enter {
  animation: pageEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   PROFILE BUTTON
   ========================================== */

.profile-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 12px var(--glass-shadow), 0 1px 0 rgba(255,255,255,0.4) inset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  color: var(--text-primary);
}

.profile-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px var(--glass-shadow-strong);
}

.profile-btn:active { transform: scale(0.92); }

/* Logged-in indicator dot */
.profile-btn .auth-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-secondary);
  border: 2px solid var(--bg-primary);
  display: none;
}

.profile-btn.logged-in .auth-dot {
  display: block;
  animation: pulse 2s ease infinite;
}

/* ==========================================
   LOGIN MODAL
   ========================================== */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.login-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.login-box {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(60px) saturate(200%);
  -webkit-backdrop-filter: blur(60px) saturate(200%);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.5) inset;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  text-align: center;
}

.login-overlay.show .login-box {
  transform: translateY(0) scale(1);
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0A84FF, #30D158);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(10,132,255,0.4);
  overflow: hidden;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 28px;
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.login-error {
  background: rgba(255,69,58,0.12);
  border: 1px solid rgba(255,69,58,0.3);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--brand-danger);
  display: none;
  text-align: left;
  margin-bottom: 12px;
}

.login-error.show { display: block; }

.login-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all 0.2s;
}

.login-close:hover { background: var(--glass-bg-strong); color: var(--text-primary); }

/* Logged-in panel inside login box */
.loggedin-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.loggedin-panel.show { display: flex; }

.loggedin-email {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

@media (max-width: 480px) {
  .login-box { padding: 28px 20px; }
  .profile-btn { width: 36px; height: 36px; font-size: 15px; border-radius: 11px; }
}
