/* =============================================================
   WordPress specific layout: content typography, toolbars,
   filters, forms and the small components the CMS adds.
   ============================================================= */

/* --- editor content ------------------------------------------------ */

.entry-content {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.entry-content > * + * {
  margin-top: 1.1em;
}

.entry-content h2 {
  margin-top: 1.6em;
  font-size: var(--fs-h2s);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

.entry-content h3 {
  margin-top: 1.4em;
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
}

.entry-content p,
.entry-content li {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--body);
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.2em;
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li + li {
  margin-top: 0.35em;
}

.entry-content a {
  color: var(--ink);
  border-bottom: 1px solid var(--gold-edge);
}

.entry-content a:hover {
  color: var(--gold);
}

.entry-content blockquote {
  padding-left: 1.2rem;
  border-left: 1px solid var(--gold-edge);
  font-style: italic;
  color: var(--ink);
}

.entry-content figure {
  margin: 1.8em 0;
}

.entry-content img {
  height: auto;
}

.entry-content hr {
  margin-block: 2.4em;
}

.page-plain .entry-content {
  max-width: 72ch;
}

.page-plain > .container > .breadcrumb {
  margin-bottom: 1.5rem;
}

/* --- home page: shared Tweaks -------------------------------------- */

.card-grid .card__media {
  width: 100%;
  height: auto;
}

.card__price {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.card__stock {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.card__stock.is-out {
  color: #d99b86;
}

.card__image-link {
  display: block;
}

/* --- collection toolbar -------------------------------------------- */

.collection-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding-block: 1.1rem;
  margin-bottom: clamp(1.5rem, 2.6vw, 2.5rem);
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
}

.collection-toolbar__count {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-chips ul,
.sort-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}

.filter-chips a,
.sort-menu a {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: 0.3rem;
}

.filter-chips a:hover,
.sort-menu a:hover {
  color: var(--ink);
}

.filter-chips a[aria-current="true"],
.sort-menu a[aria-current="true"] {
  color: var(--gold);
  box-shadow: inset 0 -2px 0 0 var(--gold);
}

.sort-menu {
  margin-left: auto;
}

/* --- pagination ----------------------------------------------------- */

.pagination {
  margin-top: clamp(2rem, 4vw, 3.5rem);
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding-inline: 0.6rem;
  border: 1px solid var(--gold-line);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--body);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  border-color: var(--gold-edge);
  color: var(--ink);
}

/* --- search --------------------------------------------------------- */

.search-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 32rem;
  margin-block: 1.5rem 2.5rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--gold-edge);
}

.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.85rem;
}

.search-form button {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

/* --- forms ---------------------------------------------------------- */

.mengpa-form {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field > label,
.field > .field__label {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--gold-line);
  background-color: rgba(241, 229, 206, 0.03);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.4;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
}

.field--check input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.2rem;
}

.field--check label {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--body);
}

.form__actions {
  margin-top: 0.5rem;
}

.form__error {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(217, 155, 134, 0.5);
  background-color: rgba(217, 155, 134, 0.08);
  color: #e9bda9;
  font-size: 0.95rem;
}

.form__success {
  padding: 0.85rem 1rem;
  border: 1px solid var(--gold-edge);
  background-color: rgba(199, 164, 113, 0.1);
  color: var(--ink);
  font-size: 0.95rem;
}

.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- guidance + order lookup ---------------------------------------- */

.guidance-form-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
}

.collections-grid {
  display: grid;
  gap: var(--gap);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.collection-card {
  position: relative;
}

.collection-card__media {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background-color: var(--panel);
}

.collection-card__title {
  margin-top: 1rem;
  font-size: var(--fs-h3);
  font-weight: 400;
  color: var(--ink);
}

.collection-card__count {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.collection-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.order-summary {
  max-width: 46rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid var(--gold-line);
  background-color: var(--panel);
}

.order-summary h2 {
  font-size: var(--fs-h2s);
  font-weight: 400;
  color: var(--ink);
}

.order-summary dl {
  display: grid;
  grid-template-columns: minmax(8rem, auto) 1fr;
  gap: 0.5rem 1.5rem;
  margin-top: 1.25rem;
  font-size: var(--fs-small);
}

.order-summary dt {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
}

.order-summary dd {
  margin: 0;
  color: var(--ink);
}

.order-summary__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin: 1.75rem 0 0;
}

.order-summary__again {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.order-summary__again:hover {
  color: var(--gold);
}

/* --- product story --------------------------------------------------- */

.spec__list li {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr);
  gap: 0.25rem 1.25rem;
  align-items: baseline;
}

.spec__label {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec__value {
  color: var(--ink);
}

.product-story {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.product-story h2 + p,
.product-story h2 + p:first-of-type {
  margin-top: 0.75rem;
}

/* --- journal --------------------------------------------------------- */

.post-header {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.post-figure {
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
}

.post-figure__media {
  width: 100%;
  height: auto;
}

/* --- language switcher ------------------------------------------------ */

.lang-switch a {
  display: inline-block;
  padding-block: 0.15rem;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.lang-switch a:hover {
  color: var(--ink);
}

.lang-switch a[aria-current="true"] {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 0 var(--gold);
}

.lang-switch--inline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.lang-switch--inline .lang-switch__sep {
  color: rgba(179, 169, 146, 0.45);
  font-size: 0.6rem;
}

.lang-switch--footer ul {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.lang-switch--footer li + li::before {
  content: "·";
  margin-right: 0.55rem;
  color: rgba(179, 169, 146, 0.45);
}

.footer__lang {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer__currency {
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* --- misc ------------------------------------------------------------ */

.newsletter__status {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--gold);
}

.visually-hidden,
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.entry-content .wp-block-image img {
  width: 100%;
  height: auto;
}

@media (min-width: 900px) {
  .collections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-story {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .guidance-form-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: start;
  }
}

@media (max-width: 782px) {
  .admin-bar.has-hero .site-header {
    top: 46px;
  }
}

/* --- wide content (cart, checkout, account) -------------------------- */

.page-plain .entry-content--wide,
.entry-content--wide {
  max-width: none;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* --- Chinese typography ---------------------------------------------- */

html:lang(zh-Hans) {
  --serif: "EB Garamond", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "Inter", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

html:lang(zh-Hant) {
  --serif: "EB Garamond", "Songti TC", "Noto Serif TC", "Source Han Serif TC", "PMingLiU", "SimSun", serif;
  --sans: "Inter", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

html:lang(zh-Hans) body,
html:lang(zh-Hant) body {
  line-height: 1.75;
}

html:lang(zh-Hans) .display,
html:lang(zh-Hant) .display,
html:lang(zh-Hans) .hero__title,
html:lang(zh-Hant) .hero__title,
html:lang(zh-Hans) .intro__title,
html:lang(zh-Hant) .intro__title,
html:lang(zh-Hans) .thoughtful__title,
html:lang(zh-Hant) .thoughtful__title {
  line-height: 1.28;
  letter-spacing: 0.02em;
}

html:lang(zh-Hans) .prose,
html:lang(zh-Hant) .prose,
html:lang(zh-Hans) .entry-content p,
html:lang(zh-Hant) .entry-content p {
  text-align: justify;
  text-justify: inter-ideograph;
  line-height: 1.85;
}

html:lang(zh-Hans) .eyebrow,
html:lang(zh-Hant) .eyebrow {
  letter-spacing: 0.16em;
}

html:lang(zh-Hans) .card__title,
html:lang(zh-Hant) .card__title {
  line-height: 1.35;
}

html:lang(zh-Hans) .card__cta,
html:lang(zh-Hant) .card__cta,
html:lang(zh-Hans) .cta-link,
html:lang(zh-Hant) .cta-link,
html:lang(zh-Hans) .button,
html:lang(zh-Hant) .button {
  letter-spacing: 0.08em;
}

/* --- search form ------------------------------------------------------- */

.search-form {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  max-width: 34rem;
  padding: 0 0 0.5rem;
  border: 0;
  border-bottom: 1px solid var(--gold-edge);
}

.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0;
  border: 0 !important;
  background: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
}

.search-form input[type="search"]:focus-visible {
  outline: none;
}

.search-form button {
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.search-form button:hover {
  color: var(--gold);
}

.search-form:focus-within {
  border-bottom-color: var(--gold);
}

/* --- order look-up ---------------------------------------------------- */

.look-up__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 5rem);
}

@media (min-width: 900px) {
  .look-up__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
  }
}

.look-up__main .mengpa-form {
  max-width: 32rem;
}

.look-up__notes {
  max-width: 32rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.look-up__help {
  padding: clamp(1.5rem, 3vw, 2.35rem);
  border: 1px solid var(--gold-line);
  background-color: rgba(241, 229, 206, 0.02);
}

.look-up__help-title {
  margin: 0.4rem 0 1.75rem;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.9vw, 1.65rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}

.look-up__steps {
  display: grid;
  gap: 1.35rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: lookup-step;
}

.look-up__steps li {
  position: relative;
  padding-left: 2.35rem;
  counter-increment: lookup-step;
}

.look-up__steps li::before {
  content: counter(lookup-step, decimal-leading-zero);
  position: absolute;
  top: 0.15rem;
  left: 0;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.look-up__steps h3 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink);
}

.look-up__steps p,
.look-up__note {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--body);
}

.look-up__note {
  padding-top: 1.35rem;
  border-top: 1px solid rgba(199, 164, 113, 0.16);
  color: var(--muted);
}

.look-up__help .cta-link {
  display: inline-block;
  margin-top: 1.35rem;
}
.look-up__main .order-summary {
  max-width: 32rem;
}

/* Keep a lone character off the last line of Chinese paragraphs. */
html:lang(zh-Hans) .prose,
html:lang(zh-Hant) .prose,
html:lang(zh-Hans) .band__text p,
html:lang(zh-Hant) .band__text p {
  text-wrap: pretty;
}

/* --- selects --------------------------------------------------------- */

/* Native selects keep the operating system's arrow, which never matches the
   dark palette. Draw our own chevron for every select on the site; selectWoo
   on checkout hides this element and is skinned separately. */
.field select,
.woocommerce select:not(.select2-hidden-accessible),
select.mengpa-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b3a992' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
  cursor: pointer;
}

.field select:hover,
.woocommerce select:not(.select2-hidden-accessible):hover {
  border-color: var(--gold-edge);
}

.field select option,
.woocommerce select option {
  padding: 0.6rem;
  background-color: #171c15;
  color: var(--ink);
}

.field select:focus-visible {
  border-color: var(--gold);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
