/* GP Theme: one shared outer edge for header, home and single-post columns. */
:root{--gp-unified-gap:16px}
body.gp-custom-layout .gp-header,
body.gp-custom-layout .gp-home,
body.gp-custom-layout .main-content{box-sizing:border-box!important}
/* Boxed A: outer header and content have the same width. */
body.gp-custom-layout.gp-layout-boxed-a .gp-header,
body.gp-custom-layout.gp-layout-boxed-a .gp-home,
body.gp-custom-layout.gp-layout-boxed-a .main-content{width:100%!important;max-width:var(--gp-layout-max,1150px)!important;margin-left:auto!important;margin-right:auto!important}
/* Remove the extra 12px inset added in previous fixes. */
body.gp-custom-layout .gp-header > .gp-header-inner,
body.gp-custom-layout .main-content.single-post-page > .container,
body.gp-custom-layout .gp-home > .gp-wrap{
 width:100%!important;max-width:var(--gp-layout-max,1150px)!important;
 padding-left:0!important;padding-right:0!important;
 margin-left:auto!important;margin-right:auto!important;
 box-sizing:border-box!important;
}
body.gp-custom-layout .main-content.single-post-page{padding-top:12px!important;margin-top:0!important}
body.gp-custom-layout .single-post-page > .container > .row{
 display:flex!important;flex-wrap:nowrap!important;align-items:flex-start!important;
 gap:var(--gp-unified-gap)!important;width:100%!important;
 margin-left:0!important;margin-right:0!important;
 --bs-gutter-x:0!important;box-sizing:border-box!important;
}
body.gp-custom-layout .single-post-page > .container > .row > .col-lg-8,
body.gp-custom-layout .single-post-page > .container > .row > .col-lg-4{
 padding-left:0!important;padding-right:0!important;min-width:0!important;max-width:none!important;
}
body.gp-custom-layout .single-post-page > .container > .row > .col-lg-8{
 flex:0 0 calc((100% - var(--gp-unified-gap))* .69)!important;
 width:calc((100% - var(--gp-unified-gap))* .69)!important;
}
body.gp-custom-layout .single-post-page > .container > .row > .col-lg-4{
 flex:1 1 0!important;width:0!important;
}
body.gp-custom-layout .single-post-page .sidebar .widget{margin-bottom:var(--gp-unified-gap)!important}
body.gp-custom-layout .gp-home{padding-top:12px!important}
body.gp-custom-layout .gp-home .gp-section-head:first-child,
body.gp-custom-layout .gp-home .gp-wrap > section:first-child .gp-section-head{margin-top:0!important}
@media(max-width:991px){
 body.gp-custom-layout .single-post-page > .container > .row{flex-wrap:wrap!important}
 body.gp-custom-layout .single-post-page > .container > .row > .col-lg-8,
 body.gp-custom-layout .single-post-page > .container > .row > .col-lg-4{flex:0 0 100%!important;width:100%!important}
}
@media(max-width:767px){
 body.gp-custom-layout .gp-header > .gp-header-inner,
 body.gp-custom-layout .main-content.single-post-page > .container,
 body.gp-custom-layout .gp-home > .gp-wrap{width:calc(100% - 24px)!important}
}

/* Homepage horizontal inset: keep the already-aligned outer shell unchanged.
   Apply spacing inside the homepage only, so section headings and cards
   share a comfortable, consistent left/right edge. */
body.gp-custom-layout .gp-home > .gp-wrap{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:var(--gp-layout-max,1150px)!important;
  padding-left:16px!important;
  padding-right:16px!important;
}
@media (max-width:991px){
  body.gp-custom-layout .gp-home > .gp-wrap{
    padding-left:12px!important;
    padding-right:12px!important;
  }
}
@media (max-width:767px){
  body.gp-custom-layout .gp-home > .gp-wrap{
    width:100%!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }
}

/* Related articles immediately below the post body / author box, in the article column. */
.single-post-page .gp-related-inline{width:100%;max-width:100%;box-sizing:border-box;margin:16px 0 0!important;padding:18px 16px 22px!important;background:#fff!important;clear:both}
.single-post-page .gp-related-inline h2{margin:0 0 16px!important}
.single-post-page .gp-related-inline .fashion-posts{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;margin:0!important}
.single-post-page .gp-related-inline .fashion-post{width:auto!important;min-width:0!important;margin:0!important}
.single-post-page .gp-related-inline .fashion-post img{display:block;width:100%!important;height:auto!important;aspect-ratio:4/3;object-fit:cover}
.single-post-page .gp-related-inline .fashion-post .title{font-size:14px!important;line-height:1.4!important;margin:5px 0!important}
.single-post-page .gp-related-inline .fashion-post .post-meta{font-size:12px!important;line-height:1.45!important}
@media(max-width:850px){.single-post-page .gp-related-inline .fashion-posts{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:550px){.single-post-page .gp-related-inline{padding:14px 10px!important}.single-post-page .gp-related-inline .fashion-posts{grid-template-columns:repeat(1,minmax(0,1fr))!important;gap:12px!important}}
/* Footer uses the same outer layout width and boxed/full modes as the header. */
body.gp-custom-layout .gp-site-footer{box-sizing:border-box!important;width:100%!important;max-width:100%!important;margin-left:auto!important;margin-right:auto!important;padding:30px 16px 22px!important}
body.gp-custom-layout .gp-site-footer .gp-footer-inner{box-sizing:border-box!important;width:100%!important;max-width:var(--gp-layout-max,1150px)!important;margin:0 auto!important;padding:0!important;text-align:center}
body.gp-custom-layout.gp-layout-boxed-a .gp-site-footer{max-width:var(--gp-layout-max,1150px)!important}
body.gp-custom-layout.gp-layout-boxed-b .gp-site-footer .gp-footer-inner{background:#fff;padding:24px 16px!important;border-radius:8px}
@media(max-width:650px){body.gp-custom-layout .gp-site-footer{padding:24px 10px 18px!important}body.gp-custom-layout.gp-layout-boxed-b .gp-site-footer .gp-footer-inner{padding:18px 10px!important}}

/* Sticky single-post sidebar: keep widgets visible during article scrolling.
   Sticky column stays within the post row and stops before the footer. */
@media (min-width: 992px) {
  .single-post-page > .container > .row > .col-lg-4 {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 16px !important;
    align-self: flex-start !important;
    max-height: calc(100vh - 32px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .single-post-page > .container > .row > .col-lg-4 .sidebar {
    margin-top: 0 !important;
  }
}
@media (max-width: 991px) {
  .single-post-page > .container > .row > .col-lg-4 {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Related articles: close the 40px article bottom margin and match rounded post card. */
.single-post-page .col-lg-8 > article.post{margin-bottom:0!important}
.single-post-page .gp-related-inline{margin-top:16px!important;border-radius:8px!important;overflow:hidden;background:#fff!important}

/* Homepage finish: remove the oversized white strip before the footer.
   Keep the existing builder grids, section spacing and theme accent intact. */
body.home .gp-home,
body.home.gp-custom-layout .gp-home,
body.front-page .gp-home {
  padding-bottom: 18px !important;
  border-radius: 0 0 12px 12px !important;
  overflow: clip;
}
body.home .gp-home > .gp-wrap,
body.home.gp-custom-layout .gp-home > .gp-wrap {
  padding-bottom: 0 !important;
}
body.home .gp-home > .gp-wrap > section:last-child,
body.home .gp-home > .gp-wrap > .gp-custom-section:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
@media (max-width: 767px) {
  body.home .gp-home,
  body.home.gp-custom-layout .gp-home {
    padding-bottom: 12px !important;
    border-radius: 0 0 9px 9px !important;
  }
}

/* Related Articles card must remain visibly distinct in Full Width mode.
   The white card previously blended into the full-width white page canvas. */
body.gp-custom-layout.gp-layout-full .single-post-page .gp-related-inline,
body.gp-layout-full .single-post-page .gp-related-inline {
  display:block!important;
  background-color:#fff!important;
  border:1px solid #e9ebef!important;
  border-radius:9px!important;
  box-shadow:0 4px 18px rgba(15,23,42,.075)!important;
  padding:18px 16px 22px!important;
  margin-top:16px!important;
  margin-bottom:12px!important;
  box-sizing:border-box!important;
  overflow:hidden;
}
body.gp-layout-full .single-post-page .gp-related-inline .fashion-posts {
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
@media(max-width:850px){
  body.gp-layout-full .single-post-page .gp-related-inline .fashion-posts{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:550px){
  body.gp-layout-full .single-post-page .gp-related-inline{padding:14px 12px!important;}
  body.gp-layout-full .single-post-page .gp-related-inline .fashion-posts{grid-template-columns:minmax(0,1fr)!important;}
}
