/* -------------------------------------------------------------
   DESIGN SYSTEM & THEME VARIABLES
------------------------------------------------------------- */
:root {
  /* Default Theme: Orange Warm (WBotApp Reference) */
  --primary-color: #FF6B00;
  --primary-rgb: 255, 107, 0;
  --primary-hover: #e05e00;
  --accent-color: #FF3B30;
  --accent-rgb: 255, 59, 48;
  
  /* Fonts */
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Theme Styles default (Light) */
  --bg-color: #F8F9FA;
  --bg-rgb: 248, 249, 250;
  --surface-color: #FFFFFF;
  --surface-rgb: 255, 255, 255;
  --text-color: #1A1D20;
  --text-muted: #6C757D;
  --border-color: #E9ECEF;
  --shadow-color: rgba(0, 0, 0, 0.06);
  --shadow-hover: rgba(0, 0, 0, 0.12);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cream Theme */
[data-theme-style="cream"] {
  --bg-color: #F7F4EB;
  --bg-rgb: 247, 244, 235;
  --surface-color: #FFFFFF;
  --surface-rgb: 255, 255, 255;
  --text-color: #2D271E;
  --text-muted: #7A7265;
  --border-color: #EFEBE0;
  --shadow-color: rgba(45, 39, 30, 0.05);
}

/* Dark Premium Theme */
[data-theme-style="dark"] {
  --bg-color: #0B0E14;
  --bg-rgb: 11, 14, 20;
  --surface-color: #161B26;
  --surface-rgb: 22, 27, 38;
  --text-color: #F3F4F6;
  --text-muted: #9CA3AF;
  --border-color: #242D3D;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
}

/* Neon Cyber Theme */
[data-theme-style="neon"] {
  --bg-color: #050508;
  --bg-rgb: 5, 5, 8;
  --surface-color: #0E0E18;
  --surface-rgb: 14, 14, 24;
  --text-color: #00FFCC;
  --text-muted: #8A92A6;
  --border-color: #1A1F38;
  --shadow-color: rgba(0, 255, 204, 0.05);
  --shadow-hover: rgba(0, 255, 204, 0.15);
}

/* Base resets & box sizing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-primary);
  background-color: #0F172A; /* Outer desktop background */
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* -------------------------------------------------------------
   DESKTOP MOCKUP SYSTEM
------------------------------------------------------------- */
.desktop-bg-decor {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.15;
  pointer-events: none;
}
.decor-1 {
  background: var(--primary-color);
  top: -10%;
  left: 10%;
}
.decor-2 {
  background: #3B82F6;
  bottom: -10%;
  right: 10%;
}

.app-frame-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  max-width: 440px;
  max-height: 920px;
  background: #000000;
  border-radius: 0px;
  box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.5);
  z-index: 10;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.desktop-frame-header {
  display: none;
}

/* Enable styling as a mobile phone mockup frame ONLY on desktop screens */
@media (min-width: 500px) {
  body {
    padding: 20px 0;
  }
  .app-frame-wrapper {
    border: 12px solid #1E293B;
    border-radius: 48px;
    height: 880px;
  }
  .desktop-frame-header {
    display: flex;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    z-index: 999;
    pointer-events: none;
  }
  .frame-notch {
    width: 160px;
    height: 20px;
    background: #1E293B;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    position: relative;
  }
  .frame-speaker {
    width: 40px;
    height: 4px;
    background: #0F172A;
    border-radius: 2px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* -------------------------------------------------------------
   PHONE SCREEN WORKSPACE
------------------------------------------------------------- */
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 500px) {
  .phone-screen {
    padding-top: 15px; /* Offset for notch */
  }
}

/* -------------------------------------------------------------
   SPLASH SCREEN
------------------------------------------------------------- */
.splash-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0F172A;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}
.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}
.splash-content {
  text-align: center;
  color: #FFFFFF;
}
.splash-logo-circle {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
  box-shadow: 0px 10px 20px rgba(var(--primary-rgb), 0.3);
  animation: splashPulse 2s infinite ease-in-out;
}
.splash-logo-icon {
  width: 40px;
  height: 40px;
}
.splash-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 5px;
}
.splash-subtitle {
  font-size: 14px;
  color: #94A3B8;
  margin-bottom: 30px;
}
.splash-loader {
  width: 140px;
  height: 4px;
  background-color: #334155;
  border-radius: 2px;
  margin: 0 auto;
  overflow: hidden;
}
.splash-loader-bar {
  width: 50%;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 2px;
  animation: splashLoaderAnim 1.5s infinite linear;
}

@keyframes splashPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes splashLoaderAnim {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* -------------------------------------------------------------
   APP HEADER
------------------------------------------------------------- */
.app-header {
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  box-shadow: 0px 4px 12px var(--shadow-color);
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background-color: rgba(var(--primary-rgb), 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  transition: all var(--transition-fast);
}
.brand-icon {
  width: 20px;
  height: 20px;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.brand-subtitle {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1px;
}
.header-action-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--text-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}
.icon-btn:hover {
  background-color: var(--border-color);
}
.icon-btn i {
  width: 22px;
  height: 22px;
}

/* Badges */
.position-relative {
  position: relative;
}
.badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1.5px solid var(--surface-color);
}
.badge-primary {
  background-color: var(--primary-color);
}
.badge-accent {
  background-color: var(--accent-color);
}

/* -------------------------------------------------------------
   MAIN CONTENT SCROLL AREA & TABS
------------------------------------------------------------- */
.app-main-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 90px; /* Space for bottom nav */
}
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}
.tab-panel.active {
  display: block;
}

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

/* -------------------------------------------------------------
   HERO BANNER
------------------------------------------------------------- */
.hero-banner {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: var(--border-radius-lg);
  padding: 20px;
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 8px 24px rgba(var(--primary-rgb), 0.25);
  margin-bottom: 20px;
}
.hero-content {
  flex: 1.2;
  z-index: 2;
}
.hero-badge {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 10px;
  backdrop-filter: blur(4px);
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 15px;
}
.hero-btn {
  border: none;
  background-color: #FFFFFF;
  color: var(--primary-color);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-fast);
}
.hero-btn:hover {
  transform: scale(1.04);
}
.hero-btn i {
  width: 14px;
  height: 14px;
}
.hero-image-wrapper {
  flex: 0.8;
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}
.hero-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
  animation: heroImgFloat 4s ease-in-out infinite;
}

@keyframes heroImgFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

/* -------------------------------------------------------------
   SEARCH & FILTERS
------------------------------------------------------------- */
.search-section {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.search-bar {
  flex: 1;
  background-color: var(--surface-color);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0px 2px 6px var(--shadow-color);
  transition: all var(--transition-fast);
}
.search-bar:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0px 0px 0px 3px rgba(var(--primary-rgb), 0.1);
}
.search-icon {
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}
.search-bar input {
  border: none;
  background: transparent;
  flex: 1;
  height: 48px;
  font-size: 15px;
  font-family: var(--font-primary);
  color: var(--text-color);
  outline: none;
}
.search-clear-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.search-clear-btn i {
  width: 16px;
  height: 16px;
}
.filter-btn {
  border: 1.5px solid var(--border-color);
  background-color: var(--surface-color);
  color: var(--text-color);
  border-radius: var(--border-radius-md);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0px 2px 6px var(--shadow-color);
  transition: all var(--transition-fast);
}
.filter-btn:hover {
  background-color: var(--border-color);
}
.filter-btn i {
  width: 18px;
  height: 18px;
}

/* -------------------------------------------------------------
   HORIZONTAL CATEGORIES
------------------------------------------------------------- */
.categories-container-outer {
  overflow-x: auto;
  margin: 0 -16px 24px -16px;
  padding: 0 16px;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}
.categories-container-outer::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}
.categories-list {
  display: flex;
  gap: 10px;
  padding-bottom: 4px;
}
.category-pill {
  border: none;
  background-color: var(--surface-color);
  color: var(--text-color);
  padding: 10px 18px;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0px 2px 6px var(--shadow-color);
  transition: all var(--transition-fast);
}
.category-pill:hover {
  transform: translateY(-2px);
}
.category-pill.active {
  background-color: var(--primary-color);
  color: #FFFFFF;
  box-shadow: 0px 6px 16px rgba(var(--primary-rgb), 0.2);
}
.category-pill i {
  width: 16px;
  height: 16px;
}

/* -------------------------------------------------------------
   SECTION HEADER
------------------------------------------------------------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.section-counter {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* -------------------------------------------------------------
   PRODUCT CARD COMPONENT
------------------------------------------------------------- */
.products-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.product-card {
  background-color: var(--surface-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  display: flex;
  gap: 14px;
  box-shadow: 0px 4px 12px var(--shadow-color);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0px 8px 18px var(--shadow-hover);
  border-color: rgba(var(--primary-rgb), 0.2);
}
.product-image-area {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--border-color);
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}
.product-card:hover .product-img {
  transform: scale(1.06);
}
.product-badge-popular {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(255, 255, 255, 0.95);
  color: #D97706; /* Amber */
  font-size: 8px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
  box-shadow: 0px 2px 4px rgba(0,0,0,0.1);
  text-transform: uppercase;
}
.product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.product-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
}
.product-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}
.product-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.product-price {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-color);
}
.product-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background-color: var(--primary-color);
  color: #FFFFFF;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0px 4px 10px rgba(var(--primary-rgb), 0.2);
  transition: all var(--transition-fast);
}
.product-add-btn:hover {
  background-color: var(--primary-hover);
  transform: scale(1.08);
}
.product-add-btn i {
  width: 16px;
  height: 16px;
}

/* Out of Stock Card Overlay */
.product-card.out-of-stock {
  opacity: 0.65;
}
.product-card.out-of-stock .product-add-btn {
  background-color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

/* -------------------------------------------------------------
   CART & CHECKOUT TAB ELEMENTS
------------------------------------------------------------- */
.tab-header-plain {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.tab-header-plain h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
}
.text-btn {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.text-danger {
  color: var(--accent-color);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  animation: fadeIn 0.4s ease-out;
}
.empty-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
}
.empty-icon-circle i {
  width: 32px;
  height: 32px;
}
.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Cart item row card */
.cart-item-row {
  background-color: var(--surface-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 10px;
  position: relative;
}
.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background-color: var(--border-color);
}
.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cart-item-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.cart-item-note {
  font-size: 11px;
  color: var(--primary-color);
  font-style: italic;
  margin-top: 2px;
}
.cart-item-price {
  font-size: 14px;
  font-weight: 800;
}
.cart-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.cart-item-remove {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.cart-item-remove:hover {
  color: var(--accent-color);
}
.cart-item-remove i {
  width: 16px;
  height: 16px;
}

/* Quantity controls */
.qty-selector {
  display: flex;
  align-items: center;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  padding: 2px;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--text-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.qty-btn:hover {
  background-color: var(--border-color);
}
.qty-btn i {
  width: 12px;
  height: 12px;
}
.qty-value {
  font-size: 13px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

/* Cart config cards */
.cart-section-card {
  background-color: var(--surface-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0px 2px 6px var(--shadow-color);
}
.card-section-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-section-title i {
  width: 18px;
  height: 18px;
  color: var(--primary-color);
}

.delivery-options {
  display: flex;
  gap: 12px;
}
.delivery-option-btn {
  flex: 1;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.delivery-option-btn input {
  display: none;
}
.delivery-option-btn.active {
  border-color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.04);
}
.delivery-option-btn .option-icon i {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}
.delivery-option-btn.active .option-icon i {
  color: var(--primary-color);
}
.delivery-option-btn .option-label {
  font-size: 12px;
  font-weight: 700;
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.form-group input, 
.form-group textarea, 
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}
.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
  border-color: var(--primary-color);
}

/* Summaries */
.cart-totals-summary {
  background-color: var(--surface-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
}
.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}
.total-row span:first-child {
  color: var(--text-muted);
}
.total-row span:last-child {
  font-weight: 600;
}
.summary-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 12px 0;
}
.total-row.grand-total {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 0;
}
.total-row.grand-total span:first-child {
  color: var(--text-color);
}
.total-row.grand-total span:last-child {
  color: var(--primary-color);
}

/* Helper Utilities */
.d-none { display: none !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-0 { margin-bottom: 0px !important; }
.mr-2 { margin-right: 8px !important; }
.flex-1 { flex: 1 !important; }
.d-flex { display: flex !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.py-3 { padding-top: 12px !important; padding-bottom: 12px !important; }

/* Buttons */
.btn {
  border: none;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-primary {
  background-color: var(--primary-color);
  color: #FFFFFF;
  box-shadow: 0px 4px 12px rgba(var(--primary-rgb), 0.2);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-color);
}
.btn-outline:hover {
  background-color: var(--border-color);
}
.btn-danger {
  background-color: var(--accent-color);
  color: #FFFFFF;
}
.btn-danger:hover {
  background-color: #d32f2f;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 8px;
}

/* -------------------------------------------------------------
   ADMIN TAB CARDS & LAYOUTS
------------------------------------------------------------- */
.admin-card {
  background-color: var(--surface-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0px 2px 6px var(--shadow-color);
  margin-bottom: 16px;
  animation: fadeIn 0.4s ease-out;
}
.admin-card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-card-title i {
  width: 18px;
  height: 18px;
  color: var(--primary-color);
}

.color-palette-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--surface-color);
  box-shadow: 0px 0px 0px 1px var(--border-color);
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.color-dot:hover {
  transform: scale(1.1);
}
.color-dot.active {
  box-shadow: 0px 0px 0px 2px var(--primary-color);
}
.custom-color-picker {
  border: none;
  width: 36px;
  height: 24px;
  cursor: pointer;
}

.logo-input-combo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.logo-emoji-presets {
  display: flex;
  gap: 8px;
}
.emoji-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}
.emoji-btn:hover {
  border-color: var(--primary-color);
}

/* Admin lists */
.admin-products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 8px;
  background-color: var(--bg-color);
}
.admin-product-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--surface-color);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}
.admin-prod-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-prod-thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
}
.admin-prod-details {
  display: flex;
  flex-direction: column;
}
.admin-prod-title {
  font-size: 13px;
  font-weight: 700;
}
.admin-prod-price {
  font-size: 11px;
  color: var(--primary-color);
  font-weight: 600;
}
.admin-prod-actions {
  display: flex;
  gap: 4px;
}

.category-manager-input {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.category-manager-input input {
  flex: 2;
  padding: 8px 12px;
  font-size: 13px;
}
.category-manager-input select {
  flex: 1;
  padding: 8px;
  font-size: 13px;
}
.category-manager-input .btn {
  padding: 8px 14px;
  font-size: 12px;
}
.admin-categories-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-cat-tag {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-cat-tag button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.admin-cat-tag button:hover {
  color: var(--accent-color);
}

.code-text {
  font-family: monospace;
}

/* -------------------------------------------------------------
   BOTTOM NAV BAR
------------------------------------------------------------- */
.app-bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 110;
  box-shadow: 0px -4px 12px var(--shadow-color);
}
.nav-item {
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex: 1;
  height: 100%;
  justify-content: center;
  transition: color var(--transition-fast);
}
/* PERFIL/ADMIN: oculto por defecto — el CLIENTE nunca lo ve. Solo el dueño, cuya
   sesión marca <body class="owner-mode">, lo ve en la barra. No depende del JS. */
#navAdminTab { display: none; }
body.owner-mode #navAdminTab { display: flex; }
.nav-item i {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-fast);
}
.nav-item span {
  font-size: 11px;
  font-weight: 600;
}
.nav-item.active {
  color: var(--primary-color);
}
.nav-item.active i {
  transform: translateY(-2px);
}
.nav-badge {
  top: 12px;
  right: 28px;
}

/* -------------------------------------------------------------
   DRAWER SIDE PANEL
------------------------------------------------------------- */
.drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.drawer-sidebar {
  position: absolute;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background-color: var(--surface-color);
  box-shadow: 10px 0px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: left var(--transition-normal);
}
.drawer-overlay.active .drawer-sidebar {
  left: 0;
}
.drawer-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-brand {
  display: flex;
  flex-direction: column;
}
.drawer-brand span {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
}
.drawer-brand small {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1px;
}
.close-drawer-btn {
  color: var(--text-muted);
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.drawer-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.drawer-info-item i {
  width: 22px;
  height: 22px;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 2px;
}
.drawer-info-item h5 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.drawer-info-item p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.drawer-footer-actions {
  margin-top: auto;
  padding-top: 20px;
}

/* -------------------------------------------------------------
   MODALS AND DIALOGS
------------------------------------------------------------- */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-end; /* Slide up from bottom on mobile */
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  width: 100%;
  background-color: var(--surface-color);
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
  max-height: 85%;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: 0px -10px 25px rgba(0, 0, 0, 0.1);
}
.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
}
.modal-body {
  padding: 16px;
  overflow-y: auto;
}
.modal-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Product Detail Specific Modal (Fullscreen Hero slide up) */
.detail-modal-card {
  max-height: 90%;
}
.detail-hero {
  position: relative;
  width: 100%;
  height: 220px;
  background-color: var(--border-color);
}
.detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-close-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  backdrop-filter: blur(4px);
}
.detail-close-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}
.detail-fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-muted);
  box-shadow: 0px 4px 10px rgba(0,0,0,0.1);
}
.detail-fav-btn.active {
  color: var(--accent-color);
  background: #FFFFFF;
}

.detail-body {
  padding: 20px 16px;
}
.detail-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}
.detail-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.detail-price {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-color);
}
.detail-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 12px;
  margin-bottom: 20px;
}

.detail-action-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 24px;
}
.detail-action-row .qty-selector {
  padding: 6px;
}
.detail-action-row .qty-btn {
  width: 32px;
  height: 32px;
}
.detail-action-row .qty-value {
  font-size: 15px;
  min-width: 30px;
}

/* Checkbox control */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  padding: 10px 0;
}
.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

/* -------------------------------------------------------------
   TOAST SYSTEM
------------------------------------------------------------- */
.toast {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 30px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-icon {
  width: 18px;
  height: 18px;
  color: var(--primary-color);
}
.toast-message {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
