/* ============================================
   3D PRINTING PAGE STYLES
   ============================================ */

/* ===== HERO / INTRO SECTION ===== */
.printing-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(46, 213, 115, 0.15);
}

.hero-content h1 {
  font-size: 3rem;
  line-height: 1.25;
  padding-bottom: 0.1em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), #1EAB57);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-color);
  opacity: 0.85;
}

/* Layer-by-layer 3D printing animation */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D Benchy hero visual */
.hero-benchy-img {
  max-width: 100%;
  height: auto;
  max-height: 280px;
  filter: drop-shadow(0 15px 25px rgba(46, 213, 115, 0.3));
  animation: floatBenchy 4s ease-in-out infinite;
}

@keyframes floatBenchy {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
}


/* ===== USE CASES SECTION ===== */
.usecases-section {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(46, 213, 115, 0.15);
}

.usecases-section h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.usecase-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.usecase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(46, 213, 115, 0.12);
}

.usecase-icon {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(46, 213, 115, 0.1);
  border-radius: 12px;
  flex-shrink: 0;
}

.usecase-card span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.4;
}


/* ===== MATERIALS SECTION ===== */
.materials-section {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(46, 213, 115, 0.15);
}

.materials-section h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.materials-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

/* Material Card */
.material-card {
  background: transparent;
}

.material-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 0.5rem 0;
}

.material-badge {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.material-badge.pla  { background: linear-gradient(135deg, #2ED573, #1EAB57); }
.material-badge.petg { background: linear-gradient(135deg, #3498db, #2980b9); }
.material-badge.tpu  { background: linear-gradient(135deg, #E8A87C, #D4845A); }
.material-badge.asa  { background: linear-gradient(135deg, #9B59B6, #8E44AD); }
.material-badge.abs  { background: linear-gradient(135deg, #E74C3C, #C0392B); }

.material-name {
  flex: 1;
}

.material-name h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.material-fullname {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.55;
  font-style: italic;
}

/* Body */
.material-card-body {
  padding: 0 0 1.5rem 0;
}

.material-info-row {
  margin-bottom: 1rem;
}

.material-info-row strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-color);
  margin-bottom: 0.3rem;
}

.material-info-row p {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.8;
}

/* Star Ratings */
.material-ratings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem 2rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.rating-row span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  opacity: 0.7;
  white-space: nowrap;
}

.rating-stars {
  display: flex;
  gap: 3px;
}

/* Generate stars via CSS */
.rating-stars::before {
  font-size: 0.9rem;
  letter-spacing: 2px;
}

.rating-stars[data-stars="1"]::before { content: "★☆☆☆☆"; color: #E8A87C; }
.rating-stars[data-stars="2"]::before { content: "★★☆☆☆"; color: #E8A87C; }
.rating-stars[data-stars="3"]::before { content: "★★★☆☆"; color: #E8A87C; }
.rating-stars[data-stars="4"]::before { content: "★★★★☆"; color: #E8A87C; }
.rating-stars[data-stars="5"]::before { content: "★★★★★"; color: #E8A87C; }


/* ===== PRICE CALCULATOR SECTION ===== */
.calculator-section {
  margin-bottom: 2rem;
}

.calculator-section h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.calculator-container {
  margin-top: 2rem;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-field label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color);
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(46, 213, 115, 0.3);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
  background: rgba(46, 213, 115, 0.03);
}

.dropzone:hover {
  border-color: var(--primary-color);
  background: rgba(46, 213, 115, 0.06);
}

.dropzone.dragover {
  border-color: var(--primary-color);
  background: rgba(46, 213, 115, 0.1);
  transform: scale(1.01);
}

.dropzone.has-file {
  border-color: var(--primary-color);
  border-style: solid;
  background: rgba(46, 213, 115, 0.05);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  opacity: 0.7;
}

.dropzone-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color);
}

.dropzone-hint {
  font-size: 0.8rem;
  color: var(--text-color);
  opacity: 0.5;
}

.file-info {
  min-height: 1.5rem;
  font-size: 0.9rem;
}

.file-success {
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.file-error {
  color: #E74C3C;
  font-weight: 600;
}

/* Select */
.calc-select {
  padding: 0.85rem 1rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-color);
  background: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%233B3A36' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.calc-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Slider */
.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.calc-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary-color) var(--fill, 10%), rgba(0, 0, 0, 0.08) var(--fill, 10%));
  outline: none;
  cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(46, 213, 115, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(46, 213, 115, 0.4);
}

.calc-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(46, 213, 115, 0.3);
}

.slider-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
  min-width: 48px;
  text-align: center;
}

/* Number Input */
.calc-input {
  padding: 0.85rem 1rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-color);
  width: 120px;
  transition: border-color 0.3s ease;
}

.calc-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Calculate button */
.calc-btn {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* Result */
.calc-result {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.3s ease;
  margin-top: 0;
}

.calc-result.visible {
  max-height: 250px;
  margin-top: 2rem;
}

.calc-result-inner {
  background: linear-gradient(135deg, rgba(46, 213, 115, 0.08), rgba(30, 171, 87, 0.04));
  border: 1px solid rgba(46, 213, 115, 0.2);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}

.calc-result-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-color);
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.calc-result-price {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.calc-result-note {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.55;
  margin: 0;
  line-height: 1.5;
}

/* ===== OR DIVIDER ===== */
.or-divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 3rem 0;
}

.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 213, 115, 0.3), transparent);
}

.or-divider span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: var(--primary-color);
  opacity: 0.6;
}


/* ===== QUOTE SECTION ===== */
.quote-section {
  margin-bottom: 2rem;
}

.quote-section h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.quote-form {
  margin-top: 2rem;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quote-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.quote-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quote-field label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color);
}

.quote-field input[type="text"],
.quote-field input[type="email"],
.quote-field textarea {
  padding: 0.85rem 1rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-color);
  transition: border-color 0.3s ease;
  resize: vertical;
}

.quote-field input:focus,
.quote-field textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.quote-file-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border: 2px solid rgba(46, 213, 115, 0.3);
  border-radius: 30px;
  background: transparent;
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  border-color: var(--primary-color);
  background: rgba(46, 213, 115, 0.06);
}

.quote-file-name {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.5;
  font-style: italic;
}

.quote-file-name.has-file {
  opacity: 1;
  color: var(--primary-color);
  font-weight: 600;
  font-style: normal;
}

.quote-submit-btn {
  align-self: flex-start;
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* Success message */
.quote-success-msg {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(46, 213, 115, 0.1);
  border: 1px solid rgba(46, 213, 115, 0.25);
  border-radius: 12px;
  color: var(--primary-color);
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.quote-success-msg.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .printing-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-visual {
    order: -1;
  }

  .layer-animation {
    width: 160px;
    height: 180px;
  }

  .usecases-grid {
    grid-template-columns: 1fr;
  }

  .calculator-container,
  .quote-form {
    padding: 1.5rem;
  }

  .quote-row {
    grid-template-columns: 1fr;
  }

  .material-ratings {
    grid-template-columns: 1fr;
  }

  .calc-result-price {
    font-size: 2.2rem;
  }

  .calc-btn,
  .quote-submit-btn {
    align-self: stretch;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .usecases-section h2,
  .materials-section h2,
  .calculator-section h2,
  .quote-section h2 {
    font-size: 1.5rem;
  }

  .material-card-header {
    padding: 1rem;
  }

  .material-badge {
    width: 44px;
    height: 44px;
    font-size: 0.75rem;
  }
}
