/*
Theme Name: Shopiume Blocksy Child
Theme URI: https://shopiume.com/
Description: Shopiume custom child theme for Blocksy. Full-width WooCommerce layout, no sidebar, and bottom-aligned footer.
Author: Shopiume
Template: blocksy
Version: 1.0.0
Text Domain: shopiume-blocksy-child
*/

:root {
  --shopiume-edge: clamp(16px, 2.5vw, 42px);
}

/* Page / sticky footer */
html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main-container {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

#main-container > main,
#main-container > .site-main,
main.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.ct-footer {
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
}

/* Full-width Blocksy containers.
   Backgrounds span the viewport while a small edge padding keeps content readable. */
#main-container,
.ct-header,
.ct-footer,
.ct-header [data-row],
.ct-footer [data-row] {
  width: 100%;
  max-width: none;
}

.ct-header .ct-container,
.ct-footer .ct-container,
#main-container .ct-container {
  width: 100%;
  max-width: none !important;
  padding-left: var(--shopiume-edge) !important;
  padding-right: var(--shopiume-edge) !important;
  box-sizing: border-box;
}

/* Remove Blocksy/third-party boxed layout constraints on the main content. */
#main-container .content-area,
#main-container #primary,
#main-container .site-main,
.woocommerce #primary,
.woocommerce-page #primary {
  width: 100% !important;
  max-width: none !important;
  flex-basis: 100% !important;
}

/* Hide common sidebar wrappers so an accidental sidebar setting cannot squeeze the shop. */
.ct-sidebar,
#secondary,
aside#secondary,
.woocommerce-sidebar,
.woocommerce-page .widget-area {
  display: none !important;
}

/* Make common grid/layout wrappers use the available width. */
.woocommerce .site-main,
.woocommerce-page .site-main,
.woocommerce .content-area,
.woocommerce-page .content-area {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Hero / full-bleed blocks created in Gutenberg or page builders. */
.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Header navigation breathing room */
.ct-header .ct-header-trigger,
.ct-header .ct-header-search,
.ct-header .ct-header-cart,
.ct-header .ct-header-account {
  flex-shrink: 0;
}

/* WooCommerce product grid uses the complete available content width. */
.woocommerce ul.products,
.woocommerce-page ul.products {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Prevent oversized media from creating horizontal scrolling. */
img,
video,
iframe {
  max-width: 100%;
}

/* Mobile */
@media (max-width: 689px) {
  :root {
    --shopiume-edge: 16px;
  }

  .ct-header .ct-container,
  .ct-footer .ct-container,
  #main-container .ct-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
