/* ==========================================================================
   Trang chủ: Thực đơn – Giới thiệu – Hình ảnh – Liên hệ
   ========================================================================== */

/* ---------- Thực đơn ---------- */
.menu-section {
  padding-block: clamp(40px, 4.5vw, 56px) calc(clamp(40px, 5vw, 60px) + var(--curve-h) * 0.5);
}
.menu-section .section-head { margin-bottom: 24px; }
.menu-section .carousel { --per-view: 4; --carousel-gap: 20px; }
.menu-note {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px;
  margin-top: 10px; text-align: center; color: var(--color-muted); font-size: 0.9375rem;
}
.menu-note a { font-weight: 700; color: var(--color-accent); text-decoration: none; white-space: nowrap; }
.menu-note a:hover { text-decoration: underline; }

/* ---------- Giới thiệu: CHỮ | ẢNH, gọn (~300px desktop) ---------- */
.about {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  /* Nền trải toàn section để ảnh (có mask) hoà vào đúng màu nền, không lộ đường nối */
  background:
    radial-gradient(70% 120% at 0% 0%, rgba(160, 89, 42, 0.24) 0%, rgba(160, 89, 42, 0) 60%),
    linear-gradient(160deg, #33231a 0%, var(--color-dark) 60%);
  color: var(--color-on-dark);
}
.about__panel {
  position: relative; isolation: isolate;
  display: flex; align-items: center;
  padding: clamp(32px, 3vw, 40px) clamp(28px, 3.5vw, 56px) clamp(32px, 3vw, 40px) max(var(--container-gutter), calc((100vw - var(--container-max)) / 2));
}
.about__content { max-width: 520px; }
.about__title { font-family: var(--font-heading); font-weight: 700; color: #fff; font-size: clamp(1.625rem, 1.3rem + 0.9vw, 2.125rem); line-height: 1.2; }
.about__script { font-family: var(--font-script); color: var(--color-primary); font-size: 1.15em; margin-right: 4px; white-space: nowrap; }
.about__brand { text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.about__text { margin-top: 10px; color: var(--color-on-dark-muted); font-size: 0.9375rem; line-height: 1.6; text-wrap: pretty; }
.about .feature-list { margin-top: 18px; }
.about .feature-list li { color: var(--color-on-dark); }
.about__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 22px; }
.about__link { display: inline-flex; align-items: center; gap: 6px; color: var(--color-on-dark); font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.about__link .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.about__link:hover { color: var(--color-primary); }
.about__link:hover .icon { transform: translateX(3px); }
.about__media { position: relative; min-height: 100%; }
.about__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%;
  /* Ảnh mờ dần vào nền ở mép trái (~260px) */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.35) 70px, rgba(0, 0, 0, 0.75) 150px, #000 260px);
          mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.35) 70px, rgba(0, 0, 0, 0.75) 150px, #000 260px);
} /* giữ dây đèn + mặt khách */

/* ---------- Hình ảnh: mỗi trang 5 ảnh, nút « » để xem tiếp ---------- */
.gallery__pages { display: grid; touch-action: pan-y; }
.gallery-grid {
  grid-area: 1 / 1;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, clamp(150px, 16vw, 210px));
  gap: 14px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}
.gallery-grid.is-active { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease), visibility 0s; }
/* Bố cục cố định: dọc trái – ngang + 2 ảnh nhỏ ở giữa – dọc phải */
.gallery-grid > li:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.gallery-grid > li:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
.gallery-grid > li:nth-child(3) { grid-column: 2; grid-row: 2; }
.gallery-grid > li:nth-child(4) { grid-column: 3; grid-row: 2; }
.gallery-grid > li:nth-child(5) { grid-column: 4; grid-row: 1 / 3; }

.gallery-item { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface-alt); }
.gallery-item a { display: block; width: 100%; height: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery-item a::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30, 24, 24, 0) 55%, rgba(30, 24, 24, 0.55) 100%);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.gallery-item__zoom {
  position: absolute; right: 12px; bottom: 12px; z-index: 1;
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-primary); color: var(--color-dark);
  opacity: 0; transform: translateY(6px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.gallery-item__zoom .icon { width: 20px; height: 20px; }
.gallery-item a:hover img,
.gallery-item a:focus-visible img { transform: scale(1.05); }
.gallery-item a:hover::after,
.gallery-item a:focus-visible::after,
.gallery-item a:hover .gallery-item__zoom,
.gallery-item a:focus-visible .gallery-item__zoom { opacity: 1; transform: none; }

.gallery-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.gallery-more { display: none; text-align: center; margin-top: 18px; }
.gallery-nav__count { min-width: 3.5em; text-align: center; font-weight: 600; color: var(--color-heading); font-variant-numeric: tabular-nums; }

/* ---------- Liên hệ ---------- */
.contact-section { background: var(--color-background); }
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.1fr) minmax(0, 0.95fr);
  gap: 18px; align-items: stretch;
}
.contact-card {
  background: #f8efe2; border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: clamp(22px, 2.6vw, 32px);
}
.contact-card__title { display: flex; align-items: center; gap: 10px; font-size: 1.375rem; }
.contact-card__title .icon { width: 26px; height: 26px; color: var(--color-gold); stroke-width: 1.8; }
.contact-list { display: grid; gap: 16px; margin-top: 20px; }
.contact-list li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; }
.contact-list .icon { width: 22px; height: 22px; color: var(--color-heading); margin-top: 2px; }
.contact-list strong { display: block; font-size: 1rem; color: var(--color-heading); font-weight: 600; line-height: 1.45; }
.contact-list span { display: block; color: var(--color-muted); font-size: 0.9375rem; }
.contact-list a { text-decoration: none; white-space: nowrap; } /* không ngắt dòng giữa số điện thoại */
.contact-list a:hover { color: var(--color-accent); }
.contact-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.contact-card__actions .btn { flex: 1 1 auto; }

.contact-map {
  position: relative; min-height: 340px;
  border-radius: var(--radius-md); overflow: hidden;
  background: var(--color-surface-alt); border: 1px solid var(--color-border);
}
.contact-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contact-map__btn {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1;
  box-shadow: var(--shadow-md); background: var(--color-surface); color: var(--color-heading);
}
.contact-map__btn:hover { transform: translateX(-50%) translateY(-1px); }

.order-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 16px;
  min-height: 340px; padding: clamp(22px, 2.6vw, 32px);
  border-radius: var(--radius-md); color: #fff; background: var(--color-dark);
}
.order-card__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.order-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  /* ảnh món lộ rõ phía trên, tối dần xuống vùng chữ & nút */
  background: linear-gradient(180deg, rgba(30, 24, 24, 0.05) 0%, rgba(30, 24, 24, 0.55) 42%, rgba(30, 24, 24, 0.92) 78%);
}
.order-card__title { font-family: var(--font-script); font-weight: 700; font-size: clamp(1.875rem, 1.45rem + 1.1vw, 2.375rem); line-height: 1.1; color: #fff; }
.order-card__phones { display: grid; gap: 10px; }
.order-card__phones .btn { width: 100%; font-size: 1.0625rem; min-height: 46px; }
.order-card__note { display: flex; align-items: center; gap: 12px; color: var(--color-on-dark); font-size: 0.9375rem; line-height: 1.45; }
.order-card__note .icon { width: 28px; height: 28px; color: var(--color-primary); stroke-width: 1.5; }

/* Nền dự phòng khi iframe bản đồ chưa tải / bị chặn */
.contact-map__fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 24px 24px 80px; text-align: center; color: var(--color-heading);
  background:
    linear-gradient(90deg, rgba(160, 89, 42, 0.07) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(0deg, rgba(160, 89, 42, 0.07) 1px, transparent 1px) 0 0 / 36px 36px,
    var(--color-surface-alt);
}
.contact-map__fallback .icon { width: 44px; height: 44px; color: #d0452f; margin-bottom: 6px; }
.contact-map__fallback span { color: var(--color-muted); font-size: 0.9375rem; }

/* ==========================================================================
   Kết nối các khối: nhịp nền kem → nâu → be → nâu sẫm (liền footer),
   đường cong mềm ở mỗi chỗ chuyển khối (cùng motif header)
   ========================================================================== */
.about, .contact-section { position: relative; }
.about::before,
.about::after,
.contact-section::before {
  content: ""; position: absolute; left: 0; right: 0; height: var(--curve-h);
  z-index: 2; pointer-events: none;
  background-repeat: no-repeat; background-size: 100% 100%;
}
/* Mép trên About: nền kem phủ xuống thành đường cong.
   Màu fill = màu trung bình của nền kem/be sau khi phủ vân giấy (đo trên ảnh render) */
.about::before {
  top: -1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1440V9C1120 40 740 40 0 16Z' fill='%23f8f2e9'/%3E%3C/svg%3E");
}
/* Mép dưới About: nền be của khối Hình ảnh trồi lên */
.about::after {
  bottom: -1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22C380 44 920 6 1440 28V40Z' fill='%23f0e4d0'/%3E%3C/svg%3E");
}
.about__panel { padding-block: calc(clamp(32px, 3vw, 40px) + var(--curve-h) * 0.6); }

/* Hình ảnh: nền be ấm + vân giấy */
.gallery-section {
  background: var(--paper-grain), var(--color-sand);
  padding-top: calc(var(--section-space) * 0.8);
  padding-bottom: calc(var(--section-space) * 0.8 + var(--curve-h) * 0.6);
}

/* Liên hệ: nền nâu sẫm chảy liền xuống footer => một khối kết thúc trang */
.contact-section {
  color: var(--color-on-dark);
  background:
    radial-gradient(60% 70% at 85% 0%, rgba(160, 89, 42, 0.22) 0%, rgba(160, 89, 42, 0) 70%),
    linear-gradient(180deg, var(--color-dark-2) 0%, var(--color-dark) 100%);
  padding-top: calc(var(--section-space) * 0.8 + var(--curve-h) * 0.6);
  padding-bottom: calc(var(--section-space) * 0.75);
}
.contact-section::before {
  top: -1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1440V14C1060 42 560 36 0 10Z' fill='%23f0e4d0'/%3E%3C/svg%3E");
}
.contact-section .contact-card { border-color: transparent; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25); }
.contact-section .contact-map { border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25); }
.contact-section .order-card { border: 1px solid rgba(242, 177, 46, 0.28); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25); }

/* Hero: đường cong mềm ở đáy (đối xứng với đường cong dưới header) */
@media (min-width: 900px) {
  .hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: var(--curve-h);
    z-index: 2; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V34C560 36 1060 22 1440 2V40Z' fill='%23f8f2e9'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  }
  .hero__controls { bottom: calc(var(--curve-h) + 12px); }
}
