.hidden {
  display: none !important;
}

.diamond-page {
  background: linear-gradient(180deg, #f6f1e7 0%, #efe7d8 100%);
  padding: 1.4rem 1rem 2.8rem;
}

.diamond-certificate {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.15rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 248, 240, 0.98) 100%);
  border: 1px solid rgba(216, 204, 184, 0.55);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(74, 60, 38, 0.05);
  position: relative;
  overflow: hidden;
}

.diamond-certificate::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(176, 138, 76, 0.12);
  border-radius: 12px;
  pointer-events: none;
}

.diamond-certificate-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(176, 138, 76, 0.12);
}

.diamond-heading-block {
  max-width: 34rem;
}

.diamond-kicker {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: #8a6a2f;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.diamond-title {
  margin: 0;
  color: #1f2d3a;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.diamond-subtitle {
  margin: 0.65rem 0 0;
  color: #5f6773;
  font-size: 0.96rem;
  line-height: 1.55;
}

.diamond-share-row {
  margin: 0;
}

.diamond-edit-btn {
  color: #2b3440;
}

.diamond-edit-btn,
.diamond-edit-save {
  border-color: rgba(176, 138, 76, 0.28);
}

.diamond-edit-save {
  background: #1f2d3a;
  color: #fff;
}

.diamond-edit-current {
  margin-right: auto;
}

.diamond-edit-save:hover,
.diamond-edit-save:focus-visible {
  background: #15202a;
  color: #fff;
}

.diamond-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.diamond-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(2px);
}

.diamond-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 30rem);
  padding: 1.1rem 1.1rem 1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(252, 248, 240, 0.99) 100%);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
  border: 1px solid rgba(216, 204, 184, 0.8);
}

.diamond-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 45, 58, 0.06);
  color: #4b5563;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.diamond-modal-copy {
  padding-right: 2.25rem;
}

.diamond-modal-kicker {
  display: inline-block;
  color: #8a6a2f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.diamond-modal-title {
  margin: 0.38rem 0 0;
  color: #15202a;
  font-size: 1.35rem;
  line-height: 1.15;
}

.diamond-modal-text {
  margin: 0.55rem 0 0;
  color: #5f6773;
  font-size: 0.94rem;
  line-height: 1.5;
}

.diamond-edit-form {
  margin-top: 1rem;
}

.diamond-edit-label {
  display: block;
  color: #1f2d3a;
  font-size: 0.88rem;
  font-weight: 700;
}

.diamond-edit-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.45rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(216, 204, 184, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.diamond-edit-currency {
  color: #8a6a2f;
  font-size: 1.1rem;
  font-weight: 700;
}

.diamond-edit-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #15202a;
  font-size: 1.25rem;
  font-weight: 700;
  outline: none;
}

.diamond-edit-input::placeholder {
  color: #9ca3af;
}

.diamond-edit-hint {
  margin: 0.55rem 0 0;
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.45;
}

.diamond-edit-error {
  margin: 0.55rem 0 0;
  color: #b42318;
  font-size: 0.83rem;
  font-weight: 600;
}

.diamond-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

body.diamond-modal-open {
  overflow: hidden;
}

.diamond-summary-label,
.diamond-spec-label,
.diamond-section-title {
  display: block;
  color: #7a7f89;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.diamond-summary-value {
  display: block;
  margin-top: 0.35rem;
  color: #1f2d3a;
  font-size: 1.1rem;
  font-weight: 700;
}

.diamond-price-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(250px, 0.9fr);
  gap: 0.85rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.diamond-price-main,
.diamond-delta-panel,
.diamond-spec-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
}

.diamond-price-main {
  padding: 1.1rem 1.15rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 251, 244, 0.88) 100%);
  box-shadow: inset 0 0 0 1px rgba(228, 217, 199, 0.45);
}

.diamond-price-total-line {
  display: flex;
  align-items: flex-start;
  gap: 0.28rem;
  margin-top: 0.45rem;
}

.diamond-price-currency {
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
  color: #8a6a2f;
  margin-top: 0.35rem;
}

.diamond-price-total-value {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: #15202a;
}

.diamond-price-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.7rem;
  color: #626b78;
  font-size: 0.88rem;
}

.diamond-price-meta strong {
  color: #1f2d3a;
}

.diamond-price-meta-sep {
  color: #b08a4c;
}

.diamond-delta-panel {
  padding: 1rem 1.05rem;
  background: rgba(250, 245, 236, 0.9);
  box-shadow: inset 0 0 0 1px rgba(228, 217, 199, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.diamond-delta-headline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.38rem;
}

.diamond-delta-icon {
  flex: 0 0 auto;
  font-size: 1.15rem;
  line-height: 1;
  color: #7a7f89;
}

.diamond-delta-hero {
  display: block;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.02;
  font-weight: 700;
}

.diamond-delta-context {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.8rem;
  color: #4f5966;
  font-size: 0.86rem;
}

.diamond-delta-context-muted {
  margin-top: 0.35rem;
  color: #6a7380;
}

.diamond-delta-absolute {
  margin-top: 0.4rem;
  color: #7a7f89;
  font-size: 0.8rem;
  font-weight: 600;
}

.diamond-delta-value.is-up {
  color: #0f8a4b;
}

.diamond-delta-value.is-down {
  color: #b42318;
}

.diamond-delta-value.is-flat {
  color: #7a7f89;
}

.diamond-delta-icon.is-up {
  color: #0f8a4b;
}

.diamond-delta-icon.is-down {
  color: #b42318;
}

.diamond-delta-icon.is-flat {
  color: #7a7f89;
}

.diamond-spec-section {
  position: relative;
  z-index: 1;
  padding: 0.2rem 0 0;
}

.diamond-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.7rem;
}

.diamond-spec-card {
  padding: 0.95rem 1rem;
  box-shadow: inset 0 0 0 1px rgba(228, 217, 199, 0.35);
}

.diamond-spec-card-wide {
  grid-column: 1 / -1;
}

.diamond-spec-value {
  display: block;
  margin-top: 0.4rem;
  color: #111827;
  font-size: 1.08rem;
  font-weight: 700;
}

.diamond-back-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: #1f2d3a;
  color: #fff;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.diamond-back-link:hover,
.diamond-back-link:focus-visible {
  background: #15202a;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(31, 45, 58, 0.16);
}

@media (min-width: 640px) {
  .diamond-heading-block {
    padding: 0.9rem 1rem 0.85rem;
  }

  .diamond-spec-section {
    padding: 0.8rem 1rem 0.15rem;
  }
}

@media (max-width: 639px) {
  .diamond-page {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .diamond-certificate {
    padding: 1rem 1.25rem;
    border-radius: 14px;
  }

  .diamond-certificate::before {
    inset: 10px;
  }

  .diamond-price-hero {
    grid-template-columns: 1fr;
  }

  .diamond-price-total-value {
    font-size: 2.8rem;
  }

  .diamond-spec-grid {
    grid-template-columns: 1fr;
  }

  .diamond-edit-actions {
    flex-direction: column-reverse;
  }

  .diamond-edit-actions .consumer-share-btn {
    width: 100%;
    justify-content: center;
  }

  .diamond-edit-current {
    margin-right: 0;
  }
}
