/* BakuraEdu course page + catalog. Loaded after shopping.css and home.css on WooCommerce views. */

/* ---------- catalog (Courses.dc.html) ---------- */

/* Full-bleed hero and filter bar live inside the content container; the page body clips them. */
body.post-type-archive-product,
body.tax-product_cat {
  overflow-x: clip;
}

.post-type-archive-product .woo-content,
.tax-product_cat .woo-content {
  padding-block-start: 0;
}

.post-type-archive-product .woocommerce-breadcrumb,
.tax-product_cat .woocommerce-breadcrumb {
  display: none;
}

.woocommerce-products-header {
  isolation: isolate;
}

.catalog-hero {
  position: relative;
  overflow: hidden;
  margin-inline: calc(50% - 50vw);
  background: var(--honey);
}

.catalog-hero__sun {
  position: absolute;
  width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  inset-inline-end: -140px;
  top: -180px;
}

.catalog-hero__ring {
  position: absolute;
  width: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  inset-inline-end: 200px;
  top: 40px;
  opacity: 0.6;
}

.catalog-hero__inner {
  position: relative;
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
  padding: 56px 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 28px;
}

.catalog-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.catalog-hero .eyebrow {
  color: #8a4a22;
}

.catalog-hero h1 {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.2;
}

.catalog-hero p,
.catalog-hero .catalog-intro p {
  margin: 0;
  max-width: 46ch;
  color: var(--bark);
}

.catalog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 380px);
  height: 56px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
  background: var(--cream);
}

.catalog-search .icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.catalog-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font: 400 15px var(--font);
  color: var(--ink);
}

.catalog-search:focus-within {
  box-shadow: 0 0 0 3px rgb(209 149 74 / 0.4);
}

.catalog-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-inline: calc(50% - 50vw);
  padding: 14px max(20px, calc((100vw - 1280px) / 2));
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.catalog-categories {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  border: 0;
}

.catalog-categories a {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.catalog-categories a[aria-current] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
}

.catalog-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot, var(--gold));
}

.catalog-dot--all {
  background: var(--sun);
}

.catalog-categories a[aria-current] .catalog-dot {
  box-shadow: 0 0 0 1.5px var(--cream);
}

.catalog-bar__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.catalog-ages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.catalog-ages > span,
.catalog-count {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.catalog-ages > div {
  display: flex;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--honey);
  overflow-x: auto;
  scrollbar-width: none;
}

.catalog-ages a {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.catalog-ages a[aria-current] {
  background: var(--cream);
  box-shadow: 0 1px 0 rgb(16 14 17 / 0.08);
}

.catalog-bar__end {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-width: 0;
  max-width: 100%;
}

.catalog-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.catalog-clear .icon {
  width: 14px;
  height: 14px;
}

.catalog-bar .ordering-wrap {
  margin: 0;
}

.catalog-bar .ordering-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.catalog-bar .woocommerce-ordering {
  margin: 0;
}

.catalog-bar .woocommerce-ordering select {
  height: 40px;
  min-height: 40px;
  padding: 0 34px 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background-color: var(--cream);
  font: 500 13px var(--font);
  color: var(--ink);
  cursor: pointer;
}

.post-type-archive-product .woocommerce-result-count,
.tax-product_cat .woocommerce-result-count {
  display: none;
}

.post-type-archive-product ul.products,
.tax-product_cat ul.products {
  margin-top: 36px;
}

.edu-card__action {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
}

.edu-card__action:hover,
.edu-card__action.added {
  background: var(--ink);
  color: var(--sunlight);
}

.edu-card__action.loading {
  opacity: 0.6;
}

.edu-card .added_to_cart {
  display: none;
}

/* The hero has its own search, so the header's mobile search is redundant here. */
.post-type-archive-product .mobile-search,
.tax-product_cat .mobile-search {
  display: none;
}

@media (max-width: 700px) {
  .catalog-hero__sun {
    width: 240px;
    inset-inline-end: -110px;
    top: -120px;
  }

  .catalog-hero__ring {
    display: none;
  }

  .catalog-hero__inner {
    padding: 40px 0 32px;
  }
}

.woocommerce ul.products {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 28px 22px;
}

.woocommerce ul.products li.product .edu-card__cover {
  border-radius: 200px 200px 24px 24px;
}

.woocommerce ul.products li.product:nth-child(even) .edu-card__cover {
  border-radius: 24px;
}

.woocommerce ul.products li.product .product-image img,
.edu-card__cover img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  margin: 0 !important;
  object-fit: cover;
  transform: none;
}

.catalog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 48px 0;
}

.catalog-empty__mascot {
  width: 160px;
  height: 160px;
  object-fit: contain;
}

/* ---------- single course (Course.dc.html) ---------- */

/* Full-bleed hero and related strip live inside the content container; the page body clips them. */
body.is-course {
  overflow-x: clip;
}

body.is-course .woo-content {
  overflow-x: visible;
  padding-block-start: 0;
}

.is-course .woo-content > div.product.course-page {
  display: block;
  padding: 0;
}

.course-hero {
  position: relative;
  overflow: hidden;
  margin-inline: calc(50% - 50vw);
  background: var(--ink);
  color: var(--cream);
}

.course-hero__sun {
  position: absolute;
  width: 560px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  inset-inline-end: -300px;
  top: 120px;
  opacity: 0.95;
}

.course-hero__moon {
  position: absolute;
  width: 240px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--honey);
  inset-inline-end: 380px;
  bottom: -120px;
}

.course-hero__inner {
  position: relative;
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
  padding: 32px 0 80px;
}

.course-hero .woocommerce-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 48px;
  font-size: 13px;
  color: var(--line);
}

.course-hero .woocommerce-breadcrumb a {
  color: var(--line);
}

.course-hero .woocommerce-breadcrumb a:hover {
  color: var(--cream);
}

.course-hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 48px;
  align-items: center;
}

.course-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.course-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.2;
  font-weight: 800;
  color: var(--cream);
}

.course-hero__lead,
.course-hero__lead p {
  margin: 0;
  max-width: 48ch;
  font-size: 18px;
  color: var(--line);
  text-wrap: pretty;
}

.course-hero__cover {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 4.4;
  margin: 0;
  justify-self: center;
  overflow: hidden;
  border-radius: 260px 260px 32px 32px;
  border: 10px solid var(--cream);
  background: var(--honey);
}

.course-hero__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--muted);
  color: var(--cream);
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
}

.course-chip--track {
  border-color: var(--sunlight);
  background: var(--sunlight);
  color: var(--ink);
  font-weight: 600;
}

.course-chip--track:hover {
  color: var(--ink);
  background: var(--cream);
}

.course-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px;
  max-width: 560px;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bark);
}

.course-facts div {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  background: var(--ink);
}

.course-facts dt {
  font-size: 12px;
  color: var(--line);
}

.course-facts dd {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.course-body {
  width: min(1280px, 100%);
  margin-inline: auto;
  padding: 80px 0 110px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 48px;
  align-items: start;
}

.course-body__main {
  min-width: 0;
}

.course-body__main .course-sections {
  padding-top: 0;
}

.course-about p {
  max-width: 68ch;
}

.course-buy {
  min-width: 0;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border-radius: 28px;
  border: 1.5px solid var(--ink);
  background: var(--cream);
  box-shadow: 12px 12px 0 var(--sunlight);
}

.course-buy__price .price {
  margin: 0;
  padding: 0;
  background: transparent;
  font: 800 40px/1.2 var(--font);
}

.course-buy form.cart {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.course-buy .single_add_to_cart_button {
  width: 100%;
  min-height: 56px;
  border-radius: 999px !important;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.course-buy .single_add_to_cart_button:hover {
  background: var(--bark);
  color: var(--cream);
}

.course-buy__closed {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--honey);
  font-size: 14px;
  font-weight: 600;
}

.course-buy .stock,
.course-buy .quantity {
  display: none;
}

.course-related {
  margin-inline: calc(50% - 50vw);
  padding: 90px 0;
  background: var(--honey);
}

.course-related__inner {
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
}

.course-related h2 {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 800;
}

.course-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.course-related__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 24px;
  background: var(--cream);
  text-decoration: none;
}

.course-related__card:hover {
  background: #fff;
  color: var(--ink);
}

.course-related__thumb {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--honey);
}

.course-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-related__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.course-related__text small {
  font-size: 12px;
  font-weight: 600;
  color: #765022;
}

.course-related__text strong {
  font-size: 18px;
  font-weight: 700;
}

.course-related__text span {
  font-size: 13px;
  color: var(--muted);
}

.course-includes {
  list-style: none;
  margin: 4px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  width: 100%;
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.course-includes li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.course-includes li::before {
  content: "✓";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sunlight);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

/* ---------- course sections ---------- */
.course-sections {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding: 64px 0 24px;
  max-width: 900px;
}

.course-block {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.course-block__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-block__head--split {
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
}

.course-block__head--split span {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.course-block h2 {
  margin: 0;
  font-size: clamp(26px, 2.8vw, 38px);
}

.course-block__mascot {
  width: 76px;
  height: 76px;
  object-fit: contain;
  flex-shrink: 0;
}

.course-outcomes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.course-outcomes li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  border-radius: 20px;
  background: var(--honey);
  font-weight: 600;
  line-height: 1.6;
}

.course-outcomes li::before {
  content: "";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--ink);
}

.course-outcomes li:nth-child(even)::before {
  border-radius: 0 100%;
  background: var(--gold);
}

.course-outline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-module {
  border-radius: 22px;
  border: 1.5px solid var(--line);
  transition: background 0.25s;
}

.course-module[open] {
  background: var(--honey);
  border-color: var(--honey);
}

.course-module summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
}

.course-module summary::-webkit-details-marker {
  display: none;
}

.course-module__n {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sunlight);
  font: 800 15px var(--font);
}

.course-module[open] .course-module__n {
  background: var(--ink);
  color: var(--sunlight);
}

.course-module__t {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-module__t strong {
  font-size: 18px;
}

.course-module__t small {
  font-size: 13px;
  opacity: 0.7;
}

.course-module summary .icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  transition: transform 0.25s;
}

.course-module[open] summary .icon {
  transform: rotate(45deg);
}

.course-module ol {
  list-style: none;
  margin: 0;
  padding: 0 22px 18px;
}

.course-module li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.course-module li span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 12px;
  border-radius: 50%;
  background: var(--gold);
  vertical-align: middle;
}

.course-module time {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.course-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.course-mentor {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border-radius: 24px;
  border: 1.5px solid var(--ink);
}

.course-mentor__avatar {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--sun);
  display: grid;
  place-items: center;
  font: 800 32px var(--font-display);
  color: var(--ink);
}

.course-mentor strong {
  display: block;
  font: 700 19px var(--font-display);
}

.course-mentor em {
  display: block;
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.course-parents {
  padding: 24px;
  border-radius: 24px;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.course-parents p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
}

.course-genes h2 {
  margin: 0 0 14px;
  font: 700 15px var(--font);
}

.course-genes h2 b {
  font-family: Manrope, var(--font);
  color: var(--gold);
}

.course-genes > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-genes a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: var(--honey);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.course-genes a span {
  font: 800 11px var(--font);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--sunlight);
}

/* related */
.is-course .editorial-related,
.is-course .related {
  padding: 72px 0;
}

@media (max-width: 900px) {
  .course-body {
    grid-template-columns: 1fr;
    padding: 56px 0 80px;
  }

  .course-buy {
    position: static;
    order: -1;
  }

  .course-hero__sun {
    width: 300px;
    inset-inline-end: -180px;
    top: auto;
    bottom: -120px;
  }

  .course-hero__moon {
    display: none;
  }

  .course-sections {
    gap: 48px;
    padding-top: 40px;
  }
}

.course-buy a.button.course-buy__browse {
  display: flex;
  justify-content: center;
  text-align: center;
  width: 100%;
  white-space: normal;
}

@media (max-width: 700px) {
  .course-buy a.button.course-buy__browse {
    padding-block: 12px;
    padding-inline: 20px 84px;
  }
}
