/* ==========================================================================
   Craft & Custom Creations - Main Stylesheet
   ========================================================================== */

:root {
  --primary-color: #d97736;       /* Warm craft terracotta */
  --primary-hover: #b85d22;
  --secondary-color: #2b3a4a;     /* Deep slate */
  --accent-color: #f6ad55;        /* Soft gold */
  --bg-light: #fbfbf9;            /* Warm off-white */
  --bg-card: #ffffff;
  --text-main: #2d3748;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition: all 0.25s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ================= Header & Navigation ================= */
header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease-in-out;
}

header.header-hidden {
  transform: translateY(-100%);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--primary-color);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--secondary-color);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: var(--transition);
}

nav a:hover,
nav a.active {
  color: var(--primary-color);
  background: rgba(217, 119, 54, 0.08);
}

/* ================= Hero Section ================= */
.hero {
  background: linear-gradient(135deg, #2b3a4a 0%, #1e2833 100%);
  color: #ffffff;
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 1.2rem;
  color: #cbd5e0;
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 0.85rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(217, 119, 54, 0.35);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 119, 54, 0.45);
}

/* ================= Section Header ================= */
.section-title {
  text-align: center;
  margin: 3.5rem 0 1rem;
}

.section-title h2 {
  font-size: 2.2rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ================= Justified Services Grid (5 boxes) ================= */
.services-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Justifies & centers lower boxes */
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex: 0 1 calc(33.333% - 1.5rem);
  min-width: 290px;
  max-width: 360px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(217, 119, 54, 0.4);
}

.service-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: #edf2f7;
}

.service-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.service-card:hover .service-image-wrapper img {
  transform: scale(1.06);
}

.service-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(43, 58, 74, 0.85);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.service-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-body h3 {
  font-size: 1.35rem;
  color: var(--secondary-color);
  margin-bottom: 0.6rem;
}

.service-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.service-link {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.service-card:hover .service-link {
  color: var(--primary-hover);
  transform: translateX(4px);
}

/* ================= Gallery Pages ================= */
.page-hero {
  background: linear-gradient(135deg, #2b3a4a 0%, #1e2833 100%);
  color: #ffffff;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: #cbd5e0;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* Section Header for Photo Gallery */
.photo-gallery-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px dashed var(--border-color);
}

.photo-gallery-header h2 {
  font-size: 2.2rem;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.photo-gallery-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.4rem;
}

.gallery-dropzone {
  display: none !important;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Justifies cards evenly, centering leftover items */
  gap: 1.75rem;
}

.gallery-card {
  flex: 0 1 calc(33.333% - 1.25rem);
  min-width: 280px;
  max-width: 360px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gallery-img-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: #edf2f7;
  cursor: pointer;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.05);
}

.gallery-info {
  padding: 1.1rem 1.25rem;
}

.gallery-info h4 {
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-bottom: 0.3rem;
}

.gallery-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Status Badges for In Stock / Sold Gallery Cards */
.gallery-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(43, 58, 74, 0.9);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  letter-spacing: 0.4px;
}

.gallery-status-badge.in-stock {
  background: #2e7d32; /* Deep emerald green */
  color: #ffffff;
}

.gallery-status-badge.sold {
  background: #546e7a; /* Neutral muted slate */
  color: #f1f5f9;
}

/* Info Notice Banner */
.info-notice {
  background: #fff8f0;
  border-left: 4px solid var(--primary-color);
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 0 auto 2.5rem;
  max-width: 900px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.info-notice-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.info-notice-content h4 {
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.info-notice-content p {
  color: var(--text-main);
  font-size: 0.92rem;
  margin: 0;
}

/* ================= Lightbox Popup Modal ================= */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(6px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: var(--primary-color);
}

.lightbox-caption {
  color: #e2e8f0;
  margin-top: 1rem;
  font-size: 1.05rem;
  text-align: center;
  font-weight: 500;
}

/* ================= Contact Section ================= */
.contact-section {
  background-color: #f1f5f9;
  padding: 4.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.contact-card {
  max-width: 700px;
  margin: 0 auto;
  background: #ffffff;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1.25rem;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background-color: #fafbfc;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(217, 119, 54, 0.15);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit-btn {
  width: 100%;
  padding: 0.95rem;
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.form-submit-btn:hover {
  background-color: var(--primary-hover);
}

/* ================= Footer ================= */
footer {
  background-color: var(--secondary-color);
  color: #a0aec0;
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

footer a {
  color: #e2e8f0;
}

footer a:hover {
  color: var(--accent-color);
}

/* ================= Dev Notice Badge ================= */
.dev-banner {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99999;
  background: linear-gradient(135deg, #ff9800, #e65100);
  color: #ffffff;
  padding: 8px 16px 8px 14px;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: pulseDevBanner 3s infinite ease-in-out;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.dev-banner.banner-hidden {
  transform: translateY(-150%);
  opacity: 0;
}

.dev-banner-icon {
  font-size: 1rem;
  line-height: 1;
}

@keyframes pulseDevBanner {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(230, 81, 0, 0.45);
  }
}

@media (max-width: 600px) {
  .dev-banner {
    top: 8px;
    right: 8px;
    font-size: 0.74rem;
    padding: 6px 12px;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.1rem;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .service-card,
  .gallery-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}
