/*builder.css*/

/* === Root Variables === */
:root {
  --thirstlock-orange: #ffa500;
  --thirstlock-navy: #1b2b34;
  --light-gray: #f8f9fa;
  --mid-gray: #ccc;
  --white: #fff;
  --black: #1f1f1f;
}

/* === Reset and Base Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background-color: var(--thirstlock-navy);
  color: var(--white);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

h1 {
  text-align: center;
  color: var(--thirstlock-orange);
  font-size: 2.5rem;
  margin-bottom: 2rem;
  padding-top: 1rem;
}

h2 {
  font-size: 1.5rem;
  color: var(--thirstlock-orange);
  margin-bottom: 0.75rem;
}

label[for="quantity"] {
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
}

/* === Builder Section === */
.builder {
  padding: 2rem 1rem;
  background-color: var(--thirstlock-navy);
}

.builder-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.05);

  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.builder-section {
  margin-bottom: 2rem;
}

/* === Swatches === */
.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.swatch.selected {
  border-color: var(--thirstlock-orange);
  transform: scale(1.1);
}

/* === Carabiner Type === */
.carabiner-types {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.carabiner-slot h3 {
  text-align: center;
  color: var(--thirstlock-orange);
  margin-bottom: 0.5rem;
}

.carabiner-slot {
  position: relative;
  z-index: 0;
}

.type-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.type-options img {
  width: calc(25% - 1rem); /* Match 4 per row layout */
  aspect-ratio: 1 / 1;
  border-radius: 40px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s ease;
}

.type-options img.selected {
  border-color: var(--thirstlock-orange);
  transform: scale(1.05);
}

/* === Toggles & Inputs === */
.toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

/*Custom length*/
#customLengthControls {
  margin-top: 1rem;
}

input[type="number"] {
  width: 60px;
  padding: 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--mid-gray);
  margin-bottom: 1rem;
}

.hidden {
  display: none;
}

.disclaimer,
.pricing-info {
  font-size: 0.9rem;
  color: var(--mid-gray);
  margin-top: 0.5rem;
}

#customOptionsSection {
  display: none;
}

/* === Buttons === */
button.btn {
  background-color: var(--thirstlock-orange);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: block;
  margin: 1.5rem auto 0;
}

button.btn:hover {
  background-color: #d15512;
}

/*add to cart button*/
#addToCart {
  display: block;
  width: fit-content;
  margin: 1rem auto;
  padding: 1rem 2rem;
  font-weight: bold;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  border: none;
}

#addToCart {
  background-color: #a8ff60;
  color: #003f5c;
}

#addToCart:hover {
  background-color: #39ff14;
  transform: scale(1.03);
}

/* Default (desktop) */
.swatch {
  width: calc(25% - 1rem); /* 4 per row with spacing */
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  border: 2px solid var(--mid-gray);
  cursor: pointer;
  transition: transform 0.2s ease;
  object-fit: cover;
}

/* Mobile override */
@media (max-width: 768px) {
  .swatch {
    width: calc(50% - 0.75rem);
  }
  .type-options img {
    width: calc(50% - 0.75rem);
  } /* ← moved here */
  .builder-container {
    padding: 1rem;
  }
  .builder-section {
    padding: 0 0.5rem;
  }
  .btn {
    width: 100%;
    text-align: center;
  }
}

.length-picker-container {
  width: 100%;
  max-width: 500px;
  margin: 2rem auto;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  overflow: hidden;
  font-family: "Space Grotesk", sans-serif;
  color: #fff;
}

.length-picker-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-align: center;
  font-weight: bold;
  border-bottom: 2px solid #ffa500;
  padding: 1rem; /* ← Increase this from 0.5rem to 1rem (or more) */
  background: rgba(0, 0, 0, 0.3);
  font-size: 1.1rem; /* Optional: Increase for more height via text */
  line-height: 1.5; /* Optional: Adds vertical breathing room */
}

.length-picker-wheel {
  max-height: 200px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  border-bottom: 2px solid #ffa500;
  box-sizing: border-box;
}

.length-picker-wheel .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 1rem;
  scroll-snap-align: center;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.1rem;
  transition: background 0.3s;
}

.length-picker-wheel .row.selected {
  background-color: rgba(255, 165, 0, 0.3);
  font-weight: bold;
  border-left: 4px solid #ffa500;
  border-right: 4px solid #ffa500;
}

.confirm-btn {
  width: 100%;
  padding: 1rem;
  background-color: #ffa500;
  color: #1b2b34;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.confirm-btn:hover {
  background-color: #ffb733;
}

.length-disclaimer {
  font-size: 0.9rem;
  color: #ccc;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  border-left: 4px solid #ff4500;
  border-radius: 8px;
  line-height: 1.5;
}
.length-disclaimer strong {
  color: #fff;
}
.length-disclaimer em {
  font-style: italic;
  color: #aaa;
}

#customLengthWrapper {
  padding-top: 1rem;
  padding-bottom: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.5s ease, opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

#customLengthWrapper.active {
  max-height: 1100px; /* enough room for wheel + button + disclaimer */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.qty-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem 0;
}

.qty-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  all: unset; /* remove all browser default styles */
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: #ffa500;
  color: #1b2b34;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
  min-width: 44px;
  min-height: 44px;
  text-align: center;
}

.qty-btn:hover {
  background-color: #ffb733;
  transform: scale(1.05);
}

.qty-wrapper input[type="number"] {
  width: 60px;
  text-align: center;
  font-size: 1.5rem;
  padding: 0.3rem;
  border-radius: 6px;
  border: 1px solid #ffa500;
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

/* Remove spinner arrows in number input (Chrome, Safari, Edge) */
.qty-wrapper input[type="number"]::-webkit-inner-spin-button,
.qty-wrapper input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Remove spinner arrows in Firefox */
.qty-wrapper input[type="number"] {
  -moz-appearance: textfield;
}

/* Ensure consistent sizing across browsers for qty buttons */
.qty-btn {
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  font-size: 1.5rem;
  line-height: 1;
  min-width: 48px; /* ensures tap target is large enough */
  min-height: 48px; /* ensures tap target is large enough */
}

@media (max-width: 480px) {
  .qty-btn {
    font-size: 1.25rem;
    padding: 0.5rem 0.75rem;
    min-width: 44px;
    min-height: 44px;
  }
}

/* Swatch Wrapper */
.swatch-wrapper {
  position: relative;
  cursor: pointer;
  width: calc(25% - 1rem); /* Match carabiner swatch size */
}

/* Swatch Image */
.swatch-wrapper img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  border: 2px solid var(--mid-gray);
  transition: transform 0.2s ease;
}

/* Hover Label Overlay — paracord + carabiner TYPE + COLOR */
#paracord-swatches .swatch-wrapper::after,
.carabiner-slot .type-options .swatch-wrapper::after,
.carabiner-color-block .swatch-wrapper::after {
  content: attr(data-label);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(27, 43, 52, 0.8);
  color: #fff;
  font-size: 0.75rem;
  text-align: center;
  padding: 0.25rem 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-bottom-left-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
  pointer-events: none;
  box-sizing: border-box;
}

/* Show label on hover/focus for paracord + type + color tiles */
#paracord-swatches .swatch-wrapper:hover::after,
#paracord-swatches .swatch-wrapper:focus::after,
.carabiner-slot .type-options .swatch-wrapper:hover::after,
.carabiner-slot .type-options .swatch-wrapper:focus::after,
.carabiner-color-block .swatch-wrapper:hover::after,
.carabiner-color-block .swatch-wrapper:focus::after {
  opacity: 1;
}

/* Keep label visible when "sticky" (for mobile tap) */
#paracord-swatches .swatch-wrapper.sticky-label::after,
.carabiner-slot .type-options .swatch-wrapper.sticky-label::after,
.carabiner-color-block .swatch-wrapper.sticky-label::after {
  opacity: 1;
}



/* Mobile Adjustments */
@media (max-width: 768px) {
  .swatch-wrapper {
    width: calc(50% - 0.75rem); /* 2 per row on mobile */
  }
}



/* TM styling*/
.tm {
  font-size: 0.65em; /* bigger for clarity */
  vertical-align: text-top; /* less aggressive than super */
  position: relative;
  top: -0.1em; /* brings it down */
}

.brand-name {
  font-family: "Sarpanch", sans-serif;
  color: #ffa500;
}

#builder-title {
  color: #ffffff; /* ensure white text */
  font-family: "Space Grotesk", sans-serif; /* enforce consistency */
}

/* === SlideLock Size Row Styles === */
.size-row {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;

  --size-img-w: 220px; /* default desktop width for compare image */
  --size-img-pad: 8px;
}

.size-row.active {
  max-height: none;
  opacity: 1;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.size-row-header {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--thirstlock-orange);
}

.size-row-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.size-row .size-content {
  flex: 1 1 auto;
  min-width: 0;
}

.size-row .size-compare {
  flex: 0 0 var(--size-img-w);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-block: var(--size-img-pad);
}

.size-row .size-compare img {
  width: 100%;
  max-width: none;
  border-radius: 10px;
  object-fit: contain;
  display: block;
}

/* INSERT BELOW */
.size-row.attn {
  box-shadow: 0 0 0 2px var(--thirstlock-orange) inset,
    0 0 14px rgba(255, 165, 0, 0.35);
  transition: box-shadow 0.25s ease;
}

/* Pills */
.size-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.size-pill {
  display: flex;
  align-items: center;
  background: var(--thirstlock-navy);
  border: 1px solid #444;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
}

.size-pill input {
  display: none;
}

.size-pill span {
  font-size: 0.85rem;
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .size-pill:hover {
    border-color: var(--accent) !important;
    box-shadow: var(--glow-ember);
  }
}


.size-pill input:checked + span {
  color: var(--thirstlock-orange);
  font-weight: 600;
}

/* When input is checked, keep border orange */
.size-pill:has(input:checked) {
  border-color: var(--thirstlock-orange);
}

.size-help {
  font-size: 1rem;
  color: #aaff00;
}

/* === Responsive Fix === */
@media (max-width: 768px) {
  .size-row-inner {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  .size-content,
  .size-compare {
    width: 100%;
  }

  .size-compare img {
    width: 100%;
    height: auto;
    max-width: 400px;
  }

  /* critical fix: stop overlap when shrinking */
  .size-row.active {
    overflow: hidden; /* reset so it doesn’t spill over */
    position: static; /* reflow into normal layout */
  }
}

/* Small screens: stack image under pills if needed */
@media (max-width: 420px) {
  .size-row .size-row-inner {
    flex-direction: column;
  }
  .size-row .size-compare {
    flex: none;
    justify-content: center;
  }
  .size-row {
    --size-img-w: 100%;
  }
}

/* === Make the right image column match the image size === */
.size-row {
  --size-img-w: 220px; /* ~2× swatch; tweak here */
  --size-img-pad: 8px; /* top/bottom breathing room; tweak here */
}

/* === Carabiner color rows under each side === */
.carabiner-color-block {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  overflow: hidden;
  max-height: 0; /* collapsed by default */
  opacity: 0; /* invisible by default */
  pointer-events: none; /* can’t click while hidden */
  transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease;
}

/* Optional: smaller heading so it feels subordinate to Size */
.carabiner-color-block > h3 {
  font-size: 1rem;
  color: var(--thirstlock-orange);
  margin: 0 0 0.5rem 0;
  text-align: left;
}

/* Prep animation states; we'll toggle these in JS next */
.carabiner-color-block.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.carabiner-color-block.active {
  /* JS will set max-height inline to the exact content height */
  opacity: 1;
  pointer-events: auto;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    height: auto;
  }

  .header .logo span {
    font-size: 1.6rem;
    text-align: center;
  }
}

/* === Generic info/note row (accordion like size-row) === */
.note-row {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease;
}

.note-row.active {
  max-height: 600px; /* roomy for text */
  opacity: 1;
}

.note-row-inner {
  display: block;
}

.note-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--thirstlock-orange);
  margin-bottom: 0.35rem;
}

.note-text {
  font-size: 0.9rem;
  color: #aaff00;
  line-height: 1.5;
}

/* === FINAL: glassmorphism + clean 3-per-row grid === */

/* Visual look (accordion properties are defined earlier and kept) */
.carabiner-color-block {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem;
  margin-top: 1rem;
}

/* Grid */
.carabiner-color-block .swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: stretch;
}

/* Mobile: 2-per-row (single source of truth) */
@media (max-width: 768px) {
  .carabiner-color-block .swatch-wrapper {
    width: calc(50% - 0.5rem);
  }
}

/* Carabiner color: 3 per row on desktop, inherit all other swatch behavior */
.carabiner-color-block .swatch-wrapper {
  width: calc(33.333% - 0.75rem);
}

@media (max-width: 768px) {
  .carabiner-color-block .swatch-wrapper {
    width: calc(50% - 0.75rem);
  }
}

/* === Color swatches: 3-up, smaller tiles, overlay inside the image ===
:root {
  --color-swatch-inset: 8%; /* tweak this to make the tile look smaller/bigger 
  --color-swatch-radius: 6px; /* match your swatch rounding 
}

/* 3 per row stays the same 
.carabiner-color-block .swatch-wrapper {
  width: calc(33.333% - 0.5rem);
  aspect-ratio: 1 / 1;
  position: relative;
  padding: var(--color-swatch-inset); /* ↓ this visually shrinks the tile 
  box-sizing: border-box; /* ensure padding behaves as intended */
}

/* Image fills the inner square
.carabiner-color-block .swatch-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

*/



/* Hover/Focus behavior remains the same elsewhere in your CSS */

/* === Carabiner COLOR tiles: 3 per row, smaller, overlay on image edge === */

/* 3-per-row grid for color swatches (wrapper is the grid cell) */
.carabiner-color-block .swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.carabiner-color-block .swatch-wrapper {
  position: relative;
  width: calc(33.333% - 0.5rem);
  aspect-ratio: 1 / 1;
  display: block;
}

/* The visible tile that we shrink a bit (so it’s smaller than type swatches) */
.carabiner-color-block .swatch-inner {
  --inner-scale: 1; /* tweak this to make them bigger/smaller */
  position: absolute;
  inset: 0;
  margin: auto;
  width: calc(100% * var(--inner-scale));
  height: calc(100% * var(--inner-scale));
  border-radius: 16px;
  overflow: hidden; /* keep overlay clipped to the image box */
  background: #000; /* prevents gaps if image has transparency */
}

/* Make the image fill the inner square cleanly */
.carabiner-color-block .swatch-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--mid-gray);
  border-radius: 16px;
}



/* Mobile: 2-per-row (optional; keep or remove) */
@media (max-width: 768px) {
  .carabiner-color-block .swatch-wrapper {
    width: calc(50% - 0.5rem);
  }
}

/* Match the selection bump for carabiner color swatches */
.carabiner-color-block .swatch-inner img.selected {
  transform: scale(1.05);
  border-color: var(--thirstlock-orange);
}

/* Carabiner color swatches: match paracord + type selection style 
.carabiner-color-block .swatch-wrapper.selected {
  border: 2px solid var(--thirstlock-orange);
  border-radius: 6px; /* match others
  transform: scale(1.1);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

/* make the orange border hug the image edge 
.carabiner-color-block .swatch-wrapper img.selected {
  outline: none;
  border-color: var(--thirstlock-orange);
  transform: scale(1.03);
  transition: transform 0.2s ease, outline-color 0.2s ease;
}
*/

/* Orange ring that hugs the visible tile, unaffected by image scaling */
.carabiner-color-block .swatch-inner {
  position: absolute; /* you already have this */
  inset: 0;
}



/* keep the label above the ring */
.carabiner-color-block .swatch-inner::after {
  z-index: 2;
}


.carabiner-color-block .swatch-wrapper.is-selected {
  transform: scale(1.03);
  transition: transform 0.2s ease;
}

.divider {
  border-top: 2px solid var(--thirstlock-orange);
  margin: 2rem 0;
  width: 100%;
  opacity: 0.5;
}

/* === THIRSTLOCK Modal ==== */
.tl-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 3000;
  animation: tlFadeIn 0.18s ease-out;
}
.tl-overlay[hidden] {
  display: none !important;
}

.tl-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  width: min(560px, 92vw);
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  outline: 2px solid var(--thirstlock-orange);
  outline-offset: -6px;
  color: var(--white);
  font-family: "Space Grotesk", sans-serif;
  position: relative;
  animation: tlPop 0.18s ease-out;
}

.tl-title {
  font-family: "Sarpanch", sans-serif;
  color: var(--thirstlock-orange);
  font-size: 1.75rem;
  margin: 0 0 0.25rem;
  text-align: center;
}

.tl-body {
  color: var(--light-gray);
  text-align: center;
  margin-bottom: 0.75rem;
}

.tl-list {
  margin: 0.25rem 0 1rem;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}
.tl-list li {
  color: #fff;
}
.tl-list li::marker {
  color: var(--thirstlock-orange);
}

.tl-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.tl-btn {
  border: none;
  border-radius: 8px;
  font-weight: 700;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.2s ease;
}
.tl-primary {
  background: var(--thirstlock-orange);
  color: var(--thirstlock-navy);
}
.tl-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.tl-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.tl-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.tl-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tl-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Orange attention ring for target section */
.tl-attn {
  box-shadow: 0 0 0 2px var(--thirstlock-orange) inset,
    0 0 14px rgba(255, 165, 0, 0.35);
  transition: box-shadow 0.25s ease;
}
.tl-pulse {
  animation: tlPulse 1.2s ease-out 0s 2;
}
@keyframes tlPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 165, 0, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(255, 165, 0, 0.35);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 165, 0, 0);
  }
}

@keyframes tlFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes tlPop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-overlay,
  .tl-card {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================
   THIRSTLOCK — Charcoal + Ember Orange
   Paste at the VERY END of builder.css
   ========================================= */
:root {
  /* Theme tokens (sleek, hardware-grade) */
  --bg: #0e1116; /* charcoal page bg */
  --surface: #161b22; /* main cards/nav */
  --surface-2: #1a232e; /* secondary slabs (size/note blocks) */
  --text: #e6edf3; /* primary text */
  --muted: #a2b0bd; /* helper text */
  --accent: #ff8a3d; /* ember CTA/selection */
  --accent-strong: #ff6a00; /* hover/focus ember */
  --border: rgba(230, 237, 243, 0.1);
  --border-strong: rgba(230, 237, 243, 0.16);
  --shadow-1: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 12px rgba(0, 0, 0, 0.38);
  --glow-ember: 0 0 0 3px rgba(255, 138, 61, 0.2);

  /* Map legacy vars so existing rules keep working */
  --thirstlock-orange: var(--accent);
  --thirstlock-navy: var(--bg);
  --light-gray: #d6dee6;
  --mid-gray: #2a333c;
  --white: #ffffff;
  --black: #000000;
}

/* ===== Base ===== */
body {
  background: var(--bg) !important;
  color: var(--text) !important;
}
#builder-title,
h1,
h2,
h3 {
  color: var(--text) !important;
}

/* Divider: thin ember line (subtle) */
.divider {
  border-top: 1px solid var(--border) !important;
  background: none !important;
  opacity: 1 !important;
}

/* ===== Cards / sections ===== */
.builder-container,
.tl-card,
.length-picker-container {
  background: var(--surface) !important;
  border: 1px solid #ff8a3d;
  box-shadow: var(--shadow-1) !important;
}
.size-row,
.note-row,
.carabiner-color-block {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

/* ===== Text / helpers ===== */
.size-help,
.note-text,
.disclaimer,
.pricing-info,
.length-disclaimer {
  color: var(--muted) !important;
}

.note-title,
.size-row-header,
.carabiner-color-block > h3,
.tl-title {
  color: var(--accent) !important;
}

/* ===== CTAs (ember) ===== */
button.btn,
#addToCart,
.confirm-btn,
.tl-primary,
.qty-btn {
  background: var(--accent) !important;
  color: #0e1116 !important; /* dark text on ember for crisp contrast */
  border: 1px solid var(--accent) !important;
  text-shadow: none !important;
}
button.btn:hover,
#addToCart:hover,
.confirm-btn:hover,
.tl-primary:hover,
.qty-btn:hover {
  background: var(--accent-strong) !important;
  border-color: var(--accent-strong) !important;
  box-shadow: var(--glow-ember) !important;
  transform: translateY(-1px) scale(1.01);
}

/* Secondary/neutral buttons */
.tl-secondary {
  background: transparent !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
}
.tl-secondary:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

/* Inputs */
.qty-wrapper input[type="number"] {
  border: 1px solid var(--border-strong) !important;
  background: #0f141a !important;
  color: var(--text) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

/* ===== Swatches (matte tiles + ember ring on select) ===== */

/* === Selected Swatch Wrapper Rings (paracord + carabiner type) === */

/* Paracord Swatches */
#paracord-swatches .swatch-wrapper:has(.swatch.selected) {
  border: 8px solid var(--thirstlock-orange, #ff7a00);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.7);
}

/* Carabiner Type Tiles (SlideLock + Ahhh...) */
.carabiner-slot .type-options .swatch-wrapper:has(img.selected) {
  border: 8px solid var(--thirstlock-orange, #ff7a00);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.7);
}


/* Carabiner COLOR tiles – match orange selection ring */
.carabiner-color-block .swatch-wrapper:has(img.selected) {
  border: 8px solid var(--thirstlock-orange, #ff7a00);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.7);
  border-radius: 16px;
}



.swatch,
.type-options img,
.swatch-wrapper img,
.carabiner-color-block .swatch-inner img {

  border: 8px solid var(--border) !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  background: #10161c;
  border-radius: 16px;

  /* crisp “click” animation */
  transform: scale(1);
  transition:
    transform 120ms ease-out,
    box-shadow 120ms ease-out,
    border-color 120ms ease-out;
}
.swatch.selected,
.type-options img.selected,
.carabiner-color-block .swatch-inner img.selected {
  /* keep the inner border neutral; selection is shown by the outer ring + glow */
  outline: none !important;

  /* keep the “clicked” pop + glow */
  box-shadow: var(--glow-ember), 0 2px 10px rgba(0, 0, 0, 0.6);
  transform: scale(1.06);
}




/* Swatch overlays on dark */
.swatch-wrapper::after,
.carabiner-color-block .swatch-wrapper::after {
  background: rgba(14, 17, 22, 0.82) !important;
  color: var(--text) !important;
}


/* ===== Pills ===== */
.size-pill {
  background: var(--surface) !important;
  border: 1px solid var(--mid-gray) !important;
  border-radius: 12px !important;
}

.size-pill:has(input:checked) {
  border-color: var(--accent) !important;
  box-shadow: var(--glow-ember);
}
.size-pill input:checked + span {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

/* Global focus styles (keep glow for most controls) */
.swatch-wrapper:focus-visible,
.type-options button:focus-visible,
button:focus-visible,
.tl-btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-strong) !important;
  outline-offset: 2px !important;
  border-radius: 8px;
  box-shadow: var(--glow-ember);
}

/* Size pills: focus should NOT look like selection */
.size-pill:focus-within {
  outline: 2px solid var(--accent-strong) !important;
  outline-offset: 2px !important;
  border-radius: 20px; /* match their pill shape */
  box-shadow: none;    /* 🔥 this is the key change */
}


/* ===== Modal ===== */
.tl-card {
  outline: 2px solid var(--accent) !important;
  outline-offset: -6px !important;
  color: var(--text) !important;
}
.tl-body {
  color: var(--text) !important;
}
.tl-list li {
  color: var(--text) !important;
}
.tl-list li::marker {
  color: var(--accent) !important;
}

/* ===== Length picker ===== */
.length-picker-header,
.length-picker-wheel {
  border-color: var(--accent) !important;
}
.length-picker-container {
  color: var(--text) !important;
}

/* ===== Attention rings ===== */
.tl-attn,
.size-row.attn {
  box-shadow: 0 0 0 2px var(--accent) inset, 0 0 14px rgba(255, 138, 61, 0.28) !important;
}

/* Ensure carabiner slot headings match theme */
.carabiner-slot h3 {
  color: var(--accent) !important;
}

/* === Qty pill: bottom-centered variant (overrides) === */
#cartPage {
  --qty-pill-height: 36px; /* easy knob: 36/40/44 */
  --qty-pill-font: 0.95rem;
  --qty-pill-bg: rgba(27, 43, 52, 0.85);
  --qty-pill-accent: #ffa500;
  --qty-pill-border: 1px solid var(--qty-pill-accent);
  --qty-pill-color: #fff;
  --qty-pill-gap: 0.35rem;
  --qty-pill-radius: 9999px;
  --qty-pill-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --qty-pill-danger: #ff6b6b;
}

/* wrapper where the pill now lives */
.qty-row {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 0.25rem; /* space above Item Total */
}

/* override the old overlay positioning */
.qty-row .qty-pill {
  position: static;
  top: auto;
  right: auto;
  margin: 0 auto;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  gap: var(--qty-pill-gap);
  height: var(--qty-pill-height);
  padding: 0 0.5rem;
  background: var(--qty-pill-bg);
  color: var(--qty-pill-color);
  border: var(--qty-pill-border);
  border-radius: var(--qty-pill-radius);
  box-shadow: var(--qty-pill-shadow);
  backdrop-filter: blur(6px);
}

/* keep the existing button/count styling */
.qty-row .qty-count {
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
  font-size: var(--qty-pill-font);
}

.qty-row .qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--qty-pill-height) - 8px);
  height: calc(var(--qty-pill-height) - 8px);
  border-radius: 9999px;
  border: 1px solid var(--qty-pill-accent);
  background: transparent;
  color: var(--qty-pill-accent);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    transform 0.05s ease;
}

.qty-row .qty-btn.remove {
  border-color: var(--qty-pill-danger);
  color: var(--qty-pill-danger);
}

@media (hover: hover) and (pointer: fine) {
  .qty-row .qty-btn:hover {
    background: rgba(255, 165, 0, 0.15);
  }
  .qty-row .qty-btn.remove:hover {
    background: rgba(255, 107, 107, 0.18);
  }
}
.qty-row .qty-btn:active {
  transform: translateY(1px);
}
.qty-row .qty-btn:focus-visible {
  outline: 2px solid var(--qty-pill-accent);
  outline-offset: 2px;
}

/* small spacing polish with Item Total */
.item-total {
  margin-top: 0.25rem;
}

/* === Build Steps Roadmap === */
.build-steps {
  margin: 1rem auto 2rem; /* spacing above paracord swatches */
  max-width: 640px;
  text-align: left;
  color: var(--muted); /* subtle text tone */
  font-size: 1rem;
  line-height: 1.5;
}

.build-steps ul {
  list-style: disc;
  padding-left: 1.5rem; /* indent bullets */
}

/* Only sublist under Customize Carabiners */
.build-steps ul ul li {
  color: white; /* keep sublist text white */
}

.build-steps ul ul li::marker {
  color: #5FA8D3; /* Steel Blue ONLY for sub-bullets */
}


.build-steps li {
  margin-bottom: 0.5rem;
  color: var(--text); /* readable against bg */
}

.build-steps li::marker {
  color: var(--thirstlock-orange); /* branded bullet color */
  font-size: 1.2em;
}

/* === Carabiner Choice Helper === */
.carabiner-helper {
  margin: 1rem auto 2rem;
  max-width: 720px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}

.carabiner-helper ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.carabiner-helper li {
  margin-bottom: 1rem;
}

.carabiner-helper li::marker {
  color: var(--thirstlock-orange);
  font-size: 1.2em;
}

.carabiner-helper .tip {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
  margin-left: 0.25rem;
  font-style: italic;
}

/* Mobile behavior like original */
@media (max-width: 768px) {
  .header {
    height: auto !important;
    padding: 0.5rem 1rem !important;
  }
  .header .logo span {
    font-size: 1.6rem !important;
  }
}

/* Make modal actions equal width */
.tl-actions .tl-btn {
  flex: 1 1 0;
  min-width: 0;
}

/* Remove the X close control from the modal */
.tl-close {
  display: none !important;
}

/* Keep jump targets clear of the fixed header */
#paracord-swatches,
.carabiner-slot .type-options,
#size-row-left,
#size-row-right,
.carabiner-slot .carabiner-color-block,
#customLengthWrapper {
  scroll-margin-top: 140px; /* header height comfort */
}

/* Make ONLY the paracord swatches round */
#paracord-swatches .swatch-wrapper {
  border-radius: 30%;
  overflow: hidden; /* clips the hover label to the circle */
}
#paracord-swatches .swatch {
  border-radius: 30%;
}

/* put this directly below your existing .type-options { ... } block */
.type-options button,
.type-options label {
  border-radius: 16px; /* match your img */
  overflow: hidden; /* clip anything square inside */
}

/* Carabiner COLOR swatches: keep inner border thin and don't cover the orange ring */
.carabiner-color-block .swatch {
  border: 2px solid var(--mid-gray) !important;
}

.carabiner-color-block .swatch.selected {
  transform: scale(1); /* no zoom so the image doesn't eat the outer ring */
}



