/* === Two Column Layout for Desktop === */
#three-d-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: auto;
  background: #232323; /* Outer form background */
  padding: 25px;
  border-radius: 10px;
  font-family: 'Open Sans', sans-serif;
  color: #fff;
}

/* File upload full width */
#file-upload-area {
  grid-column: span 2;
}

#file-upload-area input[type="file"] {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border: 2px dashed #FF6C00;
  background: #fff;
  color: #232323;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* Customer Notes */
.print-options textarea[name="customer_notes"] {
  width: 100%;
  min-height: 120px;        /* default height */
  resize: vertical;         /* user can stretch vertically */
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  color: #232323;
  box-sizing: border-box;   /* prevent overflow */
}

/* On larger screens, give it a bit more height */
@media screen and (min-width: 992px) {
  .print-options textarea[name="customer_notes"] {
    min-height: 160px;
  }
}


/* === Two Column Inner Fields === */
.print-options label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #fff;
}

.print-options input[type="number"],
.print-options input[type="text"],
.print-options select {
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 16px;
  background: #fff;
  color: #232323;
}

/* === Buttons Style === */
.material-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.material-btn {
  flex: 1;
  text-align: center;
  padding: 8px 14px;
  border: 2px solid #FF6C00;
  background: #232323;
  color: #FF6C00;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}



/* Button grid (always 3 per row) */
 /* .color-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 12px;
  margin-bottom: 15px;
}
.color-btn {
  padding: 8px 14px;
  border: 2px solid #FF6C00;
  background: #232323;
  color: #FF6C00;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  width: auto;             
  text-align: center;
  box-sizing: border-box;  
} */
 .color-row {
  display: flex;
  flex-wrap: wrap;      /* allow multiple rows if too many buttons */
  gap: 10px;            /* consistent spacing */
}

/* .color-btn {
  flex: 1 1 calc(33.333% - 12px); 
  max-width: calc(33.333% - 12px);
  text-align: center;
} */

.color-btn {
  flex: 1;
  text-align: center;
  padding: 8px 14px;
  border: 2px solid #FF6C00;
  background: #232323;
  color: #FF6C00;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}


/* Hover (grow effect) */

 /* Hover (grow effect) */
/* Hover (grow effect only) */
.material-btn:hover,
.color-btn:hover {
  background: #FF6C00;
  color: #232323;
  transform: scale(1.05);
}

/* Selected (same as hover, but no grow) */
.material-btn.selected,
.color-btn.selected {
  background: #FF6C00 !important;
  color: #232323 !important;
  border-color: #FF6C00 !important;
  transform: none; /* prevent grow */
}
/* === Color Sections === */

/* Section wrapper */
.color-section-group {
  margin-bottom: 20px;
}

/* Headline above buttons */
.color-heading {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  grid-column: 1 / -1; /* span full width if inside a grid */
}


.color-section-group:last-child .color-row {
  grid-template-columns: 1fr; /* only one button in last group */
}



/* Wunschfarbe button & field */
#wunschfarbe-btn {
  display: inline-block;
  margin-top: 10px;
}
#custom-color-field {
  margin-top: 8px;
  width: 100%;
}

/* Dropdowns in rows of 3 */
.dropdown-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 15px;
}

/* Checkboxes left aligned */
.checkbox-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.checkbox-group label {
  font-size: 15px;
  color: #fff;
}

/* Additional Notes */
#additional-notes {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  background: #fff;
  color: #232323;
  margin-top: 8px;
}

/* === Price & Action Buttons === */
#three-d-form button,
#add-to-cart {
  grid-column: span 2;
  background: #232323;
  border: 2px solid #FF6C00;
  color: #FF6C00;
  font-size: 16px;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

#three-d-form button:hover,
#add-to-cart:hover {
  background: #FF6C00;
  color: #232323;
  transform: scale(1.05);
}

#price-display {
  grid-column: span 2;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  color: #fff;
}

/* Responsive: one column on small screens */
@media screen and (max-width: 768px) {
  #three-d-form {
    grid-template-columns: 1fr;
  }
}

/* Uploaded file list styling */
.uploaded-file-row {
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: #232323;
  color: #fff;
  margin-bottom: 8px;
  border-radius: 6px;
}
.uploaded-file-row strong {
  font-size: 16px;
}
.file-qty {
  margin-top: 5px;
  max-width: 80px;
}
.file-details {
  font-size: 14px;
  margin-top: 5px;
  color: #ccc;
}


/* Force the 3 dropdowns into one row */
.dropdown-row {
  grid-column: span 2; /* make it span full form width */
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
  gap: 12px;
  margin-bottom: 15px;
}

.dropdown-row .print-options {
  margin: 0; /* remove extra spacing so they align neatly */
}

/* Full-page overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(35, 35, 35, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none; /* hidden by default */
}

/* Triple dot loader */
.dot-loader {
  display: flex;
  gap: 8px;
}

.dot-loader span {
  width: 12px;
  height: 12px;
  background: #FF6C00; 
  border-radius: 50%;
  display: inline-block;
  animation: bounce 0.6s infinite alternate;
  box-shadow: 0 0 8px rgba(255, 108, 0, 0.9); /* glow */
}


.dot-loader span:nth-child(2) {
  animation-delay: 0.2s;
}
.dot-loader span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  from {
    transform: translateY(0);
    opacity: 0.5;
  }
  to {
    transform: translateY(-10px);
    opacity: 1;
  }
}