/* ============================================================
   見積もりシミュレーション（白黒 + オレンジアクセント）
   ============================================================ */

body.estimate-page {
  background: #f5f5f5;
  color: var(--color-black);
  padding-bottom: 6.5rem;
}

body.estimate-page .site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

body.estimate-page .logo {
  color: var(--color-black);
}

body.estimate-page .logo:hover {
  color: var(--color-orange);
}

body.estimate-page .site-nav a {
  color: var(--color-black);
}

body.estimate-page .nav-toggle-bar {
  background: var(--color-black);
}

body.estimate-page .site-nav.is-open {
  background: var(--color-white);
  border-bottom-color: var(--color-orange);
}

/* --- ヒーロー --- */
.estimate-hero {
  padding: calc(var(--header-height) + 2rem) 0 2rem;
  background: var(--color-white);
  border-bottom: 3px solid var(--color-orange);
}

.estimate-hero-inner {
  max-width: 720px;
}

.estimate-hero .section-label::before {
  color: var(--color-orange);
}

.estimate-hero .section-title {
  color: var(--color-black);
  margin-bottom: 0.75rem;
}

.estimate-hero-lead {
  margin: 0;
  color: var(--color-gray-dark);
  font-size: 0.98rem;
}

/* --- プログレス --- */
.estimate-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 0;
  max-width: 480px;
  margin: 0 auto;
}

.estimate-progress-item {
  flex: 1;
  text-align: center;
  position: relative;
}

.estimate-progress-item::after {
  content: "";
  position: absolute;
  top: 1rem;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #e5e5e5;
  z-index: 0;
}

.estimate-progress-item:last-child::after {
  display: none;
}

.estimate-progress-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.35rem;
  border-radius: 50%;
  background: #e5e5e5;
  color: var(--color-gray-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
  transition: background var(--transition), color var(--transition);
}

.estimate-progress-text {
  font-size: 0.7rem;
  color: var(--color-gray-dark);
  letter-spacing: 0.05em;
}

.estimate-progress-item.is-active .estimate-progress-num,
.estimate-progress-item.is-done .estimate-progress-num {
  background: var(--color-orange);
  color: var(--color-black);
}

.estimate-progress-item.is-active .estimate-progress-text {
  color: var(--color-black);
  font-weight: 700;
}

/* --- ステップ本体 --- */
.estimate-main {
  padding: 0 0 2rem;
}

.estimate-step-host {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 4%;
}

.estimate-submit-message {
  max-width: 640px;
  margin: 0 auto 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.92rem;
  line-height: 1.65;
  font-weight: 700;
  width: min(640px, 92%);
}

.estimate-submit-message--success {
  background: #ecfdf3;
  border: 2px solid #22c55e;
  color: #166534;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(7.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 1500;
  margin: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(34, 197, 94, 0.15);
  animation: estimate-toast-in 0.35s ease;
}

.estimate-submit-message--error {
  background: #fef2f2;
  border: 2px solid #ef4444;
  color: #991b1b;
}

@keyframes estimate-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.estimate-step-panel {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.estimate-step-label {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--color-orange);
}

.estimate-step-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--color-black);
  line-height: 1.35;
}

.estimate-step-desc {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--color-gray-dark);
}

.estimate-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.estimate-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 2px solid #e8e8e8;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  background: #fafafa;
}

.estimate-option:hover {
  border-color: rgba(255, 107, 0, 0.45);
  background: var(--color-white);
}

.estimate-option.is-selected {
  border-color: var(--color-orange);
  background: var(--color-white);
  box-shadow: 0 4px 20px var(--color-orange-glow);
}

.estimate-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.estimate-option-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.estimate-option-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.estimate-option-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-black);
}

.estimate-option-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-orange-dark);
  white-space: nowrap;
}

.estimate-option-catch {
  font-size: 0.85rem;
  color: var(--color-gray-dark);
  line-height: 1.55;
}

.estimate-option-check {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border: 2px solid #ccc;
  border-radius: 50%;
  margin-top: 0.15rem;
  transition: border-color var(--transition), background var(--transition);
}

.estimate-options--multi .estimate-option-check {
  border-radius: 4px;
}

.estimate-option.is-selected .estimate-option-check {
  border-color: var(--color-orange);
  background: var(--color-orange);
  box-shadow: inset 0 0 0 3px var(--color-white);
}

.estimate-option.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: #f0f0f0;
  border-color: #e0e0e0;
}

.estimate-option.is-disabled:hover {
  border-color: #e0e0e0;
  background: #f0f0f0;
  box-shadow: none;
}

.estimate-option.is-disabled .estimate-option-name,
.estimate-option.is-disabled .estimate-option-price {
  color: #999;
}

.estimate-option-unavailable {
  font-size: 0.78rem;
  color: #999;
  font-weight: 600;
}

.estimate-label-req {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-orange-dark);
  margin-left: 0.35rem;
}

.estimate-label-opt {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-gray-dark);
  margin-left: 0.35rem;
}

#estimate-btn-consult:disabled {
  background: #ccc;
  border-color: #ccc;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

#estimate-btn-consult:not(:disabled) {
  flex: 1.5;
  font-weight: 900;
  box-shadow: 0 4px 16px var(--color-orange-glow);
}

#estimate-btn-next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --- 下部固定バー（合計 + ナビ）--- */
.estimate-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1400;
  background: var(--color-white);
  border-top: 2px solid var(--color-orange);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
  padding: 0.85rem 0 max(0.85rem, env(safe-area-inset-bottom));
}

.estimate-bar-inner {
  width: min(640px, 92%);
  margin: 0 auto;
}

.estimate-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.estimate-total-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-gray-dark);
}

.estimate-total-amount {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1;
}

.estimate-total-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.72rem;
  color: var(--color-gray-dark);
  margin-bottom: 0.75rem;
  min-height: 1.2em;
}

.estimate-total-breakdown span::after {
  content: " /";
  opacity: 0.4;
}

.estimate-total-breakdown span:last-child::after {
  content: "";
}

.estimate-nav-actions {
  display: flex;
  gap: 0.65rem;
}

.estimate-nav-actions .btn {
  flex: 1;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.estimate-btn-prev {
  background: transparent;
  color: var(--color-black);
  border: 2px solid #ddd;
}

.estimate-btn-prev:hover {
  border-color: var(--color-black);
  color: var(--color-black);
  transform: none;
}

#estimate-btn-consult {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

/* --- 最終ステップ：連絡先入力 --- */
.estimate-contact-form {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.estimate-contact-heading {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--color-black);
}

.estimate-contact-lead {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--color-gray-dark);
  line-height: 1.65;
}

.estimate-contact-field {
  margin-bottom: 0.85rem;
}

.estimate-contact-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-black);
}

.estimate-contact-field input,
.estimate-contact-field textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--color-black);
  background: #fafafa;
  border: 2px solid #e8e8e8;
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.estimate-contact-field input:focus,
.estimate-contact-field textarea:focus {
  outline: none;
  border-color: var(--color-orange);
  background: var(--color-white);
}

.estimate-contact-field textarea {
  resize: vertical;
  min-height: 5rem;
}

.estimate-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-gray-dark);
  margin: 1rem auto 0;
  max-width: 640px;
  padding: 0 4%;
}

@media (max-width: 767px) {
  body.estimate-page {
    padding-bottom: 9rem;
  }

  .estimate-submit-message--success {
    bottom: calc(10rem + env(safe-area-inset-bottom, 0px));
    width: min(640px, 94%);
    font-size: 0.88rem;
  }

  .estimate-step-panel {
    padding: 1.35rem 1.1rem;
  }

  .estimate-total-amount {
    font-size: 1.5rem;
  }

  .estimate-nav-actions {
    flex-wrap: wrap;
  }

  #estimate-btn-consult:not([hidden]) {
    flex: 1 1 100%;
    order: -1;
    min-height: 3.25rem;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
  }

  #estimate-btn-consult:not([hidden]) ~ #estimate-btn-prev {
    flex: 1;
  }
}

@media (min-width: 768px) {
  .section-contact .container {
    grid-template-columns: 1fr 1fr;
  }
}
