/**
 * Vila Vez — Custom Embroidery Designer Styles
 * Luxury editorial palette matching House of Embroidery aesthetic
 */

/* Step Tracker */
.designer-steps-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0 2.5rem;
  flex-wrap: wrap;
}

.designer-step-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #8a6b54;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.designer-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #d7cabb;
  font-size: 0.75rem;
  font-weight: 600;
  color: #8a6b54;
  background: #ffffff;
}

.designer-step-item.active {
  color: #633b21;
  font-weight: 700;
}

.designer-step-item.active .designer-step-num {
  background: #633b21;
  color: #ffffff;
  border-color: #633b21;
}

.designer-step-divider {
  width: 24px;
  height: 1px;
  background: #d7cabb;
}

/* Category Filter Bar */
.designer-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(215, 202, 187, 0.6);
}

.designer-category-pills {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.designer-pill-btn {
  background: #ffffff;
  border: 1px solid #d7cabb;
  color: #633b21;
  padding: 0.55rem 1.25rem;
  border-radius: 30px;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.04em;
}

.designer-pill-btn:hover {
  border-color: #633b21;
  background: rgba(99, 59, 33, 0.04);
}

.designer-pill-btn.active {
  background: #633b21;
  color: #ffffff;
  border-color: #633b21;
  box-shadow: 0 2px 8px rgba(99, 59, 33, 0.18);
}

.designer-search-wrap {
  position: relative;
  min-width: 240px;
}

.designer-search-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.25rem;
  border: 1px solid #d7cabb;
  border-radius: 30px;
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  color: #633b21;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}

.designer-search-input:focus {
  border-color: #633b21;
}

.designer-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8a6b54;
  pointer-events: none;
}

/* Products Grid */
.designer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

/* Product Card */
.designer-card {
  background: #ffffff;
  border: 1px solid #d7cabb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
}

.designer-card:hover {
  transform: translateY(-4px);
  border-color: #bfa895;
  box-shadow: 0 10px 28px rgba(99, 59, 33, 0.08);
}

.designer-card.selected {
  border: 2px solid #633b21;
  box-shadow: 0 0 0 4px rgba(99, 59, 33, 0.12), 0 12px 32px rgba(99, 59, 33, 0.12);
}

.designer-card-selected-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #633b21;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.designer-card.selected .designer-card-selected-badge {
  display: flex;
}

.designer-img-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #f7f3ee;
  position: relative;
  overflow: hidden;
}

.designer-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.designer-card:hover .designer-img-box img {
  transform: scale(1.04);
}

.designer-card-category-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(254, 250, 238, 0.94);
  backdrop-filter: blur(4px);
  color: #633b21;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  border: 1px solid rgba(215, 202, 187, 0.6);
}

.designer-card-content {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.designer-card-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.35rem;
  color: #633b21;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.designer-card-price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #633b21;
  margin-bottom: 0.75rem;
}

.designer-card-price span {
  font-size: 0.8rem;
  font-weight: 400;
  color: #8a6b54;
}

.designer-card-desc {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.02rem;
  color: #5c4738;
  line-height: 1.45;
  margin: 0 0 1.2rem;
  flex: 1;
}

/* Colors & Placement previews */
.designer-card-meta {
  border-top: 1px solid #f0e8de;
  padding-top: 0.85rem;
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.designer-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.designer-meta-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a6b54;
}

.designer-color-chips,
.designer-variant-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.designer-color-chip {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  background: #fefaee;
  border: 1px solid #e0d5c5;
  color: #633b21;
  padding: 2px 7px;
  border-radius: 12px;
}

.designer-chip-btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  background: #fdfbf7;
  border: 1px solid #d7cabb;
  color: #633b21;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.designer-chip-btn:hover {
  border-color: #633b21;
  background: #fbf7f2;
}

.designer-chip-btn.active {
  background: #633b21;
  color: #ffffff;
  border-color: #633b21;
  font-weight: 600;
}

.designer-chip-delta {
  font-size: 0.65rem;
  background: rgba(99, 59, 33, 0.12);
  color: #633b21;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

.designer-chip-btn.active .designer-chip-delta {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.designer-chip-btn.sold-out {
  background: #f7f4f0 !important;
  border-color: #e5ded4 !important;
  color: #a8988a !important;
  cursor: not-allowed;
  opacity: 0.85;
}

.designer-chip-btn.sold-out:hover {
  border-color: #e5ded4 !important;
  background: #f7f4f0 !important;
}

.designer-chip-sold-out-tag {
  font-size: 0.62rem;
  font-weight: 700;
  color: #c62828;
  background: #ffebee;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.designer-card.sold-out {
  opacity: 0.92;
}

.designer-card.sold-out .designer-select-btn {
  background: #f0eae1;
  color: #8c7866;
  border-color: #ded5c7;
  cursor: not-allowed;
}

.designer-card.sold-out .designer-select-btn:hover {
  background: #f0eae1;
  color: #8c7866;
  border-color: #ded5c7;
  transform: none;
  box-shadow: none;
}

.designer-card-soldout-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(198, 40, 40, 0.94);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.designer-selected-variant-badge {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  background: #f6efe6;
  border: 1px solid #dfd3c3;
  color: #633b21;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 3px;
  font-weight: 500;
}

/* Card Button */
.designer-select-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: #ffffff;
  border: 1px solid #633b21;
  color: #633b21;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.designer-card:hover .designer-select-btn {
  background: #633b21;
  color: #ffffff;
}

.designer-card.selected .designer-select-btn {
  background: #633b21;
  color: #ffffff;
}

/* Sticky Bottom Summary Bar */
.designer-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #d7cabb;
  box-shadow: 0 -4px 20px rgba(99, 59, 33, 0.1);
  padding: 1rem 1.5rem;
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.designer-bottom-bar.active {
  transform: translateY(0);
}

.designer-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.designer-selected-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.designer-selected-thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #d7cabb;
}

.designer-selected-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.2rem;
  color: #633b21;
  font-weight: 600;
  margin: 0;
}

.designer-selected-price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  color: #8a6b54;
  margin: 0;
}

.designer-continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #633b21;
  color: #ffffff;
  border: 1px solid #633b21;
  padding: 0.85rem 1.8rem;
  border-radius: 4px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(99, 59, 33, 0.2);
}

.designer-continue-btn:hover {
  background: #4a2b17;
  border-color: #4a2b17;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99, 59, 33, 0.28);
}

.designer-continue-btn:disabled,
.designer-continue-btn.disabled {
  background: #d4c8ba !important;
  border-color: #d4c8ba !important;
  color: #7d6b5c !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Empty State / Loading State */
.designer-loading-box,
.designer-empty-box {
  text-align: center;
  padding: 4rem 1rem;
  font-family: 'EB Garamond', Georgia, serif;
  color: #8a6b54;
  font-size: 1.25rem;
  grid-column: 1 / -1;
}

.designer-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(99, 59, 33, 0.15);
  border-top-color: #633b21;
  border-radius: 50%;
  animation: designer-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes designer-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   STEP 2: CUSTOMIZER STYLES (House of Embroidery Split Studio Experience)
   ========================================================================== */

/* 1. Compact Canvas Summary Bar (Step 1 Selection Carry-over) */
.designer-canvas-summary-bar {
  background: #ffffff;
  border: 1px solid #d7cabb;
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 4px 14px rgba(99, 59, 33, 0.04);
}

.summary-canvas-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.summary-canvas-thumb {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #d7cabb;
  background: #faf6f0;
}

.summary-canvas-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.summary-canvas-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.summary-canvas-title {
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #633b21;
  margin: 0;
}

.summary-canvas-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a6b54;
  background: #f4ecdf;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.summary-canvas-meta {
  font-size: 0.82rem;
  color: #7a5c43;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.summary-canvas-meta strong {
  color: #633b21;
}

.btn-change-canvas {
  background: transparent;
  border: 1px solid #d7cabb;
  color: #633b21;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-change-canvas:hover {
  background: #fdfaf6;
  border-color: #633b21;
  transform: translateX(-2px);
}

/* 2. Split Studio Layout */
.customizer-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(340px, 1fr);
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 5rem;
}

/* 3. Left Column: Live Canvas Mockup Stage */
.customizer-preview-col {
  position: sticky;
  top: 1.5rem;
}

.customizer-mockup-card {
  background: #ffffff;
  border: 1px solid #d7cabb;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(99, 59, 33, 0.08);
}

.customizer-mockup-header {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f0e8de;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #faf6f0;
}

.mockup-header-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8a6b54;
}

.mockup-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #2e7d32;
  background: #e8f5e9;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}

.mockup-live-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #2e7d32;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.customizer-mockup-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 420px;
  background-color: #ffffff;
  /* Authentic Atelier Fine Linen Fabric Texture */
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(253, 252, 250, 0.95) 0%, rgba(248, 245, 240, 0.6) 100%),
    repeating-linear-gradient(0deg, rgba(215, 202, 187, 0.12) 0px, rgba(215, 202, 187, 0.12) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(215, 202, 187, 0.12) 0px, rgba(215, 202, 187, 0.12) 1px, transparent 1px, transparent 4px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 35px rgba(99, 59, 33, 0.03);
}

.atelier-canvas-inner-frame {
  position: absolute;
  inset: 20px;
  border: 1px dashed rgba(179, 141, 76, 0.3);
  border-radius: 6px;
  pointer-events: none;
}

.atelier-canvas-watermark {
  position: absolute;
  bottom: 12px;
  right: 18px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(138, 107, 84, 0.35);
  pointer-events: none;
}

.canvas-product-pill {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.70rem;
  font-weight: 600;
  color: #633b21;
  background: #f4ecdf;
  padding: 2px 10px;
  border-radius: 12px;
  letter-spacing: 0.04em;
  border: 1px solid #ebd9c8;
}

/* Realistic Embroidery Stitched Effect */
.embroidery-render-zone {
  position: absolute;
  pointer-events: none;
  user-select: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.embroidery-stitch-effect {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pes-monogram-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: auto;
}

.pes-monogram-container.has-crest {
  position: relative;
  width: 320px;
  height: 320px;
}

.pes-monogram-crest-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.pes-crest-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(35, 18, 8, 0.22));
}

.pes-monogram-container.has-crest .pes-monogram-composite {
  position: relative;
  z-index: 2;
  transform: scale(0.68);
}

/* PES Monogram Composite: Side-by-side stitch rendering */
.pes-monogram-composite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 18px;
  user-select: none;
  position: relative;
  transition: gap 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.pes-letter-col {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative;
  cursor: grab;
  user-select: none;
  touch-action: none;
  pointer-events: auto;
  transition: transform 0.15s ease-out;
}

.pes-letter-col:hover {
  filter: drop-shadow(0 0 5px rgba(179, 141, 76, 0.35));
}

.pes-letter-col.dragging {
  cursor: grabbing !important;
  transition: none;
  z-index: 12;
  filter: drop-shadow(0 4px 8px rgba(99, 59, 33, 0.25));
}

.pes-letter-col.center-large {
  z-index: 2;
}

.pes-letter-svg-item {
  display: block;
  width: auto;
  height: 112px;
  max-width: 140px;
  /* Crystal-clear vector rendering with zero blur */
  shape-rendering: geometricPrecision;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translateZ(0);
  pointer-events: none;
}

.pes-letter-col.center-large .pes-letter-svg-item {
  height: 156px;
  max-width: 190px;
}

/* Monogram Spacing Control Bar Directly Under the Letters */
.monogram-letter-spacing-bar {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.94);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid #d7cabb;
  box-shadow: 0 3px 10px rgba(99, 59, 33, 0.08);
  pointer-events: auto;
  user-select: none;
  z-index: 15;
}

.spacing-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #faf7f2;
  border: 1px solid #e0d4c5;
  color: #633b21;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
}

.spacing-btn:hover {
  background: #633b21;
  color: #ffffff;
  border-color: #633b21;
  transform: translateY(-1px);
}

.spacing-btn:active {
  transform: translateY(0);
}

.spacing-btn svg {
  flex-shrink: 0;
}

.spacing-btn.reset-btn {
  background: transparent;
  border-color: transparent;
  color: #8a6b54;
  font-size: 0.7rem;
  padding: 4px 8px;
}

.spacing-btn.reset-btn:hover {
  background: #f0e8de;
  color: #633b21;
}

.pes-letter-stitch-fallback {
  font-size: 5rem;
  line-height: 1;
  font-weight: 700;
  filter: drop-shadow(1px 2px 2px rgba(35, 18, 8, 0.35));
}

/* Active PES Font Gallery */
.pes-font-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.pes-font-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border: 1.5px solid #d7cabb;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pes-font-card:hover {
  border-color: #633b21;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 59, 33, 0.08);
}

.pes-font-card.active {
  border-color: #633b21;
  background: #fdfaf7;
  box-shadow: 0 0 0 1px #633b21, 0 4px 14px rgba(99, 59, 33, 0.12);
}

.pes-font-card-preview {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #faf7f2;
  border-radius: 6px;
  border: 1px solid #ebd9c8;
}

.pes-font-card-preview svg,
.pes-font-card-preview img {
  max-width: 42px;
  max-height: 42px;
  height: auto;
  object-fit: contain;
}

.pes-font-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pes-font-card-badge {
  font-size: 0.72rem;
  color: #8a6b54;
  font-weight: 600;
}

/* PES Active Letters Quick Bar */
.pes-active-letters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0.65rem;
  padding: 0.55rem 0.85rem;
  background: #faf7f2;
  border: 1px solid #ebd9c8;
  border-radius: 6px;
}

.pes-active-letters-label {
  font-size: 0.75rem;
  color: #633b21;
  font-weight: 600;
}

.pes-letter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pes-letter-chip {
  background: #ffffff;
  border: 1px solid #d7cabb;
  color: #633b21;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 2px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pes-letter-chip:hover {
  background: #633b21;
  color: #ffffff;
  border-color: #633b21;
}

.embroidery-text-render {
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25), 0 0 1px rgba(255, 255, 255, 0.4);
}

.embroidery-motif-render {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.embroidery-motif-render svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.8;
  filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.25));
}

/* Placement Pin Indicators (Hidden for pristine canvas stage) */
.placement-pin-marker,
.placement-pin-label {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Mockup Footer Info */
.customizer-mockup-footer {
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid #f0e8de;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #7a5c43;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.customizer-mockup-footer strong {
  color: #633b21;
}

/* 4. Right Column: Customizer Controls Panel */
.customizer-controls-col {
  background: #ffffff;
  border: 1px solid #d7cabb;
  border-radius: 8px;
  padding: 1.75rem 2rem;
  box-shadow: 0 8px 28px rgba(99, 59, 33, 0.04);
}

.customizer-section-title {
  font-family: 'EB Garamond', serif;
  font-size: 1.35rem;
  color: #633b21;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.customizer-section-subtitle {
  font-size: 0.8rem;
  color: #8a6b54;
  margin-bottom: 1.25rem;
}

/* Mode Selection Tabs (Category-Aware: Monogram / Text / Motif) */
.customizer-mode-tabs {
  display: flex;
  gap: 0.5rem;
  background: #faf6f0;
  border: 1px solid #d7cabb;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 1.75rem;
}

.customizer-mode-tab {
  flex: 1;
  padding: 0.65rem 0.8rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #7a5c43;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.customizer-mode-tab:hover {
  color: #633b21;
  background: rgba(99, 59, 33, 0.05);
}

.customizer-mode-tab.active {
  background: #ffffff;
  color: #633b21;
  box-shadow: 0 2px 8px rgba(99, 59, 33, 0.1);
  font-weight: 700;
}

/* Control Groups */
.customizer-group {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0e8de;
}

.customizer-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.customizer-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #633b21;
  margin-bottom: 0.6rem;
}

.customizer-label-hint {
  font-size: 0.72rem;
  color: #8a6b54;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

/* Monogram Format Selector (Single, 2-Letter, 3-Letter Diamond) */
.monogram-format-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.monogram-format-btn {
  background: #ffffff;
  border: 1px solid #d7cabb;
  color: #7a5c43;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.monogram-format-btn:hover {
  border-color: #633b21;
  color: #633b21;
}

.monogram-format-btn.active {
  background: #633b21;
  border-color: #633b21;
  color: #ffffff;
}

/* Monogram & Text Inputs */
.monogram-inputs-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.monogram-letter-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.monogram-letter-box span {
  font-size: 0.7rem;
  color: #8a6b54;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.monogram-char-input {
  width: 100%;
  height: 52px;
  border: 1.5px solid #d7cabb;
  border-radius: 6px;
  font-family: 'EB Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  color: #633b21;
  background: #ffffff;
  outline: none;
  text-transform: uppercase;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.monogram-char-input:focus {
  border-color: #633b21;
  box-shadow: 0 0 0 3px rgba(99, 59, 33, 0.12);
}

.custom-text-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #d7cabb;
  border-radius: 6px;
  font-family: 'EB Garamond', serif;
  font-size: 1.3rem;
  color: #633b21;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}

.custom-text-input:focus {
  border-color: #633b21;
  box-shadow: 0 0 0 3px rgba(99, 59, 33, 0.12);
}

/* Font Style Cards Grid */
.font-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.font-card {
  background: #ffffff;
  border: 1.5px solid #d7cabb;
  border-radius: 6px;
  padding: 0.75rem 0.6rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.font-card:hover {
  border-color: #b89f89;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 59, 33, 0.08);
}

.font-card.active {
  border-color: #633b21;
  background: #fdfaf6;
  box-shadow: 0 0 0 2px #633b21;
}

.font-sample-preview {
  font-size: 1.6rem;
  color: #633b21;
  line-height: 1.2;
  margin: 0.25rem 0;
  text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}

.font-card-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a5c43;
}

/* Motifs Gallery Grid */
.motifs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.motif-card {
  background: #ffffff;
  border: 1.5px solid #d7cabb;
  border-radius: 6px;
  padding: 0.75rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.motif-card:hover {
  border-color: #b89f89;
  transform: translateY(-2px);
}

.motif-card.active {
  border-color: #633b21;
  background: #fdfaf6;
  box-shadow: 0 0 0 2px #633b21;
}

.motif-svg-wrap {
  width: 38px;
  height: 38px;
  color: #633b21;
  display: flex;
  align-items: center;
  justify-content: center;
}

.motif-card-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: #7a5c43;
  line-height: 1.2;
}

/* Lookbook Reference Trigger Button */
.btn-lookbook-trigger {
  background: #faf6f0;
  border: 1px dashed #bfa895;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lookbook-trigger:hover {
  background: #fefaee;
  border-color: #633b21;
}

/* Placement Options Pills */
.placement-pills-wrap {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.placement-pill-btn {
  background: #ffffff;
  border: 1.5px solid #d7cabb;
  border-radius: 20px;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #633b21;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.placement-pill-btn:hover {
  border-color: #633b21;
}

.placement-pill-btn.active {
  background: #633b21;
  border-color: #633b21;
  color: #ffffff;
}

/* Silk Thread Palette */
.thread-palette-grid {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.thread-swatch-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  outline: 1.5px solid #d7cabb;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.thread-swatch-btn:hover {
  transform: scale(1.15);
  outline-color: #633b21;
}

.thread-swatch-btn.active {
  transform: scale(1.2);
  outline: 2px solid #633b21;
  box-shadow: 0 0 0 3px rgba(99, 59, 33, 0.25);
}

/* Custom Lookbook Modal */
.lookbook-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 26, 14, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.lookbook-modal-box {
  background: #ffffff;
  border: 1px solid #d7cabb;
  border-radius: 8px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.lookbook-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f0e8de;
}

/* Responsive Customizer Layout */
@media (max-width: 960px) {
  .customizer-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .customizer-preview-col {
    position: relative;
    top: 0;
  }
}

@media (max-width: 640px) {
  .customizer-controls-col {
    padding: 1.25rem 1rem;
  }
  .designer-canvas-summary-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-change-canvas {
    width: 100%;
    justify-content: center;
  }
  .monogram-char-input {
    height: 46px;
    font-size: 1.5rem;
  }
}

