/* ==========================================================================
   Brandage — global design system
   Tokens + shared components ported from the Brandage design
   (brandage.powercommerce.com). Loaded site-wide from layout/theme.html.
   Section-specific styles live next to each section.
   ========================================================================== */

:root {
  /* Brand palette */
  --bd-cream: #FFFDF6;
  --bd-ink: #16183A;
  --bd-navy: #2A2B6E;
  --bd-navy-dot: #3A3B84;
  --bd-pink: #F0619B;
  --bd-pink-soft: #E8A0C6;
  --bd-pink-tint: #FFF6FA;
  --bd-yellow: #F5E14B;
  --bd-sky: #A8D6E8;
  --bd-pale: #EAF1FF;
  --bd-pale-dot: #CBDAF5;
  --bd-muted: #3D4166;
  --bd-amber: #E0851F;
  --bd-error: #B0246A;
  --bd-near-black: #0B0B0D;

  /* Type */
  --bd-font-display: "Bagel Fat One", system-ui, sans-serif;
  --bd-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --bd-page: 1440px;
  --bd-gutter: 32px;
  --bd-header-h: 80px;
  --bd-radius-lg: 20px;
  --bd-radius-md: 18px;
  --bd-radius-sm: 12px;
  --bd-border: 3px;

  /* Orion theme variables → brand fonts */
  --sort-title-font: var(--bd-font-display);
  --sort-title-font-weight: 400;
  --sort-title-font-style: normal;
  --sort-body-font: var(--bd-font-body);
  --page-padding: var(--bd-gutter);
  --page-width: calc(var(--bd-page) - var(--bd-gutter) * 2);
}

@media (max-width: 1080px) {
  :root { --bd-gutter: 24px; }
}
@media (max-width: 760px) {
  :root { --bd-gutter: 18px; }
}

/* --------------------------------------------------------------- Base -- */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html,
body {
  overflow-x: clip;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bd-cream);
  color: var(--bd-ink);
  font-family: var(--bd-font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
}

body > main#main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6,
.title0, .title1, .title2, .title3, .title4, .title5, .title6 {
  font-family: var(--bd-font-display);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
}

img, video { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--bd-pink);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ----------------------------------------------------------- Utilities -- */

.bd-wrap {
  width: 100%;
  max-width: var(--bd-page);
  margin: 0 auto;
  padding-inline: var(--bd-gutter);
}

.bd-sr-only,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.bd-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 90;
  background: var(--bd-yellow);
  color: var(--bd-ink) !important;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
}
.bd-skip-link:focus { left: 12px; top: 12px; }

/* Section backgrounds */
.bd-bg--cream { background-color: var(--bd-cream); }
.bd-bg--pale { background-color: var(--bd-pale); }
.bd-bg--navy { background-color: var(--bd-navy); }
.bd-bg--ink { background-color: var(--bd-ink); }
.bd-bg--dots-navy {
  background-color: var(--bd-navy);
  background-image: radial-gradient(var(--bd-navy-dot) 2.2px, transparent 2.3px);
  background-size: 26px 26px;
}
.bd-bg--dots-pale {
  background-color: var(--bd-pale);
  background-image: radial-gradient(var(--bd-pale-dot) 3px, transparent 3.2px);
  background-size: 28px 28px;
}
.bd-border-y {
  border-top: var(--bd-border) solid var(--bd-navy);
  border-bottom: var(--bd-border) solid var(--bd-navy);
}
.bd-border-t { border-top: var(--bd-border) solid var(--bd-navy); }
.bd-border-b { border-bottom: var(--bd-border) solid var(--bd-navy); }
.bd-border-t--ink { border-top: var(--bd-border) solid var(--bd-ink); }

/* Headings ---------------------------------------------------------------- */

.bd-display {
  font-family: var(--bd-font-display);
  font-weight: 400;
  line-height: 1.04;
  color: var(--bd-navy);
  margin: 0;
}
.bd-display--xl { font-size: clamp(40px, 5.4vw, 76px); line-height: 1; text-wrap: balance; }
.bd-display--lg { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.02; }
.bd-display--md { font-size: clamp(32px, 3.8vw, 52px); }
.bd-display--sm { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.06; }

.bd-lede {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--bd-muted);
  max-width: 62ch;
}
.bd-lede p { margin: 0; }
.bd-lede p + p { margin-top: 0.8em; }

/* On navy / ink sections */
.bd-on-dark .bd-display { color: var(--bd-yellow); }
.bd-on-dark .bd-lede { color: var(--bd-cream); }

/* Buttons ----------------------------------------------------------------- */

.bd-btn,
a.bd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 30px;
  border-radius: 999px;
  border: var(--bd-border) solid var(--bd-ink);
  background: var(--bd-pink);
  color: var(--bd-ink);
  font-family: var(--bd-font-body);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  box-shadow: none;
}
.bd-btn:hover,
a.bd-btn:hover { background: var(--bd-yellow); color: var(--bd-ink); text-decoration: none; }
.bd-btn:active { transform: translateY(1px); }
.bd-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.bd-btn::after { display: none !important; }

.bd-btn--lg,
a.bd-btn--lg { min-height: 60px; font-size: 19px; padding: 0 34px; }
.bd-btn--sm,
a.bd-btn--sm { min-height: 48px; font-size: 16px; padding: 0 24px; }
.bd-btn--block,
a.bd-btn--block { width: 100%; }

.bd-btn--ghost,
a.bd-btn--ghost { background: var(--bd-cream); border-color: var(--bd-navy); }
.bd-btn--ghost:hover,
a.bd-btn--ghost:hover { background: var(--bd-yellow); }

.bd-btn--navy,
a.bd-btn--navy { background: var(--bd-navy); color: var(--bd-cream); }
.bd-btn--navy:hover,
a.bd-btn--navy:hover { background: var(--bd-ink); color: var(--bd-cream); }

.bd-btn--yellow,
a.bd-btn--yellow { background: var(--bd-yellow); }
.bd-btn--yellow:hover,
a.bd-btn--yellow:hover { background: var(--bd-pink); }

.bd-btn--done { background: var(--bd-yellow) !important; }

@media (max-width: 480px) {
  .bd-btn { font-size: 16.5px; padding: 0 22px; }
}

.bd-link-quiet {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bd-navy) !important;
  font-family: var(--bd-font-body);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  cursor: pointer;
}
.bd-link-quiet:hover { color: var(--bd-pink) !important; }

/* Orion base buttons → Brandage pill buttons (collection, cart, account…) */
.button:not(.button--link, .button--icon),
.shopline-element-buy-now {
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: var(--bd-border) solid var(--bd-ink);
  background-color: var(--bd-pink);
  color: var(--bd-ink);
  font-family: var(--bd-font-body);
  font-size: 17px;
  font-weight: 800;
  box-shadow: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.button:not(.button--link, .button--icon)::after,
.shopline-element-buy-now::after {
  display: none !important;
}
.button:not([disabled], .button--icon, .button--link):hover,
.shopline-element-buy-now:hover {
  background-color: var(--bd-yellow);
  color: var(--bd-ink);
}
.button--secondary:not(.button--link, .button--icon) {
  background-color: var(--bd-cream);
  border-color: var(--bd-navy);
}
.button.loading { color: transparent !important; }
.button.loading .loading--rotator,
.button.loading .button__spinner { color: var(--bd-ink); }

/* Links (base theme sets the scheme link colour; brand hover is pink) */
body a:not(.button, .bd-btn):hover { color: var(--bd-pink); }

/* Badges / stars ---------------------------------------------------------- */

.bd-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bd-navy);
  color: var(--bd-cream);
}
.bd-badge--yellow {
  background: var(--bd-yellow);
  color: var(--bd-ink);
  border: 2px solid var(--bd-ink);
}
.bd-badge--pink { background: var(--bd-pink); color: var(--bd-ink); }

.bd-stars {
  color: var(--bd-amber);
  letter-spacing: 1px;
}

/* Cards ------------------------------------------------------------------- */

.bd-card {
  background: var(--bd-cream);
  border: var(--bd-border) solid var(--bd-navy);
  border-radius: var(--bd-radius-md);
  padding: 22px;
}

.bd-icon-tile {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 2px solid var(--bd-ink);
  display: grid;
  place-items: center;
  background: var(--bd-yellow);
}
.bd-icon-tile svg { display: block; }
.bd-icon-tile img { width: 60%; height: 60%; object-fit: contain; }

/* Lists ------------------------------------------------------------------- */

.bd-tick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
.bd-tick-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 15px;
  font-weight: 600;
  color: var(--bd-ink);
}
.bd-tick-list svg { flex: 0 0 auto; margin-top: 2px; }
@media (max-width: 760px) {
  .bd-tick-list { grid-template-columns: 1fr; }
}

.bd-bullets,
.bd-rte ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bd-bullets li,
.bd-rte ul li {
  display: flex;
  gap: 10px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--bd-muted);
}
.bd-bullets li::before,
.bd-rte ul li::before {
  content: "\2022";
  color: var(--bd-pink);
  font-weight: 800;
  flex: 0 0 auto;
}

/* Spec list --------------------------------------------------------------- */

.bd-spec {
  margin: 0;
  border-top: 2px solid var(--bd-pink-soft);
}
.bd-spec > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 2px solid var(--bd-pink-soft);
}
.bd-spec dt { font-size: 16.5px; color: var(--bd-sky); }
.bd-spec dd {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--bd-cream);
  text-align: right;
}
@media (max-width: 760px) {
  .bd-spec > div { flex-direction: column; gap: 4px; }
  .bd-spec dd { text-align: left; }
}

/* Accordion --------------------------------------------------------------- */

.bd-accordion { border-top: 2px solid var(--bd-pale); }
.bd-accordion__item { border-bottom: 2px solid var(--bd-pale); }
.bd-accordion__item > summary { list-style: none; }
.bd-accordion__item > summary::-webkit-details-marker { display: none; }
.bd-accordion__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 4px;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: var(--bd-font-body);
  font-size: 18.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--bd-ink);
  cursor: pointer;
}
.bd-accordion__btn:hover { color: var(--bd-pink); }
.bd-accordion__icon {
  font-size: 26px;
  font-weight: 700;
  color: var(--bd-pink);
  flex: 0 0 auto;
  line-height: 1;
  transition: transform 0.18s ease;
}
.bd-accordion__item[open] .bd-accordion__icon { transform: rotate(45deg); }
.bd-accordion__panel { padding: 0 4px 20px; }
.bd-accordion__panel,
.bd-accordion__panel p {
  max-width: 64ch;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--bd-muted);
}
.bd-accordion__panel p { margin: 0 0 12px; }
.bd-accordion__panel p:last-child { margin-bottom: 0; }

/* Reviews ----------------------------------------------------------------- */

.bd-review-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.bd-review-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.bd-round-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: var(--bd-border) solid var(--bd-ink);
  background: var(--bd-cream);
  color: var(--bd-ink);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.bd-round-btn:hover:not([disabled]) { background: var(--bd-yellow); }
.bd-round-btn[disabled] { opacity: 0.35; cursor: not-allowed; }

/* Forms ------------------------------------------------------------------- */

.bd-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.bd-field > label {
  font-size: 15px;
  font-weight: 800;
  color: var(--bd-ink);
}
.bd-field > label .opt { font-weight: 600; color: var(--bd-muted); }

.bd-input,
.bd-select,
.bd-textarea {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  font-family: var(--bd-font-body);
  font-size: 16px;
  color: var(--bd-ink);
  background: var(--bd-cream);
  border: var(--bd-border) solid var(--bd-ink);
  border-radius: var(--bd-radius-sm);
}
.bd-textarea {
  padding: 14px 16px;
  line-height: 1.55;
  resize: vertical;
  min-height: 140px;
}
.bd-select { font-weight: 600; appearance: auto; }
.bd-input[aria-invalid="true"],
.bd-textarea[aria-invalid="true"] { border-color: var(--bd-pink); }

.bd-field-error {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--bd-error);
}

.bd-form-status {
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--bd-radius-sm);
  font-size: 16px;
  font-weight: 700;
  color: var(--bd-ink);
}
.bd-form-status--ok { background: var(--bd-pale); border: var(--bd-border) solid var(--bd-navy); }
.bd-form-status--err { background: var(--bd-pink-tint); border: var(--bd-border) solid var(--bd-pink); }

.bd-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--bd-ink);
  cursor: pointer;
}
.bd-checkbox-row input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--bd-pink);
}

/* Breadcrumb -------------------------------------------------------------- */

.bd-breadcrumb {
  max-width: var(--bd-page);
  margin: 0 auto;
  padding: 18px var(--bd-gutter) 0;
}
.bd-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--bd-muted);
}
.bd-breadcrumb a:not(.button) {
  color: var(--bd-navy);
  font-weight: 600;
  text-decoration: none;
}
.bd-breadcrumb a:not(.button):hover { color: var(--bd-pink); }
.bd-breadcrumb .sep { color: var(--bd-sky); }
.bd-breadcrumb [aria-current="page"] { font-weight: 600; color: var(--bd-muted); }

/* Rich text --------------------------------------------------------------- */

.bd-rte p { margin: 0 0 16px; }
.bd-rte p:last-child { margin-bottom: 0; }
.bd-rte a { font-weight: 700; text-underline-offset: 3px; text-decoration: underline; }

/* Toast ------------------------------------------------------------------- */

.bd-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(140%);
  z-index: 1000;
  background: var(--bd-ink);
  color: var(--bd-cream);
  border: var(--bd-border) solid var(--bd-yellow);
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 15.5px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(22, 24, 58, 0.3);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.bd-toast.is-visible { transform: translateX(-50%) translateY(0); }

/* Image placeholder (when a merchant hasn't picked an image yet) ---------- */

.bd-placeholder {
  width: 100%;
  height: 100%;
  min-height: 120px;
  display: grid;
  place-items: center;
  background: var(--bd-pale);
  color: var(--bd-navy);
}
.bd-placeholder svg { width: 60%; height: auto; opacity: 0.4; }

/* Wiggle ------------------------------------------------------------------ */

@keyframes bd-wiggle {
  0%, 100% { transform: rotate(-3deg); }
  25% { transform: rotate(4deg) scale(1.05); }
  75% { transform: rotate(-6deg); }
}

/* Swipe carousel dots (<bd-swipe>, shown only when the section enables it) */
.bd-swipe { display: block; }
.bd-swipe__dots { display: none; justify-content: center; gap: 8px; margin-top: 22px; }
.bd-swipe__dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid var(--bd-navy);
  background: transparent;
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease;
}
.bd-swipe__dots button.is-active {
  width: 26px;
  background: var(--bd-pink);
  border-color: var(--bd-ink);
}
.bd-on-dark .bd-swipe__dots button { border-color: var(--bd-pink-soft); }
.bd-on-dark .bd-swipe__dots button.is-active { background: var(--bd-yellow); border-color: var(--bd-yellow); }

/* Scroll locks (drawer, modals, lightbox) set overflow:hidden on <body>. With
   html's overflow-x: clip that turns <body> into its own scroller and the sticky
   header jumps back to the top of the document. Lock on <html> instead. */
body[style*="overflow: hidden"],
body[style*="overflow:hidden"] { overflow: visible !important; }
html:has(> body[style*="overflow: hidden"]),
html:has(> body[style*="overflow:hidden"]) { overflow: hidden !important; }
