/* ================================================
   ACERO SHOP V2 - UTILITY CLASSES
   ================================================
   Reusable single-purpose utility classes.
   Follows the spacing & design token system.
   Mobile First.
   ================================================ */

/* ============================================
   DISPLAY
   ============================================ */

.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; }

/* ============================================
   FLEXBOX DIRECTION
   ============================================ */

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-row-reverse { flex-direction: row-reverse !important; }
.flex-column-reverse { flex-direction: column-reverse !important; }

/* ============================================
   FLEXBOX WRAP
   ============================================ */

.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

/* ============================================
   FLEXBOX ALIGNMENT (MAIN AXIS)
   ============================================ */

.justify-start { justify-content: flex-start !important; }
.justify-end { justify-content: flex-end !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-around { justify-content: space-around !important; }
.justify-evenly { justify-content: space-evenly !important; }

/* ============================================
   FLEXBOX ALIGNMENT (CROSS AXIS)
   ============================================ */

.align-start { align-items: flex-start !important; }
.align-end { align-items: flex-end !important; }
.align-center { align-items: center !important; }
.align-baseline { align-items: baseline !important; }
.align-stretch { align-items: stretch !important; }

/* ============================================
   FLEXBOX SELF ALIGNMENT
   ============================================ */

.align-self-start { align-self: flex-start !important; }
.align-self-end { align-self: flex-end !important; }
.align-self-center { align-self: center !important; }

/* ============================================
   FLEX GROW / SHRINK
   ============================================ */

.flex-1 { flex: 1 !important; }
.flex-auto { flex: auto !important; }
.flex-grow-0 { flex-grow: 0 !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

/* ============================================
   GAP SPACING
   ============================================ */

.gap-4 { gap: var(--space-4) !important; }
.gap-8 { gap: var(--space-8) !important; }
.gap-12 { gap: var(--space-12) !important; }
.gap-16 { gap: var(--space-16) !important; }
.gap-20 { gap: var(--space-20) !important; }
.gap-24 { gap: var(--space-24) !important; }
.gap-32 { gap: var(--space-32) !important; }

/* ============================================
   MARGIN
   ============================================ */

.m-0 { margin: 0 !important; }
.m-4 { margin: var(--space-4) !important; }
.m-8 { margin: var(--space-8) !important; }
.m-12 { margin: var(--space-12) !important; }
.m-16 { margin: var(--space-16) !important; }
.m-20 { margin: var(--space-20) !important; }
.m-24 { margin: var(--space-24) !important; }
.m-32 { margin: var(--space-32) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-8 { margin-top: var(--space-8) !important; }
.mt-12 { margin-top: var(--space-12) !important; }
.mt-16 { margin-top: var(--space-16) !important; }
.mt-20 { margin-top: var(--space-20) !important; }
.mt-24 { margin-top: var(--space-24) !important; }
.mt-32 { margin-top: var(--space-32) !important; }
.mt-auto { margin-top: auto !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }
.mb-12 { margin-bottom: var(--space-12) !important; }
.mb-16 { margin-bottom: var(--space-16) !important; }
.mb-20 { margin-bottom: var(--space-20) !important; }
.mb-24 { margin-bottom: var(--space-24) !important; }
.mb-32 { margin-bottom: var(--space-32) !important; }

.ml-0 { margin-left: 0 !important; }
.ml-4 { margin-left: var(--space-4) !important; }
.ml-8 { margin-left: var(--space-8) !important; }
.ml-12 { margin-left: var(--space-12) !important; }
.ml-16 { margin-left: var(--space-16) !important; }
.ml-auto { margin-left: auto !important; }

.mr-0 { margin-right: 0 !important; }
.mr-4 { margin-right: var(--space-4) !important; }
.mr-8 { margin-right: var(--space-8) !important; }
.mr-12 { margin-right: var(--space-12) !important; }
.mr-16 { margin-right: var(--space-16) !important; }
.mr-auto { margin-right: auto !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* ============================================
   PADDING
   ============================================ */

.p-0 { padding: 0 !important; }
.p-4 { padding: var(--space-4) !important; }
.p-8 { padding: var(--space-8) !important; }
.p-12 { padding: var(--space-12) !important; }
.p-16 { padding: var(--space-16) !important; }
.p-20 { padding: var(--space-20) !important; }
.p-24 { padding: var(--space-24) !important; }
.p-32 { padding: var(--space-32) !important; }

.pt-0 { padding-top: 0 !important; }
.pt-4 { padding-top: var(--space-4) !important; }
.pt-8 { padding-top: var(--space-8) !important; }
.pt-12 { padding-top: var(--space-12) !important; }
.pt-16 { padding-top: var(--space-16) !important; }
.pt-20 { padding-top: var(--space-20) !important; }
.pt-24 { padding-top: var(--space-24) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-4 { padding-bottom: var(--space-4) !important; }
.pb-8 { padding-bottom: var(--space-8) !important; }
.pb-12 { padding-bottom: var(--space-12) !important; }
.pb-16 { padding-bottom: var(--space-16) !important; }
.pb-20 { padding-bottom: var(--space-20) !important; }
.pb-24 { padding-bottom: var(--space-24) !important; }
.pb-safe { padding-bottom: env(safe-area-inset-bottom) !important; }

.pl-16 { padding-left: var(--space-16) !important; }
.pr-16 { padding-right: var(--space-16) !important; }

.px-16 { padding-left: var(--space-16) !important; padding-right: var(--space-16) !important; }
.px-20 { padding-left: var(--space-20) !important; padding-right: var(--space-20) !important; }
.py-8 { padding-top: var(--space-8) !important; padding-bottom: var(--space-8) !important; }
.py-12 { padding-top: var(--space-12) !important; padding-bottom: var(--space-12) !important; }
.py-16 { padding-top: var(--space-16) !important; padding-bottom: var(--space-16) !important; }

/* ============================================
   WIDTH & HEIGHT
   ============================================ */

.w-full { width: 100% !important; }
.w-auto { width: auto !important; }
.w-50 { width: 50% !important; }

.h-full { height: 100% !important; }
.h-auto { height: auto !important; }

.min-h-100 { min-height: 100vh !important; }

/* ============================================
   TEXT ALIGNMENT
   ============================================ */

.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* ============================================
   TEXT TRANSFORM
   ============================================ */

.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }
.text-lowercase { text-transform: lowercase !important; }

/* ============================================
   TEXT DECORATION
   ============================================ */

.text-underline { text-decoration: underline !important; }
.text-no-underline { text-decoration: none !important; }
.text-line-through { text-decoration: line-through !important; }

/* ============================================
   TEXT TRUNCATION
   ============================================ */

.text-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

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

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

/* ============================================
   TEXT COLOR
   ============================================ */

.text-primary { color: var(--color-text-primary) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }
.text-muted { color: var(--color-text-muted) !important; }
.text-brand { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-white { color: var(--color-text-white) !important; }

/* ============================================
   TEXT SIZE
   ============================================ */

.text-xs { font-size: var(--font-size-small) !important; }
.text-sm { font-size: var(--font-size-caption) !important; }
.text-base { font-size: var(--font-size-body) !important; }
.text-md { font-size: var(--font-size-card-title) !important; }
.text-lg { font-size: var(--font-size-price) !important; }
.text-xl { font-size: var(--font-size-section-title) !important; }
.text-2xl { font-size: var(--font-size-hero) !important; }

/* ============================================
   FONT WEIGHT
   ============================================ */

.font-regular { font-weight: var(--font-weight-regular) !important; }
.font-medium { font-weight: var(--font-weight-medium) !important; }
.font-semibold { font-weight: var(--font-weight-semibold) !important; }
.font-bold { font-weight: var(--font-weight-bold) !important; }

/* ============================================
   WHITE SPACE
   ============================================ */

.whitespace-normal { white-space: normal !important; }
.whitespace-nowrap { white-space: nowrap !important; }

/* ============================================
   WORD BREAK
   ============================================ */

.break-word { word-break: break-word !important; }
.break-all { word-break: break-all !important; }

/* ============================================
   BACKGROUND COLORS
   ============================================ */

.bg-white { background-color: var(--color-card-background) !important; }
.bg-light { background-color: #F5F5F5 !important; }
.bg-primary { background-color: var(--color-primary) !important; }
.bg-primary-light { background-color: var(--color-primary-light) !important; }
.bg-success { background-color: var(--color-success) !important; }
.bg-warning { background-color: var(--color-warning) !important; }
.bg-danger { background-color: var(--color-danger) !important; }
.bg-transparent { background-color: transparent !important; }

/* ============================================
   BORDER
   ============================================ */

.border { border: 1px solid var(--color-border) !important; }
.border-0 { border: none !important; }
.border-top { border-top: 1px solid var(--color-border) !important; }
.border-bottom { border-bottom: 1px solid var(--color-border) !important; }
.border-primary { border-color: var(--color-primary) !important; }

/* ============================================
   BORDER RADIUS
   ============================================ */

.rounded-sm { border-radius: var(--radius-small) !important; }
.rounded { border-radius: var(--radius-button) !important; }
.rounded-lg { border-radius: var(--radius-card) !important; }
.rounded-xl { border-radius: var(--radius-modal) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* ============================================
   SHADOW
   ============================================ */

.shadow-none { box-shadow: none !important; }
.shadow-light { box-shadow: var(--shadow-light) !important; }
.shadow-medium { box-shadow: var(--shadow-medium) !important; }
.shadow-hover { box-shadow: var(--shadow-hover) !important; }
.shadow-card { box-shadow: var(--shadow-card) !important; }

/* ============================================
   OVERFLOW
   ============================================ */

.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }
.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }

/* ============================================
   POSITION
   ============================================ */

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

/* ============================================
   INSET
   ============================================ */

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* ============================================
   OBJECT FIT
   ============================================ */

.object-cover { object-fit: cover !important; }
.object-contain { object-fit: contain !important; }

/* ============================================
   ASPECT RATIO
   ============================================ */

.aspect-square { aspect-ratio: 1 / 1 !important; }
.aspect-video { aspect-ratio: 16 / 9 !important; }

/* ============================================
   CURSOR
   ============================================ */

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

/* ============================================
   USER SELECT
   ============================================ */

.select-none { user-select: none !important; }
.select-all { user-select: all !important; }

/* ============================================
   VISIBILITY
   ============================================ */

.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

/* ============================================
   OPACITY
   ============================================ */

.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* ============================================
   RESPONSIVE VISIBILITY
   ============================================ */

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

.show-mobile {
  display: block !important;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: block !important;
  }

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

  .hide-tablet {
    display: none !important;
  }
}

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

/* ============================================
   BOTTOM NAV SPACING (MOBILE)
   ============================================ */

.pb-nav {
  padding-bottom: calc(var(--bottom-nav-height) + var(--space-16) + env(safe-area-inset-bottom)) !important;
}

.mb-nav {
  margin-bottom: var(--bottom-nav-height) !important;
}

/* ============================================
   HEADER SPACING
   ============================================ */

.pt-header {
  padding-top: calc(var(--header-height) + var(--space-16)) !important;
}

/* ============================================
   NO SCROLLBAR
   ============================================ */

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ============================================
   GRID HELPERS
   ============================================ */

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr) !important;
}

@media (min-width: 768px) {
  .grid-cols-3-tablet {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (min-width: 1024px) {
  .grid-cols-4-desktop {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .grid-cols-5-desktop {
    grid-template-columns: repeat(5, 1fr) !important;
  }

  .grid-cols-6-desktop {
    grid-template-columns: repeat(6, 1fr) !important;
  }
}

/* ============================================
   SAFE AREA (iOS)
   ============================================ */

.safe-top {
  padding-top: env(safe-area-inset-top) !important;
}

.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom) !important;
}