/* ═══════════════════════════════════════════════════════════
   Xpresa Label Editor – Stylesheet v1.0
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────── */
.xle-wrap {
  --teal:       #5AACAC;
  --teal-dark:  #4A9696;
  --teal-pale:  #EAF5F5;
  --dark:       #252834;
  --body:       #3D4456;
  --muted:      #6B7385;
  --gold:       #F4A623;
  --bg:         #EEF0F8;
  --white:      #FFFFFF;
  --border:     #DDE0EC;
  --danger:     #E53935;
  --shadow-sm:  0 2px 8px rgba(37,40,52,.06);
  --shadow-md:  0 4px 24px rgba(37,40,52,.10);
  --shadow-lg:  0 8px 40px rgba(37,40,52,.14);
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --font:       'Sora', 'Open Sans', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────── */
.xle-wrap *, .xle-wrap *::before, .xle-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.xle-wrap ul { list-style: none; }
.xle-wrap button { font-family: var(--font); cursor: pointer; }
.xle-wrap input, .xle-wrap select, .xle-wrap textarea { font-family: var(--font); }

/* ── Editor Shell ──────────────────────────────────────── */
.xle-wrap {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--body);
  background: var(--bg);
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  z-index: 99999;
}

/* Hide theme chrome and strip all offsets when editor is present */
html:has(.xle-wrap),
body:has(.xle-wrap) {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
body:has(.xle-wrap) header,
body:has(.xle-wrap) footer,
body:has(.xle-wrap) #wpadminbar,
body:has(.xle-wrap) .wp-block-template-part,
body:has(.xle-wrap) .site-header,
body:has(.xle-wrap) .site-footer,
body:has(.xle-wrap) nav {
  display: none !important;
}
body:has(.xle-wrap) .wp-site-blocks {
  padding: 0 !important;
  margin: 0 !important;
}

/* ══════════════════════════════════════════════════════════
   ICON SIDEBAR
══════════════════════════════════════════════════════════ */
.xle-sidebar {
  width: 72px;
  flex-shrink: 0;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 2px;
  overflow-y: auto;
  scrollbar-width: none;
}
.xle-sidebar::-webkit-scrollbar { display: none; }

.xle-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 58px;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: rgba(255,255,255,.4);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  transition: background .18s, color .18s;
}
.xle-icon-btn svg { width: 20px; height: 20px; }
.xle-icon-btn:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.75); }
.xle-icon-btn.active {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 4px 14px rgba(90,172,172,.45);
}

/* ══════════════════════════════════════════════════════════
   OPTIONS PANEL
══════════════════════════════════════════════════════════ */
.xle-panel {
  width: 272px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.xle-sub-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.xle-panel-head {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--dark);
  background: #FAFBFD;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.xle-panel-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.xle-panel-scroll::-webkit-scrollbar { width: 4px; }
.xle-panel-scroll::-webkit-scrollbar-track { background: transparent; }
.xle-panel-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Design panel tools ─ */
.xle-tool-group { padding: 12px 14px 4px; }
.xle-field-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 8px;
}

.xle-tool-btns { display: flex; gap: 6px; }
.xle-tool-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--dark);
  font-size: 12px;
  font-weight: 600;
  transition: border-color .15s, background .15s, color .15s;
}
.xle-tool-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.xle-tool-btn:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-pale); }

.xle-tool-row { display: flex; gap: 8px; padding: 4px 14px; align-items: flex-end; }
.xle-flex1 { flex: 1; }

.xle-select {
  width: 100%;
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--dark);
  background: var(--white);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7385' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: border-color .15s;
}
.xle-select:focus { border-color: var(--teal); }

.xle-input-num {
  width: 100%;
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--dark);
  outline: none;
  transition: border-color .15s;
}
.xle-input-num:focus { border-color: var(--teal); }

.xle-style-btns { display: flex; gap: 5px; }
.xle-style-btn {
  width: 34px; height: 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.xle-style-btn:hover, .xle-style-btn.active { border-color: var(--teal); background: var(--teal-pale); color: var(--teal); }

.xle-align-btns { display: flex; gap: 5px; }
.xle-align-btn {
  flex: 1;
  padding: 7px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.xle-align-btn svg { width: 15px; height: 15px; }
.xle-align-btn:hover, .xle-align-btn.active { border-color: var(--teal); background: var(--teal-pale); color: var(--teal); }

.xle-color-row { display: flex; flex-wrap: wrap; gap: 7px; }
.xle-cswatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: transform .15s, outline-color .15s;
}
.xle-cswatch:hover { transform: scale(1.12); }
.xle-cswatch.active { outline-color: var(--teal); }

/* ── Custom font picker ─ */
.xle-font-picker { position: relative; }

.xle-font-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--white);
  font-size: 13px;
  color: var(--dark);
  transition: border-color .15s;
  gap: 8px;
}
.xle-font-trigger:hover { border-color: var(--teal); }
#xleFontDisplay { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.xle-font-list {
  /* fixed so it escapes overflow:hidden/.xle-panel-scroll clipping */
  position: fixed;
  /* top / left / width are set dynamically by toggleFontPicker() */
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 9999;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.xle-font-list.open { display: block; }

.xle-font-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
  gap: 8px;
}
.xle-font-option:last-child { border-bottom: none; }
.xle-font-option:hover { background: var(--teal-pale); }
.xle-font-option.active { background: var(--teal-pale); }
.xle-font-option.active .xle-font-opt-name { color: var(--teal); }

.xle-font-opt-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
}
.xle-font-opt-preview {
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Icon category tab bar ─ */
.xle-icon-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--border);
  background: #FAFBFD;
}
.xle-icon-tab {
  padding: 3px 9px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  background: var(--white);
  color: var(--muted);
  font-family: var(--font);
  transition: all .14s;
  white-space: nowrap;
  line-height: 1.6;
}
.xle-icon-tab:hover  { border-color: var(--teal); color: var(--teal); }
.xle-icon-tab.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ── Icon grid ─ */
.xle-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 2px 2px 8px;
}
.xle-icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.xle-icon-tile:hover { border-color: var(--teal); background: var(--teal-pale); color: var(--teal); }
.xle-icon-tile svg { width: 22px; height: 22px; }

/* ── Layer buttons ─ */
.xle-layer-btns { display: flex; flex-direction: column; gap: 5px; }
.xle-layer-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--dark);
  font-size: 12px; font-weight: 600;
  transition: all .15s;
}
.xle-layer-btn svg { width: 14px; height: 14px; }
.xle-layer-btn:hover { border-color: var(--teal); background: var(--teal-pale); color: var(--teal); }
.xle-layer-btn--danger:hover { border-color: var(--danger); background: #FFF0F0; color: var(--danger); }

.xle-divider { border: none; border-top: 1px solid var(--border); margin: 10px 14px; }

/* ── Fold list ─ */
.xle-fold-list { padding: 6px 0; }
.xle-fold-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 14px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}
.xle-fold-item:hover { background: #F5F7FA; }
.xle-fold-item.active { background: var(--teal-pale); border-left-color: var(--teal); }
.xle-fold-item.active .xle-fold-name { color: var(--teal); font-weight: 700; }
.xle-fold-thumb {
  width: 52px; height: 36px;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #F0F1F5;
  display: flex; align-items: center; justify-content: center;
}
.xle-fold-thumb img { width: 52px; height: 36px; object-fit: contain; }
.xle-fold-name { font-size: 12px; font-weight: 500; color: var(--dark); line-height: 1.4; }

/* ── Size list ─ */
.xle-size-list { padding: 6px 0; }
.xle-size-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}
.xle-size-item:hover { background: #F5F7FA; }
.xle-size-item.active { background: var(--teal-pale); border-left-color: var(--teal); }
.xle-size-item.active .xle-sz-in { color: var(--teal); font-weight: 700; }
.xle-sz-in { display: block; font-size: 12px; font-weight: 600; color: var(--dark); }
.xle-sz-mm { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }

/* ── Woven cards ─ */
.xle-woven-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.xle-woven-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.xle-woven-card:hover { border-color: var(--teal); background: var(--teal-pale); }
.xle-woven-card.active { border-color: var(--teal); background: var(--teal-pale); }
.xle-woven-icon { font-size: 22px; flex-shrink: 0; }
.xle-woven-info { flex: 1; }
.xle-woven-name { font-size: 13px; font-weight: 700; color: var(--dark); }
.xle-woven-card.active .xle-woven-name { color: var(--teal); }
.xle-woven-desc { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.xle-woven-check { flex-shrink: 0; opacity: 0; transition: opacity .15s; color: var(--teal); }
.xle-woven-check svg { width: 16px; height: 16px; }
.xle-woven-card.active .xle-woven-check { opacity: 1; }

/* ── Color swatches ─ */
.xle-swatch-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.xle-swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: transform .15s, outline-color .15s;
}
.xle-swatch:hover { transform: scale(1.1); }
.xle-swatch.active { outline-color: var(--teal); }

.xle-custom-color-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.xle-color-picker-wrap {
  position: relative;
  width: 42px; height: 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}
.xle-color-picker {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  border: none;
}
.xle-color-hex {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--dark);
  outline: none;
  font-family: monospace;
}
.xle-color-hex:focus { border-color: var(--teal); }
.xle-selected-color-name { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ── Logo color counter & chips ─ */
.xle-logo-color-counter {
  font-size: 12px; font-weight: 700;
  color: var(--teal);
  margin-bottom: 12px;
  padding: 6px 10px;
  background: var(--teal-pale);
  border-radius: var(--radius-sm);
  text-align: center;
}
.xle-logo-color-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.xle-logo-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--border);
  font-size: 11px; font-weight: 600;
  color: var(--dark);
}
.xle-logo-chip-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── Info text ─ */
.xle-info-text { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.xle-info-text strong { color: var(--dark); }

/* ── Extra cards ─ */
.xle-extra-list { display: flex; flex-direction: column; gap: 7px; }
.xle-extra-card {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.xle-extra-card:hover { border-color: var(--teal); background: var(--teal-pale); }
.xle-extra-card.active { border-color: var(--teal); background: var(--teal-pale); }
.xle-extra-card.disabled { opacity: .38; cursor: not-allowed; pointer-events: none; }
.xle-extra-icon { flex-shrink: 0; color: var(--muted); }
.xle-extra-icon svg { width: 20px; height: 20px; }
.xle-extra-info { flex: 1; }
.xle-extra-name { font-size: 13px; font-weight: 700; color: var(--dark); }
.xle-extra-card.active .xle-extra-name { color: var(--teal); }
.xle-extra-desc { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.xle-optional-badge {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(244,166,35,.12);
  color: #B07D10;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  vertical-align: middle;
  margin-left: 4px;
}

/* ── Quantity list ─ */
.xle-qty-list { display: flex; flex-direction: column; gap: 5px; padding: 10px 10px; }
.xle-qty-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.xle-qty-card:hover { border-color: var(--teal); background: var(--teal-pale); }
.xle-qty-card.active { border-color: var(--teal); background: var(--teal-pale); }
.xle-qty-card.active .xle-qty-val { color: var(--teal); }
.xle-qty-val { font-size: 13px; font-weight: 700; color: var(--dark); }
.xle-qty-meta { text-align: right; }
.xle-qty-per { font-size: 11px; color: var(--muted); }
.xle-qty-total { font-size: 11px; font-weight: 700; color: var(--teal); margin-top: 1px; }


/* ══════════════════════════════════════════════════════════
   CANVAS STAGE
══════════════════════════════════════════════════════════ */
.xle-stage {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Stage toolbar ─ */
.xle-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
}
.xle-toolbar-left, .xle-toolbar-right { display: flex; gap: 6px; }
.xle-toolbar-center { flex: 1; text-align: center; }
.xle-step-label { font-size: 12px; font-weight: 700; color: var(--muted); }

.xle-tb-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--dark);
  font-size: 12px; font-weight: 600;
  transition: all .15s;
}
.xle-tb-btn svg { width: 13px; height: 13px; }
.xle-tb-btn:hover { border-color: var(--teal); color: var(--teal); }
.xle-tb-btn:disabled { opacity: .4; pointer-events: none; }

/* ── Stage main ─ */
.xle-stage-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 10px;
  overflow: hidden;
  gap: 12px;
  /* subtle dot-grid to feel like a design workspace */
  background-color: #E8EBF4;
  background-image: radial-gradient(circle, rgba(90,172,172,.18) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ── Canvas container ─ */
.xle-canvas-outer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.xle-canvas-inner {
  background: transparent;   /* workspace dot-grid shows through */
  border-radius: var(--radius-lg);
  padding: 0;
  display: inline-block;
  position: relative;
}

/* Fabric canvas element itself */
.xle-canvas-inner canvas {
  display: block;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 32px rgba(37,40,52,.16);
}

.xle-canvas-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* ── Step nav ─ */
.xle-step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 520px;
  gap: 12px;
  flex-shrink: 0;
}

.xle-prev-btn, .xle-next-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  transition: all .18s;
  flex-shrink: 0;
}
.xle-prev-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--dark);
}
.xle-prev-btn:hover { border-color: var(--teal); color: var(--teal); }
.xle-prev-btn:disabled { opacity: .35; pointer-events: none; }
.xle-prev-btn svg, .xle-next-btn svg { width: 14px; height: 14px; }

.xle-next-btn {
  background: var(--teal);
  border: none;
  color: #fff;
  box-shadow: 0 4px 16px rgba(90,172,172,.38);
}
.xle-next-btn:hover { background: var(--teal-dark); transform: translateY(-1px); }
.xle-next-btn.xle-next-btn--cart {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  padding: 11px 28px;
}

.xle-step-dots { display: flex; gap: 6px; align-items: center; }
.xle-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background .2s, width .2s;
}
.xle-dot.active { background: var(--teal); width: 20px; border-radius: 4px; }


/* ══════════════════════════════════════════════════════════
   ORDER SUMMARY SIDEBAR
══════════════════════════════════════════════════════════ */
.xle-summary {
  width: 290px;
  flex-shrink: 0;
  background: var(--white);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.xle-summary-head {
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--dark);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #FAFBFD;
}

.xle-summary-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
}

.xle-sum-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.xle-sum-section:last-of-type { border-bottom: none; }

.xle-sum-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
}
.xle-sum-lbl { font-size: 11px; color: var(--muted); font-weight: 500; flex-shrink: 0; }
.xle-sum-val { font-size: 11px; font-weight: 700; color: var(--dark); text-align: right; }

.xle-sum-color-val { display: flex; align-items: center; gap: 5px; justify-content: flex-end; }
.xle-color-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.08);
}

.xle-total-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--teal-pale);
  border: 1px solid rgba(90,172,172,.25);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  margin: 14px 0;
  font-size: 13px; font-weight: 700;
  color: var(--dark);
}
.xle-total-val { font-size: 18px; font-weight: 800; color: var(--teal); }

.xle-processing-note {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 11px; color: var(--muted);
  line-height: 1.55;
  background: rgba(244,166,35,.07);
  border: 1px solid rgba(244,166,35,.2);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin-bottom: 4px;
}

.xle-summary-footer {
  padding: 14px 20px;
  border-top: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.xle-cart-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 13px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--teal);
  color: #fff;
  font-size: 14px; font-weight: 700;
  transition: background .18s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(90,172,172,.38);
}
.xle-cart-btn svg { width: 16px; height: 16px; }
.xle-cart-btn:hover { background: var(--teal-dark); transform: translateY(-1px); }
.xle-cart-btn:disabled { opacity: .55; pointer-events: none; transform: none; }

.xle-quote-btn {
  width: 100%; padding: 11px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-size: 13px; font-weight: 600;
  transition: border-color .15s, color .15s;
}
.xle-quote-btn:hover { border-color: var(--teal); color: var(--teal); }


/* ══════════════════════════════════════════════════════════
   SUCCESS MODAL
══════════════════════════════════════════════════════════ */
.xle-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(37,40,52,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(3px);
}

.xle-modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: xleModalIn .25s ease;
}

@keyframes xleModalIn {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.xle-modal-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--teal-pale);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  color: var(--teal);
}
.xle-modal-icon svg { width: 28px; height: 28px; }
.xle-modal-title { font-size: 20px; font-weight: 800; color: var(--dark); margin-bottom: 10px; }
.xle-modal-text { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 24px; }

.xle-modal-btns { display: flex; gap: 10px; margin-bottom: 16px; }
.xle-modal-btn {
  flex: 1; padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.xle-modal-btn--outline {
  border: 1.5px solid var(--border);
  color: var(--dark);
  background: var(--white);
}
.xle-modal-btn--outline:hover { border-color: var(--teal); color: var(--teal); }
.xle-modal-btn--fill { background: var(--teal); color: #fff; border: none; box-shadow: 0 4px 12px rgba(90,172,172,.35); }
.xle-modal-btn--fill:hover { background: var(--teal-dark); }

.xle-modal-close {
  border: none; background: none;
  font-size: 12px; color: var(--muted);
  text-decoration: underline; cursor: pointer;
}
.xle-modal-close:hover { color: var(--dark); }


/* ── Icon search ─ */
.xle-icon-search-wrap {
  padding: 8px 10px 4px;
}
.xle-icon-search {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--dark);
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
}
.xle-icon-search:focus { border-color: var(--teal); }
.xle-icon-search::placeholder { color: var(--muted); }

/* ── Weight selector ─ */
.xle-weight-bar {
  display: flex;
  gap: 4px;
  padding: 6px 10px 4px;
}
.xle-weight-btn {
  flex: 1;
  padding: 5px 2px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  cursor: pointer;
  background: var(--white);
  color: var(--muted);
  font-family: var(--font);
  transition: all .14s;
  white-space: nowrap;
}
.xle-weight-btn:hover  { border-color: var(--teal); color: var(--teal); }
.xle-weight-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ── No results ─ */
.xle-no-icons {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 24px 10px;
  grid-column: 1 / -1;
}

/* ── Icon tile image ─ */
.xle-icon-tile img { display: block; pointer-events: none; }


/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .xle-summary { width: 256px; }
}

@media (max-width: 1024px) {
  .xle-summary { display: none; }
  .xle-panel { width: 248px; }
}

@media (max-width: 768px) {
  .xle-wrap { height: auto; min-height: 100vh; border-radius: 0; flex-direction: column; }
  .xle-sidebar { width: 100%; flex-direction: row; padding: 6px 8px; height: 58px; overflow-x: auto; }
  .xle-icon-btn { width: auto; padding: 8px 10px; flex-direction: row; gap: 5px; }
  .xle-panel { width: 100%; max-height: 300px; border-right: none; border-bottom: 1px solid var(--border); }
  .xle-stage { min-height: 420px; }
}
