/* ==========================================================================
   FULLMING — Premium polish layer
   Loaded last so it can refine the existing system without editing tokens.
   Scope: typography, numerals, micro-interaction, hairline detail.
   No layout, no colour direction, no spacing scale changes.
   ========================================================================== */

/* ---------- 1. Numbers are data, not expression ----------
   Playfair's dollar glyph and oldstyle figures are decorative: at semibold
   the $ carries far more visual weight than the digits beside it, which
   reads as an accident rather than a price. Prices and quantities move to
   the sans face with tabular figures so columns of numbers line up. */
.dd-pp-price-now,
.dd-pp-price-was,
.dd-card-price,
.dd-cart-price,
.dd-order-total,
.dd-table-price,
.amount,
.price {
  font-family: var(--fm-font-body);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -.01em;
}

/* Keep the headline price optically confident without the heavier serif. */
.dd-pp-price-now {
  font-weight: var(--fw-semibold);
  letter-spacing: -.02em;
}

/* Money inside prose keeps the sans figures but not the display weight. */
.dd-pp-price-was {
  font-weight: var(--fw-regular);
}

/* ---------- 2. Better line breaks in display type ----------
   Balanced headings avoid a lone short word on the last line, which is the
   single most common "unfinished" look in large serif setting. */
h1, h2, h3,
.dd-display,
.dd-h1, .dd-h2, .dd-h3 {
  text-wrap: balance;
}

/* Body copy trades perfect balance for fewer ragged edges.
   Deliberately NOT applied to .dd-sub / .dd-lede: those carry an em dash
   before a qualifying clause, and pretty moves the dash to the start of the
   next line, which is worse typography than a ragged edge. */
p, li, dd {
  text-wrap: pretty;
}

/* ---------- 3. Optical tracking on large serif ----------
   Playfair at display sizes needs slightly tighter tracking than at body
   sizes; the existing --tr-tight is tuned for headings, not hero type. */
.dd-display,
.dd-h1 {
  letter-spacing: -.022em;
}

/* ---------- 4. Micro-interaction on cards ----------
   A 2px lift plus a softer, wider shadow reads as physical; a colour change
   alone reads as a hyperlink. Timing stays inside the existing motion scale. */
.dd-card {
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

@media (hover: hover) {
  .dd-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
    border-color: var(--fm-line-strong);
  }

  .dd-card:hover .dd-card-img {
    transform: scale(1.015);
  }
}

.dd-card-img {
  transition: transform var(--dur-slow) var(--ease);
}

/* ---------- 5. Hairline discipline ----------
   Premium surfaces separate with a rule, not a box. One weight everywhere. */
.dd-pp-spec,
.dd-pp-price-card {
  border-color: var(--fm-line);
}

/* ---------- 6. Selection ----------
   Default blue selection is the loudest non-brand colour on the page. */
::selection {
  background: var(--fm-rose-soft);
  color: var(--fm-ink);
}

/* ---------- 7. Focus ----------
   Keep the accessible ring, drop the double outline that browsers add. */
:focus-visible {
  outline: 2px solid var(--fm-rose);
  outline-offset: 2px;
}

/* ---------- 8. Star ratings ----------
   The unfilled star was rendering in a dark gold, so a 4-star review looked
   like 5 stars at a glance. Unfilled = the muted line colour. */
.dd-review-stars .is-off,
.dd-review-stars span[style*="--line"] {
  color: var(--fm-line-strong) !important;
}

/* ---------- 9. Image edges ----------
   Slightly rounded corners on media keep cards from looking cut out. */
.dd-card-img,
.dd-pp-main-img {
  border-radius: var(--r-sm);
}

/* ==========================================================================
   HERO — elevated landing treatment
   Layered rather than loud: a soft light source, staged entrance, one
   emphasised phrase, and counters that resolve into place.
   ========================================================================== */

.dd-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Light source: a wide, low-opacity rose bloom behind the copy. Sits under
   the content and never intercepts pointer events. */
.dd-hero::before {
  content: "";
  position: absolute;
  inset: -20% 35% 30% -15%;
  z-index: -1;
  background:
    radial-gradient(48% 55% at 32% 38%, rgba(196, 85, 122, .13), transparent 70%),
    radial-gradient(38% 45% at 62% 72%, rgba(255, 255, 255, .85), transparent 72%);
  filter: blur(6px);
  pointer-events: none;
}

/* A hairline that fades out — reads as a light edge rather than a border. */
.dd-hero-inner {
  position: relative;
}

.dd-hero-inner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fm-line-strong) 22%, var(--fm-line) 60%, transparent);
  pointer-events: none;
}

/* ---------- Emphasised phrase ----------
   One phrase carries the promise; setting it in italic rose gives the
   headline a focal point without adding another colour block. */
.dd-display em {
  font-style: italic;
  color: var(--fm-rose);
  letter-spacing: -.018em;
}

/* ---------- Staged entrance ----------
   Each block arrives slightly after the one above it. Kept short (620ms)
   and eased out so it reads as settling, not as an effect. */
@keyframes dd-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dd-hero-copy > * {
  animation: dd-rise .62s var(--ease) both;
}

.dd-hero-copy > :nth-child(1) { animation-delay: .04s; }
.dd-hero-copy > :nth-child(2) { animation-delay: .12s; }
.dd-hero-copy > :nth-child(3) { animation-delay: .22s; }
.dd-hero-copy > :nth-child(4) { animation-delay: .30s; }
.dd-hero-copy > :nth-child(5) { animation-delay: .38s; }

/* ---------- Media ----------
   A very slow scale keeps the still image from feeling frozen, and a soft
   left edge lets it dissolve into the page instead of ending on a hard cut. */
.dd-hero-media img {
  animation: dd-settle 1.1s var(--ease) both, dd-breathe 26s ease-in-out 1.1s infinite alternate;
}

@keyframes dd-settle {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes dd-breathe {
  from { transform: scale(1); }
  to   { transform: scale(1.035); }
}

.dd-hero-media::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 90px;
  background: linear-gradient(90deg, var(--fm-cream), transparent);
  pointer-events: none;
  z-index: 1;
}

.dd-hero-badge {
  animation: dd-rise .62s var(--ease) .56s both;
}

/* ---------- Counters ----------
   Numbers count up once when the hero is in view; the markup value stays
   the source of truth so the page is correct without JavaScript. */
.dd-hero-stat b {
  font-variant-numeric: tabular-nums;
  display: inline-block;
}

/* ---------- Reduced motion ----------
   Everything above is decorative; honour the OS setting. */
@media (prefers-reduced-motion: reduce) {
  .dd-hero-copy > *,
  .dd-hero-media img,
  .dd-hero-badge {
    animation: none !important;
  }
}

/* ==========================================================================
   SITE-WIDE MOTION SYSTEM
   One language: 18px rise + fade, 700ms, ease, once. Applied to section
   containers and cascaded through their items so a grid arrives as a wave
   rather than as a block.
   ========================================================================== */

/* Pre-state is applied only when JS is present, so a no-JS visitor sees
   fully rendered content instead of invisible sections. */
.js .dd-reveal {
  opacity: 0;
  transform: translateY(18px);
}

.js .dd-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity .7s var(--ease),
    transform .7s var(--ease);
}

/* Cascade: children of a revealed grid step in 60ms apart, capped at eight
   so long grids never feel slow. */
.js .dd-reveal.is-in > * {
  animation: dd-rise .7s var(--ease) both;
}

.js .dd-reveal.is-in > :nth-child(1) { animation-delay: .00s; }
.js .dd-reveal.is-in > :nth-child(2) { animation-delay: .06s; }
.js .dd-reveal.is-in > :nth-child(3) { animation-delay: .12s; }
.js .dd-reveal.is-in > :nth-child(4) { animation-delay: .18s; }
.js .dd-reveal.is-in > :nth-child(5) { animation-delay: .22s; }
.js .dd-reveal.is-in > :nth-child(6) { animation-delay: .26s; }
.js .dd-reveal.is-in > :nth-child(7) { animation-delay: .30s; }
.js .dd-reveal.is-in > :nth-child(n+8) { animation-delay: .34s; }

/* ---------- Header condenses on scroll ----------
   Travel is small (10px) but the backdrop blur plus shadow is what reads as
   "the page is now behind the chrome". */
.dd-header {
  transition:
    padding .28s var(--ease),
    box-shadow .28s var(--ease),
    background-color .28s var(--ease);
}

/* The stuck state used to add 8px above and below. That was a flourish on a
   72px bar; with the second nav row the bar is 120px, and 16px more of a
   sticky header is 15% of a laptop viewport. Keep the blur and the shadow,
   drop the growth, so scrolling does not shift the page either. */
.dd-header.is-stuck {
  padding-top: 0;
  padding-bottom: 0;
  background: rgba(255, 250, 249, .94);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 1px 0 var(--fm-line), 0 8px 24px -18px rgba(43, 30, 33, .35);
}

/* ---------- Mega menu ----------
   Enters from the bar it hangs from, not from the middle of the screen. */
.dd-mega {
  transform-origin: top center;
  animation: dd-mega-in .22s var(--ease) both;
}

@keyframes dd-mega-in {
  from { opacity: 0; transform: translateY(-6px) scale(.995); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Eyebrow detail ----------
   A single rose dot turns a label into a mark. No extra markup needed. */
.dd-eyebrow::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fm-rose);
  margin-right: 9px;
  vertical-align: 2px;
  opacity: .85;
}

/* ---------- Press feedback ----------
   Buttons acknowledge the press before the page changes. */
.dd-btn:active,
.dd-pp-qty-btn:active,
.dd-cart-del:active {
  transform: scale(.985);
}

.dd-btn {
  transition:
    transform .14s var(--ease),
    background-color .2s var(--ease),
    box-shadow .2s var(--ease),
    border-color .2s var(--ease);
}

@media (hover: hover) {
  .dd-btn--ink:hover,
  .dd-btn--rose:hover {
    box-shadow: 0 10px 22px -14px rgba(43, 30, 33, .6);
  }
}

/* ---------- Listing hero: same light source as the home hero ---------- */
.dd-page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.dd-page-hero::before {
  content: "";
  position: absolute;
  inset: -30% 45% 20% -10%;
  z-index: -1;
  background: radial-gradient(50% 60% at 30% 40%, rgba(196, 85, 122, .10), transparent 72%);
  filter: blur(6px);
  pointer-events: none;
}

/* ---------- Tab underline ---------- */
.dd-pp-tab,
[data-toggle="tab"] {
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .js .dd-reveal,
  .js .dd-reveal.is-in,
  .js .dd-reveal.is-in > *,
  .dd-mega {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .dd-header,
  .dd-btn {
    transition: none !important;
  }
}

/* ==========================================================================
   FONT METRICS
   On a cold cache the hero headline renders in Georgia (5 lines) and then
   reflows to 4 lines when Playfair arrives: an 84px jump, CLS 0.149.
   A metric-adjusted fallback makes the fallback wrap identically, so the
   shift disappears without delaying the real font.
   ========================================================================== */
@font-face {
  font-family: "DD Display Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 92%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  --fm-font-display: "Playfair Display", "DD Display Fallback", Georgia, "Times New Roman", serif;
}

/* ==========================================================================
   CART — MOQ progress
   The MOQ warning used to be a cream sticker that read as an error. A
   progress meter answers the buyer's real question ("how far am I?") at a
   glance and looks like part of the interface rather than a fault.
   ========================================================================== */
.dd-moq {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--fm-line);
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, rgba(196, 85, 122, .045), rgba(196, 85, 122, .015));
}

.dd-moq-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.dd-moq-label {
  font-family: var(--fm-font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fm-ink-soft);
}

.dd-moq-count {
  font-family: var(--fm-font-body);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--fm-ink-soft);
}

.dd-moq-count b {
  color: var(--fm-rose);
  font-weight: var(--fw-semibold);
}

.dd-moq-track {
  height: 3px;
  border-radius: 999px;
  background: var(--fm-line);
  overflow: hidden;
}

.dd-moq-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--fm-rose-soft), var(--fm-rose));
  transition: width .45s var(--ease);
}

.dd-moq-hint {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  color: var(--fm-ink-soft);
}

/* ---------- Cart button hierarchy ----------
   Three actions competed at the same weight. Placing an enquiry is the only
   primary here; updating line items is housekeeping. */
.dd-cart-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dd-cart-actions .dd-btn-sm:not(.dd-btn--rose) {
  background: transparent;
  color: var(--fm-ink);
  border: 1px solid var(--fm-line-strong);
  box-shadow: none;
}

.dd-cart-actions .dd-btn-sm:not(.dd-btn--rose):hover {
  border-color: var(--fm-ink);
  background: transparent;
}

/* ---------- Assurance strip ----------
   Three boxes became one row of claims separated by hairlines: less chrome,
   more legible at the size they actually render. */
/* The summary column is ~340px wide. Three claims side by side get 100px
   each, which forces every line to wrap twice. Stacked, each claim gets the
   full measure and can be read in one line. */
.dd-trust,
.dd-trust.dd-trust--3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--fm-line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--fm-surface);
}

.dd-trust > div,
.dd-trust--3 .dd-trust-item {
  padding: 12px 16px;
  border-right: 0;
  border-bottom: 1px solid var(--fm-line);
}

.dd-trust > div:last-child,
.dd-trust--3 .dd-trust-item:last-child {
  border-bottom: 0;
}

.dd-trust b {
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}

.dd-trust span {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: var(--fm-ink-soft);
}

/* Items keep their own card styling from the checkout stylesheet; inside a
   stacked panel that double-borders every row. Flatten them. */
.dd-trust.dd-trust--3 .dd-trust-item {
  border: 0;
  border-bottom: 1px solid var(--fm-line);
  border-radius: 0;
  background: transparent;
}

.dd-trust.dd-trust--3 .dd-trust-item:last-child {
  border-bottom: 0;
}

/* ==========================================================================
   CHECKOUT — one position, one numbering
   Sections carried both a numbered badge and a "Step N:" prefix while the
   progress chips counted differently again. The prefix is stripped in
   dd-motion.js; these rules make the chips carry the progress state.
   ========================================================================== */
.dd-checkout-steps li {
  transition: color .25s var(--ease), border-color .25s var(--ease);
}

.dd-checkout-steps li b {
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}

/* Current stage: ink ring on the number, ink label. */
.dd-checkout-steps li.is-active {
  color: var(--fm-ink);
  font-weight: var(--fw-medium);
}

.dd-checkout-steps li.is-active b {
  background: var(--fm-ink);
  color: var(--fm-paper);
  border-color: var(--fm-ink);
}

/* Completed stages: rose tick instead of a number. */
.dd-checkout-steps li.is-done b {
  background: var(--fm-rose);
  color: #fff;
  border-color: var(--fm-rose);
}

/* Sticky order summary so the amount never leaves the screen while the buyer
   scrolls through six sections. */
@media (min-width: 1024px) {
  .dd-co-side {
    position: sticky;
    top: 92px;
    align-self: start;
  }
}

/* Section open/close: a short, decisive move. */
.dd-step-section .collapse {
  transition: none;
}

.dd-step-section .collapse.in {
  animation: dd-section-in .34s var(--ease) both;
}

@keyframes dd-section-in {
  from { opacity: .35; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   SIMPLIFY
   The checkout had grown three labels for the same thing: a progress chip,
   a numbered badge and a title, plus a summary line repeating the title.
   Strip it back to one label per section.
   ========================================================================== */

/* Chips own the numbering — the badge is the same number a second time. */
.dd-step-num {
  display: none !important;
}

/* The right-hand line restates the heading ("Company details and billing
   address" under "Billing Details"). Remove it. */
.dd-step-sum {
  display: none !important;
}

/* Once the number is gone the heading does not need the left gutter. */
.dd-step-head-l {
  gap: 0;
}

/* Reassurance belongs where the buyer hesitates (cart, product), not next to
   the payment step where it competes with the only action on screen. */
.dd-co-side .dd-trust {
  display: none;
}

/* Quiet the sidebar: terms are reference, the total is the message. */
.dd-co-side .dd-terms-row {
  padding: 9px 0;
}

/* Step 1 explained the benefit of an account in 28 words above the action.
   The radio labels already say what each choice does. */
#collapse-checkout-option .dd-text-muted,
#collapse-checkout-option .dd-step-body > p,
#collapse-checkout-option .dd-co-split > div > p {
  display: none;
}

/* "Checkout Options:" is a label for a label. */
#collapse-checkout-option .dd-eyebrow {
  display: none;
}

/* ==========================================================================
   MOBILE CHECKOUT FIXES
   Two defects observed on a 390px viewport:

   1. The 'You must agree…' warning renders at the top of the payment panel
      while the agree checkbox sits below the fold; the buyer is told to act
      but never shown the control. Anchor the message to the checkbox
      instead of the panel top.
   2. Repeating 'Delivery Method' twice in the stack (the merge rename left
      the old panel title stale). Tighten the heading area so the duplicate
      is obvious rather than doubled up.
   ========================================================================== */

/* Keep the warning with the control it belongs to. */
#collapse-payment-method .alert-danger {
  position: sticky;
  top: 70px;
  z-index: 5;
  margin-bottom: 12px;
}

/* The agree row gets emphasis so it reads as a required action. */
#collapse-payment-method .dd-check {
  padding: 12px 14px;
  border: 1px solid var(--fm-line-strong);
  border-radius: var(--r-sm);
  background: var(--fm-surface);
}

/* When the form is valid again, drop the sticky warning (is-valid is set by
   dd-motion.js on successful save). */
#collapse-payment-method.is-valid .alert-danger {
  display: none;
}
