/* Custom scrollbar styles */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none;    /* Firefox */
}
.zoomed {
  cursor: grab;
}
.zoomed:active {
  cursor: grabbing;
}

/* --- STYLES FOR TWO-LEVEL TABS --- */

.primary-cat-btn {
  padding: 0.5rem 0;
  font-size: 14px;
  font-weight: 500;
  color: #8C8C8C;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.primary-cat-btn.active {
  color: #003942;
  font-weight: 700;
  border-bottom-color: #DD592B;
}
.tab-btn {
  padding: 0.5rem 0;
  font-size: 14px;
  font-weight: 500;
  color: #666666;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn.active {
  color: #003942;
  font-weight: 700;
  border-bottom-color: #DD592B;
}

/* --- HERO THUMBNAILS --- */
.hero-thumb-btn {
  outline-offset: -2px;
  transition: outline 0.2s ease-in-out;
}
.hero-thumb-active {
  outline: 2px solid #003942;
}
.hero-control-active {
  border-color: #003942;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 57, 66, 0.08);
}

/* --- SUB-CATEGORY THUMBNAILS --- */
.subcat-thumb-btn {
  transition: border-color 0.2s ease-in-out;
  background-color: transparent;
}
.subcat-thumb-active {
  border-color: #003942;
}
.subcat-thumb-inactive {
  border-color: transparent;
}

.shadow-inner-bottom {
  box-shadow: inset 0 -4px 5px -3px rgba(0, 0, 0, 0.1);
}

/* Active state for size tags */
.size-active {
    border-color: #003942 !important;
}

@media (min-width: 1024px) {
  .builder-shell {
    display: grid;
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: 0 1.5rem;
    align-items: start;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
  }

  .builder-media {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }

  .builder-sidebar-head {
    grid-column: 2;
    grid-row: 1;
    border: 1px solid #d8d2ca;
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    overflow: hidden;
    background: #ffffff;
  }

  .builder-sidebar-body {
    grid-column: 2;
    grid-row: 2;
    border: 1px solid #d8d2ca;
    border-top: 0;
    border-radius: 0 0 28px 28px;
    overflow: hidden;
    background: #ffffff;
  }

  #main {
    flex: 1 1 auto;
    min-height: 0;
  }

  #primary-categories {
    padding: 1.5rem 1.5rem 0;
    gap: 1rem;
    border-bottom: 1px solid #e7e0d7;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
  }

  .primary-cat-btn {
    padding: 0 0 0.9rem;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  #sub-categories-container {
    padding: 1rem 1.5rem 1.25rem;
    gap: 0.875rem;
    align-items: flex-start;
    box-shadow: none;
    background: #ffffff;
  }

  #sub-categories-container > div {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sub-cat-panel {
    flex-wrap: nowrap;
    gap: 1rem;
  }

  .tab-btn {
    padding: 0.15rem 0 0.65rem;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  #thumb-container {
    padding: 1.5rem;
  }

  .thumb-panel {
    flex-wrap: wrap;
    gap: 0.75rem;
    overflow: visible;
  }

  .thumb-panel .thumb-btn {
    width: calc((100% - 1.5rem) / 3);
    min-width: 0;
  }

  .thumb-panel .thumb-btn > div {
    height: 110px;
  }

  #available-sizes-wrapper {
    margin-top: 0;
    padding-top: 1.5rem;
    border-top: 1px solid #f0ebe4;
  }

  #available-sizes-container {
    gap: 0.625rem;
  }

  #available-sizes-container button {
    min-width: 56px;
  }

  #review-items {
    width: 100%;
  }

  #review-items > div {
    padding: 1rem;
    border: 1px solid #ece4d9;
    border-radius: 20px;
    background: transparent;
  }

  #sticky-cta {
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
  }
}

@media (min-width: 1440px) {
  .builder-shell {
    grid-template-columns: minmax(0, 1fr) 460px;
    gap: 0 2rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
