/* ═══════════════════════════════════════
   UTILITIES — Spacing, Layout, Typography Helpers
   ═══════════════════════════════════════ */

/* ─── Display ───────────────────────── */
.u-hidden {
  display: none !important;
}

.u-block {
  display: block;
}

.u-inline-block {
  display: inline-block;
}

.u-flex {
  display: flex;
}

.u-inline-flex {
  display: inline-flex;
}

.u-grid {
  display: grid;
}

/* ─── Flex Alignment ────────────────── */
.u-items-center {
  align-items: center;
}

.u-items-start {
  align-items: flex-start;
}

.u-items-end {
  align-items: flex-end;
}

.u-justify-center {
  justify-content: center;
}

.u-justify-between {
  justify-content: space-between;
}

.u-justify-end {
  justify-content: flex-end;
}

.u-flex-col {
  flex-direction: column;
}

.u-flex-wrap {
  flex-wrap: wrap;
}

.u-flex-1 {
  flex: 1;
}

.u-flex-shrink-0 {
  flex-shrink: 0;
}

/* ─── Grid ──────────────────────────── */
.u-grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.u-grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.u-grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ─── Gap ───────────────────────────── */
.u-gap-1 {
  gap: 4px;
}

.u-gap-2 {
  gap: 8px;
}

.u-gap-3 {
  gap: 12px;
}

.u-gap-4 {
  gap: 16px;
}

.u-gap-5 {
  gap: 20px;
}

.u-gap-6 {
  gap: 24px;
}

.u-gap-8 {
  gap: 32px;
}

/* ─── Padding ───────────────────────── */
.u-p-0 {
  padding: 0 !important;
}

.u-p-2 {
  padding: 8px;
}

.u-p-3 {
  padding: 12px;
}

.u-p-4 {
  padding: 16px;
}

.u-p-5 {
  padding: 20px;
}

.u-p-6 {
  padding: 24px;
}

.u-px-3 {
  padding-left: 12px;
  padding-right: 12px;
}

.u-px-4 {
  padding-left: 16px;
  padding-right: 16px;
}

.u-px-5 {
  padding-left: 20px;
  padding-right: 20px;
}

.u-py-2 {
  padding-top: 8px;
  padding-bottom: 8px;
}

.u-py-3 {
  padding-top: 12px;
  padding-bottom: 12px;
}

.u-py-4 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.u-py-6 {
  padding-top: 24px;
  padding-bottom: 24px;
}

/* ─── Margin ────────────────────────── */
.u-m-0 {
  margin: 0 !important;
}

.u-mt-2 {
  margin-top: 8px;
}

.u-mt-3 {
  margin-top: 12px;
}

.u-mt-4 {
  margin-top: 16px;
}

.u-mt-5 {
  margin-top: 20px;
}

.u-mt-6 {
  margin-top: 24px;
}

.u-mt-8 {
  margin-top: 32px;
}

.u-mb-2 {
  margin-bottom: 8px;
}

.u-mb-3 {
  margin-bottom: 12px;
}

.u-mb-4 {
  margin-bottom: 16px;
}

.u-mb-5 {
  margin-bottom: 20px;
}

.u-mb-6 {
  margin-bottom: 24px;
}

.u-mb-8 {
  margin-bottom: 32px;
}

.u-mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* ─── Typography ────────────────────── */
.u-text-center {
  text-align: center;
}

.u-text-left {
  text-align: left;
}

.u-text-right {
  text-align: right;
}

.u-text-sm {
  font-size: 11px;
}

.u-text-xs {
  font-size: 10px;
}

.u-text-lg {
  font-size: 16px;
}

.u-text-xl {
  font-size: 20px;
}

.u-text-2xl {
  font-size: 24px;
}

.u-font-bold {
  font-weight: 700;
}

.u-font-extrabold {
  font-weight: 800;
}

.u-font-semibold {
  font-weight: 600;
}

.u-font-medium {
  font-weight: 500;
}

.u-text-muted {
  color: var(--muted);
}

.u-text-brand {
  color: var(--brand);
}

.u-text-success {
  color: var(--success);
}

.u-text-danger {
  color: var(--danger);
}

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

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

/* ─── Width ─────────────────────────── */
.u-w-full {
  width: 100%;
}

.u-w-auto {
  width: auto;
}

/* ─── Position ──────────────────────── */
.u-relative {
  position: relative;
}

.u-absolute {
  position: absolute;
}

/* ─── Overflow ──────────────────────── */
.u-overflow-hidden {
  overflow: hidden;
}

/* ─── Cursor ────────────────────────── */
.u-pointer {
  cursor: pointer;
}

/* ─── Visual ────────────────────────── */
.u-rounded {
  border-radius: var(--radius-lg);
}

.u-shadow {
  box-shadow: var(--shadow-md);
}

/* ─── Whitespace ────────────────────── */
.u-whitespace-nowrap {
  white-space: nowrap;
}

/* ─── Responsive utilities ──────────── */
@media (max-width: 1024px) {
  .u-hidden-tablet {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .u-hidden-mobile {
    display: none !important;
  }

  .u-flex-col-mobile {
    flex-direction: column;
  }

  .u-w-full-mobile {
    width: 100%;
  }
}