/* ============================================================
   Catalyst Fence — fence-pdp.css
   Dev-site swatch widget styles
   Matches live site: catalystfence.com/fence/riverside/
   ============================================================ */

/* ----------------------------------------------------------
   Swatch item wrapper (label + swatch stacked)
   ---------------------------------------------------------- */
.swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #333;
}

/* ----------------------------------------------------------
   Color swatches — square, 40×40, no border-radius
   Matches live site exactly
   ---------------------------------------------------------- */
.swatch {
  width: 40px;
  height: 40px;
  border-radius: 0;           /* live site: square, not rounded */
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity 0.2s ease;
  overflow: hidden;           /* keeps img clipped to square */
}

.swatch img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: cover;
}

.swatch:hover {
  transform: none;            /* live site has no scale effect */
  border-color: #ccc;
}

/* Active/selected state: orange outline (ADA orange), not black border */
.swatch.active {
  border: 2px solid transparent;
  outline: 2px solid #CC4B00; 
  outline-offset: 2px;
  transform: none;
}

/* ----------------------------------------------------------
   Swatch option containers
   ---------------------------------------------------------- */
#material-options,
#fence-type-options,
#color-options,
#smooth-color-options {
  display: flex;
  gap: 0px;                   /* live site uses 8px, not 12px */
  flex-wrap: wrap;
  margin-left: 0px;
}

/* ----------------------------------------------------------
   Config group / color group spacing
   ---------------------------------------------------------- */
.config-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
}

.color-groups-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ----------------------------------------------------------
   Widget section headings (SELECT A COLOR, AVAILABLE HEIGHTS…)
   ---------------------------------------------------------- */
.widget-title {
  font-size: 1rem;         /* matches live site small uppercase label */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}

/* ----------------------------------------------------------
   Selected color name (the "White" / "Sand" text next to heading)
   ---------------------------------------------------------- */
#selected-color-name {
  font-weight: 400;
  font-size: 0.75rem;
}

/* ----------------------------------------------------------
   Dimensions row wrapper
   ---------------------------------------------------------- */
.global-dimensions {
  display: flex;
  gap: 30px;
  margin-top: 40px;
  margin-bottom: 30px;
}

@media (max-width: 600px) {
  .global-dimensions {
    flex-direction: column;
  }
}

.global-available-heights,
.global-available-widths,
.global-available-grades {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  flex: 1 0 0;
}

#height-options,
#width-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ----------------------------------------------------------
   Size swatch boxes (6′ height / width tiles)
   Live site: white bg, black 1px border, no grey fill
   ---------------------------------------------------------- */
.size-swatch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #fff;           /* live site: white, not #f5f5f5 */
  border: 1px solid #000;     /* live site: solid black border */
  font-weight: 600;
  font-size: 14px;
  cursor: default;
  transition: opacity 0.3s ease;
}

/* Hover: live site has no hover effect on size swatches */
.size-swatch:hover {
  background: #fff;
}

/* Active: live site does NOT invert size swatches to black */
.size-swatch.active {
  background: #fff;
  color: #000;
}

/* ----------------------------------------------------------
   Faded state — unavailable options based on selected color
   ---------------------------------------------------------- */
.faded {
  opacity: 0.2 !important;
  transition: opacity 0.3s ease;
}

/* ----------------------------------------------------------
   Fence image fade transition
   ---------------------------------------------------------- */
#selected-color-fence-image {
  transition: opacity 0.3s ease;
}

#selected-color-fence-image.fade-out {
  opacity: 0;
}

/* ----------------------------------------------------------
   Navbar override (keep as-is from original)
   ---------------------------------------------------------- */
.fence-template-default .navbar-primary {
  background-color: hsla(0, 0%, 100%, 0.95);
}

 
/* Fix 1: Lock swatch-item width so label always centres under its swatch */
.swatch-item {
  width: 55px;
  text-align: center;
  word-break: break-word;
  text-transform: capitalize;
}
 
/* Fix 2: Top-align all items so a 2-line label (e.g. "Coastal Cedar")
   doesn't push the swatch image down compared to single-line labels */
#material-options,
#fence-type-options,
#color-options,
#smooth-color-options {
  align-items: flex-start;
}
.taxonomy-material {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: none !important;
    padding: 0 !important;
}

.material-badge {
    background: #e65c00;
    color: #fff;
    font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.007), 0.88rem);
    font-weight: 500;
    text-transform: uppercase;
    padding: 2px 9px;
}
#material-options .swatch-item span {
    display: none;
}

.widget-title span {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-left: 6px;
}
#selected-material {
    text-transform: none !important;
    display: inline-block;
    align-items: center;
    font-weight: 400;
    color: #000;
    font-family: Inter, sans-serif;
    font-size: 1rem;
}
#selected-style {
    text-transform: none !important;
    display: inline-block;
    align-items: center;
    font-weight: 400;
    color: #000;
    font-family: Inter, sans-serif;
    font-size: 1rem;
}
#selected-color {
    text-transform: none !important;
    display: inline-block;
    align-items: center;
    font-weight: 400;
    color: #000;
    font-family: Inter, sans-serif;
    font-size: 1rem;
}
.color-classification-title {
  font-size: 13px;
}
