:root {
  --color-main: #ffa15c;
  /* base orange */
  --color-alt: #ff925c;
  /* softer tone */
  --color-light: #ffa15c;
  /* very light */
  --color-peach: #ff852d;
  /* Customise chips */
  --customise-chip-ink: #0d0d0d;
  --customise-chip-paper: #f7f4ef;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Product Page Layout */
.product-page {
  max-width: 1800px;
  width: 100%;
  display: flex;
  margin: auto;
  /* gap: 2rem; */
  padding: 1rem 4rem 4rem 4rem;
  flex-direction: column;
}

.sides-wrapper {
  width: 100%;
  gap: 2rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
}

.left-side,
.right-side {
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 25px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.left-side-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 50%;
}

.left-side {
  width: 100%;
  max-height: fit-content;
}

.right-side {
  width: 100%;
}

.right-side-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 50%;
}

.side-top-title {
  gap: 1rem;
  width: 100%;
  font-size: 2rem;
  display: flex;
  color: var(--black-color);
  font-weight: 800;
  flex-direction: row;
  align-items: center;
}

.badge-holder {
  width: 100%;
  display: none;
  gap: 0.5rem;
}

.badge-of {
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white-color);
  background: var(--black-color);
}

.prun-badge {
  color: #000;
  background: var(--color);
}

.image-preview {
  width: 100%;
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Loading overlay for image preview */
.image-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  border-radius: 20px;
}

.image-loading-overlay i {
  font-size: 2rem;
  color: var(--color);
}

.generate-actions {
  margin-top: 1rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.generate-preview-btn {
  background-color: var(--color);
  color: var(--black-color);
  border: 2px solid var(--color);
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.generate-preview-btn:hover {
  background-color: var(--black-color);
  color: var(--color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.generate-preview-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.image-generating-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.image-generating-wrap i {
  font-size: 2rem;
  color: var(--color);
}

.image-generating-wrap p {
  margin: 0;
  font-weight: 600;
  color: var(--black-color);
}

/* Award Select Panel */
.award-select-panel {
  background: var(--white-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.panel-header h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--black-color);
}

.select-wrapper {
  position: relative;
}

.award-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  background: var(--white-color);
  font-size: 1rem;
  font-weight: 500;
  color: var(--black-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.award-select:focus {
  outline: none;
  border-color: var(--color);
  box-shadow: 0 0 0 3px rgba(255, 161, 92, 0.1);
}

.award-select:hover {
  border-color: var(--color-alt);
}

.award-select option {
  padding: 0.5rem;
  font-weight: 500;
}

/* Product Image Placeholder */
.product-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: transparent;
  border-radius: 12px;
  border: 0;
}

.product-preview-fallback {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.product-preview-shell {
  width: 300px;
  background: transparent;
}

.product-preview-carousel {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: transparent;
}

.product-preview-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}

.product-preview-carousel-image {
  flex: 0 0 100%;
  width: 100%;
  min-width: 285px;
  min-height: 400px;
  max-height: 400px;
  object-fit: contain;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
}

.product-preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 17, 0.72);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    background 0.2s ease;
  z-index: 2;
}

.product-preview-nav.prev {
  left: 0.75rem;
}

.product-preview-nav.next {
  right: 0.75rem;
}

.product-preview-nav:hover,
.product-preview-nav:focus-visible {
  background: rgba(17, 17, 17, 0.9);
}

.product-preview-carousel:hover .product-preview-nav,
.product-preview-carousel:focus-within .product-preview-nav {
  opacity: 1;
  pointer-events: auto;
}

.product-preview-image {
  width: 100%;
  min-width: 285px;
  min-height: 400px;
  max-height: 400px;
  object-fit: contain;
  background: transparent;
}

.product-image-label {
  text-align: center;
}

.product-image-label p {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: var(--black-color);
}

.product-image-label small {
  color: #6c757d;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .award-select-panel {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .panel-header h3 {
    font-size: 1rem;
  }

  .award-select {
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
  }

  .product-image-placeholder {
    padding: 1.5rem;
  }

  .product-preview-shell {
    width: min(100%, 280px);
  }

  .product-preview-carousel {
    min-height: unset;
  }

  .product-preview-carousel-image {
    min-width: 240px;
    min-height: 340px;
    max-height: 340px;
  }

  .product-preview-image {
    min-width: 240px;
    min-height: 340px;
    max-height: 340px;
  }
}

.prev-wrap {
  width: 300px;
  position: relative;
  overflow: hidden;
  filter: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.4));
  transition: 0.3s;
}

.preview-image {
  width: 100%;
  min-width: 285px;
  min-height: 400px;
  background: #ffffff00;

  border: 0px solid transparent;
  transition: 3s;
  position: relative;
  backface-visibility: hidden;
}

.top-wrapper {
  width: 100%;
  padding: 1rem;
  display: none;
}

.preview-title {
  font-weight: 800;
  font-size: 2rem;
  line-height: 2rem;
  color: var(--color);
}

@media (max-width: 600px) {
  .preview-title {
    font-size: 1.3rem;
    line-height: 1.4rem;
  }
}

.preview-subtitle {
  width: 100%;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1rem;
  color: var(--black-color);
}

@media (max-width: 600px) {
  .preview-subtitle {
    display: none;
  }
}

.options-wrapper {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.options-wrapper::-webkit-scrollbar {
  display: none;
}

.options-wrapper.few-items {
  justify-content: center;
}

.option-container {
  flex: 0 0 auto;
  width: 100px;
  height: 150px;
  border-radius: 15px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 0.5rem;
  transition: 0.2s;
}

.option-container:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.option-image-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.option-image {
  max-width: 80%;
  height: auto;
}

.option-title {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  line-height: 1rem;
  font-weight: bold;
  margin-top: 0.5rem;
}

.runs-section {
  width: 100%;
  margin: auto;
  padding: 2rem;
  margin-top: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 25px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: fit-content;
  transition: 1s;
}

/* Map view accordion: space between title row and body, and between alert / legend / map */
.product-map-accordion.runs-section {
  gap: 1.75rem;
}

.product-map-accordion .product-award-map-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.product-map-accordion .product-award-map-intro {
  margin: 0;
}

.product-map-accordion .tracker-alphabet-map-note {
  margin: 0;
}

.product-map-accordion .tracker-alphabet-map-legend.product-award-map-legend {
  margin: 0;
}

.product-map-accordion .tracker-alphabet-map.product-award-map {
  margin: 0;
}

.product-map-accordion--stub .product-map-stub-message {
  margin: 0;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--black-color);
}

.runs-section h2 {
  font-size: 2rem;
  color: var(--black-color);
  font-weight: 800;
  margin-bottom: 1rem;
  text-align: center;
}

.product-info-accordion {
  gap: 1rem;
}

.product-info-content {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-info-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.5fr);
  gap: 0.8rem;
  align-items: start;
  margin-top: 10px;
}

.product-info-copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.product-info-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color);
}

.product-info-heading {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--black-color);
}

.product-info-disclaimers {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding-top: 0.15rem;
}

.product-info-disclaimers p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.72);
  flex: 1 1 260px;
}

.product-info-disclaimers strong {
  color: var(--black-color);
}

.product-info-details {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 0.8rem;
  align-items: start;
}

.product-info-column {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.product-info-section-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--black-color);
}

.product-info-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.product-info-spec-card,
.product-info-shipping-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
}

.product-info-spec-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.product-info-spec-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color);
}

.product-info-spec-card strong {
  font-size: 0.88rem;
  color: var(--black-color);
  line-height: 1.25;
}

.product-info-spec-card small {
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.7);
}

.product-info-shipping-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-info-shipping-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.product-info-shipping-points {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-info-shipping-point {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.product-info-shipping-point strong {
  font-size: 0.78rem;
  color: var(--black-color);
}

.product-info-shipping-point span {
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.72);
}

.product-info-packaging-visual {
  width: 150px;
  height: 110px;
  margin-top: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-info-packaging-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-info-lead {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--black-color);
}

.product-info-list {
  margin: 0;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.product-info-plain-list li {
  color: rgba(0, 0, 0, 0.76);
  font-size: 0.8rem;
  line-height: 1.4;
}

.runs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 1rem;
  max-height: calc(300px + 4rem);
  overflow-y: auto;
  overflow: overlay;
  padding: 1rem;
}

/* Run Square: fixed, square shape with rounded corners and centered text */
.run-square {
  background-color: var(--background);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s;
  cursor: pointer;
  aspect-ratio: 1/1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.run-square:hover {
  transform: scale(1.05);
}

/* Run label styling: bold and large */
.run-label {
  font-size: 2rem;
  font-weight: bold;
  color: var(--black-color);
}

/* Active run square style */
.run-square.active {
  border-width: 4px;
}

/* Run details container */
.run-details {
  background: var(--foreground);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 25px;
  padding: 1rem;
  position: relative;
  margin-bottom: 1rem;
  overflow: hidden;
}

.run-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.run-details li {
  font-size: 0.9rem;
  color: var(--black-color);
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.run-details li:last-child {
  border-bottom: none;
}

.customise-options textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  background: var(--foreground);
  color: var(--black-color);
  font-size: 1rem;
}

.customise-options {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.customise-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.customise-field {
  position: relative;
  width: 100%;
}

.customise-field__label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black-color);
  opacity: 0.78;
  margin-bottom: 0.55rem;
}

.customise-chip-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.7rem;
  overflow-x: auto;
  padding: 0.2rem 0.1rem 0.5rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.customise-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  appearance: none;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding: 0.7rem 1.2rem;
  border-radius: 14px;
  border: 2px solid var(--customise-chip-ink);
  background: var(--customise-chip-paper);
  color: var(--customise-chip-ink);
  cursor: pointer;
  box-shadow: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    transform 0.12s ease;
  max-width: 16rem;
  text-align: center;
}

.customise-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.customise-chip:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: #000;
}

.customise-chip:not(:disabled):active {
  transform: translateY(0);
}

.customise-chip:focus-visible {
  outline: 3px solid var(--color-main);
  outline-offset: 3px;
}

/* Award chips: number above title */
.customise-chip-strip--award .customise-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.55rem 1rem 0.62rem;
}

.customise-chip-strip--award .customise-chip__value {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.customise-chip-strip--award .customise-chip__label {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  max-width: 12.5rem;
}

/* Award row: milestone / challenge / legend — orange “finisher” selection */
.customise-chip-strip--award .customise-chip.is-selected {
  border-width: 3px;
  border-color: var(--color-main);
  background: linear-gradient(165deg, rgba(255, 161, 92, 0.22) 0%, rgba(255, 161, 92, 0.09) 100%);
  color: var(--customise-chip-ink);
}

/* Style row: selected = bold black bib (non–color-picker options) */
.customise-chip-strip--theme .customise-chip.is-selected:not(.customise-chip--picker) {
  border-color: var(--customise-chip-ink);
  background: var(--customise-chip-ink);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* Custom / Gradient: selected chip shows picker colour; --picker-* set in product.js */
.customise-chip--theme.customise-chip--picker {
  position: relative;
  padding-right: 1rem;
  padding-left: 1rem;
}

.customise-chip--picker[data-theme-value='customColor'].is-selected,
.customise-chip--picker[data-theme-value='gradientColor'].is-selected {
  background: var(--picker-chip-bg, var(--customise-chip-paper));
  color: var(--picker-chip-fg, var(--customise-chip-ink));
  text-shadow: none;
  border-width: 2px;
  border-style: solid;
  border-color: var(--picker-chip-border, rgba(0, 0, 0, 0.22));
}

.customise-chip--picker[data-theme-value='customColor'].is-selected.customise-chip--light-fg
  .customise-chip__text,
.customise-chip--picker[data-theme-value='gradientColor'].is-selected.customise-chip--light-fg
  .customise-chip__text {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.customise-chip--theme.customise-chip--picker.is-selected.is-picker-active {
  outline: 3px solid var(--color-main);
  outline-offset: 3px;
}

.customise-chip__picker-slot {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.customise-chip--picker.is-selected .customise-chip__picker-slot {
  pointer-events: auto;
}

.customise-chip__picker-slot input[type='color'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  cursor: pointer;
  border: none;
  padding: 0;
}

.customise-chip__text {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.customise-chip__theme-icon {
  margin-right: 0.4em;
  vertical-align: -0.1em;
  font-size: 1.05em;
  color: currentColor;
}

.customise-chip__theme-image-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.45rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.9;
}

.customise-chip__theme-image-indicator[data-tooltip]:hover::after,
.customise-chip__theme-image-indicator[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(18, 18, 18, 0.96);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0.35rem 0.5rem;
  border-radius: 0.45rem;
  z-index: 5;
}

.customise-color-inputs-mount {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.customise-field--title-colour {
  margin-top: 0;
}

/* Tighter gap under section heading (global input uses margin-top: 2rem for floating label) */
.customise-field--title-colour .customise-field__label {
  margin-bottom: 0.35rem;
}

.customise-field--title-colour .customise-title-field .input-container input {
  margin-top: 0.75rem;
}

.customise-row-title-colour {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.customise-title-field {
  flex: 1;
  min-width: 12rem;
}

.customise-title-swatch-wrap {
  position: relative;
  flex-shrink: 0;
  width: 7.5rem;
}

.customise-title-swatch-input {
  display: block;
  width: 100%;
  height: 4rem;
  margin-top: 2rem;
  padding: 0;
  border: 2px solid rgba(0, 0, 0, 0.14);
  border-radius: 10px;
  cursor: pointer;
  background: var(--foreground, #fff);
}

@media (max-width: 520px) {
  .customise-row-title-colour {
    flex-direction: column;
    align-items: stretch;
  }

  .customise-title-swatch-wrap {
    width: 100%;
    max-width: 14rem;
  }
}

.bad-run {
  border: 2px solid var(--error-color);
}

.ok-run {
  border: 2px solid var(--warning-color);
}

.good-run {
  border: 2px solid var(--success-color);
}
.best-run {
  border: 5px solid #ffe75c;
  box-shadow: 0 0 10px #ffe75c;
  background-image: repeating-linear-gradient(
    -45deg,
    #ffe75c,
    #ffe75c 10px,
    #fddc3a 10px,
    #fddc3a 20px
  ) !important;
  background-size: 200% 200%;
  animation: barberpole 60s linear infinite;
  background-position: 100% 100%;
  display: flex;
}

.pb-star {
  position: absolute;
  right: calc(50% - 0.75rem);
  bottom: -0.75rem;
  font-size: 1.5rem;
  color: var(--black-color);
  height: 1.5rem;
  width: 1.5rem;
  line-height: 1.5rem;
  text-align: center;
}

.product-buttons {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

.product-button {
  width: 50%;
  padding: 1rem;
  border: 4px solid var(--color);
  display: flex;
  font-size: 1.1rem;
  color: var(--black-color);
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-radius: 3rem;
  font-weight: 600;
  background-color: rgba(var(--color-rgb), 0.1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  align-content: center;
  transition: 0.2s;
  cursor: pointer;
  gap: 1rem;
}

.product-button:hover {
  background-color: rgba(var(--color-rgb), 0.2);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border: solid 4px transparent;
  /* padding: calc(1.5rem); */
  transform: scale(1.005);
}

.product-button:active {
  transform: scale(0.99);
}

.product-button {
  --border-angle: 0turn;
  --main-bg: conic-gradient(
    from var(--border-angle),
    var(--foreground),
    var(--foreground) 5%,
    var(--foreground) 60%,
    var(--foreground) 95%
  );
  border: solid 1px transparent;
  padding: calc(1.5rem + 4px);
  --gradient-border: conic-gradient(
    from var(--border-angle),
    transparent 25%,
    var(--color),
    var(--color-alt) 99%,
    transparent
  );
  background:
    var(--main-bg) padding-box,
    var(--gradient-border) border-box,
    var(--main-bg) border-box;
  background-position: center center;
  animation: bg-spin 10s ease-in-out infinite;
  /* Optional: hint to the browser to optimize this animation */
  will-change: --border-angle;
}

@-webkit-keyframes bg-spin {
  to {
    --border-angle: 1turn;
  }
}

@keyframes bg-spin {
  to {
    --border-angle: 1turn;
  }
}

@property --border-angle {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0turn;
}

.buy-button,
.product-button.product-button--try-code {
  --main-bg: conic-gradient(
    from var(--border-angle),
    rgba(var(--color-rgb), 1),
    rgba(var(--color-alt-rgb), 1) 5%,
    rgba(var(--color-alt-rgb), 1) 60%,
    rgba(var(--color-rgb), 1) 95%
  );
  background: linear-gradient(
    180deg,
    rgba(var(--color-rgb), 1) 0%,
    rgba(var(--color-alt-rgb), 1) 100%
  );
  color: var(--background);
  overflow: hidden;
  position: relative;
}

.product-button.product-button--try-code {
  text-decoration: none;
  box-sizing: border-box;
}

.product-buttons.product-buttons--try-code {
  justify-content: center;
}

.product-buttons.product-buttons--try-code .product-button--try-code {
  width: 100%;
  max-width: 26rem;
}

.animated-arrow {
  display: inline-block;
  animation: arrow-slide 2s ease-in-out infinite;
}

@keyframes arrow-slide {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(10px);
  }
}

.wiggle {
  display: inline-block;
  animation: wiggle 4s infinite ease-out;
}

@keyframes wiggle {
  /* Wiggle sequence */
  0% {
    transform: rotate(0deg);
  }

  10% {
    transform: rotate(15deg);
  }

  20% {
    transform: rotate(-15deg);
  }

  30% {
    transform: rotate(10deg);
  }

  40% {
    transform: rotate(-10deg);
  }

  50% {
    transform: rotate(0deg);
  }

  /* Stationary break */
  75% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

.carticle {
  font-size: 2rem;
  text-align: center;
  color: #000;
  text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  position: fixed;
  z-index: 999;
}

.scale-pulse {
  /* Trigger the keyframe when the class is added. */
  animation: scalePulse 1s ease forwards;
}

@keyframes scalePulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulseAnimation 0.5s ease;
}

@keyframes pulseAnimation {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Charge up effect */
.charge-animation {
  animation: chargeEffect 300ms ease-out forwards;
}

@keyframes chargeEffect {
  0% {
    transform: translateX(0);
  }

  30% {
    transform: translateX(-5px);
  }

  60% {
    transform: translateX(20px);
  }

  100% {
    transform: translateX(0);
  }
}

.buy-button i {
  display: inline-block;
}

/* Charge/pulse effect on the button container */
.btn-charge {
  animation: btnCharge 800ms ease-out forwards;
}

@keyframes btnCharge {
  0% {
    transform: scale(1);
    box-shadow: none;
  }
  30% {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(72, 52, 212, 0.5);
  }
  60% {
    transform: scale(0.95);
    box-shadow: 0 0 4px rgba(72, 52, 212, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

/* Pivot animation on the button container */
.btn-pivot {
  animation: btnPivot 800ms ease-out forwards;
  transform-origin: bottom left;
}

@keyframes btnPivot {
  0% {
    transform: rotate(0deg);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    transform: scale(1.025) !important;
  }

  /* Slowly rotate left */
  30% {
    transform: rotate(-5deg);
  }

  /* Quickly pivot to a slight right rotation */
  60% {
    transform: rotate(2deg);
  }

  /* Slight left adjustment */
  80% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(0deg);
    box-shadow: 0 0 10px rgba(var(--color-rgb), 0.9);
    transform: scale(1.025) !important;
  }
}

/* Shuffle animation on the span element inside the button */
.span-shuffle {
  animation: spanSlide 600ms ease-out forwards;
}

@keyframes spanSlide {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(-20px);
  }

  100% {
    transform: translateX(0);
  }
}

/* Ensure the arrow icon is inline-block so it can animate properly */
.buy-button i {
  display: inline-block;
}

.bread-bar {
  width: 100%;
  padding: 0 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1800px;
  display: flex;
  margin: auto;
}

.run-detail-container {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  padding: 1rem 2rem 2rem 2rem;
}

.best-run-banner {
  background-image: repeating-linear-gradient(
    -45deg,
    #ffe75c,
    #ffe75c 10px,
    #fddc3a 10px,
    #fddc3a 20px
  ) !important;
  background-size: 200% 200%;
  animation: barberpole 60s linear infinite;
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border-radius: 8px;
  width: calc(100% - 4rem);
  margin: 2rem 2rem 0 2rem;
  border: 4px solid #f8e784;
  font-size: 1rem;
  font-weight: 700;
  position: relative !important;
  overflow: hidden !important;
  background-position: 200% 200%;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
}

@keyframes barberpole {
  100% {
    background-position: 100% 100%;
  }
}

.extra-bottom-gap {
  margin-bottom: 0.5rem;
}

.remove-color {
  display: block;
  margin-top: 0.5rem;
  background: red;
  color: #fff;
  border: none;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}

#addCustomColorBtn button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

.scale-animation {
  animation: scaleAnim 0.5s ease;
}

@keyframes scaleAnim {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Run Insights Section - using standard toggle pattern */
.insights-wrapper .badge-of i {
  margin-right: 0.5rem;
  color: var(--color-main);
}

/* Statistics Cards */
.stats-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 84px;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 161, 92, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 161, 92, 0.3);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-main), var(--color-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.stat-icon i {
  font-size: 1.2rem;
  color: white;
}

.stat-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-color);
  line-height: 1.1;
  margin-bottom: 0.15rem;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-color);
  opacity: 0.7;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.stat-meta {
  font-size: 0.76rem;
  color: var(--text-color);
  opacity: 0.72;
  margin-top: 0.15rem;
  line-height: 1.25;
}

/* Chart Controls */
.chart-controls {
  margin-bottom: 0.85rem;
}

.chart-toggle-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.chart-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.82rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.chart-toggle i {
  font-size: 1rem;
}

.chart-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.chart-toggle:hover::before {
  left: 100%;
}

.chart-toggle:not(.black) {
  background: var(--color-main);
  color: var(--black-color);
  border-color: var(--color-main);
  box-shadow: 0 4px 15px rgba(255, 161, 92, 0.3);
}

.chart-toggle.black {
  background: rgba(255, 161, 92, 0.12);
  color: var(--black-color);
  border-color: rgba(255, 161, 92, 0.4);
  box-shadow: none;
}

.chart-toggle.black:hover {
  background: rgba(255, 161, 92, 0.2);
  border-color: var(--color-main);
  color: var(--color-main);
  transform: translateY(-1px);
}

/* Chart Container */
.chart-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 0.25rem;
}

.chart-wrapper {
  width: 100%;
  max-width: 800px;
  height: 290px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.chart-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 161, 92, 0.05), transparent);
  pointer-events: none;
}

.chart-wrapper canvas {
  position: relative;
  z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .stats-cards-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.85rem;
    flex-direction: row;
    text-align: left;
    gap: 0.75rem;
    min-height: 76px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
  }

  .stat-icon i {
    font-size: 1rem;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .stat-meta {
    font-size: 0.68rem;
  }

  .chart-toggle-buttons {
    gap: 0.5rem;
    justify-content: flex-start;
  }

  .chart-toggle {
    padding: 0.5rem 0.8rem;
    font-size: 0.76rem;
  }

  .chart-wrapper {
    height: 240px;
    padding: 0.85rem;
  }
}

.anim-text-flow,
.anim-text-flow-hover:hover {
  text-transform: uppercase;
  text-rendering: optimizeLegibility;
}

.anim-text-flow span,
.anim-text-flow-hover:hover span {
  animation-name: anim-text-flow-keys;
  animation-duration: 12s;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-fill-mode: forwards;
  display: inline-block;
  transition: color 2s ease;
}

@keyframes anim-text-flow-keys {
  0% {
    color: #ffa15c;
  }

  25% {
    color: #ff8934;
  }

  50% {
    color: #fcaa70;
  }

  75% {
    color: #ffa15c;
  }

  100% {
    color: #ff7d20;
  }
}

.toggle-prod-sec i {
  transition: 0.3s;
}

.toggle-prod-sec {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2rem;
  font-size: 2rem;
  color: #000;
  cursor: pointer;
  transition: 0.3s;
  width: 100%;
  z-index: 99;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  align-content: flex-start;
  flex-direction: row;
}

.toggle-prod-sec:hover {
  opacity: 0.8;
}

.toggle-limit {
  max-height: 7rem;
  overflow: hidden;
  transition: 0.3s;
}

.toggle-limit.expanded {
  max-height: none;
}

.rotated-tog {
  transform: rotate(180deg);
}

.runner-flag {
  height: 2rem;
  min-width: 2.75rem;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.runner-flag-text {
  min-height: 2rem;
  border-radius: 8px;
  text-align: center;
  display: flex;
  padding: 0.25rem 0.85rem;
  flex-direction: column;
  background-color: var(--color);
  font-weight: 700;
  justify-content: center;
  font-size: 0.82rem;
  line-height: 1.1;
}

.run-detail-header {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: flex-start;
  flex-direction: row;
  padding: 1rem 1.5rem 0 1.5rem;
}

.run-flags {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
}

.with-badge-title {
  display: flex;
  flex-direction: row-reverse;
  gap: 1rem;
}

.custom-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.custom-options-grid .option {
  flex: 1 1 150px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  justify-items: stretch;
  align-items: center;
  justify-content: center;
  align-content: center;
}

/* Remove padding and border effects for section and options-grid in dynamic product page */
.customise-options .section {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.customise-options .section .section-title {
  position: static;
  top: auto;
  left: auto;
  width: auto;
  padding: 0;
  background: transparent;
  font-size: 1rem;
  color: var(--text-color);
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.customise-options .options-grid {
  margin: 0;
  padding: 0;
}

/* Display options — grouped cards (dynamic product customise panel only) */
.customise-options .display-options-section {
  margin-top: 0;
}

.customise-options .display-options-group {
  margin-bottom: 0.65rem;
}

.customise-options .display-options-group:last-child {
  margin-bottom: 0;
}

.customise-options .display-options-group__heading {
  margin-bottom: 0.3rem;
}

.customise-options .display-options-group__title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black-color);
  opacity: 0.78;
  line-height: 1.2;
}

.customise-options .display-options-group__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

@media (min-width: 480px) {
  .customise-options .display-options-group__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.customise-options .display-option-card.switch-container {
  margin-bottom: 0;
}

.customise-options .display-option-card {
  margin-bottom: 0;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  /* background: var(--foreground, #faf8f5); */
  padding: 0.35rem 0.45rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.customise-options .display-option-card:hover {
  border-color: rgba(255, 161, 92, 0.55);
  background: rgba(255, 161, 92, 0.06);
}

.customise-options .display-option-card:focus-within {
  border-color: var(--color-main, #ffa15c);
  box-shadow: 0 0 0 2px rgba(255, 161, 92, 0.25);
}

.customise-options .display-option-card__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  cursor: pointer;
}

.customise-options .display-option-card__content {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.customise-options .display-option-card__icon {
  font-size: 1rem;
  color: var(--black-color);
  opacity: 0.72;
  flex-shrink: 0;
}

.customise-options .display-option-card__text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--black-color);
  line-height: 1.2;
}

/* Extra group: single PB tile */
.customise-options .display-options-group:last-child .display-options-group__grid {
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .customise-options .display-options-group:last-child .display-options-group__grid {
    grid-template-columns: minmax(0, 16rem);
  }
}

.preview-button-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.preview-button {
  background: linear-gradient(135deg, var(--color-main) 0%, var(--color-alt) 100%);
  position: relative;
  overflow: hidden;
  padding: 1rem 2rem;
  border-radius: 25px;
  width: 100%;
  border: 2px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  cursor: pointer;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 4px 15px rgba(255, 161, 92, 0.3);
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  color: white;
  text-decoration: none;
}

.preview-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.preview-button:hover::before {
  left: 100%;
}

.preview-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 161, 92, 0.4);
  gap: 1rem;
}

.preview-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 161, 92, 0.3);
}

.preview-button i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.preview-button:hover i {
  transform: scale(1.1);
}

/* Loading / in-flight generation: grey out; native :disabled used so :not(.disabled) still allows preview-mode styling */
.preview-button.loading,
.preview-button:disabled:not(.disabled) {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: not-allowed;
  pointer-events: none;
}

.preview-button.loading:hover,
.preview-button.loading:active,
.preview-button:disabled:not(.disabled):hover,
.preview-button:disabled:not(.disabled):active {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.preview-button.loading::before,
.preview-button:disabled:not(.disabled)::before {
  display: none;
}

.preview-button.loading i:not(.fa-spin) {
  display: none;
}

.preview-button.loading i.fa-spin {
  display: inline-block !important;
  animation: spin 1s linear infinite;
}

.preview-button:disabled:not(.disabled) i:not(.fa-spin) {
  display: none;
}

.preview-button:disabled:not(.disabled) i.fa-spin {
  display: inline-block !important;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Success state for preview button */
.preview-button.success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.preview-button.success i {
  color: white;
}

/* Responsive preview button */
@media (max-width: 768px) {
  .preview-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 20px;
  }

  .preview-button i {
    font-size: 1rem;
  }
}

.magic-loading {
  box-shadow: 0 0 12px rgba(var(--color-rgb), 0.4);
  border: solid 2px var(--color);
  position: relative;
  margin: 0px;
  overflow: visible;
}

.magic-loading::after {
  position: absolute;
  top: 10px;
  left: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  content: '';
  z-index: -1;
  opacity: 0.5;
  filter: blur(40px);
  transform: scale(1.1);
  background: linear-gradient(90deg, #ffa15c, #ff5c7a);
  background-size: 200% 200%;
  animation: animateGlow 10s ease infinite;
}

@keyframes animateGlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.image-generating-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 3rem;
  opacity: 1;
  justify-content: center;
  color: var(--color);
}

.color-input {
  height: 6rem;
  border-radius: 8px;
}

.scale-pulse-remix {
  animation:
    scalePulseRemix 3s ease-in-out infinite,
    wigglePulse 3s ease-in-out infinite;
  transform-origin: center;
}

@keyframes scalePulseRemix {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes wigglePulse {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-2deg);
  }

  50% {
    transform: rotate(2deg);
  }

  75% {
    transform: rotate(-1deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

.flip-once {
  position: relative;
  display: inline-block;
  perspective: 1000px;
  transform-style: preserve-3d;
  animation: spinYOnce 1s ease-in-out forwards;
  box-shadow: 0 45px 20px rgba(0, 0, 0, 0.35);
}

@keyframes spinYOnce {
  0% {
    transform: rotateY(0deg) scale(1);
  }

  30% {
    transform: rotateY(-2deg);
  }
  50% {
    transform: rotateY(180deg) scale(1.1);
  }
  80% {
    transform: rotateY(380deg) scale(1);
  }
  100% {
    transform: rotateY(360deg) scale(1);
  }
}

.back-side {
  width: 100%;
  position: absolute;
  top: 0px;
  left: 0px;
  display: none !important;
  height: 100%;
  background-color: rgb(0, 0, 0);
  background-image: url(../../assets/images/logo.png);
  background-size: 15px;
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 15rem;
  align-content: center;
  align-self: center;
  color: #000;
  justify-content: center;
  z-index: -1;
  transform: rotateY(180deg);
  background-position: center center;
  padding: 3rem;
  border-width: 10px;
  border-style: solid;
  border-color: rgb(0, 0, 0);
  border-image: initial;
  gap: 1rem;
}

.back-side span i {
  transform: rotateY(180deg);
}

.half-row-inp {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

/* Small devices (phones, less than 600px) */
@media only screen and (max-width: 599px) {
  .sides-wrapper {
    width: 100%;
    gap: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
  }

  .left-side-wrap {
    width: 100%;
  }

  .left-side {
    width: 100%;
    max-height: fit-content;
  }

  .right-side-wrap {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
  }
}

/* Medium devices (tablets, 600px and up) */
@media only screen and (min-width: 600px) and (max-width: 1023px) {
  .sides-wrapper {
    width: 100%;
    gap: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
  }
  .left-side-wrap {
    width: 100%;
  }
  .left-side {
    width: 100%;
    max-height: fit-content;
  }
  .right-side-wrap {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
  }
}

/* Large devices (desktops, 1024px and up) */
@media only screen and (min-width: 1024px) {
  /* Your styles for large screens */
}

/* Responsive styles for full-width controls */
@media only screen and (max-width: 768px) {
  .full-width-controls {
    flex-direction: column;
    gap: 1rem;
  }

  .control-panel {
    padding: 1.5rem;
  }

  .search-parkrun-wrap {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-parkrun-wrap .button {
    width: 100%;
  }
}

/* Product search section styles */
.search-section {
  background: var(--background);
}

.search-section .panel-header {
  margin-bottom: 1rem;
}

.search-section .panel-header h3 {
  color: var(--text-color);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.search-parkrun-wrap {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Full-width controls section */
.full-width-controls {
  width: 100%;
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 0;
  display: none;
}

.control-panel {
  flex: 1;
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 25px;
  background: var(--background);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.control-panel .panel-header {
  margin-bottom: 0;
}

.control-panel .panel-header h3 {
  color: var(--text-color);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Product options styling */
.product-option-select {
  transition: all 0.3s ease;
}

.product-option-select:focus {
  border-color: var(--color-main);
  box-shadow: 0 0 0 2px rgba(255, 161, 92, 0.2);
}

.product-option-select option {
  padding: 0.5rem;
}

/* Price display updates */
#product-price-display {
  transition: all 0.3s ease;
}

#product-price-display.updating {
  opacity: 0.7;
  transform: scale(0.98);
}

/* Product buttons with options */
.product-buttons .product-button {
  transition: all 0.3s ease;
}

.product-buttons .product-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-buttons .product-button.error {
  background: #dc3545 !important;
  color: white !important;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Keep cart button text on one line */
.product-button.cart-button span {
  white-space: nowrap;
}

/* Product Bar Styling */
.product-bar {
  margin: 2rem 0;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  z-index: 10;
  position: sticky;
  bottom: 2rem;
}

/* Inner Animated Radial Gradient */
.product-bar-wrapper {
  left: 2px;
  position: absolute;
  top: 2px;
  width: calc(100% - 4px);
  bottom: 2px;
  right: 2px;
  border-radius: inherit;
  padding: 1px;
  z-index: 2;
  background: var(--navbar);
  background: radial-gradient(
    circle at var(--gradient-x) var(--gradient-y),
    var(--bold),
    transparent 50%
  );
  opacity: 0.3;
  transition: background-position 0.1s ease-out;
}

.product-bar-wrapper::after {
  content: '';
  background: var(--navbar);
  position: relative;
  width: 100%;
  border-radius: inherit;
  opacity: 1;
}

.product-bar-container {
  border-radius: inherit;
  background-color: var(--navbar);
  padding: 0.5rem 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  backdrop-filter: blur(10px);
  z-index: 3;
  gap: 1rem;
  z-index: 10;
}

/* Product Info (Left Side) */
.product-bar .product-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.product-bar .product-info .preview-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-bar .product-info #product-price-display .product-price-display__amount {
  color: var(--black-color);
}

.product-bar .product-info #product-price-display .product-price-display__rest {
  color: var(--color-main);
}

.product-bar .product-info .preview-subtitle {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Product Controls (Right Side) */
.product-bar .product-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  flex-direction: row;
}
.product-bar .product-control-item {
  display: flex;
  align-items: center;
}

.product-bar .product-select {
  padding: 0.5rem 1rem;
  border: 2px solid rgba(var(--white-color-rgb, 255, 255, 255), 0.1);
  border-radius: 25px;
  background: rgba(var(--white-color-rgb, 255, 255, 255), 0.05);
  color: var(--text-color);
  font-size: 0.9rem;
  min-width: 150px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.product-bar .product-select:focus {
  outline: none;
  border-color: var(--color-main);
  box-shadow: 0 0 0 2px rgba(255, 161, 92, 0.2);
  background: rgba(var(--white-color-rgb, 255, 255, 255), 0.1);
}

.product-bar .product-input {
  padding: 0.5rem 1rem;
  border: 2px solid rgba(var(--white-color-rgb, 255, 255, 255), 0.1);
  border-radius: 25px;
  background: rgba(var(--white-color-rgb, 255, 255, 255), 0.05);
  color: var(--text-color);
  font-size: 0.9rem;
  min-width: 200px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.product-bar .product-input:focus {
  outline: none;
  border-color: var(--color-main);
  box-shadow: 0 0 0 2px rgba(255, 161, 92, 0.2);
  background: rgba(var(--white-color-rgb, 255, 255, 255), 0.1);
}

.product-bar .product-input::placeholder {
  color: var(--text-color);
  opacity: 0.6;
}

/* Product Actions - Use original button styles */
.product-bar .product-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Responsive Design for Product Bar */
@media only screen and (max-width: 1024px) {
  .product-bar .product-bar-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .product-bar .product-info {
    width: 100%;
    text-align: center;
  }

  .product-bar .product-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .product-bar .product-info .preview-title,
  .product-bar .product-info .preview-subtitle {
    white-space: normal;
    text-align: center;
  }
}

@media only screen and (max-width: 768px) {
  .product-info-hero,
  .product-info-details {
    grid-template-columns: 1fr;
  }

  .product-info-spec-grid {
    grid-template-columns: 1fr;
  }

  .product-info-shipping-layout {
    grid-template-columns: 1fr;
  }

  .product-info-content {
    padding: 0;
  }

  .product-info-heading {
    font-size: 1.05rem;
  }

  .product-info-packaging-visual {
    width: 140px;
    height: 100px;
  }

  .product-bar {
    margin: 1rem 0;
    border-radius: 25px;
  }

  .product-bar .product-bar-container {
    padding: 1rem;
    gap: 1rem;
  }

  .product-bar .product-controls {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .product-bar .product-control-item {
    width: 100%;
  }

  .product-bar .product-select,
  .product-bar .product-input {
    width: 100%;
    min-width: unset;
  }

  .product-bar .product-buttons {
    width: 100%;
    justify-content: center;
  }

  .product-bar .product-button {
    flex: 1;
    justify-content: center;
  }

  /* Prevent button hover effects from changing wrapper size */
  .product-bar .product-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-height: 48px; /* Fixed height to prevent size changes */
  }

  .product-bar .product-button {
    transition: all 0.3s ease;
    transform: none; /* Remove any transform effects */
  }

  .product-bar .product-button:hover {
    transform: none; /* Prevent any transform on hover */
  }

  /* Error state for print type select */
  .product-bar .nice-select.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
    animation: shake 0.5s ease-in-out;
  }
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--color);
  box-shadow: 0 0 0 3px rgba(255, 162, 92, 0.1);
}

.search-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Preview Mode Banner */
.preview-mode-banner {
  background: linear-gradient(135deg, var(--color-main) 0%, var(--color-alt) 100%);
  color: white;
  padding: 2rem;
  margin: 1rem 4rem;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(255, 161, 92, 0.3);
}

.preview-banner-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.preview-banner-icon {
  font-size: 2rem;
  opacity: 0.9;
}

.preview-banner-text {
  flex: 1;
}

.preview-banner-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.preview-banner-text p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.4;
}

.preview-banner-input {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.preview-input {
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  min-width: 250px;
}

.preview-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.preview-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
}

.preview-banner-input .button {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.preview-banner-input .button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

/* Disabled state for preview mode */
.preview-button.disabled,
.award-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Responsive preview banner */
@media (max-width: 768px) {
  .preview-mode-banner {
    margin: 1rem;
    padding: 1.5rem;
  }

  .preview-banner-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .preview-banner-input {
    flex-direction: column;
    width: 100%;
  }

  .preview-input {
    min-width: auto;
    width: 100%;
  }
}

.product-price-dark {
  color: var(--black-color);
}
