/* Catalogue Xuân 2027 – Finelife Premium
   Một bộ giao diện cho cả điện thoại và máy tính (co giãn theo bề rộng màn hình). */
:root {
  --do: #6a0800;          /* đỏ chủ đạo (theo bộ cẩm nang) */
  --do-sang: #870a06;
  --do-nut: #750000;
  --do-chu: #6a0800;
  --vang: #e2c27f;
  --vang-sang: #f6e3b4;
  --vang-dam: #b98a45;
  --kem: #fcf4d4;
  --kem-dam: #f3e2ad;
  --toi: #2a0200;
  --khung: min(100% - 32px, 1180px);
  --vien: 1.5px solid rgba(246, 227, 180, .85);
  --bo-goc: 16px;
  --chu-tieu-de: "Playfair Display", "Times New Roman", serif;
  --chu-nhan: "Josefin Sans", "Be Vietnam Pro", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--do);
  color: var(--vang-sang);
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}
body.dang-mo-hop { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.an-di { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.khung { width: var(--khung); margin-inline: auto; }

/* Nền đỏ có ánh sáng giữa như bản Figma */
.nen-do {
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(176, 24, 12, .55), transparent 60%),
    radial-gradient(90% 50% at 50% 100%, rgba(150, 16, 8, .35), transparent 70%),
    var(--do);
}
.nen-kem { background: var(--kem); color: var(--do-chu); }

/* ====================== MÀN BÌA ====================== */
.bia {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(96px, 16vw, 140px) 16px clamp(40px, 8vw, 72px);
}
.bia__mai {
  position: absolute; top: -6px; left: -18px;
  width: clamp(260px, 62vw, 620px);
  transform-origin: 0 0;
  animation: mai-dua 7s ease-in-out infinite;
  pointer-events: none;
}
.bia__logo { position: absolute; top: clamp(18px, 3vw, 32px); right: clamp(16px, 4vw, 48px); width: clamp(120px, 30vw, 220px); }
.bia__noi-dung {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(36px, 9vw, 64px);
  width: 100%;
}
.bia__tieu-de { width: clamp(240px, 70vw, 440px); animation: hien-len 1.2s ease-out both; }
.bia__huy-hieu { width: clamp(110px, 28vw, 170px); animation: lo-lung 5s ease-in-out infinite; filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); }
.bia__cuon {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: none; border: 0; padding: 8px; color: var(--vang);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .85;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.bia__cuon::after { content: ""; width: 10px; height: 10px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg); animation: nhun 1.6s ease-in-out infinite; }

@media (min-width: 900px) {
  .bia__noi-dung { flex-direction: row; justify-content: center; gap: clamp(56px, 9vw, 140px); }
  .bia__tieu-de { width: clamp(380px, 36vw, 500px); }
  .bia__huy-hieu { width: clamp(170px, 15vw, 220px); }
}

/* ====================== TIÊU ĐỀ CHUNG ====================== */
.tieu-de-muc {
  margin: 0;
  font-family: var(--chu-tieu-de);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
  background: linear-gradient(180deg, #f8e6b6 0%, #d9ae62 60%, #b98a45 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ====================== MÂM CƠM GIA TIÊN (trang chủ) ====================== */
.mam-com { padding: clamp(40px, 8vw, 80px) 0 clamp(24px, 5vw, 48px); }
.mam-com__tieu-de { width: min(80%, 460px); margin: 0 auto clamp(20px, 4vw, 36px); }
.truot-anh {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 4px max(16px, calc((100% - 860px) / 2));
}
.truot-anh::-webkit-scrollbar { display: none; }
.truot-anh__muc {
  flex: 0 0 min(86%, 860px);
  scroll-snap-align: center;
  border: 0; padding: 0; background: none;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
}
.truot-anh__muc:only-child { margin-inline: auto; }
.truot-anh__muc img { width: 100%; }
.cham { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.cham span { width: 8px; height: 8px; border-radius: 50%; background: rgba(246,227,180,.35); transition: background .2s, transform .2s; }
.cham span.dang-xem { background: var(--vang-sang); transform: scale(1.2); }

/* ====================== THẺ DANH MỤC (trang chủ) ====================== */
.danh-muc { padding: clamp(24px, 5vw, 48px) 0 clamp(48px, 8vw, 88px); }
.danh-muc__luoi {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 5vw, 40px) clamp(12px, 3vw, 28px);
}
@media (min-width: 900px) { .danh-muc__luoi { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.the-dm { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.the-dm__ten { font-size: clamp(15px, 4.2vw, 22px); white-space: nowrap; }
.the-dm__khung {
  position: relative;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 6px; padding: 10px;
  aspect-ratio: 1 / 1; min-height: 0; overflow: hidden;
  border: var(--vien); border-radius: var(--bo-goc);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.12));
  box-shadow: 0 10px 0 -6px rgba(246,227,180,.18), 0 12px 28px rgba(0,0,0,.25);
  transition: transform .25s, box-shadow .25s;
}
.the-dm:hover .the-dm__khung, .the-dm:focus-visible .the-dm__khung { transform: translateY(-4px); box-shadow: 0 12px 0 -6px rgba(246,227,180,.3), 0 18px 36px rgba(0,0,0,.35); }
.the-dm__khung > * { min-width: 0; min-height: 0; }
.the-dm__khung img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.the-dm__xem {
  display: grid; place-items: center; text-align: center;
  font-family: var(--chu-nhan); font-weight: 600; font-size: clamp(10px, 2.6vw, 13px);
  letter-spacing: .06em; text-transform: uppercase; color: var(--vang);
}

/* ====================== ĐẦU TRANG DANH MỤC ====================== */
.dau-trang {
  position: relative;
  width: var(--khung); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px; padding-top: 14px;
}
.dau-trang__ve {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 0; text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
}
.dau-trang__ve img { width: 22px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }
.dau-trang__ve span { opacity: .85; }
.dau-trang__logo { width: clamp(118px, 30vw, 190px); position: relative; z-index: 1; }
.nen-do .dau-trang__logo { position: absolute; left: 50%; transform: translateX(-50%); top: 30px; }
.trang-do__mai {
  position: absolute; top: -4px; right: -24px;
  width: clamp(180px, 42vw, 420px); transform: scaleX(-1);
  pointer-events: none; opacity: .95;
}
.trang { position: relative; overflow: hidden; min-height: 100svh; padding-bottom: clamp(40px, 8vw, 80px); }
.trang__tieu-de { margin: clamp(28px, 6vw, 48px) 0 4px; font-size: clamp(24px, 6.4vw, 40px); }
.trang__phu-de { margin: 0 0 clamp(20px, 4vw, 36px); text-align: center; color: var(--vang); font-size: 14px; letter-spacing: .03em; }

/* ====================== TRANG QUÀ TẾT (nền kem) ====================== */
.bst { padding: clamp(18px, 4vw, 34px) 0 clamp(14px, 3vw, 26px); }
.bst__dau { width: var(--khung); margin: 0 auto 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.bst__ten { margin: 0; font-family: var(--chu-tieu-de); font-weight: 700; font-size: clamp(21px, 5.6vw, 32px); line-height: 1.2; color: var(--do-chu); }
.bst__phu-de { display: block; font-family: "Be Vietnam Pro", sans-serif; font-size: clamp(12px, 3.2vw, 14px); font-weight: 600; color: #8b2a1a; margin-top: 2px; }
.nut-truot { display: none; gap: 8px; flex-shrink: 0; }
.nut-truot button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--do-chu); background: transparent; color: var(--do-chu);
  font-size: 20px; line-height: 1; display: grid; place-items: center;
  transition: background .2s, color .2s, opacity .2s;
}
.nut-truot button:hover:not(:disabled) { background: var(--do-chu); color: var(--kem); }
.nut-truot button:disabled { opacity: .3; cursor: default; }
@media (hover: hover) and (min-width: 700px) { .nut-truot { display: flex; } }

.day-qua {
  display: flex; gap: clamp(12px, 3vw, 24px);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 8px max(16px, calc((100% - 1180px) / 2)) 14px;
  scroll-padding-inline: max(16px, calc((100% - 1180px) / 2));
}
.day-qua::-webkit-scrollbar { display: none; }
.the-qua {
  flex: 0 0 clamp(210px, 62vw, 280px);
  scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center;
  border: 0; padding: 0; background: none; text-align: center; color: inherit;
}
.the-qua__anh { position: relative; width: 100%; aspect-ratio: 1 / 1.08; display: flex; align-items: flex-end; justify-content: center; }
.the-qua__anh img.sp {
  position: absolute; z-index: 1; left: 4%; top: 2%;
  width: 92%; height: 89%; object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 8px 10px rgba(80, 10, 0, .25));
  transition: transform .3s;
}
.the-qua__anh img.de { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; }
.the-qua:hover img.sp, .the-qua:focus-visible img.sp { transform: translateY(-6px) scale(1.02); }
.the-qua__nhan {
  margin-top: 12px; width: 78%; min-height: 44px;
  padding: 7px 12px; border-radius: 9px;
  background: var(--do-nut); color: var(--kem);
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  box-shadow: 0 6px 14px rgba(117, 0, 0, .25);
}
.the-qua__ten { font-family: var(--chu-nhan); font-weight: 700; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.2; }
.the-qua__gia { font-size: 13px; color: var(--kem-dam); }
.the-qua__gia sup { font-size: .68em; }
.the-qua__xem { margin-top: 8px; font-size: 12px; font-weight: 600; color: #8b2a1a; letter-spacing: .05em; text-transform: uppercase; }
.dang-cap-nhat {
  width: var(--khung); margin: 4px auto 0; padding: 22px 16px;
  border: 1.5px dashed rgba(106, 8, 0, .35); border-radius: var(--bo-goc);
  text-align: center; color: #8b2a1a; font-size: 14px;
}
.nen-do .dang-cap-nhat { border-color: rgba(246,227,180,.4); color: var(--vang); }

/* ====================== TRANG TRÁI CÂY (so le) ====================== */
.so-le { width: min(100% - 32px, 980px); margin: 0 auto; display: flex; flex-direction: column; gap: clamp(30px, 7vw, 56px); }
.dong-so-le {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: clamp(10px, 3vw, 40px);
  border: 0; background: none; padding: 0; text-align: left; color: inherit;
}
.dong-so-le:nth-child(even) .dong-so-le__anh { order: 2; }
.dong-so-le__anh img { width: 100%; max-width: 400px; margin-inline: auto; filter: drop-shadow(0 12px 16px rgba(0,0,0,.35)); transition: transform .3s; }
.dong-so-le:hover .dong-so-le__anh img { transform: scale(1.03); }
.nhan-lan { position: relative; width: 100%; max-width: 380px; container-type: inline-size; }
.nhan-lan > img { width: 100%; }
.nhan-lan__chu {
  position: absolute; left: 47%; right: 1%; top: 41.5%; bottom: 18.5%;
  display: flex; flex-direction: column; justify-content: center; gap: 1cqw;
  padding: 0 2cqw 0 4cqw; color: var(--vang-sang);
}
.nhan-lan__ten { font-family: var(--chu-nhan); font-weight: 700; text-transform: uppercase; font-size: 5.1cqw; line-height: 1.25; padding-top: .12em; letter-spacing: 0; white-space: nowrap; }
.nhan-lan__gia { font-family: var(--chu-nhan); font-weight: 700; font-size: 8.2cqw; line-height: 1; color: #fff3cf; white-space: nowrap; }
.nhan-lan__gia sup { font-size: .5em; vertical-align: .9em; margin-left: 1px; }
.nhan-lan__gia small { font-size: .42em; margin-left: 3px; letter-spacing: .04em; }
.dong-so-le__ds { margin: 8px 0 0; padding: 0 0 0 clamp(6px, 9%, 46px); list-style: none; font-size: clamp(11px, 2.9vw, 15px); line-height: 1.55; color: var(--vang-sang); }
.dong-so-le__ds li::before { content: "• "; color: var(--vang); }

/* ====================== LƯỚI ẢNH (Hoa Tết, Mâm cơm Việt) ====================== */
.luoi-anh {
  width: min(100% - 32px, 1100px); margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 5vw, 40px) clamp(12px, 3vw, 32px);
}
@media (min-width: 700px) { .luoi-anh { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .luoi-anh--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.o-anh { display: flex; flex-direction: column; align-items: center; gap: 12px; border: 0; padding: 0; background: none; color: inherit; }
.o-anh__khung { position: relative; width: 100%; aspect-ratio: var(--ti-le, 4 / 5); }
.o-anh__khung img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center var(--canh, bottom); filter: drop-shadow(0 12px 14px rgba(0,0,0,.35)); transition: transform .3s; }
.o-anh:hover .o-anh__khung img { transform: translateY(-5px); }
.o-anh__nhan {
  width: 82%; aspect-ratio: 600 / 179;
  background: url(anh/khung-nhan.webp) center / 100% 100% no-repeat;
  display: grid; place-items: center; padding: 0 10%;
  font-family: var(--chu-nhan); font-weight: 600; font-size: clamp(11px, 3vw, 15px);
  letter-spacing: .05em; text-transform: uppercase; color: var(--vang-sang); text-align: center; line-height: 1.15;
}

/* ====================== DANH MỤC KHÁC (cuối trang danh mục) ====================== */
.dm-khac { width: var(--khung); margin: clamp(48px, 9vw, 80px) auto 0; text-align: center; }
.dm-khac h2 { margin: 0 0 14px; font-family: var(--chu-tieu-de); font-size: 18px; font-weight: 700; }
.dm-khac__ds { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.dm-khac__ds a {
  padding: 9px 18px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid currentColor; font-size: 14px; font-weight: 600;
  transition: background .2s, color .2s;
}
.nen-do .dm-khac__ds a:hover { background: var(--vang-sang); color: var(--do); }
.nen-kem .dm-khac__ds a:hover { background: var(--do-chu); color: var(--kem); }

/* ====================== CHÂN TRANG ====================== */
.chan-trang {
  background: #4a0500;
  border-top: 1px solid rgba(246,227,180,.25);
  padding: 36px 16px calc(36px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}
.chan-trang__logo { width: 170px; }
.chan-trang__qr { display: flex; align-items: center; gap: 16px; text-align: left; }
.chan-trang__qr p { margin: 0; font-size: 14px; color: var(--vang-sang); }
.chan-trang__qr-o { width: 112px; height: 112px; padding: 8px; background: #fff; border-radius: 10px; }
.chan-trang__qr-o img, .chan-trang__qr-o svg { width: 100%; height: 100%; }
.chan-trang__ghi-chu { margin: 0; font-size: 12px; opacity: .75; }

/* ====================== HỘP CHI TIẾT / ẢNH PHÓNG TO ====================== */
.hop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.hop[hidden] { display: none; }
.hop__nen { position: absolute; inset: 0; background: rgba(20, 0, 0, .78); backdrop-filter: blur(3px); animation: mo-dan .2s ease-out; }
.hop__khung {
  position: relative; width: min(100%, 980px); max-height: calc(100svh - 32px); overflow: auto;
  border-radius: 18px; outline: none;
  animation: hien-len .25s ease-out;
}
.hop__dong {
  position: sticky; top: 10px; float: right; margin: 10px 10px -50px 0; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.45); color: #fff; font-size: 26px; line-height: 1;
}
.hop--anh .hop__khung { background: transparent; width: min(100%, 1200px); }
.hop--anh img { margin: 0 auto; max-height: calc(100svh - 48px); width: auto; border-radius: 12px; }

.chi-tiet { display: grid; gap: 8px; padding: 26px 20px 28px; }
.chi-tiet--kem { background: var(--kem); color: var(--do-chu); }
.chi-tiet--do { background: var(--do); color: var(--vang-sang); }
.chi-tiet__anh { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 240px; padding: 10px 0 0; }
.chi-tiet__anh img.sp { position: relative; z-index: 1; max-height: 46svh; width: auto; margin-bottom: 9%; filter: drop-shadow(0 12px 14px rgba(60,0,0,.3)); }
.chi-tiet__anh img.de { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 440px); }
.chi-tiet__bst { margin: 6px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.chi-tiet__ten { margin: 0; font-family: var(--chu-tieu-de); font-weight: 800; font-size: clamp(26px, 6vw, 36px); line-height: 1.15; }
.chi-tiet__gia { font-family: var(--chu-nhan); font-weight: 700; font-size: clamp(28px, 7vw, 40px); color: #c4161c; line-height: 1.1; }
.chi-tiet--do .chi-tiet__gia { color: #ffd54a; }
.chi-tiet__gia sup { font-size: .5em; }
.chi-tiet__gia small { font-size: .42em; margin-left: 4px; font-weight: 600; }
.chi-tiet h3 { margin: 10px 0 0; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.chi-tiet__ds { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.6; }
.chi-tiet__ghi-chu { margin: 8px 0 0; font-size: 12.5px; font-style: italic; opacity: .75; }
@media (min-width: 760px) {
  .chi-tiet { grid-template-columns: 1.05fr 1fr; column-gap: 36px; align-items: center; padding: 40px 44px; }
  .chi-tiet__anh { grid-row: span 7; min-height: 380px; }
}

/* ====================== HIỆU ỨNG ====================== */
@keyframes mai-dua { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(1.6deg); } }
@keyframes lo-lung { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hien-len { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes mo-dan { from { opacity: 0; } }
@keyframes nhun { 0%, 100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(5px) rotate(45deg); } }
.xuat-hien { opacity: 0; transform: translateY(22px); transition: opacity .6s ease-out, transform .6s ease-out; }
.xuat-hien.da-hien { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .xuat-hien { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
:focus-visible { outline: 2px solid var(--vang); outline-offset: 3px; border-radius: 6px; }
.nen-kem :focus-visible { outline-color: var(--do-chu); }
