/* ==========================================================================
   Flint Engine eCommerce Platform - Design System
   Standalone CSS supplement to Bootstrap
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
  /* Colors - Primary */
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --primary-dark: #0f0f1a;

  /* Colors - Secondary */
  --secondary: #e94560;
  --secondary-light: #ff6b81;

  /* Colors - Text */
  --text: #1a1a2e;
  --text-muted: #6c757d;
  --text-light: #adb5bd;

  /* Colors - Backgrounds */
  --bg: #ffffff;
  --bg-light: #f8f9fa;

  /* Colors - Surfaces */
  --surface: #ffffff;
  --surface-hover: #f1f3f5;

  /* Colors - Borders */
  --border: #dee2e6;
  --border-light: #e9ecef;

  /* Colors - Semantic */
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;

  /* Border Radius */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.15);

  /* Layout */
  --container: 1200px;

  /* Typography - Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
}

/* ==========================================================================
   Global Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Headings */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-4);
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

/* Paragraphs */
p {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lists */
ul, ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

/* ==========================================================================
   Selection Styling
   ========================================================================== */
::selection {
  background-color: var(--secondary);
  color: #ffffff;
}

::-moz-selection {
  background-color: var(--secondary);
  color: #ffffff;
}

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: var(--radius);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius);
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg-light);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Text Alignment */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Text Colors */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-light { color: var(--text-light) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }

/* Background Colors */
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-light { background-color: var(--bg-light) !important; }
.bg-surface { background-color: var(--surface) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }

/* Font Weights */
.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* Font Sizes */
.fs-xs { font-size: var(--text-xs) !important; }
.fs-sm { font-size: var(--text-sm) !important; }
.fs-base { font-size: var(--text-base) !important; }
.fs-lg { font-size: var(--text-lg) !important; }
.fs-xl { font-size: var(--text-xl) !important; }
.fs-2xl { font-size: var(--text-2xl) !important; }
.fs-3xl { font-size: var(--text-3xl) !important; }
.fs-4xl { font-size: var(--text-4xl) !important; }
.fs-5xl { font-size: var(--text-5xl) !important; }

/* Spacing Utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--space-1) !important; }
.m-2 { margin: var(--space-2) !important; }
.m-3 { margin: var(--space-3) !important; }
.m-4 { margin: var(--space-4) !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-8 { margin-top: var(--space-8) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }
.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-1) !important; }
.p-2 { padding: var(--space-2) !important; }
.p-3 { padding: var(--space-3) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-6 { padding: var(--space-6) !important; }
.p-8 { padding: var(--space-8) !important; }
.pt-0 { padding-top: 0 !important; }
.pt-4 { padding-top: var(--space-4) !important; }
.pb-0 { padding-bottom: 0 !important; }
.pb-4 { padding-bottom: var(--space-4) !important; }

/* Display Utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* Flex Utilities */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-stretch { align-items: stretch !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.justify-content-evenly { justify-content: space-evenly !important; }

/* Gap Utilities */
.gap-1 { gap: var(--space-1) !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-6 { gap: var(--space-6) !important; }
.gap-8 { gap: var(--space-8) !important; }

/* Width & Height */
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.w-auto { width: auto !important; }
.h-auto { height: auto !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }

/* Position */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* Border Radius */
.rounded-0 { border-radius: 0 !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded { border-radius: var(--radius) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-full { border-radius: 50% !important; }

/* Shadow Utilities */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

/* Border Utilities */
.border-0 { border: 0 !important; }
.border { border: 1px solid var(--border) !important; }
.border-top { border-top: 1px solid var(--border) !important; }
.border-bottom { border-bottom: 1px solid var(--border) !important; }
.border-left { border-left: 1px solid var(--border) !important; }
.border-right { border-right: 1px solid var(--border) !important; }
.border-light { border-color: var(--border-light) !important; }

/* Cursor */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* Truncate */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   Container
   ========================================================================== */
.container-app {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* ==========================================================================
   Button Styles
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.5rem 1.25rem;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  user-select: none;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.25);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Button Sizes */
.btn-sm {
  padding: 0.35rem 0.875rem;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

/* Button Block */
.btn-block {
  display: flex;
  width: 100%;
}

/* Primary Button (uses secondary color as primary action) */
.btn-primary {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--secondary-light);
  border-color: var(--secondary-light);
  color: #ffffff;
}

.btn-primary:active {
  background-color: var(--secondary);
  border-color: var(--secondary);
}

/* Secondary Button (uses primary color) */
.btn-secondary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  color: #ffffff;
}

.btn-secondary:active {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Outline Buttons */
.btn-outline-primary {
  background-color: transparent;
  border-color: var(--secondary);
  color: var(--secondary);
}

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

.btn-outline-secondary {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

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

.btn-outline-light {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline-light:hover {
  background-color: var(--surface-hover);
  border-color: var(--border);
}

.btn-outline-danger {
  background-color: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn-outline-danger:hover {
  background-color: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.btn-outline-success {
  background-color: transparent;
  border-color: var(--success);
  color: var(--success);
}

.btn-outline-success:hover {
  background-color: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background-color: var(--surface-hover);
  color: var(--text);
}

/* Link Button */
.btn-link {
  background-color: transparent;
  border-color: transparent;
  color: var(--secondary);
  padding-left: 0;
  padding-right: 0;
}

.btn-link:hover {
  color: var(--secondary-light);
  text-decoration: underline;
}

/* Button with Icon */
.btn-icon {
  padding: 0.5rem;
  line-height: 1;
}

.btn-icon svg,
.btn-icon i {
  width: 1.25rem;
  height: 1.25rem;
}

/* Button Group */
.btn-group {
  display: inline-flex;
  vertical-align: middle;
}

.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.btn-group .btn:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ==========================================================================
   Badge Styles
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.65em;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Badge Variants */
.badge-sale {
  background-color: var(--danger);
}

.badge-new {
  background-color: var(--success);
}

.badge-featured {
  background-color: var(--secondary);
}

.badge-warning {
  background-color: var(--warning);
  color: var(--text);
}

.badge-info {
  background-color: #17a2b8;
}

.badge-primary {
  background-color: var(--primary);
}

.badge-secondary {
  background-color: var(--secondary);
}

/* Badge Sizes */
.badge-lg {
  padding: 0.4em 0.85em;
  font-size: var(--text-sm);
}

.badge-sm {
  padding: 0.15em 0.5em;
  font-size: 0.65rem;
}

/* Badge Pill */
.badge-pill {
  border-radius: 50rem;
  padding-left: 0.75em;
  padding-right: 0.75em;
}

/* ==========================================================================
   Form Styling
   ========================================================================== */
.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--surface);
  background-clip: padding-box;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control::placeholder {
  color: var(--text-light);
  opacity: 1;
}

.form-control:focus {
  color: var(--text);
  background-color: var(--surface);
  border-color: var(--secondary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.form-control:disabled {
  background-color: var(--bg-light);
  opacity: 1;
  cursor: not-allowed;
}

/* Form Control Sizes */
.form-control-sm {
  padding: 0.25rem 0.5rem;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.form-control-lg {
  padding: 0.75rem 1rem;
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

/* Form Control Validation States */
.form-control.is-valid {
  border-color: var(--success);
}

.form-control.is-valid:focus {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

.form-control.is-invalid {
  border-color: var(--danger);
}

.form-control.is-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Form Labels */
.form-label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

/* Form Text */
.form-text {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Form Group */
.form-group {
  margin-bottom: var(--space-4);
}

/* Form Row */
.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--space-2) * -1);
  margin-left: calc(var(--space-2) * -1);
}

.form-row > * {
  padding-right: var(--space-2);
  padding-left: var(--space-2);
}

/* Input Group */
.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-group > .form-control {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group > :not(:first-child) {
  margin-left: -1px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group > :not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  background-color: var(--bg-light);
  border: 1px solid var(--border);
}

/* Select */
.form-select {
  display: block;
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus {
  border-color: var(--secondary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.form-select:disabled {
  background-color: var(--bg-light);
}

/* Checkbox & Radio */
.form-check {
  display: block;
  min-height: 1.5rem;
  padding-left: 1.5em;
  margin-bottom: var(--space-2);
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
  vertical-align: top;
  background-color: var(--surface);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid var(--border);
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-check-input[type="checkbox"] {
  border-radius: var(--radius-sm);
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-check-input:checked {
  background-color: var(--secondary);
  border-color: var(--secondary);
}

.form-check-input:focus {
  border-color: var(--secondary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.form-check-input:disabled {
  pointer-events: none;
  filter: none;
  opacity: 0.5;
}

.form-check-label {
  font-size: var(--text-sm);
  color: var(--text);
}

/* Switch */
.form-switch {
  padding-left: 2.5em;
}

.form-switch .form-check-input {
  width: 2em;
  margin-left: -2.5em;
  background-position: left center;
  border-radius: 2em;
  transition: background-position 0.2s ease;
}

.form-switch .form-check-input:checked {
  background-position: right center;
}

/* Textarea */
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* ==========================================================================
   Card Component
   ========================================================================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-body {
  flex: 1 1 auto;
  padding: var(--space-4);
}

.card-header {
  padding: var(--space-4);
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
}

.card-footer {
  padding: var(--space-4);
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-light);
}

.card-title {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--primary);
}

.card-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.card-img-top {
  width: 100%;
  object-fit: cover;
}

.card-img-bottom {
  width: 100%;
  object-fit: cover;
}

/* Product Card */
.product-card {
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.product-card .product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-card .product-info {
  padding: var(--space-4);
}

.product-card .product-name {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .product-price {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--secondary);
}

.product-card .product-price-original {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: var(--space-2);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
  max-width: 380px;
  width: 100%;
}

.toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: var(--space-4);
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease;
  overflow: hidden;
}

.toast.toast-exiting {
  animation: toastSlideOut 0.3s ease forwards;
}

.toast-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: var(--space-3);
  margin-top: 2px;
}

.toast-body {
  flex: 1;
  padding: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.toast-title {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
  color: var(--text);
}

.toast-message {
  display: block;
  color: var(--text-muted);
}

.toast-close {
  flex-shrink: 0;
  margin-left: var(--space-3);
  padding: 0;
  background: none;
  border: none;
  font-size: var(--text-lg);
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.toast-close:hover {
  opacity: 1;
  color: var(--text);
}

/* Toast Variants */
.toast-success {
  border-left: 4px solid var(--success);
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-danger {
  border-left: 4px solid var(--danger);
}

.toast-danger .toast-icon {
  color: var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info {
  border-left: 4px solid #17a2b8;
}

.toast-info .toast-icon {
  color: #17a2b8;
}

/* Toast Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: var(--secondary);
  border-radius: 0 0 0 var(--radius-lg);
  animation: toastProgress linear forwards;
}

/* Toast Animations */
@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background-color: var(--primary);
}

.navbar-brand {
  font-size: var(--text-xl);
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--secondary-light);
}

.navbar-nav {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  list-style: none;
}

.navbar-nav .nav-link {
  padding: var(--space-2) var(--space-3);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #ffffff;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  gap: var(--space-1);
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  background-color: var(--surface-hover);
  border-color: var(--border);
}

.pagination .page-item.active .page-link {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: #ffffff;
}

.pagination .page-item.disabled .page-link {
  color: var(--text-light);
  pointer-events: none;
  background-color: var(--surface);
  border-color: var(--border-light);
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 0 var(--space-4);
  list-style: none;
  font-size: var(--text-sm);
}

.breadcrumb-item + .breadcrumb-item::before {
  display: inline-block;
  padding-right: var(--space-2);
  padding-left: var(--space-2);
  color: var(--text-light);
  content: "/";
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--secondary);
}

.breadcrumb-item.active {
  color: var(--text-light);
}

/* ==========================================================================
   Alert Styles
   ========================================================================== */
.alert {
  padding: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border-color: #ffeeba;
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

/* ==========================================================================
   Dropdown
   ========================================================================== */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  min-width: 10rem;
  padding: var(--space-2) 0;
  margin: var(--space-1) 0 0;
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-4);
  color: var(--text);
  background: none;
  border: none;
  font-size: var(--text-sm);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--surface-hover);
  color: var(--text);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--secondary);
  color: #ffffff;
}

.dropdown-divider {
  height: 0;
  margin: var(--space-2) 0;
  overflow: hidden;
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: scale(0.95) translateY(-20px);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: none;
  border: none;
  font-size: var(--text-xl);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background-color: var(--surface-hover);
  color: var(--text);
}

.modal-body {
  padding: var(--space-4);
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   Table Styles
   ========================================================================== */
.table {
  width: 100%;
  margin-bottom: var(--space-4);
  color: var(--text);
  border-collapse: collapse;
}

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

.table th {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.table tbody tr:hover {
  background-color: var(--surface-hover);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
  background-color: var(--surface-hover);
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */
.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--border);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-sm {
  width: 1rem;
  height: 1rem;
  border-width: 1.5px;
}

.spinner-lg {
  width: 2.5rem;
  height: 2.5rem;
  border-width: 3px;
}

.spinner-xl {
  width: 3.5rem;
  height: 3.5rem;
  border-width: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Full Page Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ==========================================================================
   Separator / Divider
   ========================================================================== */
.separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: var(--space-6) 0;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.separator::before {
  margin-right: var(--space-4);
}

.separator::after {
  margin-left: var(--space-4);
}

.separator-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ==========================================================================
   Price Display
   ========================================================================== */
.price {
  font-weight: 600;
  color: var(--secondary);
}

.price-original {
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-discount {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--danger);
  background-color: rgba(220, 53, 69, 0.1);
  padding: 0.1em 0.5em;
  border-radius: var(--radius-sm);
  margin-left: var(--space-2);
}

/* ==========================================================================
   Wishlist & Compare Icons
   ========================================================================== */
.wishlist-btn,
.compare-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.wishlist-btn:hover,
.compare-btn:hover {
  background-color: var(--surface-hover);
  border-color: var(--border);
  color: var(--danger);
}

.wishlist-btn.active {
  background-color: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

/* ==========================================================================
   Quantity Input
   ========================================================================== */
.quantity-input {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.quantity-input button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background-color: var(--surface);
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease;
  font-size: var(--text-lg);
}

.quantity-input button:hover {
  background-color: var(--surface-hover);
}

.quantity-input input {
  width: 3rem;
  height: 2.25rem;
  padding: 0;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: var(--text-sm);
  font-weight: 500;
  -moz-appearance: textfield;
}

.quantity-input input::-webkit-outer-spin-button,
.quantity-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ==========================================================================
   Accordion
   ========================================================================== */
.accordion {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--border-light);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  margin: 0;
}

.accordion-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4);
  background-color: var(--surface);
  border: none;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.accordion-button:hover {
  background-color: var(--surface-hover);
}

.accordion-button::after {
  content: '+';
  font-size: var(--text-xl);
  font-weight: 300;
  transition: transform 0.2s ease;
}

.accordion-button.active::after {
  content: '-';
}

.accordion-body {
  display: none;
  padding: 0 var(--space-4) var(--space-4);
}

.accordion-body.show {
  display: block;
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border-light);
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-tabs .nav-item {
  margin-bottom: -2px;
}

.nav-tabs .nav-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 2px solid transparent;
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-tabs .nav-link:hover {
  color: var(--text);
  border-color: var(--border-light);
  border-bottom-color: transparent;
}

.nav-tabs .nav-link.active {
  color: var(--secondary);
  background-color: var(--surface);
  border-color: var(--border-light);
  border-bottom-color: var(--surface);
}

.tab-content {
  padding: var(--space-4) 0;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ==========================================================================
   Tooltip
   ========================================================================== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: #ffffff;
  background-color: var(--primary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

/* ==========================================================================
   Responsive Breakpoints (Mobile First)
   ========================================================================== */
@media (max-width: 575.98px) {
  :root {
    --text-4xl: 1.75rem;
    --text-5xl: 2.25rem;
  }

  .d-none-mobile {
    display: none !important;
  }

  .container-app {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  .modal {
    margin: var(--space-4);
    max-height: calc(100vh - var(--space-8));
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .d-none-tablet {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .navbar-nav {
    flex-direction: row;
    gap: var(--space-1);
  }
}

@media (min-width: 992px) {
  .container-app {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 1200px) {
  .container-app {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  .navbar,
  .toast-container,
  .page-loader {
    display: none !important;
  }
}

/* ==========================================================================
   Accessibility: Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Dark Mode Support (Optional, follows system preference)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  .auto-dark {
    --bg: #1a1a2e;
    --bg-light: #16213e;
    --surface: #1a1a2e;
    --surface-hover: #16213e;
    --border: #2a2a4a;
    --border-light: #1f1f3a;
    --text: #e0e0e0;
    --text-muted: #8a8a9a;
    --text-light: #6a6a7a;
  }
}
