/* =========================
   Shared Public Styles
   SC Price Offer – theme aligned with test.html (red accent, white cards)
========================= */

:root {
  --bg-app: #f8f9fa;
  --sc-primary: #e30613;
  --sc-primary-dark: #c00510;
  --sc-primary-gradient: linear-gradient(135deg, #e30613 0%, #c00510 100%);
  --text-muted: #6b7280;
  --primary-soft: rgba(227, 6, 19, 0.1);
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --card-border: 1px solid #e9ecef;
}

body {
  background: var(--bg-app);
}

.bg-app {
  background: var(--bg-app);
}

/* Utilities */
.muted {
  color: var(--text-muted) !important;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco,
               Consolas, "Liberation Mono", "Courier New", monospace;
}

.pill {
  border-radius: 999px !important;
}

/* Cards – like test.html */
.card {
  border-radius: 12px;
  border: var(--card-border);
  background: #fff;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--sc-primary);
}

/* Badges */
.badge-soft {
  background: var(--primary-soft);
  color: var(--sc-primary);
  border: 1px solid rgba(227, 6, 19, 0.25);
}

/* Primary button – red like test.html */
.btn-primary {
  background: var(--sc-primary-gradient);
  border: none;
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f30615 0%, #d00512 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(227, 6, 19, 0.35);
}

.btn-outline-primary {
  border-color: var(--sc-primary);
  color: var(--sc-primary);
}

.btn-outline-primary:hover {
  background: var(--primary-soft);
  border-color: var(--sc-primary);
  color: var(--sc-primary);
}

/* Tables */
.table thead th {
  color: var(--text-muted);
  font-weight: 600;
}

/* Navbar – accent */
.navbar-brand .text-primary,
.navbar .text-primary {
  color: var(--sc-primary) !important;
}

/* Spec chips (catalog / cart / offer) */
.spec-chip {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.85rem;
}

/* Sticky action bar (edit pages) */
.sticky-actions {
  position: sticky;
  bottom: 12px;
  z-index: 5;
}

/* Navbar tweaks */
.navbar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Buttons */
.btn {
  border-radius: 12px;
}

/* Forms */
.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(227, 6, 19, 0.25);
  border-color: var(--sc-primary);
}

/* Links when using primary */
a.text-primary,
.text-primary {
  color: var(--sc-primary) !important;
}

/* —— Global loading overlay (SC.loading / window.scLoading) —— */
body.sc-loading--active {
  overflow: hidden;
}
.sc-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  animation: sc-loading-fade 0.2s ease;
}
.sc-loading-overlay.sc-loading--section {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 50;
}
.sc-loading-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
}
.sc-loading-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  text-align: center;
}
.sc-loading-content .sc-loading-text {
  font-size: 0.95rem;
  color: #334155;
  max-width: 18rem;
}
@keyframes sc-loading-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.sc-loading-btn-wait {
  pointer-events: none;
  opacity: 0.85;
}
