/* ==========================================================
   Hirondelle – new design for Flatsome-rendered pages
   (shop, products, pages, posts; body.hd-flatsome).
   #main gets Flatsome's own .dark class (flatsome_main_class filter);
   this file maps Flatsome's dark mode onto the new design's tokens
   and replaces the customizer CSS, which is no longer printed.
   ========================================================== */

/* ---------- Flatsome variables & layout (were in the customizer CSS) ---------- */
:root {
  --primary-color: var(--gold);
  --fs-color-primary: var(--gold);
  --fs-color-secondary: var(--gold-hover);
  --fs-color-success: #8fbf7f;
  --fs-color-alert: #e07a6e;
  --fs-experimental-link-color: var(--gold);
  --fs-experimental-link-color-hover: var(--gold-hover);
}

/* Align content with the header: same 80rem bar and side padding as
   .header-bar. Top-level rows pad by the gutter minus their column padding. */
:root {
  --page-gutter: 1.5rem;
}

@media (min-width: 1024px) {
  :root {
    --page-gutter: 3rem;
  }
}

.container-width,
.container,
.row {
  max-width: 80rem;
}

.container {
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.row:not(.row .row, .container .row, .row-full-width) {
  padding-left: calc(var(--page-gutter) - 15px);
  padding-right: calc(var(--page-gutter) - 15px);
}

.row-collapse:not(.row .row, .container .row, .row-full-width) {
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.row-small:not(.row .row, .container .row, .row-full-width) {
  padding-left: calc(var(--page-gutter) - 9.8px);
  padding-right: calc(var(--page-gutter) - 9.8px);
}

.row-large:not(.row .row, .container .row, .row-full-width) {
  padding-left: max(0px, var(--page-gutter) - 30px);
  padding-right: max(0px, var(--page-gutter) - 30px);
}

/* Book covers in product grids: like the home page cards, every cover box
   has the same height and each cover keeps its own width (never cropped),
   left-aligned with the text below. Covers wider than the box (ratio < 1.4)
   may reach into the gap on their right instead of getting shorter. */
.has-equal-box-heights .box-image {
  padding-top: 0;
  aspect-ratio: 1 / 1.4;
  overflow: visible;
  transition: transform 500ms var(--ease);
}

.has-equal-box-heights .box-image > :first-child,
.has-equal-box-heights .box-image > :first-child > a {
  display: flex;
  justify-content: flex-start;
  height: 100%;
}

/* .cover-frame (spine, gold rim, shadow) is styled in redesign.css */
.has-equal-box-heights .box-image .cover-frame {
  display: inline-flex;
  flex: none;
  height: 100%;
  max-width: calc(100% + var(--shop-gap, 2rem) - 0.5rem);
}

.has-equal-box-heights .box-image img {
  position: static;
  flex: none;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* Product page gallery: the cover in the same frame (inc/redesign/shop-filters.php).
   The slider viewport would clip its shadow, so it may overflow and only the
   current slide is shown. */
.product-gallery-slider .cover-frame {
  display: block;
  max-width: none;
}

.product-gallery-slider .flickity-viewport {
  overflow: visible;
}

.product-gallery-slider .slide {
  transition: opacity 300ms var(--ease);
}

.product-gallery-slider.flickity-enabled .slide:not(.is-selected) {
  opacity: 0;
}

/* Product page: series above the title (inc/redesign/series.php); the class beats #main.dark p */
#main.dark p.product-series {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
}

#main.dark .product-series a {
  color: inherit;
  transition: color 200ms var(--ease);
}

#main.dark .product-series a:hover {
  color: var(--gold-light);
}

/* Product page: authors below the title, .hero-author's type in white (inc/redesign/authors.php);
   #wrapper beats the running-text link colour */
#main.dark p.product-author {
  margin: 0.5rem 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  line-height: 30px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

#wrapper #main.dark .product-author a {
  color: inherit;
  transition: color 200ms var(--ease);
}

#wrapper #main.dark .product-author a:hover {
  color: var(--gold);
}

/* Product page categories / tags (woocommerce/single-product/meta.php): one line
   above instead of Flatsome's dotted line per row, labels like the attribute labels */
.product_meta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-hairline);
}

.product_meta > span {
  display: flex;
  align-items: baseline;
  border-top: 0;
  padding: 0.25rem 0;
}

.product_meta .meta-label {
  flex: none;
  width: 150px;
  padding-right: 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.product_meta .meta-links {
  flex: 1;
  min-width: 0;
}

#wrapper #main.dark .product_meta a {
  color: var(--text-secondary);
  transition: color 200ms var(--ease);
}

#wrapper #main.dark .product_meta a:hover {
  color: var(--gold);
}

.product-small.has-hover:hover .box-image {
  transform: translateY(-0.625rem);
}

.box-text p.product-title a {
  transition: color 200ms var(--ease);
}

.product-small:hover .box-text p.product-title a {
  color: var(--gold);
}

@media screen and (min-width: 550px) {
  .products .box-vertical .box-image {
    min-width: 247px !important;
    width: 247px !important;
  }
}

/* ---------- Page ---------- */
html {
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

html,
body,
body #wrapper,
body #main,
body #main.dark {
  background-color: var(--surface-container-lowest);
}

body {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body ::selection {
  background: var(--gold);
  color: var(--on-primary);
}

#wrapper {
  min-height: 60vh;
}

/* first content block: a little air under the fixed header */
#main > :first-child:not(.section):not(.banner):not(.slider-wrapper) {
  padding-top: 3rem;
}

/* ---------- Typography ---------- */
#wrapper :is(h1, h2, h3, h4, .heading-font) {
  font-family: var(--font-serif);
  font-weight: 400;
}

/* Headings and paragraphs directly in a UX Builder Text element get class-level
   colours, so the element's own text colour (#text-… > *) wins. */
#wrapper :is(h1, h2, h3, h4, .heading-font):not(.text > *),
.text > :is(h1, h2, h3, h4) {
  color: var(--text-primary);
}

#wrapper :is(h5, h6) {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold);
}

#wrapper :is(h1, h2, h3).uppercase {
  letter-spacing: 0.04em;
}

#wrapper .entry-title {
  font-size: 36px;
  margin-bottom: 5px !important;
}

#main.dark,
#main.dark p:where(:not(.text > p)),
#main.dark td {
  color: var(--text-secondary);
}

#main.dark p:where(:not(.text > p)) {
  font-weight: 300;
}

:where(#main.dark) .text > p {
  color: var(--text-secondary);
  font-weight: 300;
}

#main.dark :is(strong, b),
#main.dark label,
#main.dark blockquote {
  color: var(--text-primary);
}

/* links in running text (not buttons, product titles or category labels) */
#main.dark :is(p, li, td):not(.product-title):not(.category) > a:not(.button),
#main.dark .entry-content a:not(.button) {
  color: var(--gold);
}

#main.dark :is(p, li, td):not(.product-title):not(.category) > a:not(.button):hover,
#main.dark .entry-content a:not(.button):hover {
  color: var(--gold-hover);
}

#wrapper blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  border-left: 1px solid rgba(198, 162, 75, 0.35);
}

.dark .is-divider,
#wrapper .is-divider {
  background-color: var(--gold-dim);
}

/* Flatsome draws hr in the text colour at 10% opacity; use the home page hairline */
#wrapper hr {
  border-top-color: var(--border-hairline);
  margin: 30px 0;
  opacity: 1;
}

/* ---------- Page titles (shop / product headers, outside #main) ---------- */
#wrapper .page-title {
  color: var(--text-secondary);
}

#wrapper .page-title-inner {
  padding-top: 2rem;
}

/* Sub page titles ([page_header] in page content): large serif, no caps
   (style.css uppercases .entry-title) */
#wrapper .page-header-wrapper .entry-title {
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -0.02em;
  text-transform: none;
}

/* the [divider] placed under the title in page content */
#wrapper .page-header-wrapper + .is-divider {
  display: none;
}

@media (min-width: 850px) {
  #wrapper .page-header-wrapper .entry-title {
    font-size: 56px;
    line-height: 64px;
  }

  /* breadcrumbs (absolute, see style.css) as in the shop's title bar: 49px under
     the header, 65px above the title */
  #wrapper .page-header-wrapper .title-breadcrumbs {
    top: -44px;
  }

  #wrapper .page-header-wrapper .page-title-inner {
    padding-top: 52px;
  }
}

/* ---------- UX Builder pages ----------
   Elements keep their own settings (section background, text colour, size,
   padding); the defaults below match new-design/about/about-us.html and the
   hd-* classes go in an element's "Class" field. */

/* [title]: serif headline without Flatsome's caps and lines; "Size" scales it.
   The margin is lost to redesign.css's .container { margin: 0 auto } otherwise. */
#wrapper .section-title-container {
  margin-bottom: 1rem;
}

#wrapper .section-title {
  font-size: 24px;
  line-height: 1.35;
  justify-content: flex-start;
}

#wrapper .section-title span {
  text-transform: none;
}

#wrapper .section-title b {
  display: none;
}

#wrapper .section-title-normal,
#wrapper .section-title-normal span {
  border: 0;
  margin: 0;
  padding-bottom: 0;
}

#wrapper :is(.section-title-center, .section-title-bold-center) {
  justify-content: center;
}

#wrapper :is(.section-title-center, .section-title-bold-center) span {
  margin: 0;
}

/* [hd_ornament] (inc/redesign/page-elements.php); .ornament is the home page's */
.hd-ornament {
  margin-bottom: 4rem;
}

/* intro under the page title */
.text.hd-lead,
.text.hd-lead > * {
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: italic;
  font-weight: 300;
  line-height: 1.625;
}

.text.hd-muted,
.text.hd-muted > * {
  color: var(--text-muted);
  font-weight: 400;
}

/* serif quote with a gold rule on the left */
.text.hd-callout {
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 1px solid rgba(198, 162, 75, 0.4);
}

.text.hd-callout > * {
  font-family: var(--font-serif);
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.625;
}

/* large centred quote */
.text.hd-quote > * {
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: italic;
  font-weight: 300;
  line-height: 1.625;
  color: var(--text-primary);
}

/* small gold capitals above a block */
.text.hd-eyebrow > * {
  margin-bottom: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.text.hd-eyebrow {
  margin-bottom: 1.25rem;
}

* + .text.hd-eyebrow {
  margin-top: 3.5rem;
}

/* image caption: 1st paragraph small capitals, then an italic line */
.text.hd-caption {
  margin-top: 1.5rem;
  text-align: center;
}

.text.hd-caption > * {
  margin-bottom: 0.25rem;
  font-family: var(--font-serif);
  font-size: 13px;
  font-style: italic;
  line-height: 22px;
  font-weight: 300;
  color: rgba(198, 162, 75, 0.8);
}

.text.hd-caption > :first-child {
  font-family: var(--font-sans);
  font-size: 10px;
  line-height: 1.5;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* column with a note at the bottom (hd-note), notes line up across the row */
.col.hd-pillar > .col-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.text.hd-note {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-hairline);
}

.text.hd-note > * {
  margin-bottom: 0;
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  line-height: 22px;
  font-weight: 300;
  color: var(--text-muted);
}

/* one-line quote with a gold book icon, and a small label next to it */
#main.dark .text.hd-motif > * {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  line-height: 20px;
  color: var(--text-secondary);
}

#main.dark .text.hd-motif > *::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  background-color: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 1l-5 5v11l5-4.5V1zM1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5V6c-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6zm22 13.5V6c-.6-.45-1.25-.75-2-1v13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5v2c1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5v-1.1z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 1l-5 5v11l5-4.5V1zM1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5V6c-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6zm22 13.5V6c-.6-.45-1.25-.75-2-1v13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5v2c1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5v-1.1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

#main.dark .text.hd-motif-label > * {
  margin-bottom: 0;
  font-size: 11px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* "label <b>value</b>" lines: label left, value right */
.text.hd-rows > * {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--text-muted);
}

#main .text.hd-rows :is(strong, b) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 400;
  text-align: right;
  color: var(--text-primary);
}

/* "<b>Label</b> value" lines: small capitals label in a column */
.text.hd-contact > * {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 5px;
  color: var(--text-primary);
}

#main .text.hd-contact :is(strong, b) {
  flex: none;
  width: 5rem;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* p > a matches the running-text link rule's specificity */
#main.dark .text.hd-contact p > a:not(.button) {
  color: var(--text-primary);
}

#main.dark .text.hd-contact p > a:not(.button):hover {
  color: var(--gold);
}

/* role above a name; an italic line under the name is muted serif */
.text.hd-role > * {
  margin-bottom: 0.25rem;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.text.hd-person > :first-child {
  margin-bottom: 0;
  font-weight: 400;
  color: var(--text-primary);
}

.text.hd-person em {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
}

/* gold capitals link with an arrow: [button style="link" class="hd-link" icon="icon-angle-right"] */
#wrapper .button.hd-link {
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--gold);
}

#wrapper .button.hd-link:hover {
  color: var(--gold-hover);
  opacity: 1;
}

#wrapper .button.hd-link i {
  transition: transform 150ms var(--ease);
}

#wrapper .button.hd-link:hover i {
  transform: translateX(0.25rem);
}

/* quieter variant for a secondary action next to the gold button */
#wrapper .button.hd-link-quiet {
  color: var(--text-secondary);
}

#wrapper .button.hd-link-quiet:hover {
  color: var(--gold);
}

/* [title class="hd-title-lg"]: section headline, as the sub page titles */
#wrapper .hd-title-lg .section-title {
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -0.02em;
}

/* running text at a readable measure */
.text.hd-narrow {
  max-width: 48rem;
}

/* bigger intro paragraph; bold words are gold */
.text.hd-intro > * {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.625;
  color: var(--text-primary);
}

#main.dark .text.hd-intro strong {
  font-weight: 500;
  color: var(--gold);
}

/* large serif statement, left aligned */
.text.hd-statement > * {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--text-primary);
}

/* attribution: 1st paragraph gold capitals, last one small; a middle one is a serif name */
.text.hd-cite > * {
  margin-bottom: 0.25rem;
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  color: var(--text-muted);
}

.text.hd-cite > :first-child {
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.text.hd-cite > :not(:first-child, :last-child) {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 34px;
  color: var(--text-primary);
}

/* column with an image and a [ux_text class="hd-cite"] on top of its lower edge */
.col.hd-portrait .img-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 13, 28, 0.9), transparent, transparent);
  pointer-events: none;
}

.col.hd-portrait .text {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.5rem;
}

/* list with gold check marks */
.text.hd-checklist > ul {
  margin: 0;
  list-style: none;
}

.text.hd-checklist li {
  margin: 0 0 0.75rem;
  padding-left: 2rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c6a24b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") left 0.125rem / 1.25rem no-repeat;
  color: var(--text-secondary);
}

/* list with gold arrows */
.text.hd-arrows > ul {
  margin: 0;
  list-style: none;
}

.text.hd-arrows li {
  margin: 0 0 0.75rem;
  padding-left: 1.75rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c6a24b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E") left 0.3rem / 1rem no-repeat;
  color: var(--text-secondary);
}

/* numbered list with gold numbers; italics are a small note */
.text.hd-steps > ol {
  margin: 0 0 0 1.25rem;
}

.text.hd-steps li {
  margin: 0 0 1rem;
  color: var(--text-secondary);
}

.text.hd-steps li::marker {
  font-weight: 500;
  color: var(--gold);
}

.text.hd-steps em {
  font-size: 13px;
  color: var(--text-muted);
}

/* small line with a gold calendar */
.text.hd-date > * {
  margin-bottom: 0;
  padding-left: 2rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c6a24b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15'/%3E%3Cpath d='M4 10h16M8 3v4M16 3v4'/%3E%3C/svg%3E") left top / 1.25rem no-repeat;
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  color: var(--text-muted);
}

#main.dark .text.hd-date strong {
  font-weight: 500;
  color: var(--text-primary);
}

/* last row of a box: its padding is enough, the columns only need a gap when stacked */
.row:has(> .col > .col-inner > .text.hd-date) > .col:last-child {
  padding-bottom: 0;
}

@media (min-width: 550px) {
  .row:has(> .col > .col-inner > .text.hd-date) > .col {
    padding-bottom: 0;
  }
}

@media (min-width: 850px) {
  #wrapper .hd-title-lg .section-title {
    font-size: 56px;
    line-height: 64px;
  }

  .text.hd-statement > * {
    font-size: 30px;
  }

  /* 5.5rem gap, the column padding is 15px */
  .col.hd-portrait + .col {
    padding-left: calc(5.5rem - 15px);
  }
}

/* ---------- Buttons ---------- */
#wrapper :is(.button, input[type=submit], input[type=button], button[type=submit]) {
  font-family: var(--font-sans);
  letter-spacing: 0.1em;
}

#wrapper .button.primary:not(.is-outline):not(.is-underline):not(.is-link),
#wrapper .button.alt,
#wrapper .single_add_to_cart_button,
#wrapper .checkout-button,
#wrapper #place_order {
  background-color: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--surface-container-lowest) !important;
}

#wrapper .button.primary:not(.is-outline):not(.is-underline):not(.is-link):hover,
#wrapper .button.alt:hover,
#wrapper .single_add_to_cart_button:hover,
#wrapper .checkout-button:hover,
#wrapper #place_order:hover {
  background-color: var(--gold-hover) !important;
  border-color: var(--gold-hover) !important;
  box-shadow: none;
}

#wrapper .woocommerce .button.primary {
  padding: 0 1.5rem;
  line-height: 2.4em !important;
}

/* secondary buttons: gold outline */
.coupon .button.expand,
.coupon .button.is-form.expand,
#wrapper .button.is-outline {
  border: 1px solid var(--gold-dim) !important;
  color: var(--gold) !important;
}

.coupon .button.expand:hover,
#wrapper .button.is-outline:hover {
  border-color: var(--gold) !important;
  background-color: transparent !important;
  color: var(--gold-hover) !important;
  box-shadow: none !important;
}

.button.is-underline::before,
.primary.is-underline::before {
  background-color: var(--gold);
}

/* ---------- Forms ---------- */
:is(#wrapper, .mfp-content) :is(input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea),
#wrapper .select2-container .select2-selection,
.form-flat input:not([type=submit]),
.form-flat select,
.form-flat textarea {
  background-color: var(--surface-input) !important;
  border: 1px solid var(--border-hairline) !important;
  border-radius: 0;
  color: var(--text-primary);
}

:is(#wrapper, .mfp-content) :is(input, select, textarea):focus {
  border-color: var(--gold-dim) !important;
  box-shadow: none;
}

:is(#wrapper, .mfp-content) :is(input, textarea)::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

#wrapper select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23c6a24b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-position: right 0.5em center !important;
  background-repeat: no-repeat !important;
  background-size: 1em !important;
}

#wrapper select option {
  background-color: var(--surface-card);
  color: var(--text-primary);
}

#wrapper .select2-container .select2-selection__rendered {
  color: var(--text-primary);
}

.select2-dropdown {
  background-color: var(--surface-card);
  border-color: var(--border-hairline);
  color: var(--text-primary);
}

/* Contact Form 7 (new-design/hir-rokopisi): also in popups, outside #main */
.wpcf7 p {
  margin-bottom: 2rem;
}

:is(#main.dark, .mfp-content) .wpcf7 label {
  display: block;
  margin-bottom: 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wpcf7 .wpcf7-form-control-wrap {
  display: block;
}

/* <div class="hd-form-row"> in the form: fields side by side where they fit */
.wpcf7 .hd-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0 2rem;
}

#wrapper .wpcf7 :is(input[type=email], input[type=tel], input[type=text], input[type=url], select, textarea),
.mfp-content .wpcf7 :is(input[type=email], input[type=tel], input[type=text], input[type=url], select, textarea) {
  height: auto;
  margin: 0.5rem 0 0;
  padding: 0.875rem 1rem;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: 0;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}

#wrapper .wpcf7 select.wpcf7-select {
  padding-right: 2.75rem;
}

#wrapper .wpcf7 textarea.wpcf7-textarea {
  height: 9rem;
  resize: vertical;
}

#wrapper .wpcf7 :is(input, select, textarea):focus {
  border-color: var(--gold-dim) !important;
  background-color: #121a35 !important;
}

/* file field: dashed box with a small button */
:is(#main.dark, .mfp-content) .wpcf7 input[type=file] {
  display: block;
  width: 100%;
  height: auto;
  margin: 0.5rem 0 0;
  padding: 1.25rem;
  border: 1px dashed var(--border-hairline);
  background-color: var(--surface-input);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}

:is(#main.dark, .mfp-content) .wpcf7 input[type=file]:hover {
  border-color: var(--gold-dim);
  background-color: #121a35;
}

:is(#main.dark, .mfp-content) .wpcf7 input[type=file]::file-selector-button {
  margin-right: 1rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border-hairline);
  background-color: var(--surface-container);
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}

:is(#main.dark, .mfp-content) .wpcf7 input[type=file]::file-selector-button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

:is(#main.dark, .mfp-content) .wpcf7 .info {
  display: block;
  margin-top: 0.5rem;
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* privacy checkbox */
:is(#main.dark, .mfp-content) .wpcf7 .wpcf7-acceptance label {
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.wpcf7 .wpcf7-acceptance .wpcf7-list-item {
  margin: 0;
}

.wpcf7 input[type=checkbox] {
  width: 15px;
  height: 15px;
  margin: 0 0.5rem 0 0;
  vertical-align: -2px;
  accent-color: var(--gold);
}

#main.dark .wpcf7 .wpcf7-acceptance a:not(.button),
.mfp-content .wpcf7 .wpcf7-acceptance a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

#main.dark .wpcf7 .wpcf7-acceptance a:not(.button):hover,
.mfp-content .wpcf7 .wpcf7-acceptance a:hover {
  color: var(--gold);
}

/* the submit is the gold .button.primary */
#wrapper .wpcf7 .wpcf7-submit,
.mfp-content .wpcf7 .wpcf7-submit {
  height: 46px;
  margin: 1rem 0 0;
  padding: 0 2.5rem;
  border-radius: 0;
  font-size: 13px;
  line-height: 46px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

/* messages */
.wpcf7 .wpcf7-form-control-wrap .wpcf7-not-valid-tip::after {
  display: none;
}

.wpcf7 form .wpcf7-response-output {
  margin: 1.5rem 0 0;
  padding: 1rem;
  border: 0;
  background-color: var(--surface-container);
  font-size: 15px;
  line-height: 24px;
  text-align: center;
  color: var(--gold);
}

.wpcf7 .wpcf7-form-control-wrap .wpcf7-not-valid-tip {
  position: static;
  width: auto;
  margin: 0.25rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  opacity: 1;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #e58a7b;
}

.dark .form-flat input::-webkit-input-placeholder {
  color: var(--text-muted);
}

.quantity .button.is-form {
  color: var(--text-secondary) !important;
}

/* ---------- Shop ---------- */
.dark .price,
.dark .price del,
.dark span.amount,
.page-title .price,
.product-info .price {
  color: var(--gold);
}

/* product page: "Buy the book" (external shop) to the right of the price */
.price-wrapper.has-buy-button {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
  margin-bottom: 1.3em;
}

.price-wrapper.has-buy-button .price {
  margin: 0;
}

.box-text .product-attributes,
.box-text p.category {
  color: var(--text-muted);
}

.box-text p.product-title a:hover,
.widget a:hover {
  color: var(--gold) !important;
}

.nav-line > li.active > a::before {
  background-color: var(--gold);
}

/* Product tabs: same look as the breadcrumbs, a bit bigger; only the
   active tab is gold and underlined. #main.dark … a:not(.button) matches
   the specificity of the gold li > a link rule above, and comes later */
#main.dark .woocommerce-tabs .nav > li > a:not(.button) {
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

#main.dark .woocommerce-tabs .nav > li > a:not(.button):hover,
#main.dark .woocommerce-tabs .nav > li.active > a:not(.button) {
  color: var(--gold);
}

#wrapper .woocommerce-tabs .nav-line > li > a::before {
  top: auto;
  bottom: 0;
  height: 2px;
  opacity: 0;
}

#wrapper .woocommerce-tabs .nav-line > li.active > a::before {
  opacity: 1;
}

.dark .product-footer .woocommerce-tabs,
.dark .product-section,
.dark td,
.dark th,
.dark .widget > ul > li + li,
.dark ul.menu > li + li {
  border-color: var(--border-hairline);
}

.dark .widget > ul > li > a:hover,
.dark .widget > ul > li.current-cat > a,
.dark .widget > ul > li.active > a {
  color: var(--gold);
}

.badge-inner {
  background-color: var(--gold);
  color: var(--surface-container-lowest);
}

/* Shop grid: full width (no sidebar, 4 per row, see shop-filters.php), wide gaps.
   The negative margins put the outer columns flush with the container edges;
   max-width lifts Flatsome's .row-small cap (1065px). */
.shop-container {
  --shop-gap: 3rem;
}

.shop-container .products.row {
  max-width: none;
  margin-left: calc(var(--shop-gap) / -2);
  margin-right: calc(var(--shop-gap) / -2);
}

.shop-container .products > .col {
  padding: 0 calc(var(--shop-gap) / 2) 4.5rem;
}

/* product page: the UX Builder layout's first section adds 30px on top of
   .shop-container's padding, pushing the breadcrumbs down (set inline on
   its #section_… id, hence !important) */
.custom-product-page > .section:first-child {
  padding-top: 0 !important;
}

/* breadcrumbs at the same height as in the shop's title bar, 49px under the
   header (beats the #main > :first-child rule) */
body.single-product #main > .shop-container:first-child:not(.section) {
  padding-top: 49px;
}

@media (min-width: 550px) {
  /* with the column's 30px, the same 65px under them as above the shop filters */
  .product-breadcrumb-container {
    margin-bottom: 35px;
  }
}

@media (max-width: 549px) {
  .shop-container {
    --shop-gap: 1.5rem;
  }

  .shop-container .products > .col {
    padding-bottom: 3rem;
  }

  /* less air above the product page breadcrumbs */
  body.single-product #main > .shop-container:first-child:not(.section) {
    padding-top: 2rem;
  }
}

/* Attribute filter dropdowns above the grid (inc/redesign/shop-filters.php) */
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 3rem;
}

.shop-filter {
  position: relative;
  flex: 0 1 14rem;
}

.shop-filter__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.75rem 0 1rem;
  border: 1px solid var(--border-hairline);
  background-color: var(--surface-card);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s var(--ease);
}

.shop-filter__toggle::-webkit-details-marker {
  display: none;
}

.shop-filter__toggle:hover,
.shop-filter[open] .shop-filter__toggle,
.shop-filter.is-active .shop-filter__toggle {
  border-color: var(--gold-dim);
}

.shop-filter__label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-filter__badge {
  min-width: 1.25rem;
  padding: 0 0.3rem;
  border-radius: var(--radius-full);
  background-color: var(--gold);
  color: var(--surface-container-lowest);
  font-size: 11px;
  line-height: 1.25rem;
  letter-spacing: 0;
  text-align: center;
}

.shop-filter__toggle .hd-icon {
  color: var(--gold);
  transition: transform 0.2s var(--ease);
}

.shop-filter[open] .shop-filter__toggle .hd-icon {
  transform: rotate(180deg);
}

.shop-filters .shop-filter__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(20rem, calc(100vw - 2 * var(--page-gutter)));
  max-height: 20rem;
  margin: 0;
  padding: 0.5rem 0;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--border-hairline);
  background-color: var(--surface-card);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.4);
}

.shop-filters .shop-filter__menu li {
  margin: 0;
}

.shop-filter__option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1rem;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.4;
}

.shop-filter__option:hover,
.shop-filter__option.is-selected {
  color: var(--text-primary);
}

.shop-filter__check {
  position: relative;
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
  border: 1px solid var(--gold-dim);
}

.shop-filter__option:hover .shop-filter__check {
  border-color: var(--gold);
}

.shop-filter__option.is-selected .shop-filter__check {
  border-color: var(--gold);
  background-color: var(--gold);
}

.shop-filter__option.is-selected .shop-filter__check::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.05rem;
  width: 0.25rem;
  height: 0.5rem;
  border: solid var(--surface-container-lowest);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.shop-filter__name {
  flex: 1;
}

.shop-filter__count {
  color: var(--text-muted);
  font-size: 12px;
}

.shop-filters__reset {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shop-filters__reset:hover {
  border-color: var(--gold);
  color: var(--gold-hover);
}

@media (max-width: 549px) {
  .shop-filter {
    flex: 1 1 calc(50% - 0.5rem);
  }

  .shop-filters__reset {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* WooCommerce messages */
.message-container,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  color: var(--text-secondary);
}

/* ---------- Authors (page-authors.php, author archive) ---------- */
/* the title sits where UX Builder pages put it (their section's 30px padding) */
.authors-page .row-main {
  padding-top: 30px;
}

.authors-intro {
  max-width: 48rem;
  margin-bottom: 3rem;
}

.authors-intro > :last-child {
  margin-bottom: 0;
}

.authors-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem 1.5rem;
  padding-bottom: 4rem;
}

.author-photo,
.author-bio-photo {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
}

.author-photo img,
.author-bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 500ms var(--ease), transform 500ms var(--ease);
}

/* only hovering the photo or the name highlights the author */
.author-card:has(.author-photo:hover, .author-name a:hover) .author-photo img {
  filter: grayscale(0.75);
  transform: scale(1.03);
}

.author-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dim);
}

#wrapper .author-name {
  margin: 1.25rem 0 0.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
}

#wrapper .author-name a {
  color: var(--text-primary);
  transition: color 200ms var(--ease);
}

#wrapper .author-card:has(.author-photo:hover) .author-name a,
#wrapper .author-name a:hover {
  color: var(--gold);
}

#wrapper .author-books {
  margin: 0;
  padding: 0;
  list-style: none;
}

#wrapper .author-books li {
  margin: 0 0 0.25rem;
}

#main.dark .author-card .author-books > li > a:not(.button) {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--text-secondary);
  transition: color 200ms var(--ease);
}

#main.dark .author-card .author-books > li > a:not(.button):hover {
  color: var(--gold);
}

.author-bio {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin: 3rem 0;
  padding-top: 3rem;
  border-top: 1px solid var(--border-hairline);
}

.author-bio-photo {
  max-width: 15rem;
}

/* as the hovered photos on the Authors page */
.author-bio-photo img {
  filter: grayscale(0.75);
}

/* same look as the breadcrumbs; p beats #main.dark p */
#wrapper p.author-bio-label {
  margin-bottom: 0.75rem;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gold);
}

#wrapper .author-bio-name {
  margin-bottom: 1.25rem;
}

.author-bio-content > :last-child {
  margin-bottom: 0;
}

/* product page "About the author" tab: the tab is the label, the name links to the author */
.woocommerce-tabs .author-bio:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.woocommerce-tabs .author-bio-label {
  display: none;
}

#wrapper .author-bio-name a {
  color: var(--text-primary);
  transition: color 200ms var(--ease);
}

#wrapper .author-bio-name a:hover {
  color: var(--gold);
}

@media (min-width: 768px) {
  .authors-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4rem 2rem;
  }

  .author-bio {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 3rem;
  }
}

@media (min-width: 1024px) {
  .authors-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Series archive (inc/redesign/series.php) ---------- */
.series-header {
  max-width: 48rem;
  margin-bottom: 3rem;
}

/* same look as the breadcrumbs; p beats #main.dark p */
#wrapper p.series-label {
  margin-bottom: 0.75rem;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gold);
}

/* as the sub page titles */
#wrapper .series-title {
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 48px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.series-description > :last-child {
  margin-bottom: 0;
}

@media (min-width: 850px) {
  #wrapper .series-title {
    font-size: 56px;
    line-height: 64px;
  }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs,
.breadcrumbs.uppercase {
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-transform: uppercase;
}

.breadcrumbs a {
  font-size: inherit;
  font-weight: inherit;
}

.breadcrumbs a,
.dark .breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover,
.dark .breadcrumbs a:hover {
  color: var(--gold);
}

/* The current page is gold. It's a bare text node after the last divider
   (or, on product pages, the last category link). */
.breadcrumbs,
.dark .breadcrumbs,
.breadcrumbs .divider:last-of-type ~ a,
.dark .breadcrumbs .divider:last-of-type ~ a {
  color: var(--gold);
}

/* also overrides the home page .divider from redesign.css */
.breadcrumbs .divider {
  height: auto;
  background: none;
  top: 0;
  margin: 0 0.4em;
  color: var(--text-muted);
  opacity: 1;
}

/* ---------- Cookie notice ---------- */
#cookie-notice {
  font-family: var(--font-sans);
}
