
/* Meșteșug minimal homepage (shortcode [gda_homepage]) */
/* Keep listing cards styling untouched; only layout for hero/tabs/search */
.ms-home{
  width:100%;
  margin:0 auto;
  /* Small, intentional breathing room under the site header */
  padding-top: 18px;
  margin-top:0;
}
@media (max-width: 640px){
  .ms-home{padding-top:12px; margin-top:0;}
}

/* Remove excessive theme spacing on the front page when this shortcode is used */
body.ms-has-homepage .hp-page,
body.ms-has-homepage .hp-page__content,
body.ms-has-homepage .site-main,
body.ms-has-homepage main,
body.ms-has-homepage .content-area,
body.ms-has-homepage .site-content{
  padding-top: 0 !important;
  margin-top: 0 !important;
}


.ms-hero{
  max-width: 1040px;
  margin: 0 auto 14px;
  /* Reduce top whitespace under site header */
  padding: 0 12px 16px;
  text-align:center;
}
.ms-title{
  /* Keep for accessibility but hide visually (hero is search-first, like prototype). */
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.ms-tabs{
  display:inline-flex;
  gap:0;
  padding:6px;
  border-radius:999px;
  background: rgba(0,0,0,.05);
  margin: 14px auto 0;
}

@media (max-width: 640px){
  .ms-tabs{
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    margin-top: 10px;
  }
  .ms-tab{
    padding: 10px 12px;
    font-size: 13px;
  }
  .ms-search{
    padding: 10px 12px;
    box-shadow: 0 14px 34px rgba(0,0,0,.10);
  }
}
.ms-tab{
  appearance:none;
  border:0;
  background: transparent;
  padding: 11px 18px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  white-space: nowrap;
  border-radius:999px;
}
.ms-tab.is-active{
  background: #C96A3B;
  color: #fff;
}
.ms-search{
  display:flex;
  align-items:center;
  gap:10px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  padding: 12px 14px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 46px rgba(0,0,0,.10);
  max-width: 940px;
  margin: 0 auto;
}
.ms-search__icon{
  font-size: 16px;
  opacity:.65;
}
.ms-search__input{
  flex:1;
  /* Theme-safe reset (some themes add borders/shadows to inputs) */
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 16px;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  min-width: 0;
}
.ms-search__clear{
  appearance:none;
  border:0;
  background: rgba(0,0,0,.06);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor:pointer;
  font-size: 20px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;

  /* Hidden by default; shown only when input has value */
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

.ms-search.has-value .ms-search__clear{
  opacity: 1;
  pointer-events: auto;
}
.ms-section{
  max-width: 1040px;
  margin: 18px auto 12px;
  padding: 0 12px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}
.gda-listings{
  max-width: 1040px;
  margin: 14px auto 0;
  padding: 0 12px 22px;
}
.gda-loadmore{
  display:flex;
  justify-content:center;
  margin-top: 14px;
}
.gda-btn--loadmore{
  appearance:none;
  border:0;
  background:#C96A3B;
  color:#fff;
  padding: 12px 18px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 600;
}
.gda-btn--loadmore[disabled]{
  opacity:.6;
  cursor: default;
}

.ms-cta{
  max-width:1040px;
  margin: 18px auto 34px;
  padding: 0 12px;
}
.ms-cta__inner{
  display:flex;
  gap:18px;
  align-items:center;
  border-radius: 22px;
  background: #F5F1EA;
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.ms-cta__media{
  flex: 0 0 42%;
  min-height: 170px;
  background:
    radial-gradient(1000px 400px at 10% 30%, rgba(201,106,59,.25), transparent 55%),
    radial-gradient(800px 360px at 80% 60%, rgba(46,125,107,.18), transparent 55%),
    linear-gradient(135deg, rgba(0,0,0,.04), rgba(0,0,0,0));
}
.ms-cta__content{
  flex:1;
  padding: 22px 22px;
  text-align:left;
}
.ms-cta__title{
  margin:0 0 6px;
  font-size: 22px;
  line-height:1.2;
}
.ms-cta__text{
  margin:0 0 14px;
  opacity:.85;
}
.ms-cta__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 18px;
  border-radius:999px;
  background:#C96A3B;
  color:#fff;
  text-decoration:none;
  font-weight:600;
}
.ms-cta__btn:hover{filter:brightness(.95);}

@media (max-width: 640px){
  .ms-hero{padding: 0 12px 12px;}
  .ms-tab{padding:10px 12px;font-size:13px;}
  .ms-search{padding:10px 12px;}
}

/* --- Mobile header overflow fixes (homepage only) --- */
html.ms-has-homepage,
body.ms-has-homepage{overflow-x:hidden;}

@media (max-width: 768px){
  /* Common header containers across themes */
  body.ms-has-homepage header,
  body.ms-has-homepage .site-header,
  body.ms-has-homepage .hp-header,
  body.ms-has-homepage .header{
    max-width:100vw;
    overflow-x:hidden;
  }

  /* Allow flex rows in header to wrap instead of pushing width */
  body.ms-has-homepage header .container,
  body.ms-has-homepage header .container-fluid,
  body.ms-has-homepage .site-header .container,
  body.ms-has-homepage .hp-header__inner,
  body.ms-has-homepage .header__inner{
    flex-wrap:wrap;
    min-width:0;
    max-width:100%;
  }

  /* Prevent long language labels / menu items from forcing overflow */
  body.ms-has-homepage .trp-language-switcher,
  body.ms-has-homepage .trp-language-switcher-container,
  body.ms-has-homepage nav,
  body.ms-has-homepage .menu,
  body.ms-has-homepage .hp-menu{
    max-width:100%;
  }
  body.ms-has-homepage .trp-language-switcher a,
  body.ms-has-homepage .trp-language-switcher span,
  body.ms-has-homepage nav a,
  body.ms-has-homepage .menu a{
    min-width:0;
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

/* v1.8.20 — Meșteșug typography foundation.
   Use one full local Inter family for Latin/Romanian/Cyrillic so RU/RO cards
   cannot fall into different browser/theme fallback fonts. */
.ms-home,
.ms-home button,
.ms-home input,
.ms-home select,
.ms-home textarea,
.ms-home .gda-lcard,
.ms-home .ms-editorial{
  font-family:"Mestesug Inter",Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif !important;
}
.ms-home .gda-lcard__title,
.ms-home .gda-lcard__title *{
  font-family:"Mestesug Inter",Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif !important;
  font-weight:700 !important;
  font-variation-settings:normal !important;
  font-synthesis:none !important;
}
.gda-grid.is-refreshing{opacity:.58;transition:opacity .14s ease;}
.gda-grid{transition:opacity .14s ease;}

/* v1.8.21 — Compact editorial strip.
   The blog is useful supporting content, not the primary marketplace action:
   keep it visually light, equal-weight and much shorter than a product row. */
.gda-grid__editorial{grid-column:1 / -1;min-width:0;}
.ms-editorial{
  margin:4px 0 8px;
  padding:14px 16px 16px;
  border:1px solid rgba(80,58,39,.07);
  border-radius:16px;
  background:#faf7f1;
  box-shadow:0 4px 14px rgba(69,48,30,.035);
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
}
.ms-editorial__head{grid-column:1;grid-row:1;min-width:0;margin:0 18px 10px 0;}
.ms-editorial__title{margin:0;font-size:20px;line-height:1.15;font-weight:700;color:#24211e;}
.ms-editorial__foot{grid-column:2;grid-row:1;align-self:center;margin:0 0 10px;}
.ms-editorial__all{display:inline-flex;align-items:center;white-space:nowrap;font-size:12.5px;line-height:1.2;font-weight:600;color:#9b512f;text-decoration:none;}
.ms-editorial__all:hover{text-decoration:underline;}
.ms-editorial__cards{grid-column:1 / -1;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;min-width:0;}
.ms-article{
  position:relative;
  display:grid;
  grid-template-columns:42% minmax(0,1fr);
  min-width:0;
  min-height:132px;
  height:auto;
  overflow:hidden;
  border-radius:13px;
  background:#fff;
  border:1px solid rgba(0,0,0,.065);
  text-decoration:none!important;
  color:#191713!important;
  box-shadow:0 2px 9px rgba(0,0,0,.035);
  transition:box-shadow .15s ease,transform .15s ease;
}
.ms-article:hover{box-shadow:0 5px 14px rgba(0,0,0,.07);transform:translateY(-1px);}
.ms-article__media{display:block;min-width:0;height:100%;background:linear-gradient(135deg,#e7ded1,#d8c8b5);overflow:hidden;}
.ms-article__media img,.ms-article__placeholder{display:block;width:100%;height:100%;object-fit:cover;}
.ms-article__body{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:6px;padding:11px 12px;}
.ms-article__kicker{font-size:10px;line-height:1.2;font-weight:600;color:#9b512f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ms-article__title{
  margin:0;
  font-size:14px;
  line-height:1.32;
  font-weight:700;
  color:#1b1916;
  display:block;
  overflow:visible;
  overflow-wrap:anywhere;
}
@media (max-width:900px){
  .ms-editorial__cards{
    display:flex;
    gap:10px;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scroll-padding-inline:0;
    padding-bottom:2px;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
  }
  .ms-editorial__cards::-webkit-scrollbar{display:none;}
  .ms-article{flex:0 0 min(78%,340px);grid-template-columns:112px minmax(0,1fr);min-height:122px;height:auto;scroll-snap-align:start;}
}
@media (max-width:760px){
  .ms-editorial{
    grid-template-columns:1fr;
    padding:12px 12px 12px;
    margin:4px 0 7px;
    border-radius:14px;
  }
  .ms-editorial__head{grid-column:1;grid-row:1;margin:0 0 10px;}
  .ms-editorial__title{font-size:19px;line-height:1.15;white-space:nowrap;}
  .ms-editorial__cards{grid-column:1;grid-row:2;gap:10px;}
  .ms-editorial__foot{grid-column:1;grid-row:3;display:flex;justify-content:flex-end;align-items:center;margin:10px 1px 0;}
  .ms-editorial__all{font-size:12.5px;line-height:1.2;}
  /* Container-relative width is intentional: unlike vw, this cannot exceed the
     inset editorial panel. Keeping ~42px free exposes the next card and makes
     the horizontal swipe affordance obvious without clipping the active card. */
  .ms-article{
    flex:0 0 calc(100% - 42px);
    max-width:none;
    grid-template-columns:96px minmax(0,1fr);
    min-height:124px;
    height:auto;
    border-radius:12px;
  }
  .ms-article__body{padding:10px 10px 10px 11px;gap:6px;}
  .ms-article__title{font-size:13.5px;line-height:1.28;}
}
@media (max-width:380px){
  .ms-editorial__title{font-size:18px;}
  .ms-article{flex-basis:calc(100% - 34px);grid-template-columns:92px minmax(0,1fr);}
}

/* v1.8.22 — the editorial strip is now real server-rendered HTML.
   CSS positions it after the intended first visual batch, so there is no
   template/DOM-ready flash and no resize-time cloning. */
.gda-grid > :not(.gda-grid__editorial){order:2;}
.gda-grid > .gda-grid__editorial{order:1;}
@media (min-width:1101px){
  .gda-grid > :nth-child(-n+4):not(.gda-grid__editorial){order:0;}
}
@media (min-width:761px) and (max-width:1100px){
  .gda-grid > :nth-child(-n+3):not(.gda-grid__editorial){order:0;}
}
@media (min-width:421px) and (max-width:760px){
  .gda-grid > :nth-child(-n+4):not(.gda-grid__editorial){order:0;}
}
@media (max-width:420px){
  .gda-grid > :nth-child(-n+3):not(.gda-grid__editorial){order:0;}
}

/* Keep editorial interactions in the Meșteșug palette; never inherit the
   theme's generic blue hover/visited link color. */
.ms-editorial__all,
.ms-editorial__all:visited{color:#9b512f!important;}
.ms-editorial__all:hover,
.ms-editorial__all:focus-visible{color:#783d24!important;text-decoration:underline!important;}
.ms-article,
.ms-article:visited,
.ms-article:hover,
.ms-article:focus{color:#191713!important;}
.ms-article:hover .ms-article__title,
.ms-article:focus-visible .ms-article__title{color:#783d24!important;}


/* v1.8.23 — isolate all custom homepage interaction states from theme/HivePress.
   The global Frankenstein card stylesheet intentionally keeps a neutral .gda-btn
   hover for non-homepage surfaces; the marketplace homepage uses its own warm
   accent and must win regardless of stylesheet enqueue order. */
.ms-home{
  --ms-accent:#C96A3B;
  --ms-accent-hover:#B85D31;
  --ms-accent-active:#A8532C;
  --ms-focus:rgba(201,106,59,.30);
}

/* Load more: never fall back to the shared neutral/grey .gda-btn:hover. */
body.ms-has-homepage .ms-home .gda-btn.gda-btn--loadmore,
body.ms-has-homepage .ms-home .gda-btn.gda-btn--loadmore:visited{
  background:var(--ms-accent)!important;
  color:#fff!important;
  border-color:transparent!important;
  box-shadow:none!important;
  text-decoration:none!important;
  transition:background-color .15s ease,box-shadow .15s ease,transform .08s ease,opacity .15s ease;
}
body.ms-has-homepage .ms-home .gda-btn.gda-btn--loadmore:hover:not(:disabled),
body.ms-has-homepage .ms-home .gda-btn.gda-btn--loadmore:focus-visible:not(:disabled){
  background:var(--ms-accent-hover)!important;
  color:#fff!important;
}
body.ms-has-homepage .ms-home .gda-btn.gda-btn--loadmore:focus-visible{
  outline:0!important;
  box-shadow:0 0 0 4px var(--ms-focus)!important;
}
body.ms-has-homepage .ms-home .gda-btn.gda-btn--loadmore:active:not(:disabled){
  background:var(--ms-accent-active)!important;
  color:#fff!important;
  transform:translateY(1px);
}
body.ms-has-homepage .ms-home .gda-btn.gda-btn--loadmore:disabled,
body.ms-has-homepage .ms-home .gda-btn.gda-btn--loadmore[disabled]{
  background:var(--ms-accent)!important;
  color:#fff!important;
  opacity:.55!important;
  cursor:default!important;
}

/* Bottom CTA: anchor states from the theme must never turn button text blue. */
body.ms-has-homepage .ms-home .ms-cta__btn,
body.ms-has-homepage .ms-home .ms-cta__btn:link,
body.ms-has-homepage .ms-home .ms-cta__btn:visited{
  background:var(--ms-accent)!important;
  color:#fff!important;
  text-decoration:none!important;
  border-color:transparent!important;
  box-shadow:none!important;
  transition:background-color .15s ease,box-shadow .15s ease,transform .08s ease;
}
body.ms-has-homepage .ms-home .ms-cta__btn:hover,
body.ms-has-homepage .ms-home .ms-cta__btn:focus-visible{
  background:var(--ms-accent-hover)!important;
  color:#fff!important;
  text-decoration:none!important;
  filter:none!important;
}
body.ms-has-homepage .ms-home .ms-cta__btn:focus-visible{
  outline:0!important;
  box-shadow:0 0 0 4px var(--ms-focus)!important;
}
body.ms-has-homepage .ms-home .ms-cta__btn:active{
  background:var(--ms-accent-active)!important;
  color:#fff!important;
  transform:translateY(1px);
}

/* Editorial links: raise specificity over generic theme link rules. */
body.ms-has-homepage .ms-home .ms-editorial__all,
body.ms-has-homepage .ms-home .ms-editorial__all:link,
body.ms-has-homepage .ms-home .ms-editorial__all:visited{
  color:#9b512f!important;
  text-decoration:none!important;
}
body.ms-has-homepage .ms-home .ms-editorial__all:hover,
body.ms-has-homepage .ms-home .ms-editorial__all:focus-visible{
  color:#783d24!important;
  text-decoration:underline!important;
}
body.ms-has-homepage .ms-home .ms-article,
body.ms-has-homepage .ms-home .ms-article:link,
body.ms-has-homepage .ms-home .ms-article:visited,
body.ms-has-homepage .ms-home .ms-article:hover,
body.ms-has-homepage .ms-home .ms-article:focus{
  color:#191713!important;
  text-decoration:none!important;
}

/* Native custom controls get consistent, visible keyboard focus without
   inheriting the theme's blue outline/glow. */
body.ms-has-homepage .ms-home .ms-tab:focus-visible,
body.ms-has-homepage .ms-home .ms-search__clear:focus-visible{
  outline:0!important;
  box-shadow:0 0 0 4px var(--ms-focus)!important;
}
body.ms-has-homepage .ms-home .ms-tab:not(.is-active):hover{
  background:rgba(201,106,59,.09)!important;
  color:inherit!important;
}
body.ms-has-homepage .ms-home .ms-search__clear:hover{
  background:rgba(0,0,0,.10)!important;
  color:inherit!important;
}

/* v1.8.24 — publication date in compact editorial cards. */
.ms-article__date{
  display:block;
  margin:0;
  font-size:10.5px;
  line-height:1.2;
  font-weight:500;
  color:#918b84;
  letter-spacing:.01em;
}
@media (max-width:760px){
  .ms-article__date{font-size:10px;}
}

/* ads blocks inside grid
   Responsive AdSense must have a parent with a real width and VARIABLE height.
   Do not stretch the ad to the listing-row height and do not cap child height:
   either can make a responsive creative render partially/cropped. The card keeps
   the grid width, while Google is free to choose the correct natural height. */
.gda-grid__item--ad{
  display:block;
  align-self:start;
  min-width:0;
  width:100%;
  box-sizing:border-box;
}
.gda-grid__item--ad .gda-adcard{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  overflow:hidden;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  display:block;
}
.gda-grid__item--ad .gda-ad{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  display:block;
  text-align:center;
  overflow:visible;
  padding:0;
  background:transparent;
  border:0;
}
.gda-grid__item--ad .gda-ad > *{
  max-width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
/* The INS width must be known before adsbygoogle.push() measures the unit, but
   its height must stay under Google's control. In particular: no max-height,
   no flex stretching, and no forced iframe height. */
.gda-grid__item--ad .gda-ad--adsense > ins.adsbygoogle{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 auto !important;
}
/* Keep padding for generic/raw ad content, but do not steal width from a
   responsive AdSense unit. */
.gda-grid__item--ad .gda-ad--slot,
.gda-grid__item--ad .gda-ad--raw{
  padding:10px;
}
.gda-grid__item--ad .gda-ad--adsense,
.gda-grid__item--ad .gda-adcard--adsense .gda-ad--raw{
  padding:0;
}
.gda-grid__item--ad .gda-ad img{
  display:block;
  max-width:100% !important;
  height:auto !important;
}
.gda-grid__item--ad .gda-ad iframe,
.gda-grid__item--ad .gda-ad video{
  display:block;
  max-width:100% !important;
}
.gda-grid__item--ad .gda-ad--raw{background:transparent}
.gda-loadmore{display:flex;justify-content:center;margin:18px 0 0}
.gda-btn--loadmore{min-width:200px}

/* GDA-parity CMP/unfilled structural collapse. */
html:not(.gda-google-ads-ready) .ms-home .gda-grid__item--adsense{display:none!important;}
.ms-home .gda-grid__item--adsense[data-gda-ad-collapsed="1"],
.ms-home .gda-grid__item--adsense.gda-adsense-container--unfilled,
.ms-home .gda-adcard--adsense.gda-adcard--unfilled{display:none!important;}
.ms-home ins.adsbygoogle[data-ad-status="unfilled"],
.ms-home ins.adsbygoogle[data-ad-status="unfill-optimized"]{display:none!important;}

/* v1.8.26 — mobile editorial: title stays on one line; archive link moves below the carousel; card width is container-relative so the current card is fully visible while a deliberate next-card peek communicates horizontal swipe. */

/* v1.8.27 — homepage progressive loader typography.
   Match the already-correct blog loader: real bundled Inter 600, no synthetic
   800/fallback shaping for Romanian diacritics on Android. */
body.ms-has-homepage .ms-home .gda-loadmore .gda-btn--loadmore{
  font-family:"Mestesug Inter",Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif!important;
  font-weight:600!important;
  font-style:normal!important;
  font-synthesis:none!important;
  font-variation-settings:normal!important;
  text-rendering:optimizeLegibility;
}
body.ms-has-homepage .ms-home .gda-loadmore .gda-btn--loadmore .gda-home-loadmore__label{
  display:block;
  font-family:inherit!important;
  font-size:inherit;
  line-height:1;
  font-weight:600!important;
  font-style:normal!important;
  font-synthesis:none!important;
  font-variation-settings:normal!important;
  white-space:nowrap;
}
