/* --- GLOBAL --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f5f5f7;
  color: #1d1d1f;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 40px 10px;
}

.main-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  max-width: 1350px;
  width: 100%;
  justify-content: center;
}

/* --- CARD CONTAINERS --- */
.card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 30px 26px;
  width: 700px;
  transition: all 0.3s ease;
}

.info-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 30px 26px;
  width: 320px;
  transition: all 0.3s ease;
}

.card:hover, .info-card:hover {
  transform: translateY(-2px);
}

/* --- TITLES --- */
h1 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #000;
  letter-spacing: -0.02em;
}
.desc {
  font-size: 0.9rem;
  color: #6e6e73;
  margin-bottom: 20px;
  line-height: 1.5em;
}

/* --- MODEL GRID --- */
.model-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 25px;
  justify-items: center;
}

.model-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 12px 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  overflow: hidden;
}

.model-card:hover {
  border-color: #86868b;
  background: #f2f2f2;
  transform: scale(1.03);
}

.model-card.selected {
  border-color: #1d1d1f;
  background: #e9e9eb;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

/* --- MODEL IMAGES --- */
.model-card img {
  width: 75px;
  height: 75px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  display: block;
}

.model-card span {
  font-size: 0.85rem;
  font-weight: 500;
  color: #1d1d1f;
  text-align: center;
}

/* --- WARNING BOX --- */
.warning {
  background: #fffbea;
  border-left: 4px solid #f5c518;
  color: #5f5f62;
  font-size: 0.9rem;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.warning-icon {
  font-size: 1.2rem;
}

/* --- BUTTONS --- */
.row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn {
  padding: 10px 22px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.25s;
  letter-spacing: -0.01em;
}

/* Apple graphite-style buttons */
.btn.primary {
  background: linear-gradient(180deg, #3a3a3c, #1d1d1f);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #4a4a4c, #2a2a2c);
}

.btn.ghost {
  background: #e9e9eb;
  color: #1d1d1f;
}
.btn.ghost:hover {
  background: #d1d1d6;
}

/* --- INPUTS (IMEI FIELD) --- */
input[type="text"], input[type="number"] {
  width: 50%;
  max-width: 300px;
  display: block;
  margin: 15px auto 10px auto;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d2d2d7;
  outline: none;
  transition: 0.2s ease-in-out;
  font-size: 0.85rem;
  text-align: center;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

input:focus {
  border-color: #6e6e73;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
}

/* --- STEP DISPLAY --- */
.step { display: none; }
.step.show { display: block; margin-top: 10px; }
.result { display: none; }
.result.visible { display: block; margin-top: 20px; }

/* ✅ PROFESSIONAL UNLOCK BANNER (Optimized Apple Style) */
.assurance-banner {
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  background: #f9fff9;
  border: 1px solid #b8f5c2;
  border-left: 6px solid #34c759;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin: 25px auto 22px;
  max-width: 620px;
  animation: fadeInUp 0.5s ease both;
}

.assurance-banner .a-left {
  font-size: 1.9rem;
  line-height: 1;
  color: #34c759;
  flex-shrink: 0;
}

.assurance-banner .a-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.assurance-banner .a-title {
  font-weight: 600;
  font-size: 1rem;
  color: #1d1d1f;
}

.assurance-banner .a-sub {
  color: #555;
  font-size: 0.92rem;
  line-height: 1.5;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .assurance-banner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 14px;
  }
}

/* --- PRICE CARD --- */
.price-card {
  background: #f2f2f2;
  border-radius: 12px;
  padding: 10px 15px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 10px auto 15px auto;
}

.price-text {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1d1d1f;
}

.duration-line {
  font-size: 0.85rem;
  color: #6e6e73;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.duration-line .icon { font-size: 1rem; }

/* --- INFO CARD --- */
.info-card h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #1d1d1f;
}
.info-card p {
  font-size: 0.9rem;
  color: #6e6e73;
  margin-bottom: 12px;
}
.info-card ul {
  list-style: none;
  padding: 0;
}
.info-card li {
  font-size: 0.9rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1d1d1f;
}

/* --- OVERLAY LOADING --- */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 999;
}
.overlay.show { display: flex; }
.spinner {
  width: 80px;
  height: 80px;
  border: 5px solid rgba(60, 60, 67, 0.15);
  border-top: 5px solid #1d1d1f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-weight: 600;
  color: #1d1d1f;
}

/* --- MODAL --- */
.modal { display: none; }
.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
}
.modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 14px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}
.modal-buttons {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* --- RESPONSIVE --- */
@media (max-width: 1100px) {
  .model-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .main-wrapper { flex-direction: column; align-items: center; }
  .card, .info-card { width: 90%; }
  .model-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .model-grid { grid-template-columns: repeat(2, 1fr); }
}
/* FIX floating window flickering + movement */
.floating-window {
  position: fixed !important;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.35);
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.floating-window.show {
  display: flex;
  opacity: 1;
}

.fw-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.25);
  padding: 18px;
  width: 920px;
  max-width: 96%;
  animation: fadeIn 0.3s ease;
}

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