/* ============================================
   AWESOME AQUA — style.css
   ============================================ */

:root {
  --royal-blue: #1a3a8f;
  --bright-blue: #2255cc;
  --light-blue: #e8eeff;
  --white: #ffffff;
  --black: #0d0d0d;
  --gray: #6b7280;
  --border: #e5e7eb;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Jost', 'Noto Serif Thai', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
}


/* ── NAVBAR ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  height: 68px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
nav.scrolled {
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(26,58,143,0.08);
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 700;
  color: #ffffff; letter-spacing: -0.5px;
  transition: color 0.4s;
}
.logo span { color: #7eb3ff; transition: color 0.4s; }
nav.scrolled .logo      { color: var(--royal-blue); }
nav.scrolled .logo span { color: var(--bright-blue); }

.nav-links { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
.nav-links a {
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem; font-weight: 500;
  letter-spacing: 0.3px; position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1.5px; background: #fff; border-radius: 2px;
  transform: scaleX(0); transition: transform 0.25s ease;
}
.nav-links a:hover { color: #ffffff; }
.nav-links a:hover::after { transform: scaleX(1); }
nav.scrolled .nav-links a       { color: var(--gray); }
nav.scrolled .nav-links a:hover { color: var(--royal-blue); }
nav.scrolled .nav-links a::after { background: var(--royal-blue); }

.nav-actions { display: flex; gap: 0.75rem; align-items: center; }

nav:not(.scrolled) .btn-primary {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
  color: #ffffff;
}
nav:not(.scrolled) .btn-primary:hover { background: rgba(255,255,255,0.28); }

#fish { scroll-margin-top: 80px; }

/* ── ปุ่มต่างๆ ── */
.btn {
  padding: 0.5rem 1.25rem; border-radius: 8px;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; border: none;
  transition: all 0.2s; font-family: var(--font-body);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--royal-blue);
  color: var(--royal-blue);
}
.btn-outline:hover { background: var(--light-blue); }
.btn-primary { background: var(--royal-blue); color: var(--white); }
.btn-primary:hover { background: var(--bright-blue); }
.btn-line {
  background: #06C755; color: white;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem; border-radius: 8px;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; border: none;
  font-family: var(--font-body);
  transition: opacity 0.2s;
}
.btn-line:hover { opacity: 0.85; }
.btn-line-nav { padding: 0.45rem 1rem; font-size: 0.82rem; }

/* ── Hamburger ── */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { width: 22px; height: 2px; background: var(--black); border-radius: 2px; transition: all 0.3s; display: block; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 5% 60px;
  position: relative; overflow: hidden;
}
.hero-slideshow { position: absolute; inset: 0; z-index: 0; }
.slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s ease-in-out;
  animation: zoomSlow 8s ease-in-out infinite alternate;
}
.slide.active { opacity: 1; }
@keyframes zoomSlow {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(5,12,40,0.72) 0%,
    rgba(5,12,40,0.40) 60%,
    rgba(5,12,40,0.25) 100%
  );
}
.hero-content { max-width: 580px; z-index: 2; position: relative; }
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  color: #fff; border: 1px solid rgba(255,255,255,0.3);
  padding: 0.35rem 1rem; border-radius: 100px;
  font-size: 0.82rem; font-weight: 500;
  margin-bottom: 1.5rem; letter-spacing: 0.5px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem,5.5vw,3.8rem);
  line-height: 1.12; color: #fff;
  margin-bottom: 1.25rem; font-weight: 700;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero h1 span { color: #7eb3ff; }
.hero p {
  color: rgba(255,255,255,0.82);
  font-size: 1.05rem; line-height: 1.7;
  margin-bottom: 2rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Slide Dots ── */
.slide-dots { display: flex; gap: 0.5rem; margin-top: 2rem; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer; transition: all 0.3s; border: none;
}
.dot.active { background: #fff; width: 24px; border-radius: 4px; }

/* ── STATS ── */
.stats {
  background: var(--royal-blue); color: white;
  display: grid; grid-template-columns: repeat(3,1fr);
  text-align: center; padding: 2.5rem 5%;
}
.stat { padding: 1rem; border-right: 1px solid rgba(255,255,255,0.15); }
.stat:last-child { border-right: none; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 700; display: block;
  animation: countFade 0.8s ease both;
}
@keyframes countFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-label { font-size: 0.8rem; opacity: 0.75; margin-top: 0.25rem; }

/* ── SECTION ── */
section { padding: 5rem 5%; }
.section-tag {
  font-size: 0.75rem; font-weight: 500;
  color: var(--bright-blue);
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem,3vw,2.5rem);
  font-weight: 700; margin-bottom: 0.75rem;
  color: var(--black);
}
.section-sub { color: var(--gray); font-size: 1rem; line-height: 1.6; max-width: 520px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; }

/* ── FISH GRID ── */
.fish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 1rem; padding: 1rem;
}
.fish-card {
  border: 1px solid var(--border);
  width: 100%; max-width: 100%;
  border-radius: 16px; overflow: hidden;
  transition: all 0.25s;
  background: var(--white); cursor: pointer;
}
.fish-card:hover {
  box-shadow: 0 12px 40px rgba(26,58,143,0.12);
  transform: translateY(-4px);
  border-color: #c5d3ff;
  animation: cardPop 0.25s ease forwards;
}
@keyframes cardPop {
  0%   { transform: translateY(0) scale(1); }
  50%  { transform: translateY(-6px) scale(1.02); }
  100% { transform: translateY(-4px) scale(1); }
}
.fish-img {
  position: relative; overflow: hidden;
  width: 100%; height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg,#f0f4ff,#e4ecff);
}
.fish-img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform 0.4s ease;
}
.fish-card:hover .fish-img img { transform: scale(1.06); }
.fish-info { padding: 1.25rem; }
.fish-name { font-family: 'Playfair Display',serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; }
.fish-species { font-size: 0.8rem; color: var(--gray); font-style: italic; margin-bottom: 0.75rem; }
.fish-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.fish-price { font-size: 1.1rem; font-weight: 700; color: var(--royal-blue); }
.fish-stock { font-size: 0.78rem; color: var(--gray); }
.fish-stock.low { color: #dc2626; }
.fish-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tag {
  background: var(--light-blue); color: var(--royal-blue);
  padding: 0.2rem 0.6rem; border-radius: 100px;
  font-size: 0.72rem; font-weight: 500;
}

/* ── Admin card actions ── */
.card-admin-actions {
  position: absolute; top: 8px; right: 8px;
  display: none; gap: 6px; opacity: 0; transition: opacity 0.2s;
}
body.is-admin .fish-card:hover .card-admin-actions { display: flex; opacity: 1; }
.card-admin-actions button {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px); font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15); transition: transform 0.15s;
}
.card-admin-actions button:hover { transform: scale(1.1); }

/* ── Tag Selector ── */
.tag-selector { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 0; }
.tag-option {
  background: var(--light-blue); color: var(--royal-blue);
  padding: 0.3rem 0.75rem; border-radius: 100px;
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  border: 1.5px solid transparent; transition: all 0.15s; user-select: none;
}
.tag-option:hover { border-color: var(--royal-blue); }
.tag-option.selected { background: var(--royal-blue); color: white; }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: 20px;
  padding: 2rem 2rem 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.2);
  animation: slideUp 0.25s ease;
  position: relative; max-height: 90vh; overflow-y: auto;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  background: var(--light-blue); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--royal-blue);
}
#editModal .modal { max-width: 480px; }
#fishModal .modal { max-width: 400px; }

/* ── MODAL รายละเอียดปลา ── */
.fish-detail-body { text-align: center; }
.fish-detail-emoji { font-size: 5rem; margin-bottom: 1rem; }
.fish-detail-name { font-family: 'Playfair Display',serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.fish-detail-species { color: var(--gray); font-size: 0.9rem; font-style: italic; margin-bottom: 1rem; }
.fish-detail-desc {
  color: var(--gray); font-size: 0.9rem; line-height: 1.6;
  margin-bottom: 1.5rem; text-align: left;
  background: var(--light-blue); padding: 1rem; border-radius: 10px;
}
.fish-detail-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.fish-detail-row:last-of-type { border-bottom: none; }
.fish-detail-row span:first-child { color: var(--gray); }
.fish-detail-row span:last-child { font-weight: 600; }
.fish-detail-price-box { background: var(--royal-blue); color: white; padding: 1rem; border-radius: 12px; margin: 1rem 0; }
.fish-detail-price { font-family: 'Playfair Display',serif; font-size: 1.75rem; font-weight: 700; }
.fish-detail-price-label { font-size: 0.8rem; opacity: 0.8; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
  background: var(--black); color: white;
  padding: 0.75rem 1.25rem; border-radius: 10px;
  font-size: 0.875rem; opacity: 0;
  transform: translateY(10px); transition: all 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── FOOTER ── */
footer {
  background: var(--black); color: rgba(255,255,255,0.7);
  text-align: center; padding: 2rem 5%; font-size: 0.85rem;
}
footer .footer-logo {
  font-family: 'Playfair Display', serif;
  color: white; font-size: 1.2rem; margin-bottom: 0.5rem;
}

/* ── NAV CONTACT ── */
.nav-contact {
  display: flex; flex-direction: column;
  align-items: flex-end; font-size: 0.72rem;
  gap: 0.15rem; color: rgba(255,255,255,0.8); line-height: 1.3;
}
nav.scrolled .nav-contact { color: var(--gray); }

/* ── ABOUT HERO ── */
.about-hero {
  background: linear-gradient(135deg, var(--royal-blue) 0%, var(--bright-blue) 100%);
  padding: 5rem 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}
.about-hero-content { max-width: 480px; }
.about-hero-content .section-tag { color: rgba(255,255,255,0.7); }

/* ── VIDEO SHOWCASE ── */
.video-showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fish-video-wrap {
  width: 280px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  background: #000;
  aspect-ratio: 9/16;
  position: relative;
  /* animation: videoFloat 4s ease-in-out infinite; */
}

/* Glow effect รอบวิดีโอ */
.fish-video-wrap::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(126,179,255,0.6), rgba(255,255,255,0.1));
  z-index: -1;
  filter: blur(12px);
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.04); }
}

/* Floating animation สำหรับ video */
@keyframes videoFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

.fish-video-wrap video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ── ABOUT VALUES ── */
.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 0; background: var(--white);
}
.about-value-card {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s, transform 0.25s, box-shadow 0.25s;
}
.about-value-card:hover {
  background: var(--light-blue);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(26,58,143,0.10);
}
.about-value-icon { font-size: 2rem; margin-bottom: 1rem; }
.about-value-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 0.5rem; color: var(--black);
}
.about-value-card p { font-size: 0.88rem; color: var(--gray); line-height: 1.7; }

/* ── CONTACT SECTION ── */
.about-contact-section {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 380px;
}
.about-contact-info {
  padding: 4rem 5%; background: #f8faff;
  border-top: 1px solid var(--border); z-index: 2;
}
.contact-items { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.5rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-icon { font-size: 1.2rem; margin-top: 0.1rem; }
.contact-label { font-size: 0.78rem; color: var(--gray); margin-bottom: 0.2rem; }
.contact-value { font-size: 0.95rem; font-weight: 500; color: var(--black); }
.about-contact-visual {
  background: linear-gradient(135deg, var(--royal-blue), var(--bright-blue));
  display: flex; align-items: center; justify-content: center;
  text-align: center; z-index: 1;
}
.contact-visual-inner { padding: 2rem; }

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

/* ── MOBILE MENU ── */
.nav-mobile-menu {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0;
  background: white; border-bottom: 1px solid var(--border);
  padding: 1rem 5%; flex-direction: column; gap: 1rem; z-index: 99;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a { text-decoration: none; color: var(--black); font-weight: 500; padding: 0.5rem 0; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links    { display: none; }
  .hamburger    { display: flex; }
  .nav-contact  { display: none; }
  .btn-line-nav { display: none; }

  .hero { text-align: center; }
  .hero-btns { justify-content: center; }
  .slide-dots { justify-content: center; }
  .hero-overlay { background: rgba(5,12,40,0.60); }

  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .stat:last-child { border-bottom: none; }

  .fish-grid { grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); }

  .about-hero { flex-direction: column; align-items: center; text-align: center; }
  .about-hero-content { max-width: 100%; }
  .video-showcase { width: 100%; }
  .fish-video-wrap { width: 220px; }

  .about-contact-section { grid-template-columns: 1fr; }
  .about-contact-visual { min-height: 200px; }

  .modal { max-height: 85vh; padding: 1.5rem; border-radius: 16px; }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .nav-contact { display: none; }
  .fish-grid { grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); }
  .about-hero { gap: 2rem; }
  .fish-video-wrap { width: 240px; }
  .about-contact-section { grid-template-columns: 1fr; }
  .about-contact-visual { min-height: 200px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.2rem; }
  .hero-tag { font-size: 0.75rem; }
  .stats { padding: 1.5rem 5%; }
  .stat-num { font-size: 1.6rem; }
  .fish-grid { grid-template-columns: 1fr; padding: 0.5rem; }
  .section-title { font-size: 1.5rem; }
  .fish-video-wrap { width: 180px; }
  .modal { padding: 1.25rem; }
}
