/*
 * Explosión Creativa V13
 * Sticky-header structural fix + cart layout.
 */
html .rbt-sticky-placeholder {
  display: block !important;
  width: 100% !important;
  height: 0;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  clear: both !important;
  pointer-events: none !important;
}
/* main.js sets the real height inline when the sticky header pins. */

/*
 * Unimart / Explosión Creativa V12
 * Native cart-page layout fix.
 * The cart must begin below the header/title area, never overlap it.
 */

body.woocommerce-cart {
  overflow-x: hidden !important;
}

body.woocommerce-cart main.page-wrapper {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

body.woocommerce-cart .unimart-cart-page-content {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  clear: both !important;
  overflow: visible !important;
}

body.woocommerce-cart .rbt-cart-page {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  clear: both !important;
  overflow: visible !important;
  padding-top: 32px !important;
  padding-bottom: 64px !important;
}

/* The old theme used mt_dec--24 here. V12 intentionally neutralizes
   negative vertical offsets so the cart can never climb into the header. */
body.woocommerce-cart .unimart-cart-layout-row {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0 !important;
  clear: both !important;
  align-items: flex-start !important;
}

body.woocommerce-cart .unimart-cart-layout-row > [class*="col-"] {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin-top: 24px !important;
}

/* Desktop: exactly the same left/right visual order as checkout. */
@media (min-width: 992px) {
  body.woocommerce-cart .unimart-cart-layout-row {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr) !important;
    gap: 24px !important;
  }

  body.woocommerce-cart .unimart-cart-layout-row > .col-lg-8 {
    width: auto !important;
    max-width: none !important;
    grid-column: 1 !important;
  }

  body.woocommerce-cart .unimart-cart-layout-row > .col-lg-4 {
    width: auto !important;
    max-width: none !important;
    grid-column: 2 !important;
  }

  body.woocommerce-cart .unimart-cart-sidebar {
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
  }
}

/* Tablet: two columns only while there is enough room. */
@media (min-width: 768px) and (max-width: 991.98px) {
  body.woocommerce-cart .rbt-cart-page {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  body.woocommerce-cart .unimart-cart-layout-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr) !important;
    gap: 20px !important;
  }

  body.woocommerce-cart .unimart-cart-layout-row > .col-lg-8,
  body.woocommerce-cart .unimart-cart-layout-row > .col-lg-4 {
    width: auto !important;
    max-width: none !important;
  }

  body.woocommerce-cart .unimart-cart-sidebar {
    position: relative !important;
    top: auto !important;
  }
}

/* Mobile: natural vertical order, exactly like checkout. */
@media (max-width: 767.98px) {
  body.woocommerce-cart .rbt-cart-page {
    padding: 20px 12px 48px !important;
  }

  body.woocommerce-cart .unimart-cart-layout-row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0 !important;
  }

  body.woocommerce-cart .unimart-cart-layout-row > .col-lg-8,
  body.woocommerce-cart .unimart-cart-layout-row > .col-lg-4 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-top: 16px !important;
  }

  body.woocommerce-cart .unimart-cart-sidebar {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
  }
}

/* Extra protection against theme utilities moving cart blocks upward. */
body.woocommerce-cart .unimart-cart-page-content .mt_dec--24,
body.woocommerce-cart .unimart-cart-page-content [class*="mt_dec"] {
  margin-top: 0 !important;
}

body.woocommerce-cart .unimart-cart-page-content .sticky-top {
  position: relative !important;
  top: auto !important;
}


/* Cart must stay in normal document flow; no negative offsets. */
body.woocommerce-cart main.page-wrapper {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.woocommerce-cart .unimart-cart-page-content,
body.woocommerce-cart .rbt-cart-page,
body.woocommerce-cart .unimart-cart-layout-row {
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
}
body.woocommerce-cart .unimart-cart-layout-row > [class*="col-"] {
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
}
