/* Add custom CSS styles below */ 
body:not(.product-single) salla-add-product-button {
  display: none !important;
}
/*
  ════════════════════════════════════════════════════════════════
  مداد المستقبل — مخصص الملصق | CSS
  Future Mdad Label Customizer — Salla Custom CSS
  
  📋 طريقة الإضافة:
  لوحة تحكم سلة ← التصميم ← تخصيص الثيم ← كود CSS مخصص
  ════════════════════════════════════════════════════════════════
*/

/* ── Container ── */
.fmd-customizer {
  --fmd-g1: #1B2E0F;
  --fmd-g2: #2D4A18;
  --fmd-g3: #4A6B2A;
  --fmd-gold: #C8A836;
  --fmd-gold-l: #E2D48E;
  --fmd-gold-d: #A08A20;
  --fmd-cream: #F5F2EC;
  --fmd-cream-d: #E4DFD4;
  --fmd-txt: #1A1A1A;
  --fmd-txt-m: #5A6B4A;
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  max-width: 100%;
  margin: 28px 0;
  padding: 0;
  color: var(--fmd-txt);
}
.fmd-customizer *, .fmd-customizer *::before, .fmd-customizer *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Steps bar ── */
.fmd-sb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 20px 0;
}
.fmd-si {
  display: flex;
  align-items: center;
  gap: 0;
}
.fmd-sn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  border: 2px solid var(--fmd-cream-d);
  color: var(--fmd-txt-m);
  background: #FFF;
  transition: all .3s;
}
.fmd-sl-t {
  font-size: 12px;
  font-weight: 600;
  color: var(--fmd-txt-m);
  margin-right: 8px;
  transition: all .3s;
}
.fmd-sli {
  width: 40px;
  height: 2px;
  background: var(--fmd-cream-d);
  margin: 0 12px;
  transition: all .3s;
}
.fmd-si.fmd-a .fmd-sn {
  background: var(--fmd-gold);
  color: #FFF;
  border-color: var(--fmd-gold);
}
.fmd-si.fmd-a .fmd-sl-t { color: var(--fmd-g1); }
.fmd-si.fmd-d .fmd-sn {
  background: var(--fmd-g3);
  color: #FFF;
  border-color: var(--fmd-g3);
}
.fmd-si.fmd-d .fmd-sl-t { color: var(--fmd-g3); }
.fmd-sli.fmd-d { background: var(--fmd-g3); }
.fmd-sli.fmd-a { background: var(--fmd-gold); }

/* ── Card ── */
.fmd-cd {
  background: #FFF;
  border-radius: 16px;
  border: 1px solid var(--fmd-cream-d);
  box-shadow: 0 4px 24px rgba(27, 46, 15, .06);
  padding: 28px;
  margin-bottom: 20px;
}
.fmd-ch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--fmd-cream-d);
}
.fmd-ci {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--fmd-g3), var(--fmd-g1));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  flex-shrink: 0;
}
.fmd-ci svg { width: 20px; height: 20px; }
.fmd-ch h2 {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--fmd-g1) !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
}
.fmd-ch p {
  font-size: 13px;
  color: var(--fmd-txt-m);
  margin-top: 2px;
}

/* ── Fields ── */
.fmd-f { margin-bottom: 20px; }
.fmd-lb {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--fmd-g2);
  margin-bottom: 8px;
}
.fmd-ht {
  font-weight: 400;
  color: var(--fmd-txt-m);
  font-size: 12px;
}
.fmd-ip {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--fmd-cream-d);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--fmd-txt);
  background: #FDFAF4;
  outline: none;
  transition: all .2s;
}
.fmd-ip:focus {
  border-color: var(--fmd-gold);
  background: #FFF;
  box-shadow: 0 0 0 4px rgba(200, 168, 54, .12);
}
.fmd-ip::placeholder { color: #B0A888; }
.fmd-er {
  display: none;
  color: #D45454;
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
}
.fmd-f--e .fmd-ip { border-color: #D45454 !important; }
.fmd-f--e .fmd-er { display: block; }
.fmd-sec-ttl {
  font-size: 14px;
  font-weight: 700;
  color: var(--fmd-g1);
  margin-bottom: 16px;
}
.fmd-two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* ── Chips (flavor) ── */
.fmd-cps { display: flex; gap: 10px; flex-wrap: wrap; }
.fmd-cp input { display: none; }
.fmd-cpl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 2px solid var(--fmd-cream-d);
  border-radius: 50px;
  cursor: pointer;
  transition: all .2s;
  font-size: 14px;
  font-weight: 600;
  color: var(--fmd-g2);
  background: #FDFAF4;
}
.fmd-cpl:hover { border-color: var(--fmd-gold-l); }
.fmd-cp input:checked + .fmd-cpl {
  border-color: var(--fmd-gold);
  background: linear-gradient(135deg, var(--fmd-gold), var(--fmd-gold-d));
  color: #FFF;
}

/* ── Color swatches ── */
.fmd-crw {
  padding: 12px 14px;
  border: 1px solid var(--fmd-cream-d);
  border-radius: 12px;
  background: #FDFAF4;
}
.fmd-cr { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fmd-cs {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all .2s;
}
.fmd-cs:hover { transform: scale(1.1); }
.fmd-cs.fmd-ac {
  border-color: var(--fmd-g1);
  box-shadow: 0 0 0 3px rgba(200, 168, 54, .3);
}
.fmd-cc-wrap { position: relative; width: 36px; height: 36px; }
.fmd-cc {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.fmd-cc-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px dashed var(--fmd-cream-d);
  background: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  pointer-events: none;
}
.fmd-cc-btn svg { width: 16px; height: 16px; color: var(--fmd-txt-m); }
.fmd-cc-wrap:hover .fmd-cc-btn {
  border-color: var(--fmd-gold);
  transform: scale(1.1);
}
.fmd-cc-wrap.fmd-picked .fmd-cc-btn {
  border-style: solid;
  border-color: var(--fmd-g1);
  box-shadow: 0 0 0 3px rgba(200, 168, 54, .3);
}

/* ── Font picker ── */
.fmd-fr {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.fmd-fo input { display: none; }
.fmd-fc {
  padding: 16px 10px 12px;
  border: 2px solid var(--fmd-cream-d);
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s;
  background: #FDFAF4;
  text-align: center;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
}
.fmd-fc:hover { border-color: var(--fmd-gold-l); }
.fmd-fo input:checked + .fmd-fc {
  border-color: var(--fmd-gold);
  background: rgba(200, 168, 54, .08);
  box-shadow: 0 0 0 3px rgba(200, 168, 54, .1);
}
.fmd-fp {
  font-size: 20px;
  color: var(--fmd-g1);
  display: block;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.fmd-fn {
  font-size: 11px;
  color: var(--fmd-txt-m);
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  display: block;
  margin-top: 2px;
}

/* ── Upload ── */
.fmd-uz {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  border: 2px dashed var(--fmd-cream-d);
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s;
  background: #FDFAF4;
  text-align: center;
  position: relative;
}
.fmd-uz:hover { border-color: var(--fmd-gold); }
.fmd-uz input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.fmd-uz svg { width: 28px; height: 28px; color: var(--fmd-gold-d); margin-bottom: 6px; }
.fmd-uz span { font-size: 13px; color: var(--fmd-g2); font-weight: 600; }
.fmd-uz small { font-size: 11px; color: var(--fmd-txt-m); }
.fmd-uf {
  display: none;
  font-size: 12px;
  color: var(--fmd-gold-d);
  font-weight: 600;
  margin-top: 4px;
}
.fmd-uz.fmd-has .fmd-uf { display: block; }
.fmd-uz.fmd-has { border-color: var(--fmd-gold); border-style: solid; }

/* ── Buttons ── */
.fmd-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all .25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.fmd-btn svg { width: 20px; height: 20px; }
.fmd-btn-p {
  background: linear-gradient(135deg, var(--fmd-g1), var(--fmd-g2));
  color: var(--fmd-gold-l);
}
.fmd-btn-p:hover {
  background: linear-gradient(135deg, var(--fmd-gold), var(--fmd-gold-d));
  color: #FFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(200, 168, 54, .25);
}
.fmd-btn-g {
  background: linear-gradient(135deg, var(--fmd-g3), var(--fmd-g1));
  color: #FFF;
}
.fmd-btn-g:hover {
  box-shadow: 0 6px 24px rgba(74, 107, 42, .3);
  transform: translateY(-1px);
}
.fmd-btn-o {
  padding: 13px;
  border: 2px solid var(--fmd-gold);
  border-radius: 10px;
  background: transparent;
  color: var(--fmd-gold-d);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.fmd-btn-o:hover { background: var(--fmd-gold); color: #FFF; }
.fmd-br {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.fmd-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Salla Purchase Lock ── */
.product-form[data-fmd-customizer-locked="true"] .sticky-product-bar::before {
  content: 'أكمل التخصيص ثم اضغط "تأكيد التخصيص" لتفعيل الشراء';
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fmd-gold-d);
}
.product-form[data-fmd-customizer-locked="true"] salla-add-product-button,
.product-form[data-fmd-customizer-locked="true"] button[type="submit"],
.product-form[data-fmd-customizer-locked="true"] input[type="submit"],
.product-form .fmd-purchase-locked {
  opacity: .45;
  filter: grayscale(1);
  cursor: not-allowed !important;
  pointer-events: none;
  transition: opacity .2s ease, filter .2s ease;
}
.product-form[data-fmd-customizer-locked="true"] salla-add-product-button,
.product-form .fmd-purchase-locked {
  display: block;
}

/* ── Preview ── */
.fmd-pv {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.fmd-pv-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #EDEAE4;
}
.fmd-pv-item canvas { display: block; max-width: 100%; height: auto; }
.fmd-pv-label {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(27, 46, 15, .75);
  color: #FFF;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Confirm grid ── */
.fmd-cg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.fmd-cgi {
  background: #FDFAF4;
  border: 1px solid var(--fmd-cream-d);
  border-radius: 10px;
  padding: 12px 14px;
}
.fmd-cgi .fmd-cl {
  font-size: 11px;
  color: var(--fmd-txt-m);
  font-weight: 600;
  margin-bottom: 4px;
}
.fmd-cgi .fmd-cv {
  font-size: 15px;
  color: var(--fmd-g1);
  font-weight: 700;
}
.fmd-cgf { grid-column: 1 / -1; }

/* ── Agree checkbox ── */
.fmd-cbr {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  background: rgba(200, 168, 54, .06);
  border: 1px solid rgba(200, 168, 54, .2);
  border-radius: 10px;
  margin-bottom: 20px;
  cursor: pointer;
}
.fmd-cbr input {
  margin-top: 4px;
  accent-color: var(--fmd-gold);
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.fmd-cbr label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fmd-g2);
  cursor: pointer;
  line-height: 1.6;
}
.fmd-rb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--fmd-cream);
  border: 1px solid var(--fmd-cream-d);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fmd-txt-m);
  font-family: monospace, 'Tajawal';
  direction: ltr;
}

/* ── Panels ── */
.fmd-pnl { display: none; }
.fmd-pnl.fmd-ac { display: block; animation: fmd-fi .3s ease; }
@keyframes fmd-fi {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Image Controls ── */
.fmd-img-ctrls {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  background: #FDFAF4;
  border: 1px solid var(--fmd-cream-d);
  border-radius: 10px;
}
.fmd-img-ctrls.fmd-show { display: flex; }
.fmd-mode-row { display: flex; gap: 8px; }
.fmd-mode-btn {
  flex: 1;
  padding: 9px 8px;
  border: 2px solid var(--fmd-cream-d);
  border-radius: 8px;
  background: #FFF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--fmd-g2);
  cursor: pointer;
  transition: all .2s;
}
.fmd-mode-btn:hover { border-color: var(--fmd-gold-l); }
.fmd-mode-btn.fmd-ac {
  border-color: var(--fmd-gold);
  background: linear-gradient(135deg, var(--fmd-gold), var(--fmd-gold-d));
  color: #FFF;
}
.fmd-sz-row { display: flex; flex-direction: column; }
.fmd-sz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fmd-g2);
}
.fmd-sz-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--fmd-gold-d);
  background: var(--fmd-cream);
  padding: 2px 8px;
  border-radius: 6px;
}
.fmd-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--fmd-cream-d);
  outline: none;
  cursor: pointer;
  accent-color: var(--fmd-gold);
}
.fmd-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fmd-gold);
  cursor: pointer;
  border: 2px solid #FFF;
  box-shadow: 0 2px 6px rgba(200,168,54,.4);
}
.fmd-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fmd-gold);
  cursor: pointer;
  border: 2px solid #FFF;
}
.fmd-live-wrap { display: flex; justify-content: center; padding-top: 4px; }
.fmd-live-wrap canvas {
  border-radius: 50%;
  border: 2px solid var(--fmd-cream-d);
  box-shadow: 0 2px 8px rgba(27,46,15,.08);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .fmd-cd { padding: 20px 16px; }
  .fmd-fr { grid-template-columns: repeat(2, 1fr); }
  .fmd-cg { grid-template-columns: 1fr; }
  .fmd-br { grid-template-columns: 1fr; }
  .fmd-pv { flex-direction: column; }
  .fmd-fp { font-size: 17px; }
}