@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --bg-base: #0a0a0c;
  --bg-sidebar: rgba(18, 18, 22, 0.85);
  --bg-card: #16161a;
  --bg-card-hover: #1e1e24;
  --bg-input: #222228;
  
  --text-primary: #ffffff;
  --text-secondary: #9ea2b0;
  --text-muted: #5e6273;
  
  --accent-blue: #007aff;
  --accent-cyan: #00d2ff;
  --accent-pink: #ff007f;
  --accent-orange: #ff9f0a;
  --accent-green: #30d158;
  --accent-red: #ff453a;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 122, 255, 0.5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  
  --sidebar-width: 260px;
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 22px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.15s ease;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

/* App Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 10;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin-bottom: 24px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  /* Logo inverting since original logo is black and we need it to look premium white on dark background */
  filter: invert(1) drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-display);
  background: linear-gradient(135deg, #fff 0%, #a2a2b0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-container {
  position: relative;
  margin-bottom: 24px;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  background-color: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 14px;
}

.menu-section {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  padding: 8px 12px 4px 12px;
  letter-spacing: 0.05em;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  text-decoration: none;
  border: none;
  background: transparent;
  text-align: left;
}

.menu-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.menu-item.active {
  color: var(--text-primary);
  background-color: rgba(0, 122, 255, 0.15);
  font-weight: 600;
}

.menu-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: var(--accent-blue);
}

.menu-item.active i {
  color: var(--accent-cyan);
}

/* User Profile Section in Sidebar */
.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.admin-link:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--accent-blue);
}

/* Main Content Area */
.main-content {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.page.active {
  display: block;
}

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

.page-header {
  margin-bottom: 32px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.page-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Today Showcase (Featured) */
.featured-hero {
  position: relative;
  height: 380px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.featured-hero:hover {
  transform: scale(0.995);
  box-shadow: var(--shadow-lg);
}

.featured-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1f4068, #162447, #0f1a1c);
}

.featured-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(10, 10, 12, 0.9) 0%, rgba(10, 10, 12, 0.4) 50%, rgba(10, 10, 12, 0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}

.featured-tag {
  color: var(--accent-cyan);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.featured-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  max-width: 600px;
}

.featured-desc {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 500px;
}

/* Grid Layouts */
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.view-all-link {
  font-size: 14px;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
}

.grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

/* Horizontal List Cards (Alternative Layout like Top Apps) */
.list-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

/* Card Design */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

.card-image-container {
  position: relative;
  width: 100%;
  height: 130px;
  background-color: #000;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-badge.hardware { color: var(--accent-cyan); }
.card-badge.premium_account { color: var(--accent-pink); }
.card-badge.digital_license { color: var(--accent-orange); }

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 32px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.price-tag {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.btn-get {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-blue);
  cursor: pointer;
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.card:hover .btn-get {
  background-color: var(--accent-blue);
  color: #fff;
}

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

/* Horizontal Card layout (App Store item style) */
.list-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
}

.list-card:hover {
  background-color: rgba(255, 255, 255, 0.02);
  border-color: var(--border-color);
  transform: none;
  box-shadow: none;
}

.list-card-index {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-muted);
  width: 30px;
  text-align: center;
}

.list-card-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius-md);
  object-fit: cover;
  background-color: #000;
}

.list-card-info {
  flex: 1;
}

.list-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.list-card-subtitle {
  color: var(--text-secondary);
  font-size: 12px;
}

/* Stock status tags */
.stock-status {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.status-instock { color: var(--accent-green); }
.status-low { color: var(--accent-orange); }
.status-out { color: var(--accent-red); }

/* Cart Drawer styling */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100vh;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 24px;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  right: 0;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cart-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.cart-close-btn:hover {
  color: #fff;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.cart-item-price {
  font-size: 12px;
  color: var(--accent-cyan);
  font-weight: 700;
}

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

.cart-qty-btn {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-btn:hover {
  background-color: var(--accent-blue);
}

.cart-qty {
  font-size: 14px;
  width: 16px;
  text-align: center;
}

.cart-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
}

.cart-total-val {
  font-size: 20px;
  color: #fff;
  font-weight: 800;
  font-family: var(--font-display);
}

.btn-checkout {
  background: linear-gradient(135deg, #007aff 0%, #00d2ff 100%);
  border: none;
  padding: 14px;
  border-radius: var(--border-radius-md);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
  transition: var(--transition-fast);
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.btn-checkout:active {
  transform: translateY(0);
}

/* Modals (Product Details & Forms) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
  animation: fadeInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: scaleUpModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  z-index: 10;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.modal-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background-color: #000;
}

.modal-body {
  padding: 32px;
}

.modal-header-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.modal-price {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.btn-primary {
  background: var(--accent-blue);
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-primary:hover {
  background-color: #1a8aef;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: #fff;
}

/* Mobile Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: rgba(18, 18, 22, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--border-color);
  display: none;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  z-index: 90;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  padding: 8px 12px;
  transition: var(--transition-fast);
}

.bottom-nav-item i {
  font-size: 20px;
}

.bottom-nav-item.active {
  color: var(--accent-blue);
}

/* Cart Badge in Navigation */
.badge-count {
  background-color: var(--accent-pink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

/* ==========================================
   ADMIN LOGIN PANEL
   ========================================== */
.admin-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-base);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 400px;
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
}

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

.login-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: invert(1);
}

.login-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  outline: none;
  font-size: 14px;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--border-focus);
}

.btn-login {
  width: 100%;
  background: var(--accent-blue);
  border: none;
  padding: 14px;
  border-radius: var(--border-radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: var(--transition-fast);
}

.btn-login:hover {
  background-color: #1a8aef;
}

.login-error {
  background-color: rgba(255, 69, 58, 0.15);
  border: 1px solid var(--accent-red);
  color: #ff9f9a;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  display: none;
  text-align: center;
}

/* ==========================================
   ADMIN DASHBOARD LAYOUT
   ========================================== */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.btn-add {
  background: var(--accent-green);
  border: none;
  padding: 10px 18px;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-add:hover {
  filter: brightness(1.1);
}

.admin-table-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow-x: auto;
  margin-bottom: 30px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.admin-table th {
  font-weight: 700;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.02);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.01);
}

.table-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  background-color: #000;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-action:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-action.edit:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn-action.delete:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* Image Upload Preview Box */
.image-preview-container {
  display: flex;
  gap: 16px;
  align-items: center;
}

.image-preview-box {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-input);
  border: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--bg-card);
  border: 1px solid var(--accent-blue);
  padding: 14px 24px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile Top Bar */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 95;
}

.mobile-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-topbar-brand .brand-logo {
  width: 28px;
  height: 28px;
}

.mobile-topbar-brand .brand-name {
  font-size: 18px;
}

.mobile-icon-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.mobile-icon-btn:hover {
  background-color: var(--bg-hover);
}

/* Mobile Search Bar */
.mobile-search-bar {
  display: none;
  padding: 12px 16px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
}

.mobile-search-bar.open {
  display: block;
}

/* Mobile Menu Overlay (Full menu + Back-Office access) */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 200;
}

.mobile-menu-overlay.open {
  display: flex;
  justify-content: flex-end;
}

.mobile-menu-panel {
  width: 80%;
  max-width: 300px;
  height: 100%;
  background-color: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-color);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: slideInRight 0.25s ease;
}

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

.mobile-menu-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu-panel .menu-section {
  flex: 1;
  gap: 6px;
}

.mobile-menu-panel .sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Bigger, more ergonomic touch targets inside the mobile slide-in menu */
.mobile-menu-panel .menu-item,
.mobile-menu-panel .admin-link {
  padding: 16px 14px;
  font-size: 16px;
  border-radius: var(--border-radius-md, 10px);
  min-height: 52px;
}

.mobile-menu-panel .menu-item i,
.mobile-menu-panel .admin-link i {
  font-size: 18px;
  width: 24px;
}

.mobile-menu-panel .menu-title {
  font-size: 12px;
  padding: 16px 14px 6px 14px;
}

.mobile-menu-panel .menu-item:active,
.mobile-menu-panel .admin-link:active {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Responsive Styles */
@media (max-width: 992px) {
  :root {
    --sidebar-width: 200px;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    display: none; /* Hide sidebar on mobile */
  }

  .mobile-topbar {
    display: flex; /* Show top bar with menu + search on mobile */
  }

  .main-content {
    padding: 24px 20px 88px 20px; /* Leave space for bottom nav bar */
    height: calc(100vh - 64px - 62px); /* Subtract bottom nav and top bar heights */
  }
  
  .bottom-nav {
    display: flex; /* Show bottom tab-bar */
  }
  
  .grid-row {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
  }
  
  .list-row {
    grid-template-columns: 1fr;
  }
  
  .featured-hero {
    height: 280px;
  }
  
  .featured-title {
    font-size: 28px;
  }
  
  .cart-drawer {
    width: 100%;
    right: -100%;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-title {
    font-size: 22px;
  }

  /* Make all modals (product/service edit forms, etc.) fit small screens */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    animation: slideUpModal 0.3s ease;
  }

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

  .form-row {
    grid-template-columns: 1fr !important;
  }

  .image-preview-container {
    flex-direction: column;
    align-items: flex-start !important;
  }

  /* Admin tables become horizontally scrollable cards on mobile */
  .admin-table-container {
    overflow-x: auto;
  }

  .admin-table {
    min-width: 600px;
  }
}

/* Admin back-office: mobile-first navigation */
@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
  }

  .admin-main {
    padding: 16px;
    height: auto;
    min-height: calc(100vh - 64px);
  }

  .admin-main .page-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .admin-main .btn-add {
    width: 100%;
    justify-content: center;
  }
}

/* Currency switcher styling */
.btn-currency {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
  width: 50px;
  text-align: center;
}
.btn-currency:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-currency.active {
  background: rgba(0, 122, 255, 0.2);
  border-color: var(--accent-blue);
  color: var(--accent-cyan);
}

/* Subcategory filter pills styling */
.filter-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  white-space: nowrap;
}
.filter-pill:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}
.filter-pill.active {
  background: rgba(0, 122, 255, 0.15);
  border-color: var(--accent-blue);
  color: #fff;
  font-weight: 600;
}
