/*
 * Drop by Drop – "Create my fragrance" (templates/compose.php)
 * Realistic bottle stage on the left, configurator on the right.
 */

.page-id-1516 .main-page-wrapper {
  padding-top: 0;
  background: #f6f3ee;
}

.page-id-1516 .wd-content-layout {
  padding-bottom: 0;
}

.dbd-cp {
  padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 110px);
}

/* ---------- Head ---------- */
.dbd-cp-head {
  max-width: 760px;
  margin: 0 auto clamp(32px, 5vw, 56px);
  padding: 0 20px;
  text-align: center;
}

.dbd-cp-head .dbd-title {
  font-size: clamp(40px, 5.4vw, 68px);
}

.dbd-cp-lead {
  max-width: 560px;
  margin: 18px auto 0 !important;
  color: var(--dbd-muted);
  font-size: 18px;
}

/* ---------- Layout ---------- */
.dbd-cp-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.4fr);
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
  max-width: var(--dbd-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Bottle stage ---------- */
.dbd-cp-stage {
  position: sticky;
  top: 100px;
}

.dbd-cp-stage-inner {
  position: relative;
  overflow: hidden;
  padding: 28px 24px 24px;
  border-radius: 28px;
  background:
    radial-gradient(420px 320px at 50% 30%, rgba(255, 236, 205, 0.95), rgba(255, 236, 205, 0) 70%),
    linear-gradient(180deg, #efe6d8 0%, #e3d5c0 72%, #d6c4aa 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 30px 60px -30px rgba(70, 45, 20, 0.35);
}

/* Table edge under the bottle. */
.dbd-cp-stage-inner::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(120, 85, 45, 0.12));
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.dbd-cp-bottle {
  position: relative;
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
  transform-origin: 50% 94%;
  transform: scale(0.9);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dbd-cp.is-large .dbd-cp-bottle {
  transform: scale(1);
}

/* Gentle idle float of the whole bottle. */
.dbd-cp.is-ready .dbd-cp-bottle {
  animation: dbd-cp-float 6s ease-in-out infinite;
}

@keyframes dbd-cp-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

.dbd-cp-label-brand {
  fill: #6b4f22;
  font-family: "Satoshi", Arial, sans-serif;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 2.4px;
}

.dbd-cp-label-name {
  fill: #2a2420;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 19px;
  font-style: italic;
  font-weight: 600;
}

.dbd-cp-label-meta {
  fill: #7c6a52;
  font-family: "Satoshi", Arial, sans-serif;
  font-size: 7px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* Cap rests on the table while composing, closes at the end. */
.dbd-cp-cap {
  transform: translate(138px, 392px) rotate(0deg);
  transform-box: view-box;
  transition: transform 0.9s cubic-bezier(0.5, 0, 0.2, 1.2);
}

.dbd-cp.is-closed .dbd-cp-cap {
  transform: translate(0, 0);
}

/* Pipette hovers above the neck, dips for each drop. */
.dbd-cp-pipette {
  transform: translateY(-40px);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.3, 0.7, 0.3, 1), opacity 0.4s ease;
}

.dbd-cp.is-dropping .dbd-cp-pipette {
  transform: translateY(0);
}

.dbd-cp.is-closed .dbd-cp-pipette {
  transform: translateY(-140px);
  opacity: 0;
}

/* Composition pyramid under the bottle. */
.dbd-cp-pyramid {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.dbd-cp-pyramid li {
  display: grid;
  grid-template-columns: 14px 64px 1fr;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  font-size: 14px;
  transition: background 0.3s ease;
}

.dbd-cp-pyramid li.is-filled {
  background: rgba(255, 255, 255, 0.85);
}

.dbd-cp-dot {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  background: var(--tier, transparent);
}

.dbd-cp-pyramid b {
  color: var(--dbd-ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dbd-cp-pyramid em {
  overflow: hidden;
  color: var(--dbd-muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dbd-cp-pyramid li.is-filled em {
  color: var(--dbd-ink);
  font-weight: 600;
}

/* Flying note orb. */
.dbd-cp-orb {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--orb) center / cover no-repeat;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 0 6px color-mix(in srgb, var(--orb) 35%, transparent);
  pointer-events: none;
}

/* ---------- Steps ---------- */
.dbd-cp-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(60, 40, 20, 0.06);
}

.dbd-cp-steps button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dbd-muted);
  font-size: 14px;
  text-transform: none !important;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.dbd-cp-steps button span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 17px;
  font-style: italic;
}

.dbd-cp-steps button:hover {
  background: var(--dbd-soft) !important;
  color: var(--dbd-ink) !important;
}

.dbd-cp-steps button.is-active {
  background: var(--dbd-ink) !important;
  color: #fff !important;
}

.dbd-cp-steps button.is-done {
  color: var(--dbd-ink);
}

.dbd-cp-steps button.is-done span::after {
  content: " ✓";
  font-style: normal;
  color: var(--dbd-success);
}

.dbd-cp-advice {
  margin: 16px 0 0 !important;
  color: var(--dbd-muted);
  font-size: 15px;
  text-align: center;
}

.dbd-cp-advice em {
  color: var(--dbd-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
}

/* ---------- Panel ---------- */
.dbd-cp-panel {
  margin-top: 28px;
}

.dbd-cp-ph {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
}

.dbd-cp-ph h2 {
  margin: 0;
  color: var(--dbd-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 600;
  line-height: 1.05;
}

.dbd-cp-ph p {
  margin: 6px 0 0 !important;
  color: var(--dbd-muted);
}

.dbd-cp-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dbd-muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dbd-cp-meter b {
  color: var(--dbd-ink);
  font-size: 18px;
}

.dbd-cp-meter-dots {
  display: inline-flex;
  gap: 4px;
}

.dbd-cp-meter-dots i {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  background: #ddd3c3;
  transition: background 0.3s ease;
}

.dbd-cp-meter-dots i.on {
  background: var(--dbd-accent);
}

.dbd-cp-limit {
  margin: 12px 0 0 !important;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fbf1e3;
  color: #7a5520;
  font-size: 14px;
  font-weight: 600;
}

.dbd-cp-fam {
  margin-top: 30px;
}

.dbd-cp-fam header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.dbd-cp-fam h3 {
  margin: 0;
  color: var(--dbd-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
}

.dbd-cp-fam h3::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--fam);
  vertical-align: 3px;
}

.dbd-cp-fam header span {
  color: var(--dbd-muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dbd-cp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

/* Note card */
.dbd-cp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e4dccf;
  border-radius: 18px;
  background: #fff;
  color: var(--dbd-ink);
  text-align: left;
  text-transform: none !important;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.dbd-cp-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--fam) 60%, #e4dccf);
  box-shadow: 0 18px 40px -18px rgba(60, 40, 20, 0.35);
}

.dbd-cp-card-img {
  position: relative;
  display: grid;
  place-items: center;
  height: 150px;
  background:
    radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--fam) 28%, #fff) 0%, #fbf8f3 70%);
}

.dbd-cp-card-img img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 12px 14px rgba(40, 25, 10, 0.25));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dbd-cp-card:hover .dbd-cp-card-img img {
  transform: scale(1.08) rotate(-3deg);
}

.dbd-cp-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
}

.dbd-cp-card-body b {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
}

.dbd-cp-card-body small {
  color: var(--dbd-muted);
  font-size: 14px;
  line-height: 1.4;
}

.dbd-cp-card-body em {
  align-self: flex-start;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e6f2ea;
  color: #14593a;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dbd-cp-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border: 1.5px solid #d9cfbf;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.dbd-cp-card.is-selected {
  border-color: var(--dbd-ink);
  box-shadow: 0 0 0 2px var(--dbd-ink), 0 18px 40px -20px rgba(60, 40, 20, 0.4);
}

.dbd-cp-card.is-selected .dbd-cp-check {
  border-color: var(--dbd-ink);
  background: var(--dbd-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5 10 16.5 18 8'/%3E%3C/svg%3E") center / 14px no-repeat;
  transform: scale(1.08);
}

.dbd-cp-card.is-rec {
  border-color: #b9dcc6;
}

/* WoodMart greys out hovered/focused buttons: keep cards and options white. */
.dbd-cp-card,
.dbd-cp-card:hover,
.dbd-cp-card:focus,
.dbd-cp-option,
.dbd-cp-option:hover,
.dbd-cp-option:focus {
  background-color: #fff !important;
  color: var(--dbd-ink) !important;
}

/* ---------- Finalize ---------- */
.dbd-cp-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.dbd-cp-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.dbd-cp-field {
  display: grid;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.dbd-cp-field :where(input, textarea) {
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #d5cbbb !important;
  border-radius: 12px !important;
  background: #fff;
  box-shadow: none;
  color: var(--dbd-ink);
  font-size: 16px;
  font-weight: 500;
}

.dbd-cp-field input {
  height: 52px;
}

.dbd-cp-field :where(input, textarea):focus {
  border-color: var(--dbd-ink) !important;
  box-shadow: 0 0 0 4px rgba(181, 75, 40, 0.14) !important;
}

.dbd-cp-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.dbd-cp-options-sm {
  grid-template-columns: 1fr 1fr;
}

.dbd-cp-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #d5cbbb;
  border-radius: 14px;
  background: #fff;
  color: var(--dbd-ink);
  text-align: left;
  text-transform: none !important;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dbd-cp-option b {
  font-size: 16px;
}

.dbd-cp-option small {
  color: var(--dbd-muted);
  font-size: 12px;
  font-weight: 500;
}

.dbd-cp-option em {
  margin-top: 4px;
  color: var(--dbd-accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.dbd-cp-option:hover {
  border-color: var(--dbd-ink);
}

.dbd-cp-option.is-selected {
  border-color: var(--dbd-ink);
  box-shadow: 0 0 0 2px var(--dbd-ink);
}

.dbd-cp-recap {
  margin-top: 28px;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 50px -30px rgba(60, 40, 20, 0.35);
}

.dbd-cp-recap h3 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
}

.dbd-cp-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #efe8dc;
  font-size: 15px;
}

.dbd-cp-row span:first-child {
  color: var(--dbd-muted);
}

.dbd-cp-row span:last-child {
  font-weight: 600;
  text-align: right;
}

.dbd-cp-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 16px;
}

.dbd-cp-total strong {
  font-size: 28px;
  font-weight: 800;
}

.dbd-cp-recap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.dbd-cp-recap-actions .dbd-btn {
  flex: 1 1 180px;
  text-transform: none;
}

/* ---------- Footer nav ---------- */
.dbd-cp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e4dccf;
}

.dbd-cp-nav .dbd-btn {
  text-transform: none;
}

.dbd-cp-nav .dbd-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.dbd-cp-nav [hidden] {
  display: none;
}

.dbd-cp-count {
  color: var(--dbd-muted);
  font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .dbd-cp-layout {
    grid-template-columns: 1fr;
  }

  /* Compact bottle bar that stays visible while choosing notes. */
  .dbd-cp-stage {
    top: 64px;
    z-index: 5;
  }

  .dbd-cp-stage-inner {
    display: grid;
    grid-template-columns: 130px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 20px;
  }

  .dbd-cp-bottle {
    max-width: 130px;
  }

  .dbd-cp-pyramid {
    margin: 0;
    gap: 4px;
  }

  .dbd-cp-pyramid li {
    grid-template-columns: 10px 48px 1fr;
    padding: 6px 10px;
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .dbd-cp-steps button b {
    display: none;
  }

  .dbd-cp-ph {
    flex-direction: column;
    align-items: flex-start;
  }

  .dbd-cp-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .dbd-cp-card-img {
    height: 116px;
  }

  .dbd-cp-card-img img {
    width: 92px;
    height: 92px;
  }

  .dbd-cp-card-body {
    padding: 10px 12px 12px;
  }

  .dbd-cp-card-body b {
    font-size: 18px;
  }

  .dbd-cp-card-body small {
    font-size: 12.5px;
  }

  .dbd-cp-two,
  .dbd-cp-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dbd-cp *,
  .dbd-cp.is-ready .dbd-cp-bottle {
    animation: none !important;
    transition: none !important;
  }
}
