/* ============================================================
   SJ-Mart — Mobile-First Stylesheet
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --green-primary: #06C755;   /* LINE green */
  --green-dark: #04A544;
  --whatsapp: #25D366;
  --whatsapp-dark: #1EAF54;
  --line-color: #06C755;
  --line-dark: #04A544;
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-light: #888;
  --bg-page: #f8f8f6;
  --bg-white: #ffffff;
  --bg-section: #f2f2ef;
  --border: #e0e0d8;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --header-height: 60px;
  --font-en: 'Inter', sans-serif;
  --font-th: 'Prompt', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-en);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  padding-bottom: 0;
}

body.lang-th {
  font-family: var(--font-th);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  transition: box-shadow 0.2s ease;
  border-bottom: 1px solid var(--border);
}

#site-header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: transparent;
}

.header-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.header-logo span {
  color: var(--green-primary);
}

#lang-toggle {
  background: var(--bg-section);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
  min-width: 52px;
  text-align: center;
}

#lang-toggle:hover {
  background: var(--green-primary);
  border-color: var(--green-primary);
  color: #fff;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  min-height: 52vw;
  max-height: 520px;
  background: #c8d6c0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}


.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 32px 20px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 70%, transparent 100%);
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.88);
  margin-top: 6px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section {
  padding: 48px 20px;
}

.section-alt {
  background: var(--bg-section);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 12px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--green-primary);
  border-radius: 2px;
}

/* Fade-in animation */
.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 640px;
}

/* ============================================================
   HOURS BADGE
   ============================================================ */
.hours-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
}

.hours-icon {
  flex-shrink: 0;
  color: var(--green-primary);
}

.hours-label {
  font-size: 0.78rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.hours-time {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s;
}

.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.2s; }

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:hover {
  box-shadow: var(--shadow-md);
}

.gallery-photo {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}


.gallery-caption {
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-primary);
}

.contact-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
}

.contact-info-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-top: 2px;
  line-height: 1.5;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 13px 24px;
  background: var(--text-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}

.map-btn:hover {
  background: #333;
  transform: translateY(-1px);
}

.map-btn svg {
  flex-shrink: 0;
}

/* ============================================================
   FLOATING ACTION BUTTONS (FABs) — LINE & WhatsApp
   All screen sizes: circular FABs fixed to bottom-right
   ============================================================ */

/* Hide the old sticky bar entirely */
.cta-bar {
  display: none;
}

/* FAB group — visible on ALL screen sizes */
.fab-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 200;
}

.fab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  cursor: pointer;
}

/* Sliding label — hidden on mobile (touch devices don't hover) */
.fab-label {
  display: none;
}

/* Circle button — mobile size */
.fab-circle {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.fab:active .fab-circle {
  transform: scale(0.93);
}

.fab-circle svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* Pulsing ring animation */
.fab-circle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 5px solid currentColor;
  animation: fab-ring 2s ease-out infinite;
  opacity: 0;
}

@keyframes fab-ring {
  0%   { transform: scale(1);   opacity: 0.65; }
  100% { transform: scale(2);   opacity: 0;    }
}

.fab-line .fab-circle {
  background: var(--line-color);
  color: var(--line-color);
}

.fab-whatsapp .fab-circle {
  background: var(--whatsapp);
  color: var(--whatsapp);
}

/* Stagger so they don't pulse in sync */
.fab-line .fab-circle::after     { animation-delay: 0s; }
.fab-whatsapp .fab-circle::after { animation-delay: 1s; }

/* Desktop enhancements: larger buttons + slide-in label */
@media (min-width: 600px) {
  .fab-group {
    bottom: 32px;
    right: 28px;
    gap: 16px;
  }

  .fab-label {
    display: inline-block;
    background: #fff;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-en);
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    white-space: nowrap;
    margin-right: 12px;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }

  .fab:hover .fab-label,
  .fab:focus .fab-label {
    opacity: 1;
    transform: translateX(0);
  }

  .fab-circle {
    width: 62px;
    height: 62px;
  }

  .fab:hover .fab-circle {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0,0,0,0.28);
  }

  .fab-circle svg {
    width: 30px;
    height: 30px;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 24px 20px;
  font-size: 0.88rem;
  line-height: 1.6;
}

footer strong {
  color: #fff;
}

/* ============================================================
   RESPONSIVE — Tablet & Desktop
   ============================================================ */
@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-overlay {
    padding: 48px 40px 40px;
  }

  .section {
    padding: 64px 40px;
  }

  #site-header {
    padding: 0 40px;
  }
}


@media (min-width: 900px) {
  .section {
    padding: 80px 10%;
  }

  #site-header {
    padding: 0 10%;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .hero {
    min-height: 420px;
    max-height: 600px;
  }

  .hero-title {
    font-size: 3.6rem;
  }
}
