/* ==========================================================================
   Store additions on top of the Dawn theme stylesheets:
   fonts, review widgets, floating reviews tab, small template helpers.
   ========================================================================== */
:root {
  --font-body-family: "Figtree", sans-serif;
  --font-heading-family: "Figtree", sans-serif;
  --jdgm-star-color: #108474;
  --jdgm-line: rgba(var(--color-foreground), 0.12);
}

/* ---------- Floating reviews tab ---------- */
.jdgm-reviews-tab {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 4;
  display: flex; flex-direction: row; align-items: center; gap: 0.5rem;
  padding: 1.1rem 0.8rem; background: #ffcd00; color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1.4rem; line-height: 1; letter-spacing: 0.04rem; writing-mode: vertical-rl;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
}
.jdgm-reviews-tab svg { width: 1.5rem; height: 1.5rem; display: block; }
.jdgm-form[hidden], .jdgm-form__thanks[hidden] { display: none; }

/* ---------- Stars ---------- */
.jdgm-stars { display: inline-flex; gap: 0.2rem; color: var(--jdgm-star-color); vertical-align: middle; }
.jdgm-star svg { width: 1.8rem; height: 1.8rem; display: block; }

/* ---------- Reviews carousel ---------- */
.jdgm-carousel-section { text-align: center; padding-top: 5rem; padding-bottom: 4rem; }
.jdgm-carousel-title { font-size: 2.4rem; margin: 0 0 0.2rem; font-weight: 500; color: rgb(var(--color-foreground)); letter-spacing: 0.06rem; }
.jdgm-carousel-summary .jdgm-star svg { width: 2rem; height: 2rem; }
.jdgm-carousel-number { display: inline-block; margin-top: 0.4rem; font-size: 1.6rem; color: rgba(var(--color-foreground), 0.75); text-underline-offset: 0.3rem; }
.jdgm-carousel { max-width: 90rem; margin: 3.4rem auto 0; }
.jdgm-carousel__viewport { overflow: hidden; }
.jdgm-carousel__track { display: flex; transition: transform 0.5s ease; }
.jdgm-carousel-item { flex: 0 0 33.3333%; padding: 0 2rem; box-sizing: border-box; }
.jdgm-carousel-item__stars .jdgm-star svg { width: 2.2rem; height: 2.2rem; }
.jdgm-carousel-item__body {
  margin-top: 0.4rem; font-size: 1.6rem; line-height: 1.42; min-height: 9.2rem;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.jdgm-carousel-item__author { margin-top: 1.8rem; font-size: 1.4rem; color: rgba(var(--color-foreground), 0.5); }
.jdgm-carousel-item__product img { width: 8.4rem; height: 5rem; object-fit: cover; margin: 0.6rem auto 0; display: block; }
.jdgm-carousel__arrows { display: flex; justify-content: center; gap: 1.2rem; margin-top: 1.4rem; color: rgba(var(--color-foreground), 0.3); }
.jdgm-carousel__arrows button { background: none; border: 0; cursor: pointer; color: inherit; padding: 0.4rem; }
.jdgm-carousel__arrows button:hover { color: rgb(var(--color-foreground)); }
@media screen and (max-width: 749px) { .jdgm-carousel-item { flex-basis: 100%; } }

/* ---------- Review widgets (product + all reviews) ---------- */
.jdgm-rev-widg { padding: 3rem 0 5rem; max-width: 107rem; margin: 0 auto; color: rgba(var(--color-foreground), 0.75); }
.jdgm-rev-widg__title { text-align: center; font-size: 2.6rem; margin: 0 0 2.6rem; font-weight: 500; letter-spacing: 0.06rem; }
.jdgm-rev-widg__header { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; padding: 0 0 2.4rem; border-bottom: 1px solid var(--jdgm-line); }
.jdgm-rev-widg__header > * { padding: 0.6rem 2rem; }
.jdgm-rev-widg__summary { text-align: center; border-right: 1px solid var(--jdgm-line); }
.jdgm-rev-widg__summary-average { font-size: 1.7rem; color: rgb(var(--color-foreground)); text-decoration: underline; text-underline-offset: 0.3rem; margin-left: 0.4rem; }
.jdgm-rev-widg__summary-text { font-size: 1.6rem; margin-top: 0.2rem; }
.jdgm-histogram { display: grid; gap: 0.4rem; justify-content: center; border-right: 1px solid var(--jdgm-line); }
.jdgm-histogram__row { display: grid; grid-template-columns: auto 14rem 2rem; gap: 2.8rem; align-items: center; font-size: 1.3rem; }
.jdgm-histogram__star .jdgm-star svg { width: 1.4rem; height: 1.4rem; }
.jdgm-histogram__bar { height: 1.4rem; background: rgba(var(--color-foreground), 0.08); display: block; }
.jdgm-histogram__bar-content { display: block; height: 100%; background: rgb(var(--color-foreground)); }
.jdgm-rev-widg__cta { text-align: center; }
.jdgm-write-rev-link { min-width: 24rem; }
.jdgm-rev-widg__sort-wrapper { padding: 1.8rem 0; border-bottom: 1px solid var(--jdgm-line); }
.jdgm-sort { border: 0; background: transparent; font: inherit; font-size: 1.4rem; color: rgb(var(--color-foreground)); cursor: pointer; }
.jdgm-rev { padding: 2.4rem 0; border-bottom: 1px solid var(--jdgm-line); }
.jdgm-rev__prod { font-size: 1.6rem; margin-bottom: 0.8rem; }
.jdgm-rev__prod a { color: rgb(var(--color-foreground)); text-underline-offset: 0.3rem; }
.jdgm-rev__rating-row { display: flex; justify-content: space-between; align-items: center; }
.jdgm-rev__timestamp { font-size: 1.3rem; }
.jdgm-rev__profile { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.6rem; }
.jdgm-rev__icon { width: 3.6rem; height: 3.6rem; background: rgba(var(--color-foreground), 0.08); display: grid; place-items: center; color: rgb(var(--color-foreground)); }
.jdgm-rev__author { font-size: 1.6rem; color: rgb(var(--color-foreground)); }
.jdgm-rev__buyer-badge { background: rgb(var(--color-foreground)); color: rgb(var(--color-background)); font-size: 1.1rem; padding: 0 0.6rem; line-height: 1.6; letter-spacing: 0.04rem; }
.jdgm-rev__title { display: block; margin-top: 1rem; color: rgb(var(--color-foreground)); }
.jdgm-rev__body p { margin: 1.2rem 0 0; font-size: 1.6rem; line-height: 1.45; }
.jdgm-rev__pics { display: flex; gap: 0.8rem; margin-top: 1rem; }
.jdgm-rev__pics img { width: 10rem; height: 10rem; object-fit: cover; }
.jdgm-paginate { display: flex; justify-content: center; align-items: center; gap: 1.6rem; margin-top: 2.4rem; }
.jdgm-paginate:empty { display: none; }
.jdgm-paginate button { background: none; border: 0; font: inherit; font-size: 1.6rem; cursor: pointer; color: rgb(var(--color-foreground)); padding: 0.2rem; }
.jdgm-paginate .jdgm-curt { font-size: 2.2rem; font-weight: 300; }
.jdgm-paginate svg { width: 1.8rem; height: 1.8rem; display: block; }
.jdgm-tabs { display: flex; gap: 1.2rem; padding: 1.6rem 0; border-bottom: 1px solid var(--jdgm-line); }
.jdgm-tab { background: none; border: 0; padding: 0.9rem 1.6rem; font: inherit; font-size: 1.7rem; cursor: pointer; color: rgb(var(--color-foreground)); text-decoration: underline; text-underline-offset: 0.3rem; }
.jdgm-tab.jdgm--active { background: rgba(var(--color-foreground), 0.08); text-decoration: none; }
.jdgm-form { margin: 2.4rem auto 0; max-width: 64rem; display: grid; gap: 1.6rem; padding-bottom: 2.4rem; border-bottom: 1px solid var(--jdgm-line); }
.jdgm-form__title { margin: 0; text-align: center; }
.jdgm-form__rating { display: flex; justify-content: center; gap: 0.4rem; color: var(--jdgm-star-color); }
.jdgm-form__star { background: none; border: 0; cursor: pointer; color: inherit; padding: 0; }
.jdgm-form__star svg { width: 2.8rem; height: 2.8rem; display: block; }
.jdgm-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.jdgm-form__actions { display: flex; justify-content: center; gap: 1.2rem; }
.jdgm-form--error .field__input:invalid, .jdgm-form--error textarea:placeholder-shown { border-color: #d72c0d; }
.jdgm-form__thanks { text-align: center; font-size: 1.6rem; padding: 2rem 0; }
.jdgm-prev-badge { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0.2rem 0 1rem; color: rgb(var(--color-foreground)); text-decoration: none; font-size: 1.6rem; }
.jdgm-prev-badge .jdgm-star svg { width: 1.8rem; height: 1.8rem; }
@media screen and (max-width: 749px) {
  .jdgm-rev-widg__header { grid-template-columns: 1fr; gap: 1.6rem; }
  .jdgm-rev-widg__summary, .jdgm-histogram { border-right: 0; }
  .jdgm-histogram__row { grid-template-columns: auto 12rem 2rem; gap: 1.6rem; }
  .jdgm-form__row { grid-template-columns: 1fr; }
}

/* ---------- Template helpers ---------- */
.shopify-policy__container { max-width: 70ch; margin: 0 auto; padding: 4rem 1.5rem 0; }
.shopify-policy__title { text-align: center; margin-bottom: 2rem; }
.shopify-policy__title h1 { margin: 0; }
.mobile-sort-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0 0 1.5rem; }
.mobile-sort-bar .select { flex: 1; max-width: 24rem; }
.share-button__message { margin-left: 1rem; font-size: 1.3rem; }
.cart__checkout-message { margin-top: 1rem; }
.collection__view-all { margin-top: 3rem; }
