/* Professional Theme v2.0 - Mobile First & Accessible */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand Guidelines */
  --color-primary: #10b981;
  /* Modern Emerald */
  --color-primary-dark: #059669;
  --color-primary-light: #d1fae5;

  --color-secondary: #f59e0b;
  /* Golden Amber */
  --color-secondary-dark: #d97706;

  --color-accent: #6366f1;
  /* Indigo for functional accents */

  /* Typography Colors */
  --text-dark: #0f172a;
  /* Slate 900 */
  --text-medium: #334155;
  /* Slate 700 */
  --text-muted: #64748b;
  /* Slate 500 */
  --text-light: #94a3b8;
  /* Slate 400 */

  /* Backgrounds */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;

  /* UI Elements */
  --radius-xs: 0.25rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-pill: 9999px;

  /* Shadows - Soft & Modern */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Typography */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-medium);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 80px;
  /* Accounts for fixed navbar */
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.025em;
  /* Tighten headings for pro look */
  line-height: 1.1;
}

/* Links */
a {
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--color-primary);
}

/* Utilities Extended */
.text-primary {
  color: var(--color-primary) !important;
}

.text-secondary {
  color: var(--color-secondary) !important;
}

.bg-primary {
  background-color: var(--color-primary) !important;
}

.bg-secondary {
  background-color: var(--color-secondary) !important;
}

/* Components Override */

/* 1. Buttons - Touch Friendly & Solid */
.btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  /* Larger touch targets */
  border-radius: var(--radius-pill);
  transition: var(--transition-base);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
}

.btn-outline-primary {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary-dark);
  box-shadow: none;
}

.btn-outline-primary:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* 2. Cards - Modern Surface */
.card {
  background-color: var(--bg-surface);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(226, 232, 240, 0);
  /* Let shadow define depth */
}

/* 3. Forms - Readable & Accessible */
.form-control,
.form-select {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: var(--bg-surface);
  border: 2px solid #e2e8f0;
  /* Thicker border for clarity */
  border-radius: var(--radius-md);
  color: var(--text-dark);
  transition: var(--transition-base);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* 4. Navbar - Clean & Sticky */
.navbar {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 0;
  box-shadow: var(--shadow-xs);
}

.navbar-brand {
  color: var(--color-primary-dark) !important;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.nav-link {
  color: var(--text-medium) !important;
  font-weight: 600;
  padding: 0.5rem 1rem !important;
  /* Touch spacing */
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary) !important;
  background-color: var(--bg-subtle);
}

/* 5. Hero & Sections */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--text-dark) 100%);
  padding: 6rem 0 4rem;
  clip-path: ellipse(150% 100% at 50% 0%);
  /* Subtle curve at bottom */
}

@media (max-width: 768px) {
  .hero-section {
    clip-path: none;
    /* Simplify on mobile */
    padding: 4rem 0 3rem;
  }
}

/* 6. Mobile First Specifics */
@media (max-width: 768px) {

  h1,
  .display-3 {
    font-size: 2.5rem;
    /* Better scaling */
  }

  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* Make buttons full width on small screens for easy tapping */
  .btn-mobile-full {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Theme Utilities */
.text-gradient {
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-soft-primary {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.icon-box {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.5rem;
}

/* Custom Overrides for Existing Classes found in templates */
.bg-theme-primary {
  background-color: var(--color-primary) !important;
}

.text-theme-primary {
  color: var(--color-primary) !important;
}

/* Fix Toast positions and style */
.toast {
  background-color: var(--bg-surface);
  border: none;
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
}

/* Feature Cards */
.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-subtle);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* Fix readonly inputs in quantity selector */
.qty-input[readonly] {
  background-color: #ffffff !important;
  color: #000000 !important;
  opacity: 1 !important;
  font-weight: 700 !important;
  -webkit-text-fill-color: #000000 !important;
  /* Safari/Chrome specific fix */
  box-shadow: none !important;
  border-left: 0;
  border-right: 0;
}

/* Remove up/down spinners on desktop */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input {
  -moz-appearance: textfield;
  appearance: textfield;
}