.designer-page {
  background: linear-gradient(180deg, #f7faf9 0%, #fffaf6 48%, #ffffff 100%);
  color: #24302f;
  padding: 28px 0 64px;
}

.designer-wrap {
  max-width: 1240px;
}

.designer-breadcrumb {
  align-items: center;
  color: #687675;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  gap: 8px;
  margin-bottom: 22px;
}

.designer-breadcrumb a {
  color: #0f766e;
  text-decoration: none;
}

.designer-hero {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 26px;
}

.designer-kicker {
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.designer-hero h1 {
  color: #17201f;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 1.02;
  margin: 0;
}

.designer-hero p {
  color: #596765;
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 14px 0 0;
  max-width: 690px;
}

.designer-hero-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.designer-hero-stats div {
  background: #17201f;
  border-radius: 8px;
  color: #ffffff;
  min-width: 128px;
  padding: 16px 18px;
}

.designer-hero-stats span {
  color: #b8c8c5;
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.designer-hero-stats strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

.designer-workbench {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.designer-stage-panel,
.designer-control-panel,
.designer-library {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dce7e4;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(23, 32, 31, 0.08);
}

.designer-stage-panel {
  overflow: hidden;
}

.designer-stage-toolbar {
  align-items: center;
  border-bottom: 1px solid #e4ecea;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 18px;
}

.designer-stage-toolbar span,
.designer-block-title,
.designer-slot-head span {
  color: #60706e;
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.designer-stage-toolbar strong {
  color: #1f2928;
  display: block;
  font-size: 1rem;
  margin-top: 4px;
}

.designer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.designer-tool-btn,
.designer-link-btn {
  align-items: center;
  background: #f1f7f6;
  border: 1px solid #cfdedb;
  border-radius: 8px;
  color: #1f4f4b;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.designer-tool-btn:hover,
.designer-link-btn:hover {
  background: #e5f3f1;
}

.designer-tool-btn.danger {
  background: #fff4f2;
  border-color: #f0c4bd;
  color: #a43a2c;
}

.designer-stage {
  aspect-ratio: 1.31 / 1;
  background: radial-gradient(circle at 50% 45%, #ffffff 0, #f8f1ea 62%, #eef7f5 100%);
  min-height: 420px;
  position: relative;
}

.designer-stage svg {
  display: block;
  height: 100%;
  width: 100%;
}

.designer-slot-head {
  align-items: center;
  border-top: 1px solid #e4ecea;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 16px 0;
}

.designer-slot-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  max-height: 166px;
  overflow: auto;
  padding: 12px 16px 18px;
}

.designer-slot {
  align-items: center;
  aspect-ratio: 1;
  background: #ffffff;
  border: 1px dashed #c7d5d2;
  border-radius: 8px;
  color: #60706e;
  cursor: pointer;
  display: flex;
  font-size: 0.75rem;
  font-weight: 800;
  justify-content: center;
  min-width: 0;
  padding: 4px;
}

.designer-slot img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.designer-slot.filled {
  border-style: solid;
}

.designer-slot.active {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.designer-control-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  position: sticky;
  top: 16px;
}

.designer-control-block {
  display: grid;
  gap: 10px;
}

.designer-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.designer-control-block label {
  color: #60706e;
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 8px;
  text-transform: uppercase;
}

.designer-control-block select,
.designer-filters select,
.designer-filters input {
  background: #ffffff;
  border: 1px solid #cfdedb;
  border-radius: 8px;
  color: #1f2928;
  font: inherit;
  min-height: 44px;
  padding: 0 12px;
  width: 100%;
}

.designer-segment,
.designer-preset-grid {
  display: grid;
  gap: 8px;
}

.designer-segment {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.designer-preset-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.designer-segment button,
.designer-preset-grid button {
  background: #f6faf9;
  border: 1px solid #d3e2df;
  border-radius: 8px;
  color: #2a3937;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  min-height: 44px;
  padding: 0 10px;
}

.designer-segment button.active,
.designer-preset-grid button:hover {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.designer-summary {
  background: #f7faf9;
  border: 1px solid #dce7e4;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.designer-summary-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.designer-summary-row span {
  color: #60706e;
}

.designer-summary-row strong {
  color: #1f2928;
}

.designer-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
}

.designer-materials span,
.custom-chip {
  background: #ffffff;
  border: 1px solid #dce7e4;
  border-radius: 999px;
  color: #41514f;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 9px;
}

.designer-materials .muted {
  color: #7f8c8a;
}

.designer-add-btn {
  min-height: 52px;
}

.designer-add-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.designer-library {
  margin-top: 22px;
  padding: 18px;
}

.designer-library-head {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: 260px minmax(0, 1fr);
  margin-bottom: 18px;
}

.designer-library h2 {
  color: #17201f;
  font-size: 1.55rem;
  margin: 0 0 4px;
}

.designer-library p {
  color: #60706e;
  margin: 0;
}

.designer-filters {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(130px, 160px));
}

.designer-bead-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.designer-bead-card {
  background: #ffffff;
  border: 1px solid #dce7e4;
  border-radius: 8px;
  color: #263331;
  cursor: pointer;
  display: grid;
  gap: 8px;
  min-height: 190px;
  padding: 12px;
  text-align: left;
}

.designer-bead-card:hover,
.designer-bead-card.selected {
  border-color: #0f766e;
  box-shadow: 0 10px 26px rgba(15, 118, 110, 0.14);
}

.designer-bead-img {
  align-items: center;
  background: linear-gradient(135deg, #f6faf9, #fff7ed);
  border-radius: 8px;
  display: flex;
  height: 78px;
  justify-content: center;
}

.designer-bead-img img {
  height: 64px;
  object-fit: contain;
  width: 64px;
}

.designer-bead-name {
  color: #1f2928;
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  min-height: 2.4em;
}

.designer-bead-meta {
  color: #60706e;
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
}

.designer-bead-card strong {
  color: #9d6b1f;
  display: block;
  font-size: 0.94rem;
}

.designer-empty-library {
  border: 1px dashed #cfdedb;
  border-radius: 8px;
  color: #60706e;
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
}

.designer-toast {
  background: #17201f;
  border-radius: 8px;
  bottom: 24px;
  box-shadow: 0 14px 34px rgba(23, 32, 31, 0.2);
  color: #ffffff;
  font-weight: 800;
  left: 50%;
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 14px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1000;
}

.designer-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.designer-toast.error {
  background: #a43a2c;
}

.custom-design-meta,
.checkout-custom-detail,
.order-custom-detail {
  color: #53615f;
  display: grid;
  font-size: 0.9rem;
  gap: 8px;
  margin-top: 10px;
}

.custom-design-specs,
.custom-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.custom-design-specs span {
  background: #f1f7f6;
  border-radius: 999px;
  color: #234f4b;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 9px;
}

.custom-bead-list {
  color: #53615f;
  font-size: 0.84rem;
  line-height: 1.6;
  margin: 0;
  max-width: 720px;
  padding-left: 18px;
}

.custom-bead-list li::marker {
  color: #0f766e;
  font-weight: 800;
}

.custom-design-meta details summary,
.checkout-custom-detail details summary,
.order-custom-detail details summary {
  color: #0f766e;
  cursor: pointer;
  font-weight: 800;
}

@media (max-width: 1080px) {
  .designer-workbench,
  .designer-library-head {
    grid-template-columns: 1fr;
  }

  .designer-control-panel {
    position: static;
  }

  .designer-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .designer-page {
    padding-top: 18px;
  }

  .designer-hero {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .designer-hero h1 {
    font-size: 2.35rem;
  }

  .designer-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .designer-stage-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .designer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .designer-stage {
    min-height: 330px;
  }

  .designer-two-col,
  .designer-segment,
  .designer-filters {
    grid-template-columns: 1fr;
  }

  .designer-slot-strip {
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  }

  .designer-bead-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .designer-bead-card {
    min-height: 178px;
  }
}
