/* ===== UTILITIES: LAYOUT (Flexbox, Grid, Display) ===== */
/* Utility classes for layout - NOT BEM (utilities are exempt) */

/* === DISPLAY UTILITIES === */
.hidden    { display: none !important; }
.visible   { display: block !important; }
.inline    { display: inline; }
.inline-block { display: inline-block; }
.block     { display: block; }

/* === FLEXBOX UTILITIES === */
.flex      { display: flex; }
.flex-wrap { display: flex; flex-wrap: wrap; }
.flex-nowrap { display: flex; flex-wrap: nowrap; }
.flex-col  { display: flex; flex-direction: column; }
.flex-row  { display: flex; flex-direction: row; }

/* Flex alignment (align-items) */
.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }
.items-end     { align-items: flex-end; }
.items-stretch { align-items: stretch; }

/* Flex justification (justify-content) */
.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around  { justify-content: space-around; }
.justify-evenly  { justify-content: space-evenly; }

/* Flex combined (centering) */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Flex gap */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.5rem; }
.gap-6 { gap: 2rem; }

/* Flex item grow/shrink */
.flex-1   { flex: 1; }
.flex-auto { flex: auto; }
.flex-none { flex: none; }
.flex-grow { flex-grow: 1; }
.flex-shrink { flex-shrink: 1; }

/* === GRID UTILITIES === */
.grid { display: grid; }

/* Grid auto-fit (responsive grid with min-width) */
.grid-auto-200 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.grid-auto-250 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.grid-auto-300 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

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

/* Grid gap */
.grid-gap-2 { gap: 0.5rem; }
.grid-gap-3 { gap: 0.75rem; }
.grid-gap-4 { gap: 1rem; }
.grid-gap-6 { gap: 1.5rem; }
.grid-gap-8 { gap: 2rem; }

/* === POSITIONING === */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.static { position: static; }
.sticky { position: sticky; }

/* === OVERFLOW === */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* === SIZING === */
.w-full { width: 100%; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.w-auto { width: auto; }
.h-auto { height: auto; }

.min-w-0 { min-width: 0; }
.min-h-0 { min-height: 0; }

.max-w-sm   { max-width: 24rem; }
.max-w-md   { max-width: 28rem; }
.max-w-lg   { max-width: 32rem; }
.max-w-xl   { max-width: 36rem; }
.max-w-2xl  { max-width: 42rem; }
.max-w-3xl  { max-width: 48rem; }
.max-w-4xl  { max-width: 56rem; }
.max-w-5xl  { max-width: 64rem; }
.max-w-6xl  { max-width: 72rem; }
.max-w-full { max-width: 100%; }

/* === MODAL/OVERLAY UTILITIES === */
.fixed-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.fixed-overlay-center {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === CLEARFIX === */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hidden-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hidden-desktop { display: none !important; }
}
