/* =========================
   LUXURY FURNITURE WEBSITE
   CSS
   ========================= */

/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:wght@400;700&display=swap');

/* === GLOBAL === */
body {
  margin: 0;
  padding: 0;
  font-family: 'Lato', sans-serif;
  color: #222;
  background-color: #fdfdfd;
}

a {
  text-decoration: none;
  color: inherit;
}

/* === NAVBAR === */
.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.navbar .logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  letter-spacing: 1px;
  color: #111;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2b2b2b;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #bfa36f; /* subtle gold */
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger {
  width: 25px;
  height: 3px;
  background-color: #222;
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  width: 25px;
  height: 3px;
  background-color: #222;
  position: absolute;
  left: 0;
  transition: 0.3s;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* === GALLERY === */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  padding: 2rem 1rem;
}

.gallery .item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(0,0,0,0.18);
  border: 2px solid rgba(212,175,127,0.3); /* subtle gold */
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Gold overlay effect */
.gallery .item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: rgba(212, 175, 127, 0.1); /* subtle gold tint */
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 3;
  transform: translateY(-10px);
}

.gallery .item:hover::after {
  opacity: 1;
  transform: translateY(0);
}


/* AFTER IMAGE FADE-IN */
.item img.after {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  animation: fadeIn 1s ease forwards; /* CSS-only fade-in */
  opacity: 0;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* BEFORE IMAGE (hover / tap swap) */
.item img.before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  border-radius: 12px;
  transition: opacity 0.4s ease;
  z-index: 2;
  pointer-events: none;
}

/* Hover swap for desktop */
@media (hover: hover) {
  .item:hover img.before {
    opacity: 1;
  }
}

/* Caption overlay with subtle gold tint */
.item .caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.45);
  color: #d4af7f; /* subtle gold */
  text-align: center;
  padding: 8px 0;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  font-weight: 500;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  z-index: 3;
  transition: background 0.3s ease;
}

.item:hover .caption {
  background: rgba(0,0,0,0.6);
}

/* Load More Button */
#loadMore {
  display: block;
  margin: 30px auto;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(145deg, #a67c52, #d4af7f);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(212,175,127,0.25);
  transition: all 0.3s ease;
}

#loadMore:hover {
  background: linear-gradient(145deg, #d4af7f, #a67c52);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(212,175,127,0.35);
}

/* FOOTER */
.footer {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
  border-top: 1px solid #eee;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    flex-direction: column;
    background: #fff;
    width: 200px;
    border-left: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: none;
    padding: 1rem 0;
    z-index: 1000;
  }

  .nav-links.show { display: flex; }

  .nav-links li { margin: 0; padding: 0.5rem 1rem; }
  .nav-toggle { display: block; }
}

@media (max-width: 900px) { .gallery { grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); } }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }

/* Mobile tap-to-swap */
@media (hover: none) {
  .item img.before { opacity: 0 !important; } /* tap handled by JS */
}
