/* Ridgehound Outdoor DTC Custom Components
 * Brand tokens: Forest Green #1B3B2B, Trail Orange #E06A2B, Warm Sand #F6F4EF, Charcoal #1E2421
 */

:root {
  --rh-forest: #1b3b2b;
  --rh-forest-dark: #132a1f;
  --rh-orange: #e06a2b;
  --rh-orange-hover: #c9581d;
  --rh-sand: #f6f4ef;
  --rh-sand-dark: #eae5da;
  --rh-ink: #1e2421;
  --rh-muted: #5b655f;
  --rh-border: #d9d5cb;
  --rh-success: #227a4b;
  --rh-radius: 12px;
  --rh-shadow: 0 12px 30px rgba(27, 59, 43, 0.08);
}

/* Shared section header */
.rh-section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.rh-section--sand {
  background-color: var(--rh-sand);
}

.rh-section--forest {
  background-color: var(--rh-forest);
  color: #ffffff;
}

.rh-eyebrow {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rh-orange);
}

.rh-heading {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 3.6vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--rh-forest);
}

.rh-section--forest .rh-heading {
  color: #ffffff;
}

.rh-subtext {
  margin: 0;
  max-width: 62rem;
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--rh-muted);
}

.rh-section--forest .rh-subtext {
  color: rgba(255, 255, 255, 0.82);
}

.rh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.3rem 2.4rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.rh-btn--primary {
  background-color: var(--rh-orange);
  color: #ffffff;
}

.rh-btn--primary:hover {
  background-color: var(--rh-orange-hover);
}

.rh-btn--forest {
  background-color: var(--rh-forest);
  color: #ffffff;
}

.rh-btn--forest:hover {
  background-color: var(--rh-forest-dark);
}

.rh-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ==========================================================================
   1. Free Shipping Progress Bar (Cart Drawer)
   ========================================================================== */
.rh-shipping-bar {
  padding: 1.2rem 1.8rem;
  background-color: var(--rh-sand);
  border-bottom: 1px solid var(--rh-border);
}

.rh-shipping-bar__text {
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--rh-ink);
  text-align: center;
}

.rh-shipping-bar__text strong {
  color: var(--rh-forest);
}

.rh-shipping-bar--unlocked .rh-shipping-bar__text {
  color: var(--rh-success);
  font-weight: 700;
}

.rh-shipping-bar__track {
  position: relative;
  height: 8px;
  width: 100%;
  background-color: var(--rh-sand-dark);
  border-radius: 999px;
  overflow: hidden;
}

.rh-shipping-bar__fill {
  height: 100%;
  background-color: var(--rh-orange);
  border-radius: 999px;
  transition: width 0.35s ease, background-color 0.35s ease;
}

.rh-shipping-bar--unlocked .rh-shipping-bar__fill {
  background-color: var(--rh-success);
}

/* ==========================================================================
   2. Interactive Dog Size Finder
   ========================================================================== */
.rh-size-finder__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  margin-top: 3rem;
  align-items: start;
}

.rh-size-finder__panel {
  background: #ffffff;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  padding: 2.8rem;
  box-shadow: var(--rh-shadow);
}

.rh-unit-toggle {
  display: inline-flex;
  padding: 0.4rem;
  background: var(--rh-sand);
  border-radius: 999px;
  margin-bottom: 2.2rem;
}

.rh-unit-toggle__btn {
  padding: 0.6rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--rh-muted);
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
}

.rh-unit-toggle__btn[aria-pressed='true'] {
  background: var(--rh-forest);
  color: #ffffff;
}

.rh-field-group {
  margin-bottom: 2.2rem;
}

.rh-field-group__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.rh-field-group__label {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--rh-ink);
}

.rh-field-group__value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--rh-forest);
}

.rh-range {
  width: 100%;
  accent-color: var(--rh-orange);
  cursor: pointer;
  height: 6px;
}

.rh-size-result {
  background: var(--rh-forest);
  color: #ffffff;
  border-radius: var(--rh-radius);
  padding: 2.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.rh-size-result__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6.4rem;
  height: 6.4rem;
  border-radius: 16px;
  background: var(--rh-orange);
  color: #ffffff;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.rh-size-result__title {
  margin: 0;
  font-size: 2.2rem;
  color: #ffffff;
}

.rh-size-result__note {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.rh-size-chart {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2.4rem;
  font-size: 1.35rem;
}

.rh-size-chart th,
.rh-size-chart td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rh-border);
}

.rh-size-chart th {
  color: var(--rh-muted);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rh-size-chart tr.is-recommended {
  background-color: #fff3eb;
  font-weight: 700;
  color: var(--rh-forest);
}

.rh-measure-tip {
  margin-top: 1.6rem;
  padding: 1.2rem 1.4rem;
  border-radius: 8px;
  background: var(--rh-sand);
  font-size: 1.35rem;
  color: var(--rh-muted);
}

/* ==========================================================================
   3. Trail Bundle Builder (Ajax Cart Upsell)
   ========================================================================== */
.rh-bundle__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr);
  gap: 2.8rem;
  margin-top: 3rem;
  align-items: start;
}

.rh-bundle__items {
  display: grid;
  gap: 1.6rem;
}

.rh-bundle-card {
  display: grid;
  grid-template-columns: 2.4rem 10rem minmax(0, 1fr) auto;
  gap: 1.6rem;
  align-items: center;
  padding: 1.6rem;
  background: #ffffff;
  border: 2px solid var(--rh-border);
  border-radius: var(--rh-radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rh-bundle-card.is-selected {
  border-color: var(--rh-forest);
  box-shadow: var(--rh-shadow);
}

.rh-bundle-card__check {
  width: 2rem;
  height: 2rem;
  accent-color: var(--rh-forest);
  cursor: pointer;
}

.rh-bundle-card__media {
  width: 10rem;
  height: 10rem;
  border-radius: 8px;
  background: var(--rh-sand);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rh-bundle-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rh-bundle-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--rh-forest);
}

.rh-bundle-card__role {
  margin: 0 0 0.8rem;
  font-size: 1.3rem;
  color: var(--rh-muted);
}

.rh-bundle-card__select {
  padding: 0.6rem 1rem;
  border: 1px solid var(--rh-border);
  border-radius: 6px;
  font-size: 1.35rem;
  background: #ffffff;
  color: var(--rh-ink);
  max-width: 100%;
}

.rh-bundle-card__price {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--rh-forest);
  white-space: nowrap;
}

.rh-bundle__summary {
  background: #ffffff;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  padding: 2.6rem;
  box-shadow: var(--rh-shadow);
  position: sticky;
  top: 2.4rem;
}

.rh-bundle__summary-title {
  margin: 0 0 1.4rem;
  font-size: 2rem;
  color: var(--rh-forest);
}

.rh-bundle__row {
  display: flex;
  justify-content: space-between;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--rh-sand-dark);
  font-size: 1.45rem;
}

.rh-bundle__row--total {
  border-bottom: 0;
  padding-top: 1.4rem;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--rh-forest);
}

.rh-bundle__savings {
  display: inline-block;
  margin-bottom: 1.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: #e6f5ec;
  color: var(--rh-success);
  font-size: 1.3rem;
  font-weight: 700;
}

.rh-bundle__status {
  margin: 1rem 0 0;
  font-size: 1.35rem;
  min-height: 2rem;
  color: var(--rh-success);
  font-weight: 600;
}

.rh-bundle__status.is-error {
  color: #b42318;
}

/* ==========================================================================
   4. Gear Comparison Table
   ========================================================================== */
.rh-compare-wrap {
  margin-top: 3rem;
  overflow-x: auto;
  border-radius: var(--rh-radius);
  border: 1px solid var(--rh-border);
  background: #ffffff;
  box-shadow: var(--rh-shadow);
}

.rh-compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.rh-compare th,
.rh-compare td {
  padding: 1.6rem 2rem;
  border-bottom: 1px solid var(--rh-border);
  font-size: 1.5rem;
  text-align: center;
}

.rh-compare th:first-child,
.rh-compare td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--rh-ink);
  width: 44%;
}

.rh-compare thead th {
  font-size: 1.6rem;
  font-weight: 800;
  padding-block: 2rem;
}

.rh-compare__brand-col {
  background-color: var(--rh-forest);
  color: #ffffff;
}

.rh-compare tbody .rh-compare__brand-cell {
  background-color: #f0f5f2;
  color: var(--rh-forest);
  font-weight: 700;
}

.rh-compare__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--rh-success);
  color: #ffffff;
  font-weight: 800;
}

.rh-compare__cross {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: #ece9e2;
  color: var(--rh-muted);
  font-weight: 700;
}

/* ==========================================================================
   5. UGC Trail Gallery + Trust Bar
   ========================================================================== */
.rh-ugc__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.4rem;
  margin-top: 3rem;
}

.rh-ugc-card {
  position: relative;
  border-radius: var(--rh-radius);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--rh-border);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rh-ugc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rh-shadow);
}

.rh-ugc-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--rh-sand);
}

.rh-ugc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rh-ugc-card__tag {
  position: absolute;
  left: 1.2rem;
  bottom: 1.2rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(27, 59, 43, 0.9);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.rh-ugc-card__body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.rh-ugc-card__quote {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.55;
  color: var(--rh-ink);
}

.rh-ugc-card__meta {
  margin: auto 0 0;
  padding-top: 0.8rem;
  font-size: 1.3rem;
  color: var(--rh-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--rh-sand-dark);
}

.rh-ugc-card__link {
  color: var(--rh-orange);
  font-weight: 700;
  text-decoration: none;
}

.rh-trust-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 4rem;
  padding: 2.4rem;
  border-radius: var(--rh-radius);
  background: var(--rh-forest);
  color: #ffffff;
}

.rh-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
}

.rh-trust-item__icon {
  flex: none;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 10px;
  background: rgba(224, 106, 43, 0.2);
  color: var(--rh-orange);
  display: grid;
  place-items: center;
}

.rh-trust-item__title {
  margin: 0 0 0.2rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
}

.rh-trust-item__desc {
  margin: 0;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.78);
}

@media screen and (max-width: 989px) {
  .rh-size-finder__grid,
  .rh-bundle__layout,
  .rh-ugc__grid {
    grid-template-columns: 1fr;
  }

  .rh-trust-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 640px) {
  .rh-bundle-card {
    grid-template-columns: 2.2rem 7.2rem minmax(0, 1fr);
    gap: 1.2rem;
  }

  .rh-bundle-card__media {
    width: 7.2rem;
    height: 7.2rem;
  }

  .rh-bundle-card__price {
    grid-column: 3;
  }

  .rh-trust-bar {
    grid-template-columns: 1fr;
  }
}
