.stonedesigner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

#controls {
  margin-bottom: 20px;
  text-align: center;
  width: 28%
}

#background-thumbs {
    display: flex;
    flex-wrap: nowrap;     /* keep them in a row */
    overflow-x: auto;      /* scroll if too many */
    margin-bottom: 15px;
    gap: 10px;
    padding: 5px 0;
}

#background-thumbs img {
    height: 80px;          /* consistent height */
    width: auto;
    border: 2px solid transparent;
    border-radius: 4px;
    flex-shrink: 0;        /* prevent squashing */
    cursor: pointer;
}

#background-thumbs img:hover {
    border-color: #333;
}

canvas {
  border: 1px solid #ccc;
}

.controls-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.control-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
 background: white;
 padding: 1em;
}

.price-section {
  background: lightyellow;
  padding: 1em;
}

.control-section.right {
  align-items: flex-end;
  justify-content: flex-start;
}

.inline-group {
  display: flex;
  gap: 10px;
  align-items: center;
  
}

h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
}

label {
  font-weight: bold;
  margin-bottom: 4px;
}

input[type="text"], select {
  padding: 6px;
  font-size: 16px;
  width: 100px;
}

input[type="color"] {
  width: 50px;
  height: 34px;
  padding: 0;
  border: none;
}

button {
  padding: 10px;
  font-size: 14px;
  background-color: #0078D4;
  color: white !important;
  font-weight: bold !important;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

button:hover {
  background-color: #005a9e;
}


#zoomSlider {
  width: 150px;
  margin: 0 10px;
}

#priceOutput {
  font-weight: bold;
  font-size: 1.2em;
}

.price-message {
  margin-top: 6px;
  font-size: 1.1em;
  color: #333;
}

.price-message.error {
  color: #a00;
}

/* Minimal style for Buy button (keeps your existing styles intact) */
.buy-now {
  margin-left: 10px;
  background: green;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  cursor: pointer;
}
.buy-now:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dimensions {
    display: flex;
    justify-content: space-between;
}

.dimension-input {
    width: 100px !important;
}

.align-left {
  text-align: left;
}

.price-section {
    background: lightyellow;
    padding: 1em;
    width: 100%;
    display: flex;
    justify-content: space-around;
    flex-wrap: nowrap;
}

.canvas-container {
  width: 100% !important;
  /* height: auto !important; */
  max-width: 800px;
  margin: 20px 0 2em;
}


button#delete {
    background: red;
}

#stone-canvas {
  width: 100%;
  height: auto;
  max-width: 800px;
  display: block;
}

.canvas-section {
    width: 70%;
    max-width: 800px;
}

@media (max-width: 768px) {
  .canvas-section {
    width: 100%;
  }
  #controls {
    width: 100%;
  }
  
  .dimensions {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
  }
  .inline-group {
      width: 100%;
      margin: 10px 0 0 0;
      justify-content: center;
  }
}


.stoneds-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.stoneds-item {
  background: #fff;
  border: 1px solid #ddd;
  text-align: center;
  padding: 15px;
  border-radius: 4px;
  transition: box-shadow 0.2s ease;
}

.stoneds-item:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.stoneds-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 10px;
}

.stoneds-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stoneds-price {
  color: #555;
  margin-top: 5px;
}
