/* Building Material SaaS Design System & CSS */
:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-glass: rgba(30, 41, 59, 0.75);
  --accent-primary: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --orange-accent: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  --green-accent: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --purple-accent: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-light: rgba(255, 255, 255, 0.1);
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-glow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header & Navbar */
.app-header {
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-pills {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
}

.nav-pill {
  padding: 8px 16px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-pill.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Container & Grids */
.main-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px;
  flex: 1;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%),
              url('https://images.unsplash.com/photo-1541888946425-d0fbb186a5b7?q=80&w=1000&auto=format&fit=crop') center/cover;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
  width: fit-content;
}

/* Delivery Radius Checker Bar */
.delivery-checker {
  background: var(--bg-card-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.input-field {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  outline: none;
  transition: border 0.2s ease;
}

.input-field:focus {
  border-color: var(--accent-primary);
}

.btn-action {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-orange {
  background: var(--orange-accent);
}

.btn-green {
  background: var(--green-accent);
}

/* Card Grids */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.card {
  background: var(--bg-card-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.5);
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #0f172a;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
}

.price-old {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Floating Cart Trigger */
.floating-cart-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--orange-accent);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.4);
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.875rem;
}

.table-custom th, .table-custom td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.table-custom th {
  color: var(--text-muted);
  font-weight: 600;
}

/* Status Badges */
.status-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pending { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.status-confirmed { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.status-delivered { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.status-verifying { background: rgba(139, 92, 246, 0.2); color: #c084fc; }

/* Responsive adjustments */
@media (max-width: 640px) {
  .app-header { flex-direction: column; gap: 10px; }
  .delivery-checker { flex-direction: column; align-items: stretch; }
}
