/* ============================================
   PRIME HAVEN MARKET — Application & Visual Upgrades
   ============================================ */

/* --- Application Form --- */
.app-form-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.app-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.app-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-faint);
  transition: color var(--transition-interactive);
}

.app-step.active {
  color: var(--color-primary);
  font-weight: 600;
}

.app-step.completed {
  color: var(--color-success);
}

.app-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-2);
  border: 2px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: all var(--transition-interactive);
}

.app-step.active .app-step-num {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.app-step.completed .app-step-num {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-text-inverse);
}

.app-step-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.app-step-divider {
  width: 40px;
  height: 2px;
  background: var(--color-border);
  margin: 0 var(--space-2);
}

.app-step-divider.completed {
  background: var(--color-success);
}

.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  box-shadow: var(--shadow-md);
}

.app-step-content {
  display: none;
}

.app-step-content.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

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

.app-step-content h2 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.app-step-content > p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.app-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 600px) {
  .app-form-grid.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.app-form-grid .form-group {
  margin-bottom: 0;
}

.app-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.app-actions .btn {
  min-width: 120px;
  justify-content: center;
}

/* --- File Upload --- */
.file-upload {
  position: relative;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  transition: all var(--transition-interactive);
  cursor: pointer;
  background: var(--color-surface-2);
}

.file-upload:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload .fu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.file-upload .fu-icon svg {
  width: 24px;
  height: 24px;
}

.file-upload .fu-text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.file-upload .fu-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
}

.file-upload .fu-filename {
  display: none;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-success);
  font-weight: 600;
}

.file-upload.has-file .fu-filename {
  display: block;
}

.file-upload.has-file {
  border-color: var(--color-success);
  border-style: solid;
  background: rgba(34, 197, 94, 0.05);
}

/* --- App Success --- */
.app-success {
  text-align: center;
  padding: var(--space-10);
}

.app-success .as-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-5);
  border-radius: 50%;
  background: var(--color-success);
  color: white;
}

.app-success .as-icon svg {
  width: 32px;
  height: 32px;
}

.app-success h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.app-success p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* --- Secondary Cards --- */
.secondary-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-top: var(--space-10);
}

@media (min-width: 700px) {
  .secondary-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.secondary-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.secondary-card h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.secondary-card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
}

.secondary-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* --- Image Section (alternating) --- */
.image-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 800px) {
  .image-section {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.image-section.reverse .image-section-text {
  order: 2;
}

.image-section-img {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-surface-2);
}

.image-section-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-section-text h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.image-section-text p {
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

/* --- Map Section --- */
.map-section {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.map-section iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

.map-overlay {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: rgba(26, 93, 58, 0.9);
  border-radius: var(--radius-lg);
  color: #f5f3ed;
  backdrop-filter: blur(8px);
}

.map-overlay p {
  font-size: var(--text-sm);
  color: rgba(245, 243, 237, 0.9);
}

.map-overlay strong {
  color: var(--color-accent);
}

/* --- Intro Splash Video (plays once, then disappears) --- */
.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #1a5d3a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-splash video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fade out and remove splash when video ends */
.intro-splash.fade-out {
  animation: splashFadeOut 0.8s ease-in forwards;
}

@keyframes splashFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* After splash is gone, remove from layout */
.intro-splash.hidden {
  display: none;
}

/* --- Hero Peeking Dog & Cat --- */
.hero-peeking-dog,
.hero-peeking-cat {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

/* Dog: top-left corner */
.hero-peeking-dog {
  top: -30px;
  left: -70px;
  height: 38%;
  max-height: 260px;
  width: auto;
  filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.12));
}

/* Cat: bottom-right corner */
.hero-peeking-cat {
  bottom: -20px;
  right: -120px;
  height: 42%;
  max-height: 300px;
  width: auto;
  filter: drop-shadow(-4px 4px 12px rgba(0, 0, 0, 0.12));
}

@media (min-width: 900px) {
  .hero-peeking-dog {
    top: -20px;
    left: -50px;
    height: 42%;
    max-height: 300px;
  }
  .hero-peeking-cat {
    bottom: -10px;
    right: -100px;
    height: 46%;
    max-height: 340px;
  }
}

@media (max-width: 899px) {
  .hero-peeking-dog,
  .hero-peeking-cat {
    height: 30%;
    max-height: 200px;
  }
  .hero-peeking-dog { top: -20px; left: -50px; }
  .hero-peeking-cat { bottom: -15px; right: -90px; }
}

@media (max-width: 599px) {
  .hero-peeking-dog,
  .hero-peeking-cat {
    display: none;
  }
}

/* --- Values Bento Section --- */
.values-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 700px) {
  .values-bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .values-bento {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  position: relative;
  padding: var(--space-6) var(--space-5) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color var(--transition-interactive), transform var(--transition-interactive);
}

.value-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.value-card::before {
  content: attr(data-num);
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-primary);
  opacity: 0.08;
  line-height: 1;
}

.value-card .vc-accent-bar {
  width: 32px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  margin-bottom: var(--space-3);
}

.value-card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.value-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}

.value-card .vc-impact {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Animated Hero Visual --- */
.hero-visual-animated {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  aspect-ratio: 16/10;
}

.hero-visual-animated img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(26, 93, 58, 0.7));
  display: flex;
  align-items: flex-end;
  padding: var(--space-6);
}

.hero-visual-overlay .hvo-content {
  color: #f5f3ed;
}

.hero-visual-overlay .hvo-content h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}

.hero-visual-overlay .hvo-content p {
  font-size: var(--text-sm);
  color: rgba(245, 243, 237, 0.8);
}

/* --- Floating Product Cards Animation --- */
.floating-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.float-card {
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  text-align: center;
  animation: floatCard 3s ease-in-out infinite;
}

.float-card:nth-child(2) { animation-delay: 0.5s; }
.float-card:nth-child(3) { animation-delay: 1s; }
.float-card:nth-child(4) { animation-delay: 1.5s; }

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.float-card .fc-brand {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.float-card .fc-name {
  font-size: var(--text-xs);
  color: rgba(245, 243, 237, 0.7);
}

/* --- Section Divider --- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: var(--space-8) 0;
}

/* --- Marquee Scroll Animation --- */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.brand-marquee-track {
  animation: marquee 30s linear infinite;
}

/* --- Pulse Animation --- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse 2s ease-in-out infinite;
}


/* ===== MOBILE-ONLY FIXES (does not affect desktop) ===== */

/* Mobile video uses cover - logo is small enough to fit */
@media (max-width: 767px) {
  .intro-splash video {
    object-fit: cover;
  }
}

/* Catalog preview: fix overflow and stacking on mobile */
@media (max-width: 799px) {
  .catalog-preview {
    padding: var(--space-6);
    overflow: hidden;
  }

  .catalog-preview-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .catalog-preview-text {
    text-align: center;
  }

  .catalog-preview-text h2 {
    font-size: var(--text-lg);
  }

  .catalog-preview-text p {
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
  }

  .catalog-preview-visual {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: var(--space-4);
  }

  .catalog-preview-search {
    flex-direction: column;
    gap: var(--space-2);
  }

  .catalog-preview-search input,
  .catalog-preview-search .btn {
    width: 100%;
  }

  .catalog-preview-search .btn {
    text-align: center;
    justify-content: center;
  }

  .catalog-preview-result {
    padding: var(--space-2) var(--space-3);
  }

  .catalog-preview-result .cpr-brand {
    font-size: 0.7rem;
  }

  .catalog-preview-result .cpr-desc {
    font-size: 0.8rem;
  }

  .catalog-preview-result .cpr-size {
    font-size: 0.7rem;
  }
}
