/* ============================================================
   BAMBOX PREMIUM — LAYOUT SYSTEM
   File: assets/css/layout.css
   Layer: Structural / Grid / Spacing
   Mobile First | Enterprise Scale
   ============================================================ */

/* ------------------------------------------------------------
   1. GLOBAL CONTAINERS
   ------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 16px;
}

/* Tablet */
@media (min-width: 768px) {
  .container {
    padding-inline: 24px;
  }
}

/* Desktop */
@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
    padding-inline: 32px;
  }
}

/* ------------------------------------------------------------
   2. SECTION SPACING SYSTEM
   ------------------------------------------------------------ */

.section {
  padding-block: 48px;
}

.section-tight {
  padding-block: 32px;
}

.section-loose {
  padding-block: 72px;
}

/* Tablet */
@media (min-width: 768px) {
  .section {
    padding-block: 72px;
  }

  .section-tight {
    padding-block: 48px;
  }

  .section-loose {
    padding-block: 120px;
  }
}

/* ------------------------------------------------------------
   3. HEADER & FOOTER STRUCTURE
   ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Desktop */
@media (min-width: 1024px) {
  .header-inner {
    height: 80px;
  }
}

.site-footer {
  border-top: 1px solid var(--border-light);
  padding-block: 32px;
}

/* ------------------------------------------------------------
   4. GENERIC GRID SYSTEM
   ------------------------------------------------------------ */

.grid {
  display: grid;
  gap: 24px;
}

/* Two column (tablet+) */
@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Three column (desktop) */
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Four column (wide desktop) */
@media (min-width: 1280px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ------------------------------------------------------------
   5. STUDIO (CUSTOMIZER) LAYOUT
   ------------------------------------------------------------ */

.studio-layout {
  display: grid;
  gap: 32px;
}

/* Tablet & up */
@media (min-width: 900px) {
  .studio-layout {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
    gap: 48px;
  }
}

.studio-canvas-area {
  display: flex;
  justify-content: center;
}

.studio-controls-area {
  width: 100%;
}

/* ------------------------------------------------------------
   6. PRODUCT PREVIEW / DEMO LAYOUT
   ------------------------------------------------------------ */

.product-preview-layout {
  display: grid;
  gap: 32px;
}

/* Desktop */
@media (min-width: 1024px) {
  .product-preview-layout {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
  }
}

/* ------------------------------------------------------------
   7. ORDER PAGE LAYOUT
   ------------------------------------------------------------ */

.order-layout {
  display: grid;
  gap: 40px;
}

/* Desktop */
@media (min-width: 900px) {
  .order-layout {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 64px;
  }
}

/* ------------------------------------------------------------
   8. FORM LAYOUT HELPERS
   ------------------------------------------------------------ */

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-inline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Tablet */
@media (min-width: 600px) {
  .form-inline {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------------------------------
   9. ADMIN-SAFE WRAPPERS
   ------------------------------------------------------------ */

.admin-wrap {
  max-width: 100%;
  overflow-x: auto;
}

/* ------------------------------------------------------------
   END OF LAYOUT SYSTEM
   ------------------------------------------------------------ */
