/* =============================================================
   Brand Portal — Product Management Form
   Empyra Fashion Platform / Blocksy Child Theme
   ============================================================= */
/* Design tokens are in style.css (loaded via empyra-style). Component-specific overrides below. */

/* ── Outer Wrapper ─────────────────────────────────────────── */
/* ponytail: font-size 13px differs from emp-wrap's 14px — keep this override */
.ep-wrap { font-size: 13px; }

/* ── Tab nav: pill style + single-row horizontal scroll ─────────────────────────── */
.ep-tabs.fi2-progress--tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
  cursor: default;
}
.ep-tabs.fi2-progress--tabs::-webkit-scrollbar { display: none; }
.ep-tabs.fi2-progress--tabs .emp-progress__segment {
  flex: 0 0 auto;
  height: auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--emp-cream);
  border: 1px solid var(--emp-border);
  color: var(--emp-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.ep-tabs.fi2-progress--tabs .emp-progress__segment:first-child,
.ep-tabs.fi2-progress--tabs .emp-progress__segment:last-child { border-radius: 999px; }
.ep-tabs.fi2-progress--tabs .emp-progress__segment:hover:not(.emp-progress__segment--active) {
  border-color: var(--emp-coral);
  color: var(--emp-coral);
}
.ep-tabs.fi2-progress--tabs .emp-progress__segment--completed {
  background: var(--emp-teal-light);
  border-color: var(--emp-teal);
  color: var(--emp-teal);
}
.ep-tabs.fi2-progress--tabs .emp-progress__segment--active {
  background: var(--emp-coral);
  border-color: var(--emp-coral);
  color: #fff;
}
.ep-tabs.fi2-progress--tabs .fi2-progress__num { display: none; }

/* ── Images card: featured shot + gallery side by side on wide screens ──── */
.ep-hero-media {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 560px) {
  .ep-hero-media {
    flex-direction: row;
    align-items: flex-start;
  }
}

.ep-img-slot--featured {
  flex-shrink: 0;
  width: 100%;
}

@media (min-width: 560px) {
  .ep-img-slot--featured {
    width: 200px;
  }
}

.ep-img-slot--gallery {
  flex: 1;
  min-width: 0;
}

.ep-hero-featured {
  aspect-ratio: 3 / 4;
}

.ep-hero-media-actions {
  display: flex;
  gap: 8px;
}

.ep-img-gallery-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (min-width: 560px) {
  .ep-img-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 760px) {
  .ep-img-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.ep-input--hero {
  font-family: var(--emp-font-heading, 'Playfair Display', Georgia, serif);
  font-size: 20px;
  font-weight: 700;
  padding: 12px 14px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.ep-card--coral {
  border-top: 3px solid var(--emp-coral);
}

.ep-card--teal {
  border-top: 3px solid var(--emp-teal);
}

/* ponytail: no emp-textarea--tall in global.css */
.ep-textarea--tall { min-height: 140px; }

/* ── Toggle Switch ─────────────────────────────────────────── */
.ep-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--emp-charcoal);
}

.ep-toggle-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ep-toggle-label:focus-within .ep-toggle-track {
  outline: 2px solid var(--emp-coral);
  outline-offset: 2px;
}

.ep-toggle-track {
  width: 40px;
  height: 22px;
  background: var(--emp-border);
  border-radius: 100px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
  display: inline-block;
}

.ep-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--emp-white);
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ep-toggle-label input:checked ~ .ep-toggle-track,
.ep-toggle-track--on {
  background: var(--emp-teal);
}

.ep-toggle-label input:checked ~ .ep-toggle-track::after,
.ep-toggle-track--on::after {
  transform: translateX(18px);
}

/* ── Product Type Toggle ───────────────────────────────────── */
.ep-type-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 1.5px solid var(--emp-border);
  border-radius: var(--emp-r-btn);
  overflow: hidden;
  width: fit-content;
}

.ep-type-opt {
  padding: 8px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--emp-charcoal);
  background: transparent;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.ep-type-opt:not(.ep-type-opt--active):hover {
  background: var(--emp-coral-light);
  color: var(--emp-coral-dark);
}

.ep-type-opt input[type="radio"] {
  display: none;
}

.ep-type-opt--active {
  background: var(--emp-coral-dark);
  color: var(--emp-white);
}

.ep-type-opt--active:hover {
  background: var(--emp-teal);
  color: var(--emp-white);
}

/* ── Images Section ────────────────────────────────────────── */
.ep-img-preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 2px dashed var(--emp-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--emp-cream);
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}

.ep-img-preview:hover {
  border-color: var(--emp-coral);
}

.ep-img-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--emp-muted);
  text-align: center;
  padding: 0 12px;
}

.ep-img-btn {
  font-size: 12px;
  padding: 6px 12px;
}

.ep-img-remove {
  font-size: 11px;
  padding: 4px 10px;
  color: var(--emp-danger);
  border-color: var(--emp-danger-border);
}

.ep-hint-inline {
  font-size: 11px;
  font-weight: 400;
  color: var(--emp-muted);
}

.ep-img-placeholder-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--emp-coral-light);
  color: var(--emp-coral-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ep-img-placeholder-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--emp-charcoal);
}

.ep-img-placeholder-hint {
  font-size: 11px;
  color: var(--emp-muted);
}

.ep-img-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.ep-img-thumb-wrap {
  position: relative;
  aspect-ratio: 1;
}

.ep-img-gallery-grid .ep-img-thumb {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--emp-border);
  display: block;
}

.ep-img-thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--emp-charcoal);
  color: var(--emp-white);
  border: 2px solid var(--emp-bg-card);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}

.ep-img-thumb-remove:hover {
  background: var(--emp-danger);
}

/* ── Variation Table ─────────────────────────────────────────── */

/* ══════════════════════════════════════════
   Variation Table
   ══════════════════════════════════════════ */
.ep-var-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-r-input);
  margin-bottom: 14px;
}

.ep-var-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 600px;
}

/* ── Header ── */
.ep-var-table thead tr {
  background: var(--emp-cream);
  border-bottom: 1px solid var(--emp-border);
}
.ep-var-table thead th {
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--emp-muted);
  text-align: left;
  white-space: nowrap;
}

/* ── Body rows ── */
.ep-variation-row { border-bottom: 1px solid var(--emp-border); transition: background 0.1s, opacity 0.2s; }
.ep-variation-row:last-child { border-bottom: none; }
.ep-variation-row:hover { background: #fdfcfb; }
.ep-variation-row--outofstock { opacity: 0.45; }

.ep-vr-td {
  padding: 8px 10px;
  vertical-align: middle;
}

/* ── Photo cell ── */
.ep-vr-td--img {
  width: 56px;
  text-align: center;
}

.ep-var-img-preview {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1.5px dashed var(--emp-border);
  background: var(--emp-cream);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  margin: 0 auto;
}
.ep-var-img-preview:hover { border-color: var(--emp-coral); background: var(--emp-coral-light); }
.ep-var-img-preview.ep-var-img--has-img { border-style: solid; border-color: transparent; }
.ep-var-img-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ep-var-img-placeholder-text { font-size: 9px; color: var(--emp-muted); line-height: 1.2; }

.ep-var-img-remove {
  position: absolute;
  top: 2px; right: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ep-var-img-preview:hover .ep-var-img-remove { display: flex; }

.ep-var-img-btn {
  font-size: 10px;
  color: var(--emp-teal);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 2px 0 0;
  display: block;
  text-align: center;
  width: 100%;
  transition: color 0.15s;
}
.ep-var-img-btn:hover { color: var(--emp-coral); }
.ep-var-img-caption { display: none; }

/* ── Variant name cell ── */
.ep-vr-td--name { min-width: 120px; }

.ep-var-name {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.ep-var-tag-size {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--emp-r-btn);
  font-size: 11px;
  font-weight: 700;
  background: var(--emp-teal-light);
  color: var(--emp-teal);
  border: 1px solid rgba(44,95,111,.2);
  white-space: nowrap;
}

.ep-var-tag-color {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--emp-r-btn);
  font-size: 11px;
  font-weight: 600;
  background: var(--emp-bg-card);
  color: var(--emp-charcoal);
  border: 1px solid var(--emp-border);
  white-space: nowrap;
}

.ep-var-tag-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.ep-attr-pill--locked {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--emp-r-btn);
  font-size: 11px;
  font-weight: 600;
  background: var(--emp-teal-light);
  color: var(--emp-teal);
  border: 1px solid rgba(44,95,111,.2);
}

.ep-var-name .ep-select,
.ep-var-manual-select {
  width: auto;
  min-width: 80px;
  padding: 4px 24px 4px 8px;
  font-size: 12px;
  height: 30px;
}

/* ── Shared input style ── */
.ep-vr-inp {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--emp-border);
  border-radius: 6px;
  background: var(--emp-bg-card);
  color: var(--emp-charcoal);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  height: 32px;
}
.ep-vr-inp:focus {
  border-color: var(--emp-coral);
  box-shadow: 0 0 0 2px rgba(224,120,86,.12);
}
.ep-vr-inp--sale:not(:placeholder-shown) {
  border-color: rgba(224,120,86,.4);
  background: #fff8f6;
}
.ep-vr-inp--qty { width: 56px; text-align: center; }

/* ── Sale cell — discount badge inline ── */
.ep-vr-sale-wrap { display: flex; align-items: center; gap: 6px; }

.ep-var-discount-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: #fef3c7;
  color: #b45309;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Stock cell ── */
.ep-vr-td--stock { min-width: 130px; }

.ep-vr-sel {
  width: 100%;
  height: 32px;
  padding: 0 24px 0 8px;
  border: 1px solid var(--emp-border);
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  background: var(--emp-bg-card);
  color: var(--emp-charcoal);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A7A7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px;
  cursor: pointer;
  transition: border-color 0.12s;
}
.ep-vr-sel:focus { border-color: var(--emp-coral); }

.ep-vr-track-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  cursor: pointer;
}

.ep-vr-track-txt {
  font-size: 11px;
  color: var(--emp-muted);
  user-select: none;
}

.ep-vr-qty-row { margin-top: 5px; }

/* ── Delete cell ── */
.ep-vr-td--del { width: 36px; text-align: center; }

.ep-variation-remove {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--emp-border);
  background: none;
  color: var(--emp-muted);
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ep-variation-remove:hover { background: #fef2f2; border-color: #fca5a5; color: var(--emp-danger, #dc2626); }

/* Stock badge (compat) */
.ep-var-stock-badge { display: none; }

/* ── Table footer ── */
.ep-var-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .ep-var-table { min-width: 560px; }
}

/* ── Chip Select ───────────────────────────────────────────── */
.ep-chip-select {
  position: relative;
}

.ep-chip-search-wrap {
  margin-bottom: 10px;
}

.ep-chip-search {
  width: 100%;
  padding: 7px 12px;
  border: 1.5px solid var(--emp-border-input, #C4BFBA);
  border-radius: 8px;
  background: var(--emp-cream);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.ep-chip-search:focus {
  border-color: var(--emp-coral);
}

/* ── Product Tags ──────────────────────────────────────────── */
.ep-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ep-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--emp-teal);
  color: var(--emp-white);
  border-radius: var(--emp-r-btn);
  font-size: 12px;
  line-height: 1.4;
}

.ep-tag-remove {
  background: none;
  border: none;
  color: var(--emp-white);
  cursor: pointer;
  line-height: 1;
  padding: 0 0 0 2px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.1s;
}

.ep-tag-remove:hover {
  opacity: 1;
}

/* ── Range Sliders ─────────────────────────────────────────── */
.ep-range-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ep-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--emp-coral) 0%,
    var(--emp-coral) var(--ep-range-pct, 0%),
    var(--emp-border) var(--ep-range-pct, 0%)
  );
  border-radius: 100px;
  outline: none;
  cursor: pointer;
  border: none;
}

.ep-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--emp-coral);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s;
}

.ep-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.ep-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--emp-coral);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  border: none;
  transition: transform 0.1s;
}

.ep-range::-moz-range-thumb:hover {
  transform: scale(1.1);
}

.ep-range-val {
  min-width: 36px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--emp-charcoal);
  background: var(--emp-cream);
  border: 1px solid var(--emp-border);
  border-radius: 6px;
  padding: 2px 6px;
  flex-shrink: 0;
}

/* ── Pill Group ────────────────────────────────────────────── */
.ep-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ep-pill {
  position: relative;
  cursor: pointer;
}

.ep-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ep-pill span {
  display: inline-block;
  padding: 6px 14px;
  border: 1.5px solid var(--emp-border-input, #C4BFBA);
  border-radius: var(--emp-r-btn);
  font-size: 13px;
  color: var(--emp-charcoal);
  background: var(--emp-cream);
  transition: all 0.12s;
  user-select: none;
  cursor: pointer;
  line-height: 1.4;
}

.ep-pill span:hover {
  background: var(--emp-coral-light);
  border-color: var(--emp-coral-dark);
  color: var(--emp-coral-dark);
}

.ep-pill input:checked ~ span {
  background: var(--emp-coral-dark);
  border-color: var(--emp-coral-dark);
  color: var(--emp-white);
}

.ep-pill input:checked ~ span:hover {
  background: var(--emp-teal);
  border-color: var(--emp-teal);
  color: var(--emp-white);
}

/* ── Catalogue Header ──────────────────────────────────────── */
.ep-catalogue-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.ep-catalogue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.ep-catalogue-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--emp-charcoal);
}

/* ── Spinner ───────────────────────────────────────────────── */
.ep-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emp-muted);
  font-size: 13px;
}

.ep-spinner[hidden] {
  display: none;
}

.ep-spinner__dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--emp-border);
  border-top-color: var(--emp-coral);
  border-radius: 50%;
  animation: ep-spin 0.6s linear infinite;
  flex-shrink: 0;
}

@keyframes ep-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Product status badge ──────────────────────────────────── */
.ep-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.ep-status--live    { background: #E1F4EA; color: #14612F; }
.ep-status--pending { background: #FFF4E0; color: #A05E00; }
.ep-status--draft   { background: #F0EDE6; color: var(--emp-muted); }

/* ── AI Suggest Bar ────────────────────────────────────────── */
.ep-ai-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--emp-coral) 8%, var(--emp-bg-card)), var(--emp-bg-card));
  border: 1px solid color-mix(in srgb, var(--emp-coral) 28%, var(--emp-border));
  border-radius: var(--emp-r-card);
}

.ep-btn--ai {
  background: linear-gradient(135deg, var(--emp-coral), color-mix(in srgb, var(--emp-coral) 70%, #7c3aed));
  color: var(--emp-white);
  border: none;
  padding: 9px 20px;
  border-radius: var(--emp-r-btn);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ep-btn--ai:hover:not(:disabled) { opacity: 0.88; }
.ep-btn--ai:disabled { opacity: 0.55; cursor: not-allowed; }

.ep-ai-status { font-size: 12px; color: var(--emp-muted); }
.ep-ai-status--ok  { color: var(--emp-success); }
.ep-ai-status--err { color: var(--emp-danger); }

/* ── Attribute blocks ──────────────────────────────────────── */
.ep-attr-block {
  border: 1.5px solid var(--emp-border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--emp-cream);
}

.ep-attr-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ep-attr-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 24px;
}

.ep-attr-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ep-attr-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--emp-white);
  border: 1px solid var(--emp-border);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
}

.ep-attr-pill--locked {
  background: var(--emp-teal-light);
  border-color: var(--emp-teal);
}

.ep-attr-pill-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 0 2px;
  color: var(--emp-muted);
  font-size: 14px;
  line-height: 1;
}

.ep-attr-pill-remove:hover { color: var(--emp-coral-dark); }

.ep-attr-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ep-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.ep-field--attr-display .ep-attr-pills-row { min-height: 32px; }

.ep-btn--link {
  background: none;
  border: none;
  padding: 0;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--emp-teal);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  vertical-align: middle;
  transition: color 0.15s;
}

.ep-btn--link:hover { color: var(--emp-coral-dark); }

/* ── Variant flow guide ────────────────────────────────────── */
.ep-variant-guide {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--emp-teal-light);
  border: 1px solid rgba(44, 95, 111, 0.2);
  border-radius: var(--emp-r-input);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--emp-charcoal);
  line-height: 1.5;
}

.ep-variant-guide__icon {
  color: var(--emp-teal);
  flex-shrink: 0;
  margin-top: 1px;
}

.ep-variant-hint {
  font-size: 12px;
  color: var(--emp-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.ep-variant-hint[hidden] { display: none; }

/* ── Bulk price bar ────────────────────────────────────────── */
/* ponytail: old inline bar layout kept for hidden fallback; card layout below takes over */
.ep-bulk-price-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--emp-teal-light);
  border: 1px solid rgba(44, 95, 111, 0.2);
  border-radius: var(--emp-r-card);
  padding: 11px 16px;
  margin-bottom: 14px;
}

/* ── Manual variant row — size select + color picker ── */
.ep-var-manual-select { min-width: 90px; }
.ep-var-color-picker {
  width: 34px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--emp-border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Bulk pricing card ── */
.ep-bulk-hint { margin: -12px 0 16px; }
.ep-bulk-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.ep-bulk-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ep-bulk-apply-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  color: var(--emp-teal);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
}
.ep-bulk-apply-link:hover { color: var(--emp-coral); }
@media (max-width: 640px) {
  .ep-bulk-fields { grid-template-columns: 1fr; }
}

.ep-bulk-price-bar[hidden] { display: none; }

.ep-bulk-price-bar__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--emp-teal);
  white-space: nowrap;
}

.ep-bulk-price-bar__sep {
  width: 1px;
  height: 24px;
  background: rgba(44, 95, 111, 0.2);
  flex-shrink: 0;
}

.ep-bulk-price-bar__group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ep-bulk-price-bar__group-label {
  font-size: 11px;
  color: var(--emp-muted);
  font-weight: 500;
  white-space: nowrap;
}

.ep-bulk-price-bar__input {
  width: 110px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid rgba(44, 95, 111, 0.25);
  background: var(--emp-bg-card);
  font-family: inherit;
}

/* ── Utility classes for inline style replacement ───────────── */
.ep-mb-16 { margin-bottom: 16px; }
.ep-mb-0  { margin-bottom: 0; }
.ep-mt-16 { margin-top: 16px; }
.ep-mt-8  { margin-top: 8px; }

/* ── Variable-product subsections (attributes / combinations / sizing) ──
   Each step gets its own labeled band so the previously undifferentiated
   flow of attribute blocks → combinations → sizing rows reads as three
   distinct steps instead of one long run-on section. ── */
.ep-subsection {
  background: var(--emp-cream);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-r-card);
  padding: 16px;
  margin-bottom: 16px;
}

.ep-subsection__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ep-subsection__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emp-teal);
  color: var(--emp-white);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ep-subsection__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--emp-charcoal);
  margin: 0;
  flex: 1;
}

.ep-subsection__action {
  flex-shrink: 0;
}

/* ── Drill-down chip picker (fabric, product category — hierarchical
   taxonomies). Ported from the FitIntelligence onboarding quiz: top-level
   terms render as chips; tapping a group-chip cascades-select every
   descendant leaf and reveals the subtree, so brands can select a whole
   section at once or drill into specific terms. ── */
.ep-drill .ep-chip-opt,
.ep-drill__label,
.ep-drill__gtitle,
.ep-drill__clear {
  text-transform: capitalize;
}

.ep-drill-search {
  width: 100%;
  padding: 7px 12px;
  margin-bottom: 10px;
  border: 1.5px solid var(--emp-border-input, #C4BFBA);
  border-radius: var(--emp-r-input);
  background: var(--emp-cream);
  font-size: 13px;
  font-family: inherit;
  color: var(--emp-charcoal);
  transition: border-color 0.12s;
}

.ep-drill-search:focus {
  outline: none;
  border-color: var(--emp-coral);
}

.ep-drill__node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ep-drill__dot {
  font-size: 14px;
  line-height: 1;
  color: var(--emp-muted);
  min-width: 1em;
  text-align: center;
}

.ep-drill__node--on .ep-drill__dot {
  color: var(--emp-coral-dark);
}

/* Parent chip with ≥1 picked descendant → outlined (coral-light bg + thick coral-dark border).
   JS adds ep-drill__node--on to parents, ep-chip-opt--selected only to leaves. */
.ep-drill__node--on.ep-chip-opt {
  background: var(--emp-coral-light);
  border: 2px solid var(--emp-coral-dark);
  color: var(--emp-coral-dark);
  font-weight: 600;
}

.ep-drill__node--on.ep-chip-opt:hover {
  background: color-mix(in srgb, var(--emp-coral-light) 60%, white);
  border-color: var(--emp-coral-dark);
  color: var(--emp-coral-dark);
}

.ep-drill__group {
  margin-top: 0;
  padding-left: 14px;
  border-left: 2px solid var(--emp-border);
}

.ep-drill__group[hidden] {
  display: none;
}

.ep-drill__divider {
  height: 1px;
  background: var(--emp-border);
  margin: 10px 0 8px;
}

.ep-drill__ghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ep-drill__gtitle {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--emp-muted);
}

.ep-drill__clear {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--emp-coral-dark);
  cursor: pointer;
  padding: 2px 4px;
}

.ep-drill__clear:hover {
  color: var(--emp-teal);
  text-decoration: underline;
}

/* ── Button base + variants ────────────────────────────────── */
.ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--emp-r-btn);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.ep-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.ep-btn--primary {
  background: var(--emp-teal);
  color: var(--emp-white, #fff);
  border-color: var(--emp-teal);
}
.ep-btn--primary:hover:not(:disabled) { opacity: 0.88; }

.ep-btn--coral {
  background: var(--emp-coral);
  color: var(--emp-white, #fff);
  border-color: var(--emp-coral);
}
.ep-btn--coral:hover:not(:disabled) { opacity: 0.88; }

.ep-btn--teal {
  background: var(--emp-teal);
  color: var(--emp-white, #fff);
  border-color: var(--emp-teal);
}
.ep-btn--teal:hover:not(:disabled) { opacity: 0.88; }

.ep-btn--ghost {
  background: transparent;
  color: var(--emp-charcoal);
  border-color: var(--emp-border);
}
.ep-btn--ghost:hover:not(:disabled) {
  border-color: var(--emp-coral);
  color: var(--emp-coral);
}

.ep-btn--outline {
  background: transparent;
  color: var(--emp-teal);
  border-color: var(--emp-teal);
}
.ep-btn--outline:hover:not(:disabled) {
  background: var(--emp-teal-light);
}

.ep-btn--danger {
  background: transparent;
  color: var(--emp-danger, #b91c1c);
  border-color: var(--emp-danger, #b91c1c);
}
.ep-btn--danger:hover:not(:disabled) {
  background: #fef2f2;
}

.ep-btn--sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ── Accessibility: Focus Visible ──────────────────────────────────────────────── */
.ep-tab:focus-visible {
  outline: 2px solid var(--emp-coral);
  outline-offset: 2px;
}
.ep-btn:focus-visible {
  outline: 2px solid var(--emp-coral);
  outline-offset: 2px;
}
.ep-chip-opt:focus-visible {
  outline: 2px solid var(--emp-coral);
  outline-offset: 2px;
}
.ep-input:focus-visible,
.ep-select:focus-visible,
.ep-textarea:focus-visible {
  outline: 2px solid var(--emp-coral);
  outline-offset: 2px;
}
.ep-type-opt:focus-visible {
  outline: 2px solid var(--emp-coral);
  outline-offset: 2px;
}
.ep-pill input:focus-visible + span {
  outline: 2px solid var(--emp-coral);
  outline-offset: 2px;
}
.ep-range:focus-visible {
  outline: 2px solid var(--emp-coral);
  outline-offset: 4px;
}

/* ── Responsive Breakpoints ─────────────────────────────────── */

/* Tablet: ≤ 860px */
@media (max-width: 860px) {
  .ep-wrap,
  .ep-catalogue-wrap {
    padding: 0 0 100px;
  }

  .ep-action-bar {
    padding: 12px 16px;
  }
}

/* Mobile: ≤ 640px */
@media (max-width: 640px) {
  .ep-wrap,
  .ep-catalogue-wrap {
    padding: 0 0 32px;
  }

  .ep-action-bar {
    position: static;
    padding: 12px 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-top: 1px solid var(--emp-border);
    margin-top: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ep-action-bar__nav {
    justify-content: flex-end;
  }

  .ep-tab__sub {
    display: none;
  }

  .ep-type-toggle {
    width: 100%;
  }

  .ep-type-opt {
    flex: 1;
    justify-content: center;
  }

  .ep-var-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ep-catalogue-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Very small screens: ≤ 400px */
@media (max-width: 400px) {
  .ep-var-grid {
    grid-template-columns: 1fr;
  }

  .ep-btn {
    font-size: 13px;
    padding: 8px 14px;
  }

  .ep-tab__label {
    font-size: 12px;
  }
}

/* ── Sizing card title row ── */
.ep-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ep-card__title-row .ep-card__title {
  margin-bottom: 0;
}
.ep-sizing-footer {
  margin-top: 10px;
}
.ep-sizing-row--manual .ep-sizing-row__name--editable {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* ── Size chart picker ── */
.ep-chart-picker {
  background: var(--emp-teal-light);
  border: 1px solid rgba(44, 95, 111, 0.2);
  border-radius: var(--emp-r-input);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.ep-chart-picker__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ep-chart-picker__row .ep-label {
  margin: 0;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}
.ep-chart-picker__row .ep-select {
  flex: 1;
  min-width: 160px;
}
.ep-chart-missing {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--emp-coral-dark, #B85C38);
}
.ep-chart-missing a {
  color: var(--emp-teal);
  font-weight: 600;
}

/* ── Sizing table ── */
.ep-sizing-hint {
  font-size: 12px;
  color: var(--emp-muted);
  margin: 0 0 12px;
}
.ep-sizing-row {
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-r-card);
  padding: 12px;
  margin-bottom: 10px;
  background: var(--emp-bg-card);
}
.ep-sizing-row__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 10px;
}
.ep-sizing-row__name .ep-attr-pill {
  background: var(--emp-coral-light);
  color: var(--emp-coral);
  cursor: default;
}
.ep-sizing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.ep-sizing-grid .ep-field { margin: 0; }
.ep-sizing-grid .ep-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--emp-charcoal);
  margin-bottom: 4px;
}

/* =============================================================
   WP MEDIA MODAL — light reskin
   ─────────────────────────────────────────────────────────────
   wp.media() renders WP core's own admin UI (wp-admin gray, default
   WP fonts) straight into the frontend page — this recolors it to
   Empyra's tokens without touching layout or behavior. Targets WP's
   own class names (.media-modal, .attachments-browser, etc.), which
   aren't a versioned public API, so keep this to colors/type/shape;
   don't depend on exact spacing surviving a core update.
   ============================================================= */

.media-modal-backdrop {
  background: var(--emp-charcoal);
  opacity: 0.75;
}

.media-modal {
  border-radius: var(--emp-r-card);
  overflow: hidden;
}

/* Cap the modal to a fixed, centered size instead of WP's default near-
   edge-to-edge fill (top/right/bottom/left: 30px). Left as WP's default
   on small screens — a fixed 900px/60vh box would be cramped on mobile.
   WP core's own positioning rule is scoped `.wp-core-ui .media-modal`
   (higher specificity than a bare `.media-modal`), so match that scope
   and use !important — this is overriding admin-injected core UI we
   don't control the cascade order of. */
@media (min-width: 700px) {
  .wp-core-ui .media-modal,
  .media-modal {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: 900px !important;
    max-width: calc(100vw - 40px) !important;
    height: 60vh !important;
    max-height: calc(100vh - 40px) !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
  }
}

.media-frame {
  font-family: inherit;
  color: var(--emp-charcoal);
}

.media-modal-close {
  background: var(--emp-bg-site);
  border-radius: 50%;
}

.media-modal-close .media-modal-icon {
  background-position: -30px 0;
}

/* One background across the whole frame — title bar, tabs, content, and
   sidebar all read as a single seamless surface instead of stacked white/
   cream panel blocks with hard divider lines between them. */
.media-frame-title,
.media-frame-router,
.media-frame-content,
.media-frame-toolbar,
.attachments-browser .attachments,
.media-sidebar,
.media-frame-menu {
  background: var(--emp-bg-site);
}

.media-frame-title,
.media-frame-router {
  border-bottom: none;
}

.media-frame-title h1 {
  font-family: var(--emp-font-heading, 'Playfair Display', Georgia, serif);
  font-weight: 700;
  color: var(--emp-charcoal);
}

.media-frame-menu-heading,
.media-menu-item {
  font-family: inherit;
  color: var(--emp-charcoal);
}

.media-router .media-menu-item.active {
  color: var(--emp-coral);
}

.media-toolbar-primary .media-button,
.media-toolbar-secondary .media-button {
  border-radius: var(--emp-r-btn);
  font-family: inherit;
  font-weight: 600;
  text-shadow: none;
  box-shadow: none;
}

.media-button.button-primary,
.media-frame-toolbar .media-button.button-primary,
.button.media-button.button-primary {
  background: var(--emp-coral);
  border-color: var(--emp-coral);
  color: var(--emp-white);
}

.media-button.button-primary:hover,
.button.media-button.button-primary:hover {
  background: color-mix(in srgb, var(--emp-coral) 88%, black);
  border-color: color-mix(in srgb, var(--emp-coral) 88%, black);
}

.media-button.button-primary:disabled,
.button.media-button.button-primary:disabled {
  background: var(--emp-border);
  border-color: var(--emp-border);
  color: var(--emp-muted);
}

/* Secondary buttons (Cancel, etc.) — only .button-primary was recolored
   before, leaving these as flat WP gray next to the new coral primary. */
.media-toolbar-primary .media-button:not(.button-primary),
.media-toolbar-secondary .media-button:not(.button-primary),
.media-frame-title .media-button {
  background: var(--emp-bg-card);
  border-color: var(--emp-border);
  color: var(--emp-charcoal);
}

.media-toolbar-primary .media-button:not(.button-primary):hover,
.media-toolbar-secondary .media-button:not(.button-primary):hover {
  border-color: var(--emp-coral);
  color: var(--emp-coral);
}

/* Active-tab underline (Upload files / Media Library) — text already goes
   coral, the indicator bar itself was still WP's default blue. */
.media-router .media-menu-item.active {
  box-shadow: inset 0 -2px var(--emp-coral);
}

/* Selected-thumbnail checkmark badge — WP default is a blue circle.
   Only recoloring the circle fill; the checkmark glyph itself is a
   dashicon we don't want to risk breaking with a guessed sprite offset. */
.attachment.selected .check {
  background-color: var(--emp-coral);
}

.media-toolbar .search,
.media-toolbar select.attachment-filters {
  border-radius: 8px;
  border-color: var(--emp-border);
  font-family: inherit;
}

.media-toolbar .search:focus,
.media-toolbar select.attachment-filters:focus {
  border-color: var(--emp-coral);
  box-shadow: 0 0 0 3px rgba(224, 120, 86, 0.15);
}

.attachment {
  border-radius: 12px;
}

.attachment .thumbnail {
  border-radius: 12px;
  overflow: hidden;
}

.attachment.details,
.attachment.selected .thumbnail::before {
  border-color: var(--emp-coral) !important;
}

.attachment-info .details .filename,
.attachment-info .settings .setting label {
  font-family: inherit;
}

/* Sidebar heading ("Attachment Details") — was still default WP admin
   sans, everywhere else in the modal that's a heading now uses Playfair. */
.attachment-details h2,
.media-sidebar h2 {
  font-family: var(--emp-font-heading, 'Playfair Display', Georgia, serif);
  font-weight: 700;
  color: var(--emp-charcoal);
}

/* Preview thumbnail + filename/date/size metadata block at the top of the
   sidebar — rounded corners to match every other image treatment in the
   form, muted text for the secondary details. */
.attachment-info .thumbnail,
.attachment-info .thumbnail img {
  border-radius: 8px;
}

.attachment-info .details .filename,
.attachment-info .details .uploaded,
.attachment-info .details .file-size,
.attachment-info .details .dimensions {
  color: var(--emp-muted);
}

.attachment-info .details .filename {
  color: var(--emp-charcoal);
  font-weight: 600;
}

/* "Edit more details" / "Delete permanently" links under the preview. */
.attachment-info .edit-attachment {
  color: var(--emp-teal);
}

.attachment-info .edit-attachment:hover {
  color: var(--emp-coral);
}

/* Sellers don't need the raw file URL or Alt Text field in this picker —
   internal/SEO details they don't act on here. Targets each setting row
   by its exact data-setting so Title/Caption/Description stay untouched. */
.attachment-details .setting[data-setting="url"],
.attachment-details .setting[data-setting="alt"],
.compat-item .setting[data-setting="url"],
.compat-item .setting[data-setting="alt"] {
  display: none;
}

/* Attachment Details panel (Title / Caption / Alt Text / Description,
   shown when you click a thumbnail) — the biggest remaining mismatch:
   still square WP admin fields with a blue focus ring next to our
   rounded cream inputs everywhere else in the form. */
.attachment-details .setting input[type="text"],
.attachment-details .setting textarea,
.compat-item .setting input[type="text"],
.compat-item .setting textarea {
  border-radius: 8px;
  border-color: var(--emp-border);
  background: var(--emp-bg-card);
  font-family: inherit;
  box-shadow: none;
}

.attachment-details .setting input[type="text"]:focus,
.attachment-details .setting textarea:focus,
.compat-item .setting input[type="text"]:focus,
.compat-item .setting textarea:focus {
  border-color: var(--emp-coral);
  box-shadow: 0 0 0 3px rgba(224, 120, 86, 0.15);
  outline: none;
}

.attachment-details .setting .name,
.compat-item .setting label {
  color: var(--emp-charcoal);
  font-weight: 600;
}

/* Dashicons (delete/trash icon, etc.) — default WP gray, no accent on
   the actions a seller actually uses. */
.media-frame .dashicons,
.delete-attachment,
.trash-attachment {
  color: var(--emp-muted);
}

.delete-attachment:hover,
.trash-attachment:hover {
  color: var(--emp-danger);
}

.media-uploader-status .media-progress-bar div {
  background: var(--emp-coral);
}

.uploader-inline .upload-ui .upload-instructions {
  font-family: var(--emp-font-heading, 'Playfair Display', Georgia, serif);
  color: var(--emp-charcoal);
}

.uploader-inline .drag-drop-inside .button {
  border-radius: var(--emp-r-btn);
}
.ep-sizing-grid .ep-input { width: 100%; }