/* =====================================================================
   Inspire Design — Workspace (/workspace/) layout 2-coloane:
   stage stânga (imagine + prompt), sidebar dreapta cu tab-uri.
   ===================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600&display=swap");

:root {
  --iw-bg: #fafafa;
  --iw-fg: #1a1a1a;
  --iw-fg-soft: #888;
  --iw-border: #ececec;
  --iw-bg-card: #fff;
  --iw-accent: #DE0000;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--iw-bg);
  color: var(--iw-fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 200;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
}
.iw-body { display: flex; flex-direction: column; height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

[hidden] { display: none !important; }

/* ---------- Header ---------- */
.iw-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--iw-border);
  height: 64px;
  background: #fff;
  flex-shrink: 0;
}
.iw-header__back {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  color: var(--iw-fg);
  transition: background .15s;
}
.iw-header__back:hover { background: #f5f5f5; }
.iw-header__logo img { height: 24px; }
.iw-header__right {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}

/* ---------- Main 2-col layout ---------- */
.iw-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 0;
}

/* ---------- Stage (left) ---------- */
.iw-stage {
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  min-height: 0;
}
.iw-stage__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
}
.iw-stage__head-left { flex: 1; text-align: center; padding-left: 100px; /* balance vs Detalii btn dreapta */ }
.iw-stage__title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--iw-fg-soft);
  margin: 0 0 4px;
}
.iw-stage__sub {
  font-size: 12px;
  color: var(--iw-fg-soft);
  margin: 0;
}
.iw-stage__sub strong { color: var(--iw-fg); font-weight: 600; }

.iw-summary-btn {
  background: #fff;
  border: 1px solid var(--iw-border);
  border-radius: 999px;
  padding: 8px 14px 8px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--iw-fg);
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.iw-summary-btn:hover { background: #f5f5f5; border-color: #ccc; }

/* Canvas wrapper */
.iw-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}
.iw-canvas__viewer {
  flex: 1;
  background: var(--iw-bg-card);
  border: 1px solid var(--iw-border);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.iw-canvas__viewer img.iw-image {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fafafa;
}

.iw-empty {
  text-align: center;
  padding: 40px 24px;
  max-width: 320px;
}
.iw-empty svg { color: #d4d4d4; margin: 0 auto 16px; display: block; }
.iw-empty p { font-size: 14px; color: var(--iw-fg-soft); font-weight: 300; margin: 0 0 16px; }

/* Loading overlay */
.iw-loading {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  z-index: 5;
}
.iw-loading__spin {
  width: 40px; height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: var(--iw-fg);
  border-radius: 50%;
  animation: iw-spin 1s linear infinite;
}
@keyframes iw-spin { to { transform: rotate(360deg); } }
.iw-loading p { font-size: 13px; color: var(--iw-fg-soft); margin: 0; font-weight: 300; }

/* Variant thumbs (apar pe măsură ce se generează imagini) */
.iw-variants {
  display: flex;
  gap: 8px;
  padding: 12px 0 4px;
  overflow-x: auto;
  flex-shrink: 0;
}
.iw-variant {
  width: 84px; height: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--iw-bg-card);
  flex-shrink: 0;
  transition: border-color .15s, transform .15s;
  padding: 0;
}
.iw-variant img { width: 100%; height: 100%; object-fit: cover; }
.iw-variant.is-active { border-color: var(--iw-fg); }
.iw-variant:hover { border-color: #b9b6b1; }

/* ---------- Quick controls under canvas ---------- */
.iw-controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 3;
}
.iw-controls__pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}
.iw-controls__icons {
  display: flex;
  gap: 6px;
  pointer-events: auto;
  align-items: flex-end;
  flex-direction: column;
}

.iw-pill-ctrl {
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--iw-border);
  border-radius: 999px;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  color: var(--iw-fg);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color .15s;
}
.iw-pill-ctrl:hover { border-color: #ccc; }
.iw-pill-ctrl__label { padding: 0 8px; color: var(--iw-fg-soft); }
.iw-pill-ctrl__value {
  padding: 4px 10px;
  background: var(--iw-fg);
  color: #fff;
  border-radius: 999px;
  min-width: 32px;
  text-align: center;
  font-weight: 600;
}
.iw-pill-ctrl__nav {
  background: transparent;
  border: 0;
  color: var(--iw-fg-soft);
  font-size: 14px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.iw-pill-ctrl__nav:hover { background: #f0f0f0; color: var(--iw-fg); }

.iw-icon-btn {
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--iw-border);
  border-radius: 999px;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--iw-fg);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .15s, transform .15s;
}
.iw-icon-btn:hover { background: #f5f5f5; transform: translateY(-1px); }
.iw-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ---------- Summary popover ---------- */
.iw-summary-pop, .iw-settings {
  position: absolute;
  top: 60px;
  right: 32px;
  width: 320px;
  background: #fff;
  border: 1px solid var(--iw-border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  z-index: 50;
}
.iw-summary-pop__head, .iw-settings__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--iw-border);
}
.iw-summary-pop__head h3, .iw-settings__head h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--iw-fg-soft);
  margin: 0;
}
.iw-summary-pop__head .iw-icon-btn,
.iw-settings__head .iw-icon-btn {
  background: transparent;
  border: 0;
  width: 28px; height: 28px;
}
.iw-summary-pop__body, .iw-settings__body {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 300;
  color: var(--iw-fg);
  line-height: 1.5;
}
.iw-summary-pop__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
}
.iw-summary-pop__row dt { color: var(--iw-fg-soft); font-weight: 400; text-transform: uppercase; letter-spacing: 0.4px; font-size: 10px; align-self: center; }
.iw-summary-pop__row dd { margin: 0; color: var(--iw-fg); font-weight: 500; text-align: right; max-width: 200px; }

.iw-settings__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
}
.iw-settings__row span { font-size: 13px; }
.iw-settings__row input[type="checkbox"] {
  width: 36px; height: 20px;
  appearance: none;
  background: #ddd;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background .15s;
}
.iw-settings__row input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.iw-settings__row input[type="checkbox"]:checked { background: var(--iw-fg); }
.iw-settings__row input[type="checkbox"]:checked::before { transform: translateX(16px); }
.iw-settings__note {
  font-size: 11px;
  color: var(--iw-fg-soft);
  font-weight: 300;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--iw-border);
}

/* ---------- Prompt bar ---------- */
.iw-prompt-bar {
  background: var(--iw-bg-card);
  border: 1px solid var(--iw-border);
  border-radius: 18px;
  padding: 12px 14px;
  margin-top: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.iw-prompt-input {
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  color: var(--iw-fg);
  background: transparent;
  padding: 4px 4px;
  min-height: 48px;
  max-height: 140px;
}
.iw-prompt-input::placeholder { color: var(--iw-fg-soft); }
.iw-prompt-bar__row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.iw-prompt-bar__upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--iw-fg);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .15s;
  cursor: pointer;
}
.iw-prompt-bar__upload:hover { background: #f5f5f5; }
.iw-prompt-bar__credits {
  font-size: 12px;
  color: var(--iw-fg-soft);
  font-weight: 400;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding-left: 12px;
  border-left: 1px solid var(--iw-border);
}
.iw-prompt-bar__credits strong { color: var(--iw-fg); font-weight: 600; }
.iw-prompt-bar__style {
  margin-left: auto;
  background: #f5f5f5;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 400;
  color: var(--iw-fg);
  font-family: inherit;
  cursor: pointer;
  outline: 0;
}
.iw-prompt-bar__send {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: var(--iw-fg);
  color: #fff;
  border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.iw-prompt-bar__send:hover { transform: translateY(-1px); }
.iw-prompt-bar__send:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

/* ---------- Sidebar (right) ---------- */
.iw-side {
  background: var(--iw-bg-card);
  border-left: 1px solid var(--iw-border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.iw-tabs {
  display: flex;
  border-bottom: 1px solid var(--iw-border);
  flex-shrink: 0;
}
.iw-tab {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 16px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--iw-fg-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color .15s, border-color .15s;
}
.iw-tab.is-active {
  color: var(--iw-fg);
  border-bottom-color: var(--iw-fg);
  font-weight: 500;
}
.iw-tab:hover:not(.is-active) { color: var(--iw-fg); }

.iw-side__panels {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.iw-panel { padding: 16px; }
.iw-panel__hint {
  font-size: 13px;
  color: var(--iw-fg-soft);
  font-weight: 300;
  text-align: center;
  padding: 32px 16px;
  margin: 0;
}
.iw-panel__head { margin-bottom: 12px; }
.iw-search {
  width: 100%;
  border: 1px solid var(--iw-border);
  border-radius: 999px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  outline: 0;
  background: #fafafa;
}
.iw-search:focus { background: #fff; border-color: var(--iw-fg); }

.iw-panel__empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--iw-fg-soft);
}
.iw-panel__empty svg { color: #d4d4d4; margin: 0 auto 14px; display: block; }
.iw-panel__empty-title { font-size: 15px; font-weight: 400; color: var(--iw-fg); margin: 0 0 4px; }
.iw-panel__empty-sub { font-size: 12px; font-weight: 300; line-height: 1.5; margin: 0; }

/* Product list (Adaugă / Produse) */
.iw-product-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.iw-product {
  background: #fff;
  border: 1px solid var(--iw-border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  transition: transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
}
.iw-product:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.iw-product__media {
  aspect-ratio: 1;
  background: #f5f5f5;
  overflow: hidden;
}
.iw-product__media img { width: 100%; height: 100%; object-fit: cover; }
.iw-product__body { padding: 8px 10px 10px; }
.iw-product__name {
  font-size: 12px;
  font-weight: 400;
  margin: 0 0 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.iw-product__price { font-size: 12px; font-weight: 500; color: var(--iw-fg); }

/* Design panel: pills + style cards */
.iw-panel__group { margin-bottom: 24px; }
.iw-panel__group-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--iw-fg-soft);
  margin: 0 0 10px;
}
.iw-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.iw-pill {
  background: #f5f5f5;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 400;
  color: var(--iw-fg);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.iw-pill:hover { background: #ececec; }
.iw-pill.is-active { background: var(--iw-fg); color: #fff; }

.iw-style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.iw-style-card {
  background: #fff;
  border: 1px solid var(--iw-border);
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s;
}
.iw-style-card:hover { border-color: var(--iw-fg); }
.iw-style-card.is-active { border-color: var(--iw-fg); background: #f8f8f8; }
.iw-style-card__name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--iw-fg);
  margin-bottom: 4px;
}
.iw-style-card__desc {
  display: block;
  font-size: 11px;
  font-weight: 300;
  color: var(--iw-fg-soft);
  line-height: 1.4;
}

/* ---------- Generic buttons ---------- */
.iw-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-radius: 12px;
  padding: 10px 18px;
  cursor: pointer;
  border: 0;
  transition: transform .15s, opacity .15s;
}
.iw-btn:hover { transform: translateY(-1px); }
.iw-btn--primary { background: var(--iw-fg); color: #fff; }

/* ---------- Sidebar tab panels (Detalii / Produse) ---------- */
.iw-tabpanel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.iw-tabpanel[hidden] { display: none !important; }

/* ---------- Produse panel ---------- */
.iw-products {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.iw-products__search {
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.iw-products__grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px 24px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: #d4d4d4 transparent;
}
.iw-products__grid::-webkit-scrollbar { width: 5px; }
.iw-products__grid::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 3px; }
.iw-products__msg {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  color: var(--iw-fg-soft);
  padding: 40px 16px;
  margin: 0;
}
.iw-product__price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 3px;
}
.iw-product__stock {
  font-size: 9.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #b0b0b0;
}
.iw-product__stock.is-out { color: #c64333; }

/* ---- Product card: robust (fără dependență de aspect-ratio în grid) ---- */
.iw-products__grid .iw-product {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--iw-border);
  border-radius: 12px;
  overflow: hidden;
}
.iw-products__grid .iw-product__media {
  height: 132px;
  flex-shrink: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #f2f2f2;
  aspect-ratio: auto;
}
.iw-products__grid .iw-product__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.iw-products__grid .iw-product__media:empty::after {
  content: "";
  width: 28px; height: 28px;
  border-radius: 6px;
  background: repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 6px, #e8e8e8 6px, #e8e8e8 12px);
}
.iw-products__grid .iw-product__body { padding: 9px 10px 11px; }
.iw-products__grid .iw-product__name {
  font-size: 12px;
  font-weight: 500 !important;
  color: #1a1a1a !important;
  line-height: 1.35;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.iw-products__grid .iw-product__price {
  font-size: 12.5px;
  font-weight: 600 !important;
  color: #1a1a1a !important;
}

/* ---- „Adaugă în randare" overlay pe cardul de produs ---- */
.iw-products__grid .iw-product-wrap {
  position: relative;
  display: flex;
}
.iw-products__grid .iw-product-wrap > .iw-product {
  flex: 1;
  width: 100%;
}
.iw-product__add {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--iw-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--iw-fg);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  z-index: 2;
}
.iw-product__add:hover { transform: scale(1.08); border-color: var(--iw-fg); }
.iw-product__add.is-added {
  background: var(--iw-fg);
  color: #fff;
  border-color: var(--iw-fg);
}

/* ---- Badge cu numărul de produse selectate (pe tab) ---- */
.iw-tab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--iw-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

/* ---------- Tab „Selectate" ---------- */
.iw-selected {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.iw-selected__head {
  padding: 18px 20px 12px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.iw-selected__head h2 {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--iw-fg);
}
.iw-selected__head p {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--iw-fg-soft);
  margin: 0;
}
.iw-selected__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: #d4d4d4 transparent;
}
.iw-selected__list::-webkit-scrollbar { width: 5px; }
.iw-selected__list::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 3px; }
.iw-selected__empty {
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--iw-fg-soft);
  padding: 40px 16px;
  margin: 0;
}
.iw-selected__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--iw-fg);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  vertical-align: middle;
}
.iw-selitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--iw-border);
  border-radius: 12px;
  background: #fff;
}
.iw-selitem__media {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.iw-selitem__media img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.iw-selitem__info { flex: 1; min-width: 0; }
.iw-selitem__name {
  font-size: 12.5px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 3px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.iw-selitem__price { font-size: 12px; font-weight: 600; color: #1a1a1a; }
.iw-selitem__remove {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #999;
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.iw-selitem__remove:hover { background: #f3f3f3; color: var(--iw-fg); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  html, body { overflow: auto; height: auto; }
  .iw-body { height: auto; min-height: 100vh; }
  .iw-main { grid-template-columns: 1fr; }
  .iw-side { border-left: 0; border-top: 1px solid var(--iw-border); max-height: 70vh; }
  .iw-stage { padding: 16px; }
}

/* === bule produse pe imaginea generată === */
.iw-pins { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.iw-pin { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; }
.iw-pin__dot {
  width: 15px; height: 15px; border-radius: 999px; border: 2px solid rgba(255,255,255,.95);
  background: #14110f; padding: 0;
  font-family: inherit; cursor: pointer; display: block;
  box-shadow: 0 2px 8px rgba(20,17,15,.4); transition: transform .15s;
  animation: iwPinPulse 2.4s ease-out infinite;
}
.iw-pin__dot:hover { transform: scale(1.35); }
.iw-pin.is-open .iw-pin__dot { transform: scale(1.35); animation: none; }
@keyframes iwPinPulse {
  0% { box-shadow: 0 2px 10px rgba(20,17,15,.35), 0 0 0 0 rgba(255,255,255,.75); }
  70% { box-shadow: 0 2px 10px rgba(20,17,15,.35), 0 0 0 12px rgba(255,255,255,0); }
  100% { box-shadow: 0 2px 10px rgba(20,17,15,.35), 0 0 0 0 rgba(255,255,255,0); }
}
.iw-pin__card {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  display: none; align-items: center; gap: 10px; width: 232px; padding: 9px;
  background: #fff; border-radius: 13px; box-shadow: 0 12px 34px rgba(20,17,15,.28);
  text-decoration: none; color: #14110f; z-index: 6;
}
.iw-pin.is-open .iw-pin__card { display: flex; }
.iw-pin--edge-top .iw-pin__card { bottom: auto; top: calc(100% + 10px); }
.iw-pin--edge-left .iw-pin__card { left: -6px; transform: none; }
.iw-pin--edge-right .iw-pin__card { left: auto; right: -6px; transform: none; }
.iw-pin__card img { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; flex-shrink: 0; background: #f2f0ed; }
.iw-pin__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iw-pin__meta strong { font-size: 12px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.iw-pin__meta em { font-style: normal; font-size: 12.5px; font-weight: 700; }
.iw-pin__meta u { font-size: 10.5px; text-decoration: none; color: #de0000; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* === X de ștergere pe thumbnail-urile variantelor === */
.iw-variant { position: relative; }
.iw-variant__del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border-radius: 999px; background: rgba(20,17,15,.82); color: #fff;
  font-size: 13px; font-weight: 600; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0 0 1px; box-sizing: border-box;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.35);
  transition: transform .15s, background .15s; z-index: 4;
}
.iw-variant__del:hover { transform: scale(1.15); background: #de0000; }
