/* Easy Digital Downloads product page; site header and footer stay untouched. */
.y-download-product {
  --y-product-gutter: clamp(24px, 4vw, 40px);
  color: var(--y-text);
  background: var(--y-white);
  font-family: var(--y-font-sans);
}

.y-download-product *,
.y-download-product *::before,
.y-download-product *::after { box-sizing: border-box; }
.y-download-product :where(h1, h2, h3, p, ul) { margin-top: 0; }
.y-download-product :where(a, button, summary):focus-visible {
  outline: 2px solid var(--y-focus);
  outline-offset: 3px;
}
.y-download-product .alignwide {
  width: min(1180px, calc(100% - var(--y-product-gutter) - var(--y-product-gutter)));
  max-width: none;
  margin-inline: auto;
}

.y-download-product__hero {
  padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 104px);
  background: var(--y-subtle);
}
.y-download-product__crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(32px, 5vw, 60px);
  color: var(--y-muted);
  font: 400 var(--y-t-mono-sm)/1.5 var(--y-mono);
  letter-spacing: .055em;
  text-transform: uppercase;
}
.y-download-product__crumb a { color: inherit; text-underline-offset: 4px; }
.y-download-product__hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}
.y-download-product__hero-grid > *,
.y-download-product__details-grid > * { min-width: 0; }
.y-download-product__intro .y-eyebrow,
.y-download-product__section .y-eyebrow { color: var(--y-accent-text); }
.y-download-product .y-display--product {
  max-width: 13ch;
  margin: 16px 0 24px;
  font-size: clamp(2.5rem, 3.7vw, 3.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.035em;
  overflow-wrap: normal;
  word-break: normal;
}
.y-download-product__lead {
  max-width: 54ch;
  margin-bottom: 0;
  color: var(--y-muted);
  font-size: var(--y-t-body);
  line-height: var(--y-lh-body);
}

.y-download-product__offer {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--y-border);
  border-radius: var(--y-card-radius);
  background: var(--y-white);
}
.y-download-product__status {
  margin-bottom: 0;
  color: var(--y-accent-text);
  font: 400 var(--y-t-mono-sm)/1.5 var(--y-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.y-download-product__price {
  margin: 14px 0 2px;
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.03em;
}
.y-download-product__price small { font-size: var(--y-t-sm); letter-spacing: 0; }
.y-download-product__price-basis {
  margin: 0 0 12px;
  color: var(--y-muted);
  font-size: var(--y-t-xs);
  line-height: 1.4;
}
.y-download-product__gross {
  margin: 0 0 2px;
  color: var(--y-text);
  font-size: var(--y-t-sm);
  line-height: 1.5;
}
.y-download-product__gross [data-y-tier-gross] { font-weight: 500; }
.y-download-product__tax,
.y-download-product__availability {
  margin-bottom: 4px;
  color: var(--y-muted);
  font-size: var(--y-t-xs);
  line-height: 1.55;
}
.y-download-product__tax:empty { display: none; }
.y-download-product__tiers,
.y-download-product__offer .edd_price_options {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}
.y-download-product__tiers legend {
  margin-bottom: 10px;
  color: var(--y-muted);
  font-size: var(--y-t-xs);
}
.y-download-product__tiers ul,
.y-download-product__offer .edd_price_options ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.y-download-product__tiers label,
.y-download-product__offer .edd_price_options label {
  display: flex;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--y-border);
  border-radius: 12px;
  cursor: pointer;
}
.y-download-product__tiers label:has(input:checked),
.y-download-product__offer .edd_price_options label:has(input:checked) {
  border-color: var(--y-accent);
  background: var(--y-subtle);
}
.y-download-product__tiers input,
.y-download-product__offer .edd_price_options input {
  flex: 0 0 auto;
  margin: 4px 12px 0 0;
  accent-color: var(--y-accent);
}
.y-download-product__tiers input:focus-visible,
.y-download-product__offer .edd_price_options input:focus-visible {
  outline: 2px solid var(--y-focus);
  outline-offset: 3px;
}
.y-download-product__tiers .y-download-product__tier-copy,
.y-download-product__offer .edd_price_options .y-download-product__tier-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
  min-width: 0;
}
.y-download-product__tier-copy > .y-download-product__tier-name,
.y-download-product__tier-copy > strong,
.y-download-product__tier-copy > small { display: block; }
.y-download-product__tier-copy > strong { font-size: var(--y-t-sm); font-weight: 500; }
.y-download-product__tier-copy > strong small { font-size: var(--y-t-xs); }
.y-download-product__tier-copy > small { color: var(--y-muted); font-size: var(--y-t-xs); }
.y-download-product__tier-name { font-size: var(--y-t-sm); font-weight: 500; }
.y-download-product__offer .edd_price_option_sep,
.y-download-product__offer .edd_price_option_price { display: none; }
.y-download-product__offer .edd_price_options + .edd_purchase_submit_wrapper { margin-top: 16px; }
.y-download-product__facts { list-style: none; margin: 24px 0 0; padding: 0; }
.y-download-product__facts li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--y-border);
  font-size: var(--y-t-sm);
}
.y-download-product__facts span { color: var(--y-muted); }
.y-download-product__facts strong { font-weight: 500; text-align: right; }
.y-download-product__action { margin-top: 28px; }
.y-download-product__action .y-button-link,
.y-download-product__buy,
.y-download-product .edd-submit.y-download-product__buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 24px;
  border: 1px solid var(--y-accent);
  border-radius: var(--y-r-pill);
  background: var(--y-accent);
  color: var(--y-on-accent);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.y-download-product__action :is(.y-button-link, .y-download-product__buy):hover {
  border-color: var(--y-accent);
  background: var(--y-accent);
}
.edd-js :is(.y-download-product__action, .y-download-product__offer) input.edd-no-js { display: none; }
.edd-js-none :is(.y-download-product__action, .y-download-product__offer) :is(.edd-has-js, button.edd-add-to-cart) { display: none; }
.y-download-product__offer .edd_purchase_tax_rate { display: none; }
.y-download-product__availability { margin: 14px 0 0; text-align: center; }

.y-download-product__section { padding-block: var(--y-section-space); }
.y-download-product__section--surface { background: var(--y-subtle); }
.y-download-product__section .y-section-title {
  max-width: 24ch;
  margin: 16px 0 clamp(36px, 5vw, 60px);
  letter-spacing: -.035em;
}
.y-download-product__benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}
.y-download-product__benefit { padding-top: 22px; border-top: 1px solid var(--y-border); }
.y-download-product__benefit > span {
  color: var(--y-accent-text);
  font: 400 var(--y-t-mono-sm)/1.5 var(--y-mono);
}
.y-download-product__benefit h3 {
  margin: 18px 0 12px;
  font-size: var(--y-t-h3);
  font-weight: 500;
  line-height: var(--y-lh-subheading);
  letter-spacing: -.025em;
}
.y-download-product__benefit p { margin-bottom: 0; color: var(--y-muted); font-size: var(--y-t-sm); }

.y-download-product__details-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
.y-download-product__details-grid .y-section-title { margin-bottom: 0; }
.y-download-product__details-grid details { border-block: 1px solid var(--y-border); }
.y-download-product__details-grid summary {
  position: relative;
  min-height: 64px;
  padding: 20px 48px 20px 0;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}
.y-download-product__details-grid summary::-webkit-details-marker { display: none; }
.y-download-product__details-grid summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  translate: 0 -50%;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--y-accent-text);
  mask: url("../images/icons/plus.svg") center / contain no-repeat;
}
.y-download-product__details-grid details[open] summary::after { mask-image: url("../images/icons/minus.svg"); }
.y-download-product__details-grid ul { margin: 0 0 24px; padding-left: 22px; color: var(--y-muted); }
.y-download-product__details-grid li + li { margin-top: 12px; }

.y-download-product__fallback { max-width: 760px; }
.y-download-product__fallback > :not(.y-eyebrow, h1, h2, h3) { color: var(--y-muted); }
.y-download-product__next { padding-block: clamp(56px, 8vw, 96px); background: var(--y-subtle); }
.y-download-product__next > div { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.y-download-product__next h2 { max-width: 24ch; margin: 12px 0 0; font-size: var(--y-t-h2); font-weight: 500; line-height: var(--y-lh-heading); }
.y-download-product__next .y-button-link { flex: 0 0 auto; }

@media (max-width: 48rem) {
  .y-download-product__hero-grid,
  .y-download-product__details-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .y-download-product__crumb { margin-bottom: 28px; }
  .y-download-product .y-display--product { font-size: clamp(2.5rem, 12vw, 3.25rem); }
  .y-download-product__offer { padding: 24px; }
  .y-download-product__benefits { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .y-download-product__next > div { align-items: flex-start; flex-direction: column; }
  .y-download-product__next .y-button-link { width: 100%; min-height: 50px; }
}

@media (forced-colors: active) {
  .y-download-product__action :is(.y-button-link, .y-download-product__buy) { border: 2px solid ButtonText; }
}


/* The native featured image is shared with EDD's Product schema. */
.y-download-product__media {
  max-width: 24rem;
  margin: 24px 0 0;
}
.y-download-product__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  object-position: left center;
  border-radius: 8px;
}
.y-download-product__media figcaption {
  margin-top: 8px;
  color: var(--y-muted);
  font-size: .75rem;
  line-height: 1.5;
}
