/* Shared document and native WooCommerce presentation. Business markup stays owned by WooCommerce. */

* {
  box-sizing: border-box;
}

html {
  /* Anything scrolled into view, such as a WooCommerce notice, lands below the sticky header. */
  scroll-padding-top: var(--yun-header-height);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  color: var(--yun-color-text);
  background: var(--yun-color-background);
  font-family: var(--yun-font-sans);
  font-size: 16px;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--yun-color-text);
  font-family: var(--yun-font-serif);
  font-weight: 400;
  line-height: 1.08;
}

.page-main {
  width: min(var(--yun-shell-wrap), calc(100vw - (var(--yun-shell-side) * 2)));
  min-height: 62vh;
  margin: 0 auto;
  padding: 72px 0 96px;
}

.content-page {
  max-width: 900px;
}

.content-page > :first-child {
  margin-top: 0;
}

.content-page h1 {
  margin-bottom: 24px;
  font-size: clamp(38px, 5vw, 64px);
}

.content-page h2,
.content-page h3 {
  margin: 32px 0 14px;
}

.content-page p {
  color: var(--yun-color-copy);
}

/* Text pages, such as the store's policies: their own lists and links, not those inside WooCommerce's pages. */
.content-page > :is(ul, ol) {
  padding-left: 1.25em;
  color: var(--yun-color-copy);
}

.content-page > :is(ul, ol) li + li {
  margin-top: 6px;
}

.content-page > :is(p, ul, ol) a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Primary actions take the homepage button's shape and type as an ink outline. */
.button,
.button.wc-forward,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .checkout-button,
.woocommerce button.button.alt,
.woocommerce a.button.alt {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--yun-color-text);
  border-radius: 2px;
  color: var(--yun-color-text);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .checkout-button:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover {
  border-color: var(--yun-color-text);
  color: #ffffff;
  background: var(--yun-color-text);
}

/* Secondary actions are gold text links, like the cart drawer's empty state. */
.woocommerce .woocommerce-message a.button,
.woocommerce .woocommerce-info a.button,
.woocommerce .woocommerce-error a.button,
.woocommerce .woocommerce-message a.button:hover,
.woocommerce .woocommerce-info a.button:hover,
.woocommerce .woocommerce-error a.button:hover {
  width: auto;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  color: var(--yun-color-link);
  background: none;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.woocommerce .woocommerce-message a.button:hover,
.woocommerce .woocommerce-info a.button:hover,
.woocommerce .woocommerce-error a.button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.woocommerce .woocommerce-message a.button:focus-visible,
.woocommerce .woocommerce-info a.button:focus-visible,
.woocommerce .woocommerce-error a.button:focus-visible {
  outline-color: var(--yun-color-link);
}

/* The 404 page, which also answers front-end searches, follows the cart drawer's empty state, centred between header and footer. */
body.error404 {
  --yun-not-found-link: var(--yun-color-link);
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
}

body.error404 .page-main {
  display: flex;
  flex: 1 0 auto;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}

body.error404 .content-page {
  max-width: 360px;
  text-align: center;
}

body.error404 .content-page h1 {
  margin-bottom: 0;
  font-size: 30px;
}

body.error404 .content-page p {
  margin: 10px 0 0;
  color: var(--yun-color-muted);
  font-size: 12px;
}

body.error404 .content-page p:last-child {
  margin-top: 22px;
}

body.error404 .content-page .button,
body.error404 .content-page .button:hover {
  width: auto;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  color: var(--yun-not-found-link);
  background: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  opacity: 1;
}

body.error404 .content-page .button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

body.error404 .content-page .button:focus-visible {
  outline: 2px solid var(--yun-not-found-link);
  outline-offset: 2px;
}

.woocommerce form .form-row {
  margin-bottom: 18px;
}

.woocommerce form .form-row label {
  display: block;
  margin-bottom: 6px;
  color: var(--yun-color-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce input.input-text,
.woocommerce textarea,
.select2-container--default .select2-selection--single {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--yun-color-border);
  border-radius: 0;
  color: var(--yun-color-text);
  background: transparent;
}

.woocommerce form .form-row textarea {
  min-height: 120px;
  padding-top: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 9px 0;
  line-height: 28px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 10px;
}

.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
  border-top-color: var(--yun-color-accent);
  color: var(--yun-color-text);
  background: var(--yun-color-surface);
}

.woocommerce table.shop_table {
  border: 1px solid var(--yun-color-border);
  border-radius: 0;
  background: var(--yun-color-surface);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border-color: var(--yun-color-line);
}

.woocommerce a.remove {
  color: var(--yun-color-accent) !important;
}

@media (max-width: 720px) {
  .page-main {
    width: calc(100vw - 40px);
    padding: 42px 0 64px;
  }

  .content-page h1 {
    font-size: 36px;
  }

  .button,
  .button.wc-forward,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce .checkout-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce .checkout-button {
    transition: none;
  }
}
