/* ==========================================================================
   Esnafbites - Mobile-First Industrial Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --eb-primary: #f59e0b;         /* Industrial Amber / Gold */
  --eb-primary-hover: #d97706;
  --eb-primary-light: #fef3c7;
  --eb-primary-dark: #b45309;

  --eb-dark: #0f172a;            /* Deep Slate / Industrial Dark */
  --eb-dark-surface: #1e293b;
  --eb-dark-border: #334155;
  
  --eb-accent-blue: #0284c7;     /* Tech / Automotive Blue */
  --eb-accent-blue-light: #e0f2fe;
  
  --eb-success: #10b981;
  --eb-success-light: #d1fae5;
  --eb-danger: #ef4444;
  --eb-danger-light: #fee2e2;
  --eb-warning: #f59e0b;
  
  --eb-bg-main: #f8fafc;
  --eb-card-bg: #ffffff;
  --eb-text-main: #0f172a;
  --eb-text-muted: #64748b;
  --eb-border: #e2e8f0;
  
  --eb-radius-sm: 8px;
  --eb-radius-md: 14px;
  --eb-radius-lg: 20px;
  --eb-radius-pill: 9999px;
  
  --eb-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --eb-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --eb-shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
  --eb-shadow-glow: 0 0 20px rgba(245, 158, 11, 0.25);
  
  --eb-font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --eb-bottom-nav-height: 54px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--eb-font-family);
  background-color: var(--eb-bg-main);
  color: var(--eb-text-main);
  min-height: 100vh;
  padding-bottom: calc(var(--eb-bottom-nav-height) + 16px);
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 40px;
  }
}

/* ==========================================================================
   Header & App Navigation
   ========================================================================== */

.eb-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--eb-border);
  position: sticky;
  top: 0;
  z-index: 1020;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.eb-brand-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: var(--eb-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.eb-brand-text {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: var(--eb-dark);
}

.eb-brand-text span {
  color: var(--eb-primary-hover);
}

.eb-shop-badge {
  background: #f1f5f9;
  border: 1px solid var(--eb-border);
  padding: 6px 14px;
  border-radius: var(--eb-radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--eb-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.eb-shop-badge .dot {
  width: 8px;
  height: 8px;
  background-color: var(--eb-success);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.eb-nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--eb-text-muted);
  padding: 8px 16px;
  border-radius: var(--eb-radius-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.eb-nav-link:hover, .eb-nav-link.active {
  color: var(--eb-dark);
  background-color: #f1f5f9;
}

.eb-nav-link.active {
  color: var(--eb-primary-dark);
  background-color: var(--eb-primary-light);
}

/* ==========================================================================
   Compact Mobile Bottom Navigation Bar
   ========================================================================== */

.eb-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--eb-bottom-nav-height);
  background: #ffffff;
  border-top: 1px solid var(--eb-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1030;
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 992px) {
  .eb-bottom-nav {
    display: none !important;
  }
}

.eb-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--eb-text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  flex: 1;
  height: 100%;
  padding: 2px 0;
  line-height: 1.1;
  transition: color 0.15s ease;
  position: relative;
}

.eb-bottom-nav-item i {
  font-size: 1.15rem;
  margin-bottom: 2px;
  transition: transform 0.15s ease;
}

.eb-bottom-nav-item.active {
  color: var(--eb-primary-dark);
}

.eb-bottom-nav-item.active i {
  transform: translateY(-1px);
  color: var(--eb-primary);
}

.eb-bottom-nav-action {
  position: relative;
  top: -8px;
}

.eb-bottom-nav-fab {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  border: 2.5px solid #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eb-bottom-nav-fab:hover, .eb-bottom-nav-fab:active {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
  color: #ffffff;
}

/* ==========================================================================
   Hero & Quick Search Area
   ========================================================================== */

.eb-hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--eb-radius-lg);
  padding: 28px 24px;
  color: #ffffff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--eb-shadow-lg);
}

.eb-hero-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.eb-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
}

.eb-hero-subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.eb-search-box {
  background: #ffffff;
  border-radius: var(--eb-radius-md);
  padding: 6px;
  display: flex;
  align-items: center;
  box-shadow: var(--eb-shadow-md);
}

.eb-search-input {
  border: none;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  width: 100%;
  outline: none;
  color: var(--eb-dark);
}

::placeholder {
  color: #94a3b8 !important;
  opacity: 0.45 !important;
  font-weight: 400 !important;
}

::-webkit-input-placeholder {
  color: #94a3b8 !important;
  opacity: 0.45 !important;
  font-weight: 400 !important;
}

:-ms-input-placeholder {
  color: #94a3b8 !important;
  opacity: 0.45 !important;
}

.eb-search-btn {
  background: var(--eb-primary);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--eb-radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.eb-search-btn:hover {
  background: var(--eb-primary-hover);
}

/* ==========================================================================
   Stat Widgets
   ========================================================================== */

.eb-stat-card {
  background: var(--eb-card-bg);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
  padding: 18px;
  box-shadow: var(--eb-shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
}

.eb-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--eb-shadow-md);
}

.eb-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--eb-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.eb-stat-icon.amber { background: var(--eb-primary-light); color: var(--eb-primary-dark); }
.eb-stat-icon.blue { background: var(--eb-accent-blue-light); color: var(--eb-accent-blue); }
.eb-stat-icon.green { background: var(--eb-success-light); color: var(--eb-success); }
.eb-stat-icon.red { background: var(--eb-danger-light); color: var(--eb-danger); }

.eb-stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--eb-dark);
  line-height: 1.1;
}

.eb-stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--eb-text-muted);
}

/* ==========================================================================
   Filter Chips & Badges
   ========================================================================== */

.eb-chip-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.eb-chip-scroll::-webkit-scrollbar {
  display: none;
}

.eb-chip {
  background: #ffffff;
  border: 1px solid var(--eb-border);
  padding: 8px 16px;
  border-radius: var(--eb-radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--eb-text-main);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.eb-chip:hover {
  border-color: var(--eb-primary);
  color: var(--eb-primary-dark);
  background-color: var(--eb-primary-light);
}

.eb-chip.active {
  background-color: var(--eb-dark);
  color: #ffffff;
  border-color: var(--eb-dark);
}

/* Condition & Status Badges */
.eb-badge-condition {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--eb-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.eb-badge-new { background: #dcfce7; color: #15803d; }
.eb-badge-used { background: #e0f2fe; color: #0369a1; }
.eb-badge-refurb { background: #fef3c7; color: #b45309; }

.eb-badge-urgency-critical {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
  border: 1px solid #fca5a5;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.eb-badge-urgency-urgent { background: #ffedd5; color: #c2410c; font-weight: 700; }
.eb-badge-urgency-normal { background: #f1f5f9; color: #475569; font-weight: 600; }

/* ==========================================================================
   Spare Part Cards
   ========================================================================== */

.eb-part-card {
  background: #ffffff;
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
  overflow: hidden;
  box-shadow: var(--eb-shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.eb-part-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--eb-shadow-md);
  border-color: #cbd5e1;
}

.eb-part-img-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  background-color: #0f172a;
  overflow: hidden;
}

.eb-part-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.eb-part-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  font-size: 2.8rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.eb-part-img-placeholder small {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 4px;
}

.eb-part-card:hover .eb-part-img,
.eb-part-card:hover .eb-part-img-placeholder {
  transform: scale(1.05);
}

.eb-part-card:hover .eb-part-img-placeholder {
  color: #fbbf24;
}

.eb-part-desc-box {
  font-size: 0.82rem;
  color: #334155;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  padding: 6px 10px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.dropdown-menu {
  min-width: 260px !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
}

.eb-part-brand-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--eb-radius-pill);
  backdrop-filter: blur(4px);
}

.eb-part-pool-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--eb-radius-pill);
  display: flex;
  align-items: center;
  gap: 4px;
}

.eb-part-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.eb-part-oem {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--eb-accent-blue);
  background: var(--eb-accent-blue-light);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
  vertical-align: middle;
}

.eb-part-eskikod {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--eb-dark);
  background: #f1f5f9;
  border: 1px solid var(--eb-border);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
  vertical-align: middle;
}

.eb-part-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--eb-dark);
  line-height: 1.35;
  margin-bottom: 6px;
}

.eb-part-model {
  font-size: 0.85rem;
  color: var(--eb-text-muted);
  margin-bottom: 12px;
}

.eb-part-shop {
  font-size: 0.8rem;
  color: var(--eb-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.eb-part-footer {
  margin-top: auto;
  border-top: 1px solid var(--eb-border);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eb-part-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--eb-dark);
}

.eb-part-actions {
  display: flex;
  gap: 6px;
}

/* ==========================================================================
   Buttons & Quick Action Triggers
   ========================================================================== */

.eb-btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: var(--eb-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.eb-btn-whatsapp:hover {
  background-color: #1eb857;
  color: #ffffff;
  transform: translateY(-1px);
}

.eb-btn-call {
  background-color: #f1f5f9;
  color: var(--eb-dark);
  border: 1px solid var(--eb-border);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: var(--eb-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s;
}

.eb-btn-call:hover {
  background-color: #e2e8f0;
  color: var(--eb-dark);
}

.eb-btn-primary {
  background: var(--eb-primary);
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--eb-radius-sm);
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eb-btn-primary:hover {
  background: var(--eb-primary-hover);
  color: #ffffff;
}

/* ==========================================================================
   Part Request Cards
   ========================================================================== */

.eb-request-card {
  background: #ffffff;
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
  padding: 18px;
  box-shadow: var(--eb-shadow-sm);
  margin-bottom: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.eb-request-card:hover {
  box-shadow: var(--eb-shadow-md);
  border-color: #cbd5e1;
}

.eb-request-card.critical-border {
  border-left: 5px solid #ef4444;
}

.eb-request-card.urgent-border {
  border-left: 5px solid #f59e0b;
}

.eb-request-card.normal-border {
  border-left: 5px solid #3b82f6;
}

/* ==========================================================================
   Modals & Forms
   ========================================================================== */

.modal-content {
  border-radius: var(--eb-radius-lg);
  border: none;
  box-shadow: var(--eb-shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--eb-border);
  padding: 18px 24px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--eb-border);
  padding: 16px 24px;
}

.form-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--eb-dark);
  margin-bottom: 6px;
}

.form-control, .form-select {
  border-radius: var(--eb-radius-sm);
  border: 1px solid var(--eb-border);
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--eb-primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.eb-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1060;
}

.eb-toast {
  background: var(--eb-dark);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: var(--eb-radius-md);
  box-shadow: var(--eb-shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  animation: slide-in 0.3s ease-out;
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Floating Action Button (Desktop & Mobile)
   ========================================================================== */

.eb-fab-fixed {
  position: fixed;
  bottom: 84px;
  right: 20px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--eb-radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--eb-shadow-lg);
  text-decoration: none;
  z-index: 1010;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.eb-fab-fixed:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.45);
  color: #ffffff;
}

@media (min-width: 992px) {
  .eb-fab-fixed {
    bottom: 30px;
    right: 30px;
  }
}