
/* ==========================================================
   Gandom Size Guide Bridge — Modern UI v1.2.0
   Clean, neutral and isolated from theme/plugin styles
   ========================================================== */

.gsgb-open{
  -webkit-appearance:none;
  appearance:none;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:44px;
  padding:10px 15px!important;
  margin:10px 0!important;
  border-radius:12px!important;
  font:inherit!important;
  font-size:14px!important;
  font-weight:600!important;
  line-height:1.35!important;
  letter-spacing:0!important;
  text-decoration:none!important;
  cursor:pointer;
  user-select:none;
  position:relative;
  overflow:hidden;
  box-sizing:border-box!important;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background-color .18s ease,
    color .18s ease!important;
}

.gsgb-open::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(110deg,transparent 20%,rgba(255,255,255,.16) 45%,transparent 70%);
  transform:translateX(-130%);
  transition:transform .55s ease;
  pointer-events:none;
}

.gsgb-open:hover::before{ transform:translateX(130%); }

.gsgb-open:hover{
  transform:translateY(-1px);
  box-shadow:0 7px 22px rgba(0,0,0,.09);
}

.gsgb-open:active{
  transform:translateY(0) scale(.985);
  box-shadow:none;
}

.gsgb-open:focus-visible{
  outline:2px solid currentColor!important;
  outline-offset:3px!important;
}

.gsgb-btn-icon{
  display:inline-grid;
  place-items:center;
  width:28px;
  height:28px;
  flex:0 0 auto;
  opacity:.9;
}

.gsgb-btn-icon svg{display:block;width:25px;height:25px}

.gsgb-btn-text{
  display:inline-block;
  white-space:nowrap;
}



/* button variants */
.gsgb-outline{
  background:rgba(255,255,255,.88)!important;
  color:#171717!important;
  border:1px solid rgba(20,20,20,.15)!important;
  box-shadow:0 2px 10px rgba(0,0,0,.035);
  backdrop-filter:blur(8px);
}

.gsgb-outline:hover{
  border-color:rgba(20,20,20,.28)!important;
  background:#fff!important;
}

.gsgb-solid{
  background:#171717!important;
  color:#fff!important;
  border:1px solid #171717!important;
  box-shadow:0 5px 16px rgba(0,0,0,.14);
}

.gsgb-solid:hover{ background:#242424!important; }

.gsgb-link{
  min-height:38px;
  padding-inline:3px!important;
  background:transparent!important;
  color:inherit!important;
  border:0!important;
  border-radius:8px!important;
  box-shadow:none!important;
}

.gsgb-link:hover{
  box-shadow:none!important;
  transform:none;
}


/* ================= MODAL ================= */

.gsgb-modal{
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  direction:rtl;
  isolation:isolate;
}

.gsgb-modal.is-open{
  display:flex;
  animation:gsgbFadeIn .18s ease-out both;
}

.gsgb-overlay{
  position:absolute;
  inset:0;
  background:rgba(12,12,14,.60);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}

.gsgb-dialog{
  position:relative;
  z-index:1;
  width:min(var(--gsgb-width,820px),96vw);
  max-height:min(90vh,860px);
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  background:#fff;
  color:#202124;
  border:1px solid rgba(0,0,0,.07);
  border-radius:22px;
  box-shadow:
    0 30px 80px rgba(0,0,0,.24),
    0 8px 24px rgba(0,0,0,.08);
  padding:26px;
  box-sizing:border-box;
  animation:gsgbPopIn .22s cubic-bezier(.2,.75,.25,1) both;
}

.gsgb-dialog::-webkit-scrollbar{width:7px;height:7px}
.gsgb-dialog::-webkit-scrollbar-thumb{background:#d0d0d0;border-radius:999px}
.gsgb-dialog::-webkit-scrollbar-track{background:transparent}


/* close button */
.gsgb-close{
  position:sticky!important;
  top:0!important;
  float:left!important;
  z-index:8!important;
  display:grid!important;
  place-items:center!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  padding:0!important;
  margin:-6px -6px 8px 0!important;
  border:1px solid rgba(0,0,0,.08)!important;
  background:#f6f6f7!important;
  color:#1e1e1e!important;
  font-size:25px!important;
  font-family:Arial,sans-serif!important;
  font-weight:400!important;
  line-height:1!important;
  box-shadow:0 2px 8px rgba(0,0,0,.05)!important;
  cursor:pointer!important;
  transition:transform .16s ease, background-color .16s ease, box-shadow .16s ease!important;
}

.gsgb-close:hover{
  transform:rotate(4deg) scale(1.06);
  background:#ededee!important;
  box-shadow:0 4px 12px rgba(0,0,0,.08)!important;
}

.gsgb-close:active{transform:scale(.96)}
.gsgb-close-circle{border-radius:999px!important}
.gsgb-close-square{border-radius:10px!important}
.gsgb-close-plain{
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}


/* content */
.gsgb-content{
  clear:both;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding:2px 1px 4px;
}

.gsgb-title{
  margin:0 0 8px!important;
  padding:0 0 12px!important;
  font-size:clamp(19px,2vw,25px)!important;
  line-height:1.45!important;
  font-weight:750!important;
  color:#181818!important;
  border-bottom:1px solid #ededed;
}

.gsgb-loading{
  text-align:center;
  padding:48px 12px;
  color:#666;
  font-size:14px;
}

.gsgb-loading::before{
  content:"";
  display:block;
  width:28px;
  height:28px;
  margin:0 auto 12px;
  border:3px solid #e7e7e7;
  border-top-color:#333;
  border-radius:999px;
  animation:gsgbSpin .75s linear infinite;
}

body.gsgb-lock{overflow:hidden!important}


/* ================= LEGACY CONTENT RESET ================= */

.gsgb-content .ct-size-guide{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:auto!important;
  max-height:none!important;
  position:static!important;
  inset:auto!important;
  margin:0!important;
  padding:0!important;
  box-shadow:none!important;
  border:0!important;
  background:transparent!important;
  overflow:visible!important;
  transform:none!important;
}

.gsgb-content .mfp-close,
.gsgb-content [class*="close"]{
  display:none!important;
}

.gsgb-content p{
  max-width:100%!important;
  margin:8px 0!important;
  color:#555!important;
  white-space:normal!important;
  line-height:1.9!important;
  font-size:14px!important;
}

.gsgb-content img{
  max-width:100%!important;
  height:auto!important;
  border-radius:12px;
}


/* ================= TABLE ================= */

.gsgb-content table{
  width:100%!important;
  min-width:560px;
  max-width:100%!important;
  margin:18px 0 4px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:auto!important;
  overflow:hidden;
  border:1px solid #e8e8e8!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 5px 18px rgba(0,0,0,.035)!important;
}

.gsgb-content thead th,
.gsgb-content table tr:first-child th{
  background:#f5f5f6!important;
  color:#222!important;
  font-weight:700!important;
}

.gsgb-content th,
.gsgb-content td{
  padding:12px 11px!important;
  text-align:center!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
  border:0!important;
  border-bottom:1px solid #eeeeee!important;
  border-left:1px solid #f0f0f0!important;
  box-sizing:border-box!important;
  font-size:13px!important;
  line-height:1.55!important;
}

.gsgb-content tr:last-child td{border-bottom:0!important}
.gsgb-content th:last-child,
.gsgb-content td:last-child{border-left:0!important}

.gsgb-content tbody tr:nth-child(even) td{
  background:#fbfbfb!important;
}

.gsgb-content tbody tr{
  transition:background-color .14s ease;
}

.gsgb-content tbody tr:hover td{
  background:#f7f7f7!important;
}


/* ================= MOBILE ================= */

@media(max-width:767px){
  .gsgb-open{
    min-height:42px;
    padding:9px 13px!important;
    border-radius:11px!important;
    font-size:13px!important;
  }

  .gsgb-modal{padding:8px}

  .gsgb-modal.gsgb-mobile-sheet{
    align-items:flex-end;
    padding:0;
  }

  .gsgb-modal.gsgb-mobile-sheet .gsgb-dialog{
    width:100%;
    max-width:none;
    max-height:92vh;
    border-radius:22px 22px 0 0;
    padding:16px 12px max(16px,env(safe-area-inset-bottom));
    animation:gsgbSheetIn .26s cubic-bezier(.22,.78,.25,1) both;
  }

  .gsgb-modal.gsgb-mobile-sheet .gsgb-dialog::before{
    content:"";
    display:block;
    width:42px;
    height:4px;
    margin:-4px auto 12px;
    border-radius:999px;
    background:#d8d8da;
  }

  .gsgb-dialog{
    padding:16px 12px;
    border-radius:18px;
  }

  .gsgb-close{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    font-size:24px!important;
    margin:-2px -2px 7px 0!important;
  }

  .gsgb-title{
    font-size:18px!important;
    padding-bottom:10px!important;
  }

  .gsgb-content p{
    font-size:13px!important;
    line-height:1.85!important;
  }

  .gsgb-content table{
    min-width:520px;
    margin-top:14px!important;
    border-radius:12px!important;
  }

  .gsgb-content th,
  .gsgb-content td{
    padding:9px 8px!important;
    font-size:12px!important;
  }
}


/* ================= ACCESSIBILITY / MOTION ================= */

@media(prefers-reduced-motion:reduce){
  .gsgb-modal,
  .gsgb-dialog,
  .gsgb-open,
  .gsgb-close{
    animation:none!important;
    transition:none!important;
  }
}

@keyframes gsgbFadeIn{
  from{opacity:0}
  to{opacity:1}
}

@keyframes gsgbPopIn{
  from{opacity:0;transform:translateY(8px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

@keyframes gsgbSheetIn{
  from{opacity:.7;transform:translateY(28px)}
  to{opacity:1;transform:translateY(0)}
}

@keyframes gsgbSpin{
  to{transform:rotate(360deg)}
}


/* Hide common legacy createIT front-end controls only when enabled */
body.gsgb-hide-legacy .ct-size-guide-button,
body.gsgb-hide-legacy .ct-size-guide-btn,
body.gsgb-hide-legacy .mfp-wrap .ct-size-guide{
  display:none!important;
}


/* v1.4.3 — harden modal against theme CSS */
#gsgb-modal.gsgb-modal.is-open{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
}

#gsgb-modal .gsgb-overlay{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  z-index:0!important;
}

#gsgb-modal .gsgb-dialog{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  z-index:2!important;
  background:#fff!important;
  color:#202124!important;
}

#gsgb-modal .gsgb-loading{
  display:block;
  visibility:visible!important;
  opacity:1!important;
  min-height:56px;
  color:#555!important;
}

#gsgb-modal .gsgb-loading[hidden],
#gsgb-modal .gsgb-content[hidden]{
  display:none!important;
}

#gsgb-modal .gsgb-content{
  visibility:visible!important;
  opacity:1!important;
  color:#202124!important;
}

@media(max-width:767px){
  #gsgb-modal.gsgb-mobile-sheet .gsgb-dialog{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
  }
}


/* Native Gandom guide content */
.gsgb-content .gsgb-native-guide{width:100%!important;max-width:100%!important}
.gsgb-content .gsgb-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.gsgb-content .gsgb-note{margin-top:14px;padding:12px 14px;border-radius:12px;background:#f7f7f8;color:#555;font-size:13px;line-height:1.9}


/* v2.2 exact createIT migration */
.gsgb-content .gsgb-native-table-section{margin:18px 0 26px}
.gsgb-content .gsgb-table-title{margin:0 0 10px!important;font-size:16px!important;line-height:1.6!important;font-weight:700!important;color:#222!important}
.gsgb-content .gsgb-table-caption{margin-top:10px;color:#666;font-size:13px;line-height:1.9}


/* v2.8.1 — refined responsive storefront UI */
.gsgb-wrap{margin:14px 0 10px}
.gsgb-open{
  min-height:42px;padding:9px 14px;border-radius:12px;gap:9px;font-weight:700;line-height:1.2;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease
}
.gsgb-open:hover{transform:translateY(-1px)}
.gsgb-open:active{transform:none}
.gsgb-open svg{flex:0 0 auto}

.gsgb-modal{
  padding:20px;background:rgba(17,24,39,.36);
  backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)
}
.gsgb-card{
  width:min(92vw,var(--gsgb-modal-width,760px));max-height:min(86vh,820px);
  border-radius:20px;border:1px solid rgba(17,24,39,.08);
  box-shadow:0 24px 70px rgba(17,24,39,.18);overflow:hidden
}
.gsgb-head{min-height:62px;padding:15px 18px;border-bottom:1px solid #edf0f3;background:#fff}
.gsgb-title{font-size:16px;font-weight:800;line-height:1.5;color:#17191d}
.gsgb-close{
  width:34px;height:34px;min-width:34px;border-radius:10px;border:1px solid #e5e8ec;
  background:#f8f9fa;color:#4f5660;transition:background .14s ease,transform .14s ease,color .14s ease
}
.gsgb-close:hover{background:#eef0f2;color:#111;transform:scale(1.04)}
.gsgb-body{padding:18px;background:#fff;overscroll-behavior:contain}
.gsgb-content{font-size:13px;line-height:1.8;color:#343a42}

.gsgb-content table{
  width:100%;min-width:520px;border-collapse:separate;border-spacing:0;
  border:1px solid #e8ebef;border-radius:14px;overflow:hidden;background:#fff
}
.gsgb-content th,.gsgb-content td{
  padding:11px 12px;border-left:1px solid #edf0f3;border-bottom:1px solid #edf0f3;
  text-align:center;vertical-align:middle;white-space:nowrap
}
.gsgb-content th:last-child,.gsgb-content td:last-child{border-left:0}
.gsgb-content tr:last-child td{border-bottom:0}
.gsgb-content th{position:sticky;top:0;z-index:2;background:#f7f8fa;color:#20242a;font-weight:800}
.gsgb-content tbody tr:nth-child(even) td{background:#fbfcfd}
.gsgb-content tbody tr:hover td{background:#f7f9fb}
.gsgb-table-scroll,.gsgb-content>div:has(>table){
  max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;border-radius:14px
}
.gsgb-loading{min-height:180px;display:flex;align-items:center;justify-content:center}

@media(max-width:782px){
  .gsgb-wrap{margin:12px 0 8px}
  .gsgb-open{min-height:40px;padding:8px 12px;border-radius:11px;font-size:13px}
  .gsgb-modal{align-items:flex-end;padding:0;background:rgba(17,24,39,.38)}
  .gsgb-card{
    width:100%;max-width:none;max-height:88dvh;border-radius:20px 20px 0 0;border-bottom:0;
    box-shadow:0 -16px 48px rgba(17,24,39,.16)
  }
  .gsgb-card:before{content:"";display:block;width:38px;height:4px;margin:8px auto 0;border-radius:999px;background:#d8dce1}
  .gsgb-head{min-height:54px;padding:9px 14px 11px}
  .gsgb-title{font-size:15px}
  .gsgb-close{width:32px;height:32px;min-width:32px;border-radius:9px}
  .gsgb-body{padding:12px 12px calc(14px + env(safe-area-inset-bottom))}
  .gsgb-content{font-size:12px}
  .gsgb-content table{min-width:480px;border-radius:12px}
  .gsgb-content th,.gsgb-content td{padding:10px 9px}
}
@media(max-width:420px){
  .gsgb-content table{min-width:450px}
  .gsgb-content th,.gsgb-content td{padding:9px 8px}
}
@media(prefers-reduced-motion:reduce){
  .gsgb-open,.gsgb-close{transition:none!important}
}

/* v2.9.0 — add-on fit assistant; styles strictly scoped, old guide untouched */
.gsgb-actions{display:inline-flex;max-width:100%;vertical-align:middle;align-items:center;gap:9px;flex-wrap:wrap;margin:10px 0}
.gsgb-actions>.gsgb-open{margin:0!important}
.gsgb-actions>.gsgb-fit-open{
  -webkit-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;
  min-height:42px;margin:0!important;padding:9px 15px!important;gap:7px;
  border:1px solid #eed4df!important;background:#fff2f7!important;color:#a32961!important;
  border-radius:12px!important;box-shadow:none!important;font:inherit!important;font-weight:750!important;
  font-size:13px!important;line-height:1.35!important;text-decoration:none!important;cursor:pointer;
}
.gsgb-actions>.gsgb-fit-open:hover{background:#ffe8f0!important;border-color:#eab3ca!important}
.gsgb-actions>.gsgb-fit-open:focus-visible{outline:2px solid #a32961;outline-offset:2px}

@media(max-width:450px){
  .gsgb-actions{gap:7px;flex-wrap:nowrap}
  .gsgb-actions>.gsgb-open,.gsgb-actions>.gsgb-fit-open{min-width:0;flex:1 1 0;font-size:12px!important;min-height:40px;padding:8px 6px!important}
  .gsgb-actions .gsgb-btn-icon{width:20px}
  .gsgb-actions .gsgb-btn-icon svg{width:20px;height:20px}
}

.gsgb-actions>.gsgb-fit-open .gsgb-fit-jeans-icon{display:inline-block!important;flex:none;width:20px;height:20px;vertical-align:middle}
/* 2.9.4 — consistent product actions on Woodmart/mobile/desktop.
 * CSS only: no layout JS, DOM watchers or extra requests. */
.gsgb-actions{
  display:inline-grid!important;
  grid-template-columns:max-content max-content;
  align-items:stretch!important;
  justify-items:stretch;
  gap:8px!important;
  max-width:100%!important;
  margin:10px 0!important;
  vertical-align:middle;
  direction:rtl;
  box-sizing:border-box!important;
}
.gsgb-actions > .gsgb-open,
.gsgb-actions > .gsgb-fit-open{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-flow:row nowrap!important;
  box-sizing:border-box!important;
  height:46px!important;
  min-height:46px!important;
  max-height:46px!important;
  min-width:0!important;
  margin:0!important;
  padding:0 13px!important;
  gap:7px!important;
  font-size:13px!important;
  font-weight:700!important;
  line-height:1.25!important;
  white-space:nowrap!important;
  vertical-align:middle!important;
}
.gsgb-actions > .gsgb-open .gsgb-btn-icon,
.gsgb-actions > .gsgb-fit-open .gsgb-fit-jeans-icon{
  width:20px!important;
  height:20px!important;
  flex:0 0 20px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
@media(max-width:767px){
  .gsgb-actions{
    display:grid!important;
    width:100%!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .gsgb-actions > .gsgb-open,
  .gsgb-actions > .gsgb-fit-open{
    width:100%!important;
    font-size:12px!important;
    padding:0 7px!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
  }
  .gsgb-actions .gsgb-btn-text{white-space:nowrap!important}
}
@media(max-width:335px){
  .gsgb-actions{grid-template-columns:minmax(0,1fr)!important}
  .gsgb-actions > .gsgb-open,.gsgb-actions > .gsgb-fit-open{width:100%!important}
}

#gsgb-modal .gsgb-fit-panel[hidden]{display:none!important}

/* 2.10.8: unambiguous left-to-right number order for RTL range values.
   Span is emitted only for numeric ranges, not arbitrary Persian text cells. */
#gsgb-modal .gsgb-range-value{
  display:inline-flex!important;direction:ltr!important;unicode-bidi:isolate;
  align-items:center;justify-content:center;gap:3px;white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
#gsgb-modal .gsgb-range-value bdi{direction:ltr;unicode-bidi:isolate}
