:root {
  --color-primary: #1115e4;
  --color-white: #f8f8f8;
  --color-black:rgb(3, 3, 3);
  --product-sort-transition: 0.4s ease-in-out;
  --site-header-height: 3.5rem;
}

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

body {
  margin: 0;
  font-family: "Rethink Sans", sans-serif;
  line-height: 1.5;
  color: #e0e0e0;
  background: var(--color-black);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--site-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid #222;
  background: color-mix(in srgb, var(--color-black) 90%, transparent);
  backdrop-filter: blur(4px);
}

.site-logo {
  font-family: "Rethink Sans", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
}

.site-logo:hover {
  color:var(--color-primary);
}

.site-header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header-btn {
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-white);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.site-header-btn:hover {
  color: var(--color-primary);

}

.main-content {
  width: 100%;
  margin: 0;
  padding: 2rem 1.5rem;
  min-height: 100vh;
}

.hero {
  position: relative;
  text-align: center;
  margin-bottom: 1.5rem;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-corner {
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  text-align: left;
  max-width: 28em;
  padding: 0 0rem 0 0rem;
}

.hero-title {
  margin: 0 0 0.2rem;
  font-family: "Instrument Serif", serif;
  font-size: 4rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-white);
}

.hero-subtitle {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: 8rem;
  line-height: .8;
  color: var(--color-white);
  display: flex;
  justify-content: center;
}

.hero-tagline {
  margin: 0 0 0rem;
  font-family: "Instrument Serif", serif;
  font-size: 2.5rem;
  color: var(--color-white);
}

.hero-subtext {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: 1rem;
  color: #999;
  line-height: 1.4;
}

.text-carousel-wrap {
  --text-typewriter-speed: 0.08;
  --text-typewriter-backspace-speed: 0.04;
  --text-typewriter-pause: 1;
  display: inline-block;
  min-width: 32ch;
  text-align: center;
  font-weight: 500;
  color: var(--color-primary);
  vertical-align: baseline;
}

.text-carousel-wrap .text-carousel-typed {
  display: inline;
}

.text-carousel-wrap .text-carousel-cursor {
  display: inline-block;
  animation: text-carousel-cursor-blink 0.8s step-end infinite;
  margin-left: 0.02em;

}

@keyframes text-carousel-cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.work-experience {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
}

.work-experience-title {
  flex-shrink: 0;
  max-width: 210px;
  margin: 0;
  font-family: "Rethink Sans", sans-serif;
  font-size: 0.9375rem;
  color: #999;
  line-height: 1.3;
}

.work-experience-track-wrap {
  flex: 1;
  min-width: 0;
  min-height: 100px;
  overflow: hidden;
}

.work-experience-track {
  display: flex;
  align-items: center;
  gap: 6rem;
  width: max-content;
  animation: work-experience-scroll 10s linear infinite;
}

.work-experience-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
}

.work-experience-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

@keyframes work-experience-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.product-filter {
  position: sticky;
  top: var(--site-header-height);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 0;
  background: var(--color-black);
}

.product-filter label {
  font-size: 0.9375rem;
  color: #999;
}

.product-filter-select {
  padding: 0.5rem .5rem 0.5rem 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #e0e0e0;
  background: var(--color-black);
  border: 0px solid var(--color-black);
  border-radius: 4px;
  cursor: default;
  color-scheme: dark;
}

.product-filter-select:hover,
.product-filter-select:focus {
  border-color: var(--color-black);
  outline: none;
}

.product-filter-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-left: 1rem;
  padding-left: 1.5rem;
  border-left: 1px solid #333;
}

.product-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: #999;
  cursor: pointer;
  user-select: none;
}

.product-filter-tag:has(.product-filter-tag-input:checked) .product-filter-tag-label {
  color: var(--color-white);
}

.product-filter-tag:hover {
  color: var(--color-white);
  font-weight: 300;
}

.product-filter-tag-input {
  margin: 0.5;
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1px solid #888;
  background: var(--color-black);
  border-radius: 2px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.product-filter-tag-input:checked {
  background: var(--color-white);
  border-color: var(--color-white);
}

.product-filter-tag-label {
  white-space: nowrap;
}

/* Initial load: cards start invisible (fade in from black is triggered by JS) */
.product-grid--initial .product-card {
  opacity: 0;
  filter: brightness(0);
}

@keyframes product-card-fade-in {
  from {
    opacity: 0;
    filter: brightness(0);
  }
  to {
    opacity: 1;
    filter: brightness(1);
  }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  width: 100%;
}

@media (max-width: 1600px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {

  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #222;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-black) 40%, transparent);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s ease-in-out;
}

.product-card:hover {
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--color-black) 50%, transparent);
  transform: scale(1.0);
}

.product-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-black);
  overflow: hidden;
}

.product-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card-img-fade {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease-out;
}

.product-card-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.5rem, 1.5vw, 1rem);
  flex-grow: 1;
  min-width: 0;
}

.product-card-text {
  min-width: 0;
  flex-grow: 1;
}

.product-card-title {
  margin: 0 0 0.25rem;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--color-white);
}

.product-card-description {
  margin: 0;
  font-size: clamp(0.8125rem, 1.5vw, 0.9375rem);
  color: #999;
}

.product-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.product-card-price {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--color-white);
}

.product-card-depth {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #777;
}

.product-card:visited .product-card-title {
  color: var(--color-white);
}

.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.product-detail {
  margin: 0;
}

.product-detail-header {
  margin: -1.5rem 0 0rem;
  padding: 0;
  display: flex;
  justify-content: flex-start;
}

.product-back-btn {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  color: var(--color-white);
  transition: color 0.1s;
}

.product-back-btn:hover {
  color: var(--color-primary);
}

.product-back-btn-icon {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  background-color: currentColor;
  mask: url(/images/graphics/back-button.svg) no-repeat center / contain;
  -webkit-mask: url(/images/graphics/back-button.svg) no-repeat center / contain;
}

.product-detail-body {
  display: block;
}

.product-detail-gallery {
  margin-bottom: 1.5rem;
}

.product-detail-side {
  display: flex;
  flex-direction: column;
  padding: 0 1.5rem;
}

@media (min-width: 1400px) {
  .product-detail-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
    padding: 0 1.5rem 0 0;
  }

  .product-detail-gallery {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
  }

  .product-detail-side {
    flex: 0 0 500px;
    padding: 0;
  }
}

.product-detail-carousel {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

.product-detail-carousel .carousel-track-container {
  aspect-ratio: unset;
  height: 80vh;
  max-height: 80vh;
}

.product-detail-info {
  margin: 0;
}

.product-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.product-detail-heading {
  min-width: 0;
  flex: 1;
}

.product-detail-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
}

.product-detail-meta {
  margin: 0;
  font-size: 0.875rem;
  color: #888;
}

.product-detail-price {
  margin: 0;
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
}

.product-detail-description {
  margin: 0 0 1.5rem;
  color: #999;
}

.product-detail-io {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  margin: 0 0 1.5rem;
}

.product-detail-io-list {
  min-width: 0;
}

.product-detail-io-title {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.product-detail-io-items {
  margin: 0;
  padding-left: 1.25rem;
  color: #999;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.product-detail-io-items li {
  margin-bottom: 0.2rem;
}

.product-detail-io-items li.product-detail-io-empty {
  color: #666;
  font-style: italic;
}

.carousel {
  position: relative;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  overflow: hidden;

}

.carousel-track-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid #222;
  border-radius: 4px;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.carousel-slide img,
.carousel-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;

}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: color-mix(in srgb, var(--color-black) 0%, transparent);
  color: var(--color-white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.1s;
  filter: drop-shadow(0 1px 4px color-mix(in srgb, var(--color-black) 80%, transparent));
}

.carousel-btn:hover {
  color: var(--color-primary);
}

.carousel-btn-icon {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  background-color: currentColor;
  mask: url(/images/graphics/back-button.svg) no-repeat center / contain;
  -webkit-mask: url(/images/graphics/back-button.svg) no-repeat center / contain;
}

.carousel-btn-icon-next {
  transform: scaleX(-1);
}

.carousel-btn-prev {
  left: 0.5rem;
}

.carousel-btn-next {
  right: 0rem;
}

.carousel-dots {
  display: flex;
  scale: 0.8;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #555;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.carousel-dot:hover {
  background: #888;
}

.carousel-dot.active {
  background: #fff;
}

.carousel-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 0 0;
}

.carousel-thumb {
  display: block;
  width: auto;
  height: 3.5rem;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 2px solid #333;
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-black);
  cursor: pointer;
  transition: border-color 0.2s;
}

.carousel-thumb:hover,
.carousel-thumb.active {
  border-color: var(--color-white);
}

.carousel-thumb img,
.carousel-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.product-actions {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
}

.product-actions .btn-purchase {
  align-self: flex-end;
}

.product-detail-note-details {
  margin: 0 0 1rem;
}

.product-detail-note-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}

.product-detail-note-summary::-webkit-details-marker {
  display: none;
}

.product-detail-note-summary:hover {
  color: var(--color-white);
}

.product-detail-note-arrow {
  display: inline-block;
  font-size: 0.65em;
  transition: transform 0.2s ease;
}

.product-detail-note-details[open] .product-detail-note-arrow {
  transform: rotate(-180deg);
}

.product-detail-note {
  margin: 0;
  padding-top: 0.75rem;
  font-size: 0.9375rem;
  color: #999;
  line-height: 1.5;
  max-width: 100%;
}

.product-detail-note p {
  margin: 0 0 0.75rem;
}

.product-detail-note p:last-child {
  margin-bottom: 0;
}

.btn-purchase {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: cursor;
}

.btn-purchase:hover {
  filter: brightness(1.15);
}

.site-footer {
  padding: 1.5rem;
  text-align: center;
  color: #666;
  font-size: 0.875rem;
  border-top: 1px solid #222;
  background: var(--color-black);
}

.site-footer p {
  margin: 0;
}

.contact-page {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 2rem;
  padding-top: 3rem;
  background: var(--color-black);
}

.contact-page-header {
  position: absolute;
  top: -1.5rem;
  left: 0;
  right: 0;
  margin: 0 0 1rem;
  padding: 0;
  text-align: left;
}

.contact-title {
  margin: 0 0 1rem;
  width: 100%;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-white);
  text-align: center;
}

.contact-text {
  margin: 0;
  max-width: 360px;
  font-size: 1.125rem;
  color: #e0e0e0;
}

.contact-text + .contact-text {
  margin-top: 6rem;
}

.contact-email {
  color: var(--color-primary);
  text-decoration: none;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-link {
  color: var(--color-primary);
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

/* Script submission form */
.contact-page--form {
  align-items: flex-start;
  text-align: left;
}

.contact-page--form .contact-title {
  text-align: center;
}

.script-submission-form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.5rem 0;
  color: #e57373;
  font-size: 0.9375rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #e0e0e0;
}

.form-required {
  color: #e57373;
}

.form-hint {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  color: #888;
}

.form-file {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  font-family: inherit;
  color: #888;
  background: transparent;
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-file.has-file {
  color: var(--color-white);
}

.form-file::file-selector-button {
  padding: 0.35rem 0.65rem;
  margin: -0.35rem 1rem -0.35rem -0.65rem;
  font-size: 1rem;
  font-family: inherit;
  color: #e0e0e0;
  background: #333;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
}

.form-file::file-selector-button:hover {
  background: #444;
}

.form-file.has-file::file-selector-button {
  color: var(--color-white);
  background: #444;
}

.form-file-wrap {
  display: flex;
  align-items: center;
  gap: 0rem;
}

.form-file-wrap .form-file {
  flex: 1;
  min-width: 0;
}

.form-file-wrap.images-has-files .form-file {
  flex: 0 0 auto;
  width: 9rem;
  min-width: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.form-file-wrap.images-has-files .form-file::file-selector-button {
  margin: 0;
  font-size: 1rem;
}

.form-file-clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: #888;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.form-file-clear:hover {
  color: var(--color-white);
}

.form-file-error {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #e57373;
}

.form-images-list {
  list-style: none;
  margin: 0rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-images-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem .65rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-white);
  background: transparent;
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-images-list-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-images-list-remove {
  flex-shrink: 0;
}

.form-label--with-info {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.form-label-info {
  position: relative;
  display: inline-flex;
}

.form-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: .85rem;
  height: .85rem;
  padding: 0;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  font-style: italic;
  font-family: inherit;
  color: #888;
  background: #444;
  border: none;
  border-radius: 50%;
  cursor: cursor;
}

.form-info-icon:hover,
.form-info-icon:focus {
  color: #ccc;
  background: #555;
  outline: none;
}

.form-label-info:hover .form-info-tooltip,
.form-label-info:focus-within .form-info-tooltip {
  visibility: visible;
  opacity: 1;
}

.form-info-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  transform: translateX(-50%);
  z-index: 10;
  width: 20rem;
  max-width: 90vw;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  color: #e0e0e0;
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.15s, opacity 0.15s;
}

.form-info-tooltip strong {
  color: var(--color-white);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-white);
  background: #111111;
  border: 1px solid #444;
  border-radius: 4px;
  box-sizing: border-box;
  color-scheme: dark;
}

.form-input.filled,
.form-textarea.filled {
  background: #2a2a2a;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #888;
}

.form-textarea {
  resize: vertical;
  min-height: 4rem;
}

.form-input[type="number"] {
  -moz-appearance: textfield;
}

.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-select {
  cursor: pointer;
  appearance: none;
  border-radius: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2rem;
}

/* Dropdown list: dark background so it doesn't flash white when opened */
.form-select option,
.product-filter-select option {
  background: #111111;
  color: var(--color-white);
}

.form-select optgroup,
.product-filter-select optgroup {
  background: #111111;
  color: var(--color-white);
}

/* All select menus: 4px rounded corners (trigger + open list where supported) */
.form-select,
.product-filter-select {
  border-radius: 4px;
}

/* Custom dropdown (replaces native select UI) */
.custom-select {
  position: relative;
  display: block;
  width: 100%;
}

.custom-select select {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  font-size: 1rem;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.65rem;
  padding-right: 2rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-white);
  background: #111111;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}

.custom-select-trigger:hover {
  border-color: #555;
}

.custom-select-trigger:focus {
  outline: none;
  border-color: var(--color-primary);
}

.custom-select.is-open .custom-select-trigger {
  border-color: var(--color-primary);
}

.custom-select-placeholder {
  color: #888;
}

.custom-select-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  z-index: 50;
  max-height: 240px;
  overflow-y: auto;
  background: #111111;
  border: 1px solid #444;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.15s ease-out, opacity 0.15s ease-out;
}

.custom-select.is-open .custom-select-panel {
  visibility: visible;
  opacity: 1;
}

.custom-select-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-white);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.custom-select-option:first-child {
  border-radius: 3px 3px 0 0;
}

.custom-select-option:last-child {
  border-radius: 0 0 3px 3px;
}

.custom-select-option:hover,
.custom-select-option:focus {
  background: #222;
  outline: none;
}

/* Filter/sort dropdown on index (not full width) */
.product-filter .custom-select {
  width: auto;
  min-width: 12rem;
}

.tag-picker-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tag-picker-wrap .tag-picker {
  margin-top: 0;
}

.active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  min-height: 0;
}

.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.875rem;
  color: #e0e0e0;
  background: #333;
  border: 1px solid #555;
  border-radius: 4px;
}

.active-tag-input {
  min-width: 2rem;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--color-white);
  font: inherit;
  box-sizing: content-box;
}

.active-tag-input-size {
  position: absolute;
  left: -9999px;
  white-space: pre;
  font: inherit;
  padding: 0;
  margin: 0;
  pointer-events: none;
}

.active-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1;
  font-family: inherit;
  color: #888;
  background: none;
  border: none;
  cursor: pointer;
}

.active-tag-remove:hover {
  color: var(--color-white);
}

.form-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.35rem;
}

.form-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #e0e0e0;
}

.form-checkbox {
  width: 1rem;
  height: 1rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #888;
  user-select: none;
}

.form-checkbox-text {
  line-height: 1.2;
}

.form-checkbox-text a {
  color: var(--color-white, #7cb3f2);
  text-decoration: underline;
}

.form-checkbox-text a:hover {
  text-decoration: none;
}

.form-tag-label {
  user-select: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 0.5rem;
}

.form-submit {
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-white);
  background: var(--color-primary);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.form-submit:hover {
  filter: brightness(1.1);
}

.form-link {
  font-size: 0.9375rem;
  color: var(--color-primary);
  text-decoration: none;
}

.form-link:hover {
  text-decoration: underline;
}

.thank-you-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.thank-you-btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.thank-you-link {
  font-size: 1rem;
}
