/* ========================================
   GRID & FLEXBOX UTILITIES
   ======================================== */

/* ----- FLEXBOX ----- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }

/* Flex Direction */
.flex-row { flex-direction: row; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col { flex-direction: column; }
.flex-col-reverse { flex-direction: column-reverse; }

/* Flex Wrap */
.flex-wrap { flex-wrap: wrap; }
.flex-wrap-reverse { flex-wrap: wrap-reverse; }
.flex-nowrap { flex-wrap: nowrap; }

/* Justify Content */
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

/* Align Items */
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }

/* Align Content */
.content-start { align-content: flex-start; }
.content-end { align-content: flex-end; }
.content-center { align-content: center; }
.content-between { align-content: space-between; }
.content-around { align-content: space-around; }
.content-stretch { align-content: stretch; }

/* Align Self */
.self-start { align-self: flex-start; }
.self-end { align-self: flex-end; }
.self-center { align-self: center; }
.self-baseline { align-self: baseline; }
.self-stretch { align-self: stretch; }

/* Flex Grow & Shrink */
.flex-1 { flex: 1; }
.flex-auto { flex: auto; }
.flex-initial { flex: 0 1 auto; }
.flex-none { flex: none; }

.grow { flex-grow: 1; }
.grow-0 { flex-grow: 0; }
.shrink { flex-shrink: 1; }
.shrink-0 { flex-shrink: 0; }

/* Gap */
.gap-0 { gap: 0; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 24px; }
.gap-6 { gap: 32px; }
.gap-8 { gap: 48px; }
.gap-10 { gap: 64px; }

.gap-x-0 { column-gap: 0; }
.gap-x-1 { column-gap: 4px; }
.gap-x-2 { column-gap: 8px; }
.gap-x-3 { column-gap: 12px; }
.gap-x-4 { column-gap: 16px; }
.gap-x-5 { column-gap: 24px; }
.gap-x-6 { column-gap: 32px; }

.gap-y-0 { row-gap: 0; }
.gap-y-1 { row-gap: 4px; }
.gap-y-2 { row-gap: 8px; }
.gap-y-3 { row-gap: 12px; }
.gap-y-4 { row-gap: 16px; }
.gap-y-5 { row-gap: 24px; }
.gap-y-6 { row-gap: 32px; }

/* Order */
.order-first { order: -9999; }
.order-last { order: 9999; }
.order-none { order: 0; }
.order-1 { order: 1; }
.order-2 { order: 2; }
.order-3 { order: 3; }
.order-4 { order: 4; }
.order-5 { order: 5; }

/* ----- GRID ----- */
.grid { display: grid; }
.inline-grid { display: inline-grid; }

/* Grid Template Columns */
.grid-cols-1 { grid-template-columns: repeat(1, 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-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.grid-cols-12 { grid-template-columns: repeat(12, 1fr); }

/* Grid Template Rows */
.grid-rows-1 { grid-template-rows: repeat(1, 1fr); }
.grid-rows-2 { grid-template-rows: repeat(2, 1fr); }
.grid-rows-3 { grid-template-rows: repeat(3, 1fr); }
.grid-rows-4 { grid-template-rows: repeat(4, 1fr); }

/* Grid Auto Flow */
.grid-flow-row { grid-auto-flow: row; }
.grid-flow-col { grid-auto-flow: column; }
.grid-flow-dense { grid-auto-flow: dense; }

/* Grid Column Span */
.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-12 { grid-column: span 12; }
.col-auto { grid-column: auto; }
.col-start-auto { grid-column-start: auto; }
.col-end-auto { grid-column-end: auto; }

/* Grid Row Span */
.row-span-1 { grid-row: span 1; }
.row-span-2 { grid-row: span 2; }
.row-span-3 { grid-row: span 3; }
.row-span-4 { grid-row: span 4; }
.row-auto { grid-row: auto; }

/* Grid Gap */
.grid-gap-0 { gap: 0; }
.grid-gap-1 { gap: 4px; }
.grid-gap-2 { gap: 8px; }
.grid-gap-3 { gap: 12px; }
.grid-gap-4 { gap: 16px; }
.grid-gap-5 { gap: 24px; }
.grid-gap-6 { gap: 32px; }

/* Place Content & Items */
.place-items-start { place-items: start; }
.place-items-end { place-items: end; }
.place-items-center { place-items: center; }
.place-items-stretch { place-items: stretch; }

.place-content-start { place-content: start; }
.place-content-end { place-content: end; }
.place-content-center { place-content: center; }
.place-content-between { place-content: space-between; }
.place-content-around { place-content: space-around; }
.place-content-evenly { place-content: space-evenly; }
.place-content-stretch { place-content: stretch; }

/* Place Self */
.place-self-start { place-self: start; }
.place-self-end { place-self: end; }
.place-self-center { place-self: center; }
.place-self-stretch { place-self: stretch; }

/* ----- RESPONSIVE GRID ----- */
@media (max-width: 1024px) {
    .lg\:grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:flex-col { flex-direction: column; }
    .lg\:flex-row { flex-direction: row; }
    .lg\:hidden { display: none; }
    .lg\:block { display: block; }
}

@media (max-width: 768px) {
    .md\:grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:flex-col { flex-direction: column; }
    .md\:flex-row { flex-direction: row; }
    .md\:hidden { display: none; }
    .md\:block { display: block; }
    .md\:gap-0 { gap: 0; }
    .md\:gap-2 { gap: 8px; }
    .md\:gap-4 { gap: 16px; }
}

@media (max-width: 480px) {
    .sm\:grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
    .sm\:flex-col { flex-direction: column; }
    .sm\:hidden { display: none; }
    .sm\:block { display: block; }
    .sm\:gap-0 { gap: 0; }
    .sm\:gap-2 { gap: 8px; }
}