/* ── Reset & Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #2B2B2B;
  --primary-d:  #1a1a1a;
  --blue:       #89CDE0;
  --blue-l:     #a0d8e8;
  --accent:     #89CDE0;
  --light:      #e8f6fb;
  --white:      #ffffff;
  --gray-100:   #f4f7fb;
  --gray-200:   #e2e8f0;
  --gray-400:   #94a3b8;
  --gray-600:   #64748b;
  --text:       #1e293b;
  --success:    #059669;
  --warning:    #d97706;
  --danger:     #dc2626;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,.10);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.07);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--gray-100);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Header ────────────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--blue) 100%);
  color: #fff;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23f4f7fb' d='M0,60 L0,40 L180,10 L360,50 L540,5 L720,45 L900,8 L1080,42 L1260,12 L1440,38 L1440,60 Z'/%3E%3C/svg%3E") no-repeat bottom/cover;
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 24px 72px;
  position: relative;
  z-index: 1;
}
.site-header .logo { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.5px; }
.site-header .logo span { color: var(--accent); }
.site-header .tagline { font-size: .95rem; opacity: .85; margin-top: 4px; }

/* ── Main container ────────────────────────────────────────────────── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

/* ── Progress steps ────────────────────────────────────────────────── */
.progress-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin: -28px auto 32px;
  max-width: 640px;
  position: relative;
  z-index: 2;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.step-item.done:not(:last-child)::after,
.step-item.active:not(:last-child)::after { background: var(--blue-l); }

.step-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  color: var(--gray-400);
  position: relative; z-index: 1;
  transition: all .25s;
}
.step-item.active .step-circle {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 0 0 4px rgba(0,119,182,.18);
}
.step-item.done .step-circle {
  background: var(--success); border-color: var(--success); color: #fff;
}
.step-label {
  font-size: .72rem; font-weight: 600; color: var(--gray-400);
  margin-top: 6px; text-align: center; white-space: nowrap;
}
.step-item.active .step-label { color: var(--blue); }
.step-item.done .step-label { color: var(--success); }

/* ── Card ──────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
  animation: fadeUp .3s ease;
}
.card-title {
  font-size: 1.3rem; font-weight: 700; color: var(--primary);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.card-title .icon { font-size: 1.4rem; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Service cards ─────────────────────────────────────────────────── */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.service-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  background: #fff;
}
.service-card:hover { border-color: var(--blue-l); box-shadow: var(--shadow-sm); }
.service-card.selected {
  border-color: var(--blue);
  background: linear-gradient(135deg, #e8f4f8 0%, #f0f9ff 100%);
  box-shadow: 0 0 0 3px rgba(0,119,182,.12);
}
.service-card .check {
  position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: none; align-items: center; justify-content: center;
  font-size: .75rem;
}
.service-card.selected .check { display: flex; }
.service-card .svc-icon { font-size: 2rem; margin-bottom: 10px; }
.service-card .svc-name { font-weight: 700; font-size: 1.05rem; color: var(--primary); }
.service-card .svc-desc { font-size: .82rem; color: var(--gray-600); margin-top: 6px; line-height: 1.5; }
.service-card .svc-price {
  margin-top: 12px;
  font-size: 1.4rem; font-weight: 800; color: var(--blue);
}
.service-card .svc-price small { font-size: .8rem; font-weight: 500; color: var(--gray-600); }
.service-card .svc-price.no-price { font-size: .85rem; color: var(--gray-600); font-weight: 500; }

/* ── Form elements ─────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--gray-600); }
.form-group label .req { color: var(--danger); margin-left: 2px; }

.form-control {
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,119,182,.12);
}
.form-control.error { border-color: var(--danger); }
.form-control::placeholder { color: var(--gray-400); }

textarea.form-control { resize: vertical; min-height: 90px; }

.field-error { font-size: .78rem; color: var(--danger); display: none; }
.field-error.show { display: block; }

/* ── Toggle switch ─────────────────────────────────────────────────── */
.toggle-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--gray-100); border-radius: 8px;
  cursor: pointer;
  user-select: none;
}
.toggle-row:hover { background: var(--light); }
.toggle-label { font-weight: 600; font-size: .95rem; flex: 1; }
.toggle-sublabel { font-size: .8rem; color: var(--gray-600); }

.toggle {
  position: relative; width: 48px; height: 26px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--gray-200); border-radius: 13px;
  transition: background .2s;
}
.toggle input:checked + .toggle-track { background: var(--blue); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s;
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(22px); }

/* ── Photo upload ──────────────────────────────────────────────────── */
.photo-upload {
  border: 2px dashed var(--gray-200);
  border-radius: 8px; padding: 20px; text-align: center;
  cursor: pointer; transition: all .2s; background: var(--gray-100);
  position: relative;
}
.photo-upload:hover, .photo-upload.dragover { border-color: var(--blue); background: var(--light); }
.photo-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-upload .upload-icon { font-size: 2rem; margin-bottom: 6px; }
.photo-upload .upload-text { font-size: .85rem; color: var(--gray-600); }
.photo-upload .upload-hint { font-size: .75rem; color: var(--gray-400); margin-top: 4px; }

.photo-preview {
  position: relative; margin-top: 12px;
  border-radius: 8px; overflow: hidden;
  display: none;
}
.photo-preview img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; }
.photo-preview .remove-photo {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.6); color: #fff; border: none;
  border-radius: 50%; width: 28px; height: 28px;
  cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
}

/* ── Ski section ───────────────────────────────────────────────────── */
.ski-section {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; position: relative;
  background: #fff;
}
.ski-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.ski-section-title {
  font-weight: 700; font-size: 1rem; color: var(--primary);
  display: flex; align-items: center; gap: 8px;
}
.ski-section-title .badge {
  background: var(--blue); color: #fff;
  border-radius: 20px; padding: 2px 10px; font-size: .75rem;
}
.remove-ski {
  background: none; border: 1.5px solid var(--danger);
  color: var(--danger); border-radius: 8px;
  padding: 4px 12px; font-size: .82rem; cursor: pointer;
  transition: all .2s;
}
.remove-ski:hover { background: var(--danger); color: #fff; }

.skier-section {
  margin-top: 16px; padding-top: 16px;
  border-top: 1.5px dashed var(--gray-200);
}
.skier-title { font-size: .9rem; font-weight: 700; color: var(--gray-600); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }

/* ── Count selector ────────────────────────────────────────────────── */
.count-options { display: flex; gap: 16px; }
.count-option {
  flex: 1; border: 2px solid var(--gray-200);
  border-radius: var(--radius); padding: 20px;
  cursor: pointer; text-align: center; transition: all .2s;
  background: #fff;
}
.count-option:hover { border-color: var(--blue-l); }
.count-option.selected { border-color: var(--blue); background: var(--light); }
.count-option .count-icon { font-size: 2.4rem; margin-bottom: 8px; }
.count-option .count-label { font-weight: 700; font-size: 1rem; color: var(--primary); }
.count-option .count-sub { font-size: .82rem; color: var(--gray-600); margin-top: 4px; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 8px; border: none;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: all .2s; font-family: inherit;
  text-decoration: none;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--primary); }
.btn-primary:disabled { background: var(--gray-400); cursor: not-allowed; }
.btn-secondary { background: var(--gray-200); color: var(--text); }
.btn-secondary:hover { background: var(--gray-200); filter: brightness(.95); }
.btn-outline { background: transparent; border: 2px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.9); }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; }

.nav-buttons {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 28px; gap: 12px;
}
.nav-buttons .btn-primary { margin-left: auto; }

.add-ski-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; border: 2px dashed var(--blue);
  border-radius: var(--radius); background: none; color: var(--blue);
  font-size: .95rem; font-weight: 600; cursor: pointer; transition: all .2s;
  margin-top: 8px; font-family: inherit;
}
.add-ski-btn:hover { background: var(--light); }

/* ── Confirmation screen ───────────────────────────────────────────── */
.confirm-hero {
  text-align: center; padding: 24px 0 16px;
}
.confirm-hero .check-anim {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #34d399);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; margin: 0 auto 16px;
  animation: popIn .4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.confirm-hero h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 6px; }
.confirm-hero p { color: var(--gray-600); }
.order-id-badge {
  display: inline-block; background: var(--light); border: 1.5px solid var(--accent);
  color: var(--blue); font-weight: 700; border-radius: 8px;
  padding: 6px 18px; margin-top: 10px; font-size: 1rem;
}
.return-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--blue) 100%);
  color: #fff; border-radius: var(--radius); padding: 20px 24px;
  margin-top: 20px; display: flex; align-items: center; gap: 16px;
}
.return-card .rc-icon { font-size: 2rem; flex-shrink: 0; }
.return-card .rc-label { font-size: .85rem; opacity: .8; }
.return-card .rc-value { font-size: 1.2rem; font-weight: 700; margin-top: 2px; }

.summary-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.summary-table td { padding: 8px 0; border-bottom: 1px solid var(--gray-200); font-size: .9rem; }
.summary-table td:first-child { font-weight: 600; color: var(--gray-600); width: 40%; }

/* ── Alert ─────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: 8px;
  font-size: .9rem; margin-bottom: 16px; display: none;
}
.alert.show { display: block; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

/* ── Loading overlay ───────────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: none; align-items: center; justify-content: center;
  z-index: 9999;
}
.loading-overlay.show { display: flex; }
.loading-box {
  background: #fff; border-radius: var(--radius);
  padding: 32px 48px; text-align: center;
  box-shadow: var(--shadow);
}
.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-weight: 600; color: var(--gray-600); }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .card { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .service-grid { grid-template-columns: 1fr; }
  .count-options { flex-direction: column; }
  .progress-bar { gap: 0; }
  .step-label { font-size: .65rem; }
  .header-inner { padding: 24px 16px 64px; }
  .site-header .logo { font-size: 1.4rem; }
  .nav-buttons { flex-wrap: wrap; }
  .nav-buttons .btn { flex: 1; }
}
