/* =============================================
   MY NEW KITCHEN — Custom Styles
   (Tailwind handles utilities; this file handles
   animations, hover states, and components)
   ============================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* ---- Navbar ---- */
#navbar { transition: background 0.3s ease, border-color 0.3s ease; }
#navbar.scrolled {
  background: rgba(15, 15, 30, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

/* ---- Gold Buttons ---- */
.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #F2D060 100%);
  color: #111;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: inline-block;
  text-decoration: none;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.45);
}
.btn-gold-lg {
  background: linear-gradient(135deg, #D4AF37 0%, #F2D060 100%);
  color: #111;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s;
  display: inline-block;
}
.btn-gold-lg:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(212, 175, 55, 0.5);
}
.btn-gold-lg:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Hero parallax bg ---- */
.hero-bg { will-change: transform; }

/* ---- Fade-in (hero text) ---- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeInUp 0.85s ease forwards;
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.5s; }
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- Gallery ---- */
.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: #1e1e34;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
  display: block;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,25,0.88) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a3e, #2a2a50);
  color: rgba(212,175,55,0.3);
  font-size: 3rem;
}

/* ---- Filter buttons ---- */
.filter-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: rgba(212,175,55,0.4); color: #D4AF37; }
.filter-btn.active {
  background: linear-gradient(135deg, #D4AF37, #F2D060);
  border-color: transparent;
  color: #111;
  font-weight: 700;
}

/* ---- Service cards ---- */
.service-card {
  background: rgba(255,255,255,0.025);
  transition: background 0.3s ease, transform 0.3s ease;
}
.service-card:hover {
  background: rgba(212,175,55,0.07);
  transform: translateY(-5px);
}

/* ---- Visualizer card ---- */
.visualizer-card { background: rgba(255,255,255,0.03); }

/* ---- Drop zone ---- */
.drop-zone { transition: border-color 0.25s ease, background 0.25s ease; }
.drop-zone.drag-over {
  border-color: #D4AF37 !important;
  background: rgba(212,175,55,0.07);
}

/* ---- Paint chip cards (BM store style) ---- */
.paint-chip-card {
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  cursor: pointer;
  border: 2px solid transparent;
}
.paint-chip-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 4px 10px 24px rgba(0,0,0,0.55);
}
.paint-chip-card.chip-selected {
  border-color: #D4AF37;
  box-shadow: 0 0 0 2px rgba(212,175,55,0.6), 4px 10px 24px rgba(0,0,0,0.5);
  transform: translateY(-5px) scale(1.03);
}

/* 4 stacked shades */
.paint-chip-shades {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.paint-chip-shade {
  flex: 1;
  min-height: 38px;
  position: relative;
  transition: flex 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.paint-chip-shade:hover { flex: 1.6; }

/* Checkmark on selected shade */
.shade-check {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: #111;
  font-size: 9px;
  font-weight: 900;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.shade-check.visible { display: flex; }

/* Footer label */
.paint-chip-footer {
  background: #fff;
  padding: 5px 5px 4px;
  border-top: 1px solid rgba(0,0,0,0.1);
}
.paint-chip-family {
  font-size: 7px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}
.paint-chip-bm {
  font-size: 5.5px;
  color: #e31837;
  font-weight: 700;
  margin-top: 1px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Testimonials ---- */
.testimonial-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.testimonial-card:hover { border-color: rgba(212,175,55,0.25); transform: translateY(-4px); }
.stars { color: #D4AF37; letter-spacing: 2px; font-size: 1rem; }

/* ---- Contact card ---- */
.contact-card {
  background: linear-gradient(135deg, rgba(212,175,55,0.07), rgba(15,15,30,0.95));
  border: 1px solid rgba(212,175,55,0.22);
}
.form-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  transition: border-color 0.2s ease;
}
.form-input:focus { outline: none; border-color: rgba(212,175,55,0.5); }
.form-input::placeholder { color: #6b7280; }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeInUp 0.2s ease;
}
.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
}
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2;
}
.lightbox-close:hover { color: #D4AF37; }

.lightbox-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 95vw;
}
.lightbox-img-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.lightbox-label {
  color: #D4AF37;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.lightbox-nav {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ccc;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.lightbox-nav:hover { background: rgba(212,175,55,0.15); border-color: #D4AF37; color: #D4AF37; }
.lightbox-nav.active { background: rgba(212,175,55,0.2); border-color: #D4AF37; color: #D4AF37; }

/* ---- Color result cards ---- */
.color-result-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.color-result-card:hover {
  border-color: rgba(212,175,55,0.4);
  transform: translateY(-3px);
}
.color-result-empty {
  background: rgba(255,255,255,0.02);
  border: 2px dashed rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 160px;
}
.color-result-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #D4AF37, #F2D060);
  color: #111;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.color-result-badge-empty {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.15);
  font-size: 12px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Lightbox dots & counter ---- */
.lightbox-counter {
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 0.25rem;
}
.lightbox-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 0.75rem;
}
.lightbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.lightbox-dot.active {
  background: #D4AF37;
  transform: scale(1.3);
}
.lightbox-dot:hover { background: rgba(212,175,55,0.6); }

/* ---- Lightbox nav disabled state ---- */
.lightbox-nav:disabled { opacity: 0.2; cursor: not-allowed; }
.lightbox-nav:disabled:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); color: #ccc; }

/* ---- Shimmer loading skeleton ---- */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 12px;
}

/* ---- Spinning loader ---- */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.9s linear infinite; display: inline-block; }

/* ---- Process steps (how it works) ---- */
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4AF37, #F2D060);
  color: #111;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Before/After result images ---- */
.result-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #0f0f1e;
  border-radius: 16px;
  max-height: 70vw; /* proportional on mobile */
}
@media (min-width: 768px) {
  .result-img { max-height: 380px; }
}

/* ---- Mobile bottom nav safe area ---- */
@media (max-width: 768px) {
  section { padding-left: 1rem; padding-right: 1rem; }
}

/* ---- Lightbox mobile layout ---- */
@media (max-width: 640px) {
  .lightbox { padding: 0.5rem; align-items: center; }

  .lightbox-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    max-width: 100vw;
    width: 100%;
  }
  .lightbox-img-wrap {
    flex: 0 0 100%;
    order: 0;
    width: 100%;
  }
  .lightbox-prev { order: 1; flex: 1; }
  .lightbox-next { order: 2; flex: 1; }

  .lightbox img {
    max-width: 100%;
    max-height: 65vh;
    width: 100%;
  }

  .lightbox-nav {
    padding: 0.65rem 0;
    text-align: center;
    font-size: 1rem;
  }
  .lightbox-close {
    top: 0.5rem;
    right: 0.75rem;
    font-size: 1.8rem;
  }
}
