/* Shelf product layout */
.shelf-product {
  margin: -2rem 0;
  font-family: 'Raleway', sans-serif;
}

.shelf-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}

.shelf-image-area {
  width: 100%;
  max-width: 1260px;
  flex: 1 1 55%;
  text-align: center;
}

.shelf-image-area img {
  width: 100%;
  height: auto;
  max-width: 100%;
  transition: all 0.3s ease;
}

.shelf-controls {
  flex: 1 1 40%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.shelf-controls p {
  margin-top: 0rem;
  margin-bottom: 0.3rem;
  line-height: 1.5;
  color: #444;
}

.shelf-title {
  font-size: 2rem;      /* adjust to taste */
  font-weight: 300;
  margin-bottom: 0.5rem;
  margin-top: -0rem;
  color: #444;             /* dark neutral */
  letter-spacing: 0.em;
  text-transform: none;    /* or uppercase for more impact */
  line-height: 1.2;
}

.shelf-controls .control-group .finish-text {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.2;
} 

.control-group label {
   display: block;
  font-weight: 300;  /* Default lighter font-weight */
  color: #444;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  margin-bottom: 0rem;
}

.shelf-controls .control-group label {
  font-weight: 300;              
  color: #444;                  
  font-size: 1.2rem;               
  letter-spacing: 0.01em;
}

.shelf-controls .control-group span {
  font-weight: 500;
  color: #333;                  
}

/* Style the slider track */
.shelf-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  outline: none;
  margin-bottom: 1rem;
}

/* WebKit track */
.shelf-controls input[type="range"]::-webkit-slider-runnable-track {
  background: #ddd;
  height: 4px;
  border-radius: 2px;
}

/* Firefox track */
.shelf-controls input[type="range"]::-moz-range-track {
  background: #ddd;
  height: 4px;
  border-radius: 2px;
}

/* WebKit thumb */
.shelf-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #1EAEDB;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: -7px; /* to align thumb vertically on track */
}

/* Firefox thumb */
.shelf-controls input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #333;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* IE/Edge thumb */
.shelf-controls input[type="range"]::-ms-thumb {
  width: 18px;
  height: 18px;
  background: #333;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* Hover */
.shelf-controls input[type="range"]::-webkit-slider-thumb:hover {
  background: #1EAEDB;
}

.shelf-controls input[type="range"]::-moz-range-thumb:hover {
  background: #000;
}

/* Focus styles */
.shelf-controls input[type="range"]:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.5);
  background: #005fa3;
}

.shelf-controls input[type="range"]:focus::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.5);
  background: #005fa3;
}

/* Fininsh drop down box */
#finish {
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  color: #333;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.6rem 0.6rem;
  width: 100%;
  max-width: 300px;
  cursor: pointer;
  appearance: none;          /* removes default arrow on some browsers */
  -webkit-appearance: none;  /* Chrome, Safari */
  -moz-appearance: none;     /* Firefox */
  background-image: url('data:image/svg+xml;utf8,<svg fill="gray" height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><polygon points="0,0 10,0 5,5"/></svg>'); /* custom arrow */
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
}

.paypal-button-shelves {
   background-color: #1EAEDB;
  color: #fff;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 0.6rem;
  font-family: 'Raleway', sans-serif;
  transition: background-color 1s ease;
}

.paypal-button-shelves:hover {
  background-color: #1EAEDB;
}


input[type=range] {
  width: 100%;
}

select {
  padding: 0.4rem;
  font-size: 1rem;
}

.price {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1rem;
}

.payment-note {
  font-size: 1rem;
}

/* colours styling */
.finish-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns */
  gap: 1rem; /* space between */
}

.finish-options label {
  display: flex;
  flex-direction: column;   /* stack vertically */
  align-items: center;      /* center horizontally */
  cursor: pointer;
  user-select: none;
  text-align: center;       /* center multi-line text */
} 

.finish-options input[type="radio"] {
  display: none; /* hide the actual radio */
}

.finish-options .swatch {
  width: 70%;  /* bigger colour squares */
  height: 1.5rem;
  border-radius: 0px;
  border: 3px solid transparent;
  box-sizing: border-box;
  transition: border-color 0.4s ease;
  margin-bottom: .5rem; /* space between swatch and text */
}

.finish-options label .swatch {
  transition: transform 0.3s ease; /* smooth animation */
  transform-origin: center center; /* scale from center */
}

.finish-options label:hover .swatch {
  transform: scale(1.1); /* increase size by 10% */
  /* optionally add a subtle shadow or border highlight */
  /* box-shadow: 0 0 5px rgba(0,0,0,0.2); */
}

/* Highlight the selected swatch's border */
.finish-options input[type="radio"]:checked + .swatch {
  border-color: #bcbcbc;
}

/* Gallery Area */
.shelf-image-area {
  text-align: center;
}

#main-image-container img {
  width: 100%;
  aspect-ratio: 1.23  / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#main-shelf-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
}

#main-shelf-photo:hover {
  opacity: 0.92;
}

.thumbnail-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 0.75rem;
  max-width: 100%;
  margin-top: 1rem;
}

.thumbnail-container img {
  width: 100%;
  aspect-ratio: 1.23 / 1;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid #e0e0e0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumbnail-container img:hover {
  transform: scale(1.03);
}

.thumbnail-container img.selected {
  border-color: #1EAEDB;
}
