/* ============== VARIABLES ============== */
/* Update actual brand colour here */
:root {
  --brand-color: #8b4a32;
  --brand-dark: #4b2419;
  --brand-light: #fff5eb;
  --cream: #fffaf5;
  --text-dark: #2d211c;
  --text-muted: #756b66;
  --white: #ffffff;
  --gold: #c99a4a;
  --whatsapp: #25d366;
  --shadow: 0 8px 24px rgba(75, 36, 25, 0.1);
  --radius: 16px;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.section {
  padding: 70px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-alt { background: var(--brand-light); max-width: 100%; }
.section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--brand-dark);
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 36px;
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 50px;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand-color); color: var(--white); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border-color: var(--brand-color); color: var(--brand-color); }
.btn-outline:hover { background: var(--brand-color); color: var(--white); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { background: #1eb355; }

/* ============== SPLASH SCREEN ============== */
#splash-screen {
  position: fixed;
  inset: 0;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#splash-screen.hide { opacity: 0; visibility: hidden; }
.splash-content { text-align: center; padding: 20px; }
.splash-content img { width: 110px; height: 110px; object-fit: contain; margin: 0 auto 16px; }
.splash-fallback {
  font-size: 2rem; font-weight: 800; color: var(--brand-color); margin-bottom: 16px;
}
.splash-content h1 { color: var(--brand-dark); font-size: 1.5rem; margin-bottom: 4px; }
.splash-content .tagline { color: var(--text-muted); font-style: italic; margin-bottom: 24px; }
.progress-wrapper {
  width: 220px;
  height: 8px;
  background: #eee0d3;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto 10px;
}
#loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-color), var(--gold));
  border-radius: 10px;
  transition: width 0.15s ease;
}
#loading-percent { color: var(--brand-color); font-weight: 600; font-size: 0.9rem; }

/* ============== NAVBAR ============== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 250, 245, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--brand-dark); }
.nav-logo img { width: 42px; height: 42px; object-fit: contain; }
.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-link {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--brand-color); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--brand-color);
}
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--brand-dark); transition: var(--transition); }
.menu-toggle:focus-visible, .nav-link:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand-color); outline-offset: 3px; }

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition), padding var(--transition);
    gap: 0;
    box-shadow: var(--shadow);
  }
  .nav-menu.open { max-height: 500px; padding: 20px; gap: 18px; }
  .nav-menu li { width: 100%; }
  .nav-menu .btn { display: block; width: 100%; }
}

/* ============== HERO ============== */
.hero { padding: 60px 20px; max-width: 1200px; margin: 0 auto; }
.hero-inner { display: flex; align-items: center; gap: 50px; flex-wrap: wrap; }
.hero-text { flex: 1 1 420px; }
.hero-label {
  display: inline-block;
  color: var(--brand-color);
  background: var(--brand-light);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero-heading { font-size: 2.6rem; color: var(--brand-dark); line-height: 1.2; margin-bottom: 18px; }
.hero-desc { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 28px; max-width: 480px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-image-wrap { flex: 1 1 400px; position: relative; min-height: 340px; display: flex; align-items: center; justify-content: center; }
.hero-shape {
  position: absolute;
  width: 320px; height: 320px;
  background: var(--brand-light);
  border-radius: 50%;
  z-index: 0;
}
.hero-image { position: relative; z-index: 1; border-radius: var(--radius); box-shadow: var(--shadow); max-height: 400px; margin: 0 auto; }
.hero-placeholder {
  border: 2px dashed var(--brand-color);
  border-radius: var(--radius);
  min-height: 300px;
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-color);
  font-weight: 600;
  background: var(--white);
}
.hero-placeholder::after { content: 'Cake photo placeholder'; }

@media (max-width: 700px) {
  .hero-heading { font-size: 1.9rem; }
}

/* ============== TRUST SECTION ============== */
.trust-section { max-width: 1200px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.trust-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 16px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.trust-card:hover { transform: translateY(-4px); }
.trust-icon { font-size: 2rem; margin-bottom: 10px; }
.trust-card h3 { font-size: 1rem; color: var(--brand-dark); }
.google-rating { color: var(--gold); font-weight: 700; }

/* ============== CATEGORY GRID ============== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.category-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  text-align: center;
}
.category-card:hover { transform: translateY(-4px); }
.category-card .cat-img {
  height: 140px;
  background: var(--brand-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-color);
  font-size: 2rem;
}
.category-card .cat-body { padding: 16px; }
.category-card h3 { color: var(--brand-dark); font-size: 1.05rem; margin-bottom: 6px; }
.category-card p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 14px; }
.category-card.active { outline: 2px solid var(--brand-color); }

/* ============== CATALOGUE ============== */
.catalogue-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 32px;
  align-items: center;
}
.search-input {
  width: 100%;
  max-width: 420px;
  padding: 12px 18px;
  border-radius: 50px;
  border: 1px solid #e0d3c5;
  font-size: 1rem;
}
.search-input:focus { outline: 2px solid var(--brand-color); }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.filter-btn {
  padding: 8px 18px;
  border-radius: 50px;
  border: 1px solid var(--brand-color);
  background: var(--white);
  color: var(--brand-color);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active { background: var(--brand-color); color: var(--white); }

.cake-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.cake-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
}
.cake-card:hover { transform: translateY(-4px); }
.cake-img {
  height: 170px;
  background: var(--brand-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-color);
  font-size: 0.85rem;
  text-align: center;
  padding: 10px;
}
.cake-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cake-body h3 { color: var(--brand-dark); font-size: 1.1rem; }
.cake-flavour { color: var(--text-muted); font-size: 0.85rem; }
.cake-desc { color: var(--text-muted); font-size: 0.85rem; flex: 1; }
.cake-price { color: var(--brand-color); font-weight: 700; margin: 6px 0; }
.no-results { text-align: center; color: var(--text-muted); margin-top: 30px; }

/* ============== FORM ============== */
.enquiry-form {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row-full { grid-column: 1 / -1; }
.enquiry-form label { font-weight: 600; color: var(--brand-dark); font-size: 0.9rem; }
.enquiry-form input, .enquiry-form textarea {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid #e0d3c5;
  font-size: 0.95rem;
  font-family: inherit;
}
.enquiry-form input:focus, .enquiry-form textarea:focus { outline: 2px solid var(--brand-color); }
.enquiry-form input[aria-invalid="true"], .enquiry-form textarea[aria-invalid="true"] { border-color: #c0392b; }
.error-msg { color: #c0392b; font-size: 0.8rem; min-height: 1em; }
.form-hint { color: var(--text-muted); font-size: 0.8rem; }
.ref-image-preview { margin-top: 10px; max-width: 160px; border-radius: 10px; box-shadow: var(--shadow); }
.form-submit { grid-column: 1 / -1; justify-self: center; margin-top: 8px; border: none; }
.form-status { grid-column: 1 / -1; text-align: center; font-weight: 600; color: var(--brand-color); min-height: 1.2em; }

@media (max-width: 700px) {
  .enquiry-form { grid-template-columns: 1fr; padding: 24px; }
}

/* ============== GALLERY ============== */
.gallery-filters { margin-bottom: 24px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  height: 200px;
  background: var(--brand-light);
  color: var(--brand-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: 0.85rem;
  border: none;
  width: 100%;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:focus-visible { outline: 3px solid var(--brand-color); }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 10, 5, 0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 10px; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: #fff; font-size: 2.2rem; cursor: pointer;
}
.lightbox-nav {
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  font-size: 2rem; width: 48px; height: 48px; border-radius: 50%;
  position: absolute; top: 50%; transform: translateY(-50%);
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ============== OFFERS ============== */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.offer-card {
  background: linear-gradient(135deg, var(--brand-light), var(--white));
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  text-align: center;
}
.offer-card h3 { color: var(--brand-dark); margin-bottom: 10px; }
.offer-card p { color: var(--text-muted); margin-bottom: 18px; }

/* ============== ABOUT ============== */
.about-inner { display: flex; align-items: center; gap: 50px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; }
.about-image-wrap { flex: 1 1 380px; }
.about-image { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.about-placeholder {
  border: 2px dashed var(--brand-color);
  border-radius: var(--radius);
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-color);
  background: var(--white);
}
.about-placeholder::after { content: 'Bakery photo placeholder'; }
.about-text { flex: 1 1 380px; }
.about-text p { color: var(--text-muted); margin-bottom: 18px; }
.about-features li { padding: 6px 0; color: var(--text-dark); }
.about-features li::before { content: '✓ '; color: var(--brand-color); font-weight: 700; }

/* ============== REVIEW SECTION ============== */
.review-section { text-align: center; }
.review-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============== CONTACT ============== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}
.contact-info h3 { color: var(--brand-dark); font-size: 1.3rem; margin-bottom: 10px; }
.contact-info p { color: var(--text-muted); margin-bottom: 10px; }
.contact-info a { color: var(--brand-color); font-weight: 600; }
.hours-note { font-style: italic; }
.contact-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.contact-map-placeholder {
  background: var(--white);
  border: 2px dashed var(--brand-color);
  border-radius: var(--radius);
  min-height: 220px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-color);
  text-align: center;
  padding: 20px;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

/* ============== FOOTER ============== */
.site-footer { background: var(--brand-dark); color: #f3e6db; padding: 50px 20px 20px; }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-brand img { width: 48px; height: 48px; margin-bottom: 10px; object-fit: contain; }
.footer-brand h3 { margin-bottom: 8px; }
.footer-brand p { color: #d9c4b4; font-size: 0.9rem; }
.footer-links h4, .footer-contact h4 { margin-bottom: 12px; color: var(--gold); }
.footer-links li { margin-bottom: 8px; }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold); }
.footer-contact p { margin-bottom: 8px; font-size: 0.9rem; color: #d9c4b4; }
.footer-instagram { display: inline-block; margin-top: 6px; }
.footer-copy { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 18px; font-size: 0.85rem; color: #c7b3a4; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

/* ============== FLOATING WHATSAPP ============== */
.floating-whatsapp {
  position: fixed;
  bottom: 22px; right: 22px;
  width: 58px; height: 58px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 900;
  transition: transform var(--transition);
}
.floating-whatsapp:hover { transform: scale(1.08); }
.fw-tooltip {
  position: absolute;
  right: 68px;
  background: var(--brand-dark);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
@media (min-width: 860px) {
  .floating-whatsapp:hover .fw-tooltip { opacity: 1; }
}
@media (max-width: 859px) { .fw-tooltip { display: none; } }

/* ============== SCROLL REVEAL ============== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============== REDUCED MOTION ============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============== MOBILE 320px SAFETY ============== */
@media (max-width: 360px) {
  .hero-heading { font-size: 1.6rem; }
  .section-title { font-size: 1.5rem; }
}
