/* Tiệm bánh Dâu Ngọt – landing page styles
   Palette lấy từ poster thương hiệu: hồng dâu + nâu socola + kem. */

:root {
  --pink-50: #FFF6F4;
  --pink-100: #FFE9EE;
  --pink-200: #F7C6D3;
  --pink-400: #EF7E9C;
  --pink-500: #E8507A;
  --pink-700: #C92D5B; /* CTA – contrast 5.3:1 trên nền trắng */
  --brown-900: #4A2C2A; /* text chính */
  --brown-700: #6E4A45; /* text phụ – contrast > 7:1 */
  --cream: #FFFBF7;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(74, 44, 42, .08);
  --shadow-md: 0 12px 32px rgba(201, 45, 91, .14);
  --radius: 20px;
  --radius-sm: 12px;
  --font-heading: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--brown-900);
  background: var(--pink-50);
  -webkit-font-smoothing: antialiased;
}
/* height:auto giữ đúng tỉ lệ khi ảnh có thuộc tính width/height nhưng bị co theo max-width */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink-700); }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
p { margin: 0 0 1em; }
svg { flex-shrink: 0; }

:focus-visible { outline: 3px solid var(--pink-700); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head p:last-child { color: var(--brown-700); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--brown-900); color: var(--white); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pink-700);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px; border-radius: 999px;
  font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-primary { background: var(--pink-700); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: #B02250; transform: translateY(-2px); }
.btn-outline { border-color: var(--pink-700); color: var(--pink-700); background: var(--white); }
.btn-outline:hover { background: var(--pink-100); transform: translateY(-2px); }
.btn-sm { min-height: 44px; padding: 10px 20px; font-size: .95rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 246, 244, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pink-200);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font: 800 1.5rem/1 var(--font-heading); color: var(--pink-700);
}
.brand-icon { width: 34px; height: 34px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  color: var(--brown-900); text-decoration: none; font-weight: 700;
  padding: 10px 2px; position: relative;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px;
  background: var(--pink-500); transform: scaleX(0); transition: transform .2s var(--ease);
}
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px; border-radius: 10px;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--brown-900); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px);
  background:
    radial-gradient(circle at 12% 20%, var(--pink-100) 0 180px, transparent 181px),
    radial-gradient(circle at 92% 85%, var(--pink-100) 0 220px, transparent 221px),
    var(--pink-50);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); color: var(--brown-900); margin-bottom: 16px; }
.brand-script { display: block; color: var(--pink-500); font-size: 1.25em; line-height: 1; text-shadow: 3px 3px 0 var(--white); }
.ribbon {
  display: inline-block; padding: 8px 22px; margin-bottom: 20px;
  background: var(--pink-200); color: var(--brown-900); border-radius: 999px;
  font: 700 1.15rem/1.3 var(--font-heading);
}
.lead { font-size: 1.125rem; color: var(--brown-700); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-collage { position: relative; aspect-ratio: 1 / 1; max-width: 520px; justify-self: center; width: 100%; }
.hero-collage img {
  position: absolute; object-fit: cover; border-radius: var(--radius);
  border: 6px solid var(--white); box-shadow: var(--shadow-md);
}
.collage-main { width: 62%; height: 82%; left: 4%; top: 9%; transform: rotate(-3deg); z-index: 2; }
.collage-top { width: 44%; height: 44%; right: 0; top: 0; transform: rotate(4deg); }
.collage-bottom { width: 44%; height: 44%; right: 4%; bottom: 0; transform: rotate(-2deg); z-index: 3; }

/* ---------- About ---------- */
.about { background: var(--white); }
.about-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.about-poster { margin: 0; }
.about-poster img { border-radius: var(--radius); box-shadow: var(--shadow-md); transform: rotate(-1.5deg); }
.about-text > p { color: var(--brown-700); font-size: 1.075rem; }
.category-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.category-list li {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--pink-50); border: 1px dashed var(--pink-400); border-radius: var(--radius-sm);
}
.category-list svg {
  width: 40px; height: 40px; padding: 8px; border-radius: 50%;
  background: var(--pink-200); fill: none; stroke: var(--pink-700); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Menu ---------- */
.menu-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.chip {
  min-height: 44px; padding: 10px 22px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--pink-200); background: var(--white); color: var(--brown-900);
  font: 700 .95rem/1 var(--font-body); transition: background-color .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--pink-400); }
.chip.is-active { background: var(--pink-700); border-color: var(--pink-700); color: var(--white); }

.menu-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px;
}
.menu-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.menu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.menu-card[hidden] { display: none; }
.menu-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.menu-note { margin: 4px 0 0; font-size: .85rem; color: var(--brown-700); }
.menu-card-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 18px; }
.menu-card-body h3 { font-size: 1.12rem; margin: 0; }
.price {
  margin: 0; padding: 4px 12px; border-radius: 999px; white-space: nowrap;
  background: var(--pink-100); color: var(--pink-700); font: 800 1.05rem/1.4 var(--font-heading);
}

/* ---------- Bánh kem (custom cakes) ---------- */
.cake-notes {
  list-style: none; padding: 0; margin: 0 auto 32px; max-width: 960px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.cake-notes li {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--white); border: 1px dashed var(--pink-400); border-radius: var(--radius-sm);
  color: var(--brown-700); font-size: .95rem;
}
.cake-notes strong { color: var(--brown-900); }
.cake-notes svg {
  width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: var(--pink-100);
  fill: none; stroke: var(--pink-700); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.cake-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.cake-grid > li[hidden] { display: none; }
.cake-item {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; text-align: left; vertical-align: top;
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  font: inherit; color: inherit; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.cake-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cake-item img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s var(--ease); }
.cake-item:hover img { transform: scale(1.04); }
.cake-item span { display: block; padding: 12px 14px 14px; font: 700 1rem/1.3 var(--font-heading); }
.cake-item small { display: block; margin-top: 4px; font: 400 .85rem/1.4 var(--font-body); color: var(--brown-700); }
.cakes-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

/* ---------- Gallery ---------- */
/* Nền xen kẽ: menu hồng · bánh kem trắng · bánh khác hồng · hình ảnh trắng · liên hệ hồng */
.cakes, .gallery { background: var(--white); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px; }
.gallery-item {
  padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: var(--pink-100);
}
.gallery-item.tall { grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(92vw, 900px); max-height: 92vh; overflow: visible;
}
.lightbox::backdrop { background: rgba(40, 20, 20, .82); }
.lightbox img { max-height: 88vh; width: auto; margin: auto; border-radius: var(--radius-sm); }
.lightbox-close {
  position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--white); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.lightbox-close svg { width: 20px; height: 20px; stroke: var(--brown-900); stroke-width: 2.5; stroke-linecap: round; }

/* ---------- Contact ---------- */
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: stretch; }
.contact-card { background: var(--white); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-sm); }
.contact-list { list-style: none; padding: 0; margin: 8px 0 28px; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list svg {
  width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--pink-100);
  fill: none; stroke: var(--pink-700); stroke-width: 1.8; stroke-linejoin: round;
}
.contact-list .label { display: block; font-size: .85rem; color: var(--brown-700); font-weight: 600; }
.contact-list a, .contact-list span:not(.label) { font-weight: 700; font-size: 1.05rem; color: var(--brown-900); }
.contact-list a:hover { color: var(--pink-700); }
.contact-map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); min-height: 340px; background: var(--pink-100); }
.contact-map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* ---------- Footer & FAB ---------- */
.site-footer { background: var(--brown-900); color: #F6E5E1; padding: 28px 0; font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-inner p { margin: 0; }

.fab-call {
  display: none; position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; background: var(--pink-700);
  align-items: center; justify-content: center; box-shadow: var(--shadow-md);
}
.fab-call svg { width: 26px; height: 26px; fill: var(--white); }

/* ---------- Reveal on scroll (bật bởi JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .menu-card.reveal.is-visible:hover { transform: translateY(-4px); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner, .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .hero-text { text-align: center; }
  .hero-actions { justify-content: center; }
  .lead { margin-inline: auto; }
  .about-poster { max-width: 420px; margin-inline: auto; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Nav có 6 mục + nút → chuyển sang menu thu gọn sớm hơn để không tràn */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px;
    background: var(--pink-50); border-bottom: 1px solid var(--pink-200); box-shadow: var(--shadow-sm);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--pink-100); }
  .site-nav .btn { margin-top: 12px; }
}

@media (max-width: 760px) {
  .category-list, .cake-notes { grid-template-columns: 1fr; }
  .cake-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cake-item span { font-size: .92rem; padding: 10px 12px 12px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .menu-card-body { flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
  .menu-card-body h3 { font-size: 1rem; }
  .fab-call { display: inline-flex; }
  .site-footer { padding-bottom: 88px; }
}

@media (max-width: 380px) {
  .menu-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
