/* =============================================
   Cosmy Care — Light Blue Medical Design System
   ============================================= */

:root {
  --c-primary:   #1976d2;
  --c-bright:    #42a5f5;
  --c-light-bg:  #e8f4fd;
  --c-sky:       #64b5f6;
  --c-navy:      #0d47a1;
  --c-soft:      #f0f8ff;
  --c-border:    #bbdefb;
  --c-shadow:    rgba(25, 118, 210, 0.15);
  --c-shadow-lg: rgba(25, 118, 210, 0.22);
}

* { scroll-behavior: smooth; box-sizing: border-box; }
body {
  font-family: 'Sarabun', sans-serif;
  background: #fff;
  font-weight: 400;
  color: #374151;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,h2,h3,h4,h5,h6,.font-prompt { font-family: 'Prompt', sans-serif; }
p { line-height: 1.75; }

/* ── Announce Bar (lighter) ── */
.announce-bar {
  background: linear-gradient(90deg, #1565c0, #1976d2, #42a5f5);
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  letter-spacing: 0.02em;
}
.announce-bar a { color: #bbdefb; text-decoration: underline; }

/* ── Gradient text ── */
.text-gradient {
  background: linear-gradient(135deg, #1565c0, #42a5f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Card Hover ── */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px var(--c-shadow-lg);
}

/* ── Fade-in Up ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp 0.6s ease forwards; }

/* ── Section Title ── */
.section-title { position: relative; display: inline-block; }
.section-title::after {
  content: '';
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 4px;
  background: linear-gradient(90deg, #1976d2, #42a5f5);
  border-radius: 9999px;
}

/* ── Navbar ── */
.navbar-cosmy {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #e3f2fd;
  box-shadow: 0 1px 16px rgba(25,118,210,0.07);
}

/* ── Nav Link ── */
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  font-weight: 500; font-size: .95rem; color: #374151;
  transition: background .18s, color .18s;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  background: #e3f2fd; color: #1565c0;
}
.nav-link.active { font-weight: 700; }

/* ── Cart Badge ── */
#cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  transition: transform 0.2s;
}
#cart-badge.pop { animation: cart-pop 0.3s ease; }
@keyframes cart-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ── Category Card ── */
.cat-card {
  position: relative; overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  cursor: pointer; text-decoration: none;
  display: flex; flex-direction: column; align-items: center;
}
.cat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1565c0, #42a5f5);
  opacity: 0; transition: opacity 0.25s;
}
.cat-card:hover::before { opacity: 1; }
.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(25,118,210,0.16);
}
.cat-icon-wrap {
  width: 68px; height: 68px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.28s ease;
}
.cat-card:hover .cat-icon-wrap { transform: scale(1.1) rotate(-4deg); }

/* ── Store Badge ── */
.store-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 14px;
  font-weight: 700; font-size: .9rem;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.store-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
}

/* ── Knowledge Card ── */
.knowledge-card { transition: transform 0.28s, box-shadow 0.28s; }
.knowledge-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(25,118,210,0.12);
}

/* ── Client Logo ── */
.client-logo {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 18px; border-radius: 14px;
  background: #fff; border: 1px solid #e3f2fd;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.client-logo:hover {
  border-color: #90caf9;
  box-shadow: 0 6px 20px rgba(25,118,210,0.10);
  transform: translateY(-3px);
}

/* ── Section bg ── */
.section-light { background: #f0f8ff; }
.section-blue-soft { background: linear-gradient(145deg, #e8f4fd 0%, #dbeeff 100%); }

/* ── Product img wrap ── */
.product-img-wrap { overflow: hidden; border-radius: 16px 16px 0 0; }
.product-img-wrap img { transition: transform 0.38s ease; width:100%; height:220px; object-fit:contain; padding:20px; }
.product-img-wrap:hover img { transform: scale(1.07); }

/* ── CTA Blue (light) ── */
.btn-cosmy {
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(25,118,210,0.30);
  transition: box-shadow .2s, transform .2s;
}
.btn-cosmy:hover {
  box-shadow: 0 8px 24px rgba(25,118,210,0.40);
  transform: translateY(-2px); color: #fff;
}

/* ── LINE Float ── */
.line-float-btn { position: fixed; bottom: 80px; right: 24px; z-index: 50; }
.line-float-btn::before {
  content: ''; position: absolute; inset: -5px;
  border-radius: 9999px; background: #06C755; opacity: .22;
  animation: pulse-ring 2.2s ease-out infinite;
}
@keyframes pulse-ring {
  0%  { transform:scale(1); opacity:.22; }
  70% { transform:scale(1.35); opacity:0; }
  100%{ transform:scale(1.35); opacity:0; }
}

/* ── Ticker ── */
.ticker-wrap { overflow: hidden; white-space: nowrap; }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.ticker-inner { display:inline-flex; gap:40px; animation:ticker 30s linear infinite; }
.ticker-wrap:hover .ticker-inner { animation-play-state: paused; }

/* ── CART DRAWER ── */
#cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 9998;
  width: 420px; max-width: 100vw;
  background: #fff;
  box-shadow: -8px 0 40px rgba(25,118,210,0.18);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
#cart-drawer.open { transform: translateX(0); }
#cart-overlay {
  position: fixed; inset: 0; z-index: 9997;
  background: rgba(10,22,40,0.45);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
#cart-overlay.open { opacity: 1; pointer-events: all; }

/* ── QUOTE MODAL ── */
#quote-modal {
  display: none; position: fixed; inset: 0; z-index: 9999;
  align-items: center; justify-content: center;
}
#quote-modal.open { display: flex; }
#quote-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(10,22,40,0.55);
  backdrop-filter: blur(4px);
}
#quote-modal-box {
  position: relative; z-index: 1;
  width: 100%; max-width: 680px; max-height: 90vh;
  background: #fff; border-radius: 24px;
  box-shadow: 0 32px 80px rgba(10,22,40,0.30);
  overflow: hidden; display: flex; flex-direction: column; margin: 16px;
}
@media (max-width: 640px) {
  #quote-modal-box { border-radius: 20px 20px 0 0; margin: 0; align-self: flex-end; max-height: 95vh; }
  #quote-modal { align-items: flex-end; }
  #cart-drawer { width: 100vw; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #e3f2fd; }
::-webkit-scrollbar-thumb { background: #64b5f6; border-radius: 3px; }

/* ── Badge pulse ── */
@keyframes pulse-badge { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.85;transform:scale(1.04)} }
.badge-pulse { animation: pulse-badge 2.2s ease-in-out infinite; }
