/* Hải Dương Thiên Khải — Homepage Redesign
   Đặt file này SAU file CSS hiện tại. Tất cả selector đều được cô lập bằng .hdtk-home. */

:root {
  --hdtk-ink: #31476f;
  --hdtk-muted: #75819a;
  --hdtk-blue: #75a8e8;
  --hdtk-blue-dark: #527eb9;
  --hdtk-pink: #f5b9cc;
  --hdtk-yellow: #f7dda0;
  --hdtk-cream: #fffaf0;
  --hdtk-white: #fff;
  --hdtk-line: rgba(79, 110, 158, .14);
  --hdtk-shadow: 0 24px 60px rgba(78, 105, 147, .11);
  --hdtk-radius-xl: 34px;
  --hdtk-radius-lg: 26px;
  --hdtk-radius-md: 19px;
}

.hdtk-home {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 14px 0 80px;
  color: var(--hdtk-ink);
}

.hdtk-home *, .hdtk-home *::before, .hdtk-home *::after { box-sizing: border-box; }

.hdtk-hero {
  position: relative;
  isolation: isolate;
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr);
  align-items: center;
  gap: 56px;
  overflow: hidden;
  padding: clamp(42px, 6vw, 76px);
  border: 1px solid var(--hdtk-line);
  border-radius: var(--hdtk-radius-xl);
  background:
    radial-gradient(circle at 9% 12%, rgba(255,255,255,.94) 0 4%, transparent 4.2%),
    radial-gradient(circle at 88% 18%, rgba(255,255,255,.78) 0 9%, transparent 9.2%),
    linear-gradient(135deg, #fff7ec 0%, #fcecf3 45%, #eaf4ff 100%);
  box-shadow: var(--hdtk-shadow);
}

.hdtk-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 330px;
  height: 330px;
  right: -80px;
  bottom: -130px;
  border: 70px solid rgba(255,255,255,.35);
  border-radius: 50%;
}

.hdtk-hero__copy { position: relative; z-index: 2; max-width: 690px; }

.hdtk-hero__kicker,
.hdtk-shelf__label,
.hdtk-featured__copy > p {
  margin: 0 0 15px;
  color: #cf7e9c;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hdtk-hero__kicker span { letter-spacing: 0; }

.hdtk-hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--hdtk-ink);
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: clamp(2.65rem, 5.5vw, 4.75rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.045em;
}

.hdtk-hero__lead {
  max-width: 590px;
  margin: 24px 0 0;
  color: #6d7890;
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.75;
}

.hdtk-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hdtk-button {
  min-height: 51px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: .95rem;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.hdtk-button:hover { transform: translateY(-3px); }
.hdtk-button--primary { color: #fff; background: linear-gradient(135deg, #77adee, #678fd0); box-shadow: 0 13px 28px rgba(91,136,197,.25); }
.hdtk-button--ghost { color: var(--hdtk-ink); background: rgba(255,255,255,.72); border-color: rgba(81,113,161,.13); backdrop-filter: blur(10px); }

.hdtk-hero__art { position: relative; min-height: 330px; display: grid; place-items: center; }
.hdtk-cake-card {
  width: min(290px, 86%);
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(5deg);
  border: 10px solid rgba(255,255,255,.7);
  border-radius: 44% 44% 28px 28px;
  color: #5b77a4;
  background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(255,240,210,.95));
  box-shadow: 0 32px 60px rgba(93,113,148,.16);
}
.hdtk-cake-card::before { content: "🧁"; font-size: 5rem; filter: drop-shadow(0 10px 12px rgba(80,97,130,.14)); }
.hdtk-cake-card > span { color: #e6a3ba; font-size: 1.5rem; }
.hdtk-cake-card b { margin-top: 8px; font-family: "Baloo 2", sans-serif; font-size: 1.65rem; }
.hdtk-cake-card small { margin-top: 2px; font-size: .58rem; letter-spacing: .22em; }
.hdtk-spark { position: absolute; font-style: normal; color: #e7a2ba; animation: hdtk-float 3.8s ease-in-out infinite; }
.hdtk-spark--one { top: 7%; left: 8%; font-size: 2rem; }
.hdtk-spark--two { top: 22%; right: 0; font-size: 2.4rem; animation-delay: -1.2s; }
.hdtk-spark--three { bottom: 5%; left: 1%; font-size: 1.4rem; animation-delay: -2.2s; }
@keyframes hdtk-float { 50% { transform: translateY(-10px) rotate(8deg); } }

.hdtk-categories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 22px 0 42px; }
.hdtk-categories > a {
  min-height: 108px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border: 1px solid var(--hdtk-line);
  border-radius: var(--hdtk-radius-lg);
  background: rgba(255,255,255,.9);
  box-shadow: 0 14px 34px rgba(77,101,140,.07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hdtk-categories > a:hover { transform: translateY(-4px); box-shadow: var(--hdtk-shadow); }
.hdtk-categories__icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 19px; background: linear-gradient(135deg,#eff7ff,#fff2e3); font-size: 1.75rem; }
.hdtk-categories span:not(.hdtk-categories__icon) { display: flex; flex-direction: column; }
.hdtk-categories small { color: var(--hdtk-muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.hdtk-categories b { font-family: "Baloo 2", sans-serif; font-size: 1.45rem; }
.hdtk-categories i { color: #91a4c3; font-style: normal; font-size: 1.25rem; }

.hdtk-featured { position: relative; min-height: 390px; margin-bottom: 42px; overflow: hidden; border-radius: var(--hdtk-radius-xl); background: #dfeafa; box-shadow: var(--hdtk-shadow); }
.hdtk-featured__slide { position: absolute; inset: 0; display: none; }
.hdtk-featured__slide.active { display: block; }
.hdtk-featured__slide img { width: 100%; height: 100%; object-fit: cover; }
.hdtk-featured__shade { position: absolute; inset: 0; background: linear-gradient(90deg,rgba(33,48,76,.82),rgba(33,48,76,.27) 62%,transparent); }
.hdtk-featured__copy { position: absolute; z-index: 2; left: clamp(28px,6vw,72px); top: 50%; width: min(540px,75%); transform: translateY(-50%); color: #fff; }
.hdtk-featured__copy > p { color: #ffe8ac; }
.hdtk-featured__copy h2 { margin: 0 0 10px; font-family: "Baloo 2",sans-serif; font-size: clamp(2.2rem,5vw,4rem); line-height: 1; }
.hdtk-featured__copy span { display: block; line-height: 1.7; opacity: .87; }
.hdtk-featured__copy a { display: inline-flex; margin-top: 23px; padding-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,.55); font-weight: 800; }
.hdtk-featured__dots { position: absolute; z-index: 5; right: 28px; bottom: 24px; display: flex; gap: 7px; }
.hdtk-featured__dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.5); }
.hdtk-featured__dots button.active { width: 28px; border-radius: 9px; background: #fff; }

.hdtk-shelf { position: relative; margin-top: 28px; padding: clamp(28px,4vw,48px); overflow: hidden; border: 1px solid var(--hdtk-line); border-radius: var(--hdtk-radius-xl); }
.hdtk-shelf::before { content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -110px; border-radius: 50%; background: rgba(255,255,255,.4); }
.hdtk-shelf--blue { background: linear-gradient(145deg,#edf7ff,#f7fbff); }
.hdtk-shelf--pink { background: linear-gradient(145deg,#fff1f6,#fff9fb); }
.hdtk-shelf--yellow { background: linear-gradient(145deg,#fff8df,#fffdf3); }
.hdtk-shelf--cream { background: linear-gradient(145deg,#fff5e7,#fffaf4); }
.hdtk-shelf--white { background: linear-gradient(145deg,#f8fbff,#fff); }

.hdtk-shelf__head { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.hdtk-shelf__title { display: flex; align-items: center; gap: 17px; }
.hdtk-shelf__icon { flex: 0 0 auto; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 20px; background: rgba(255,255,255,.8); box-shadow: 0 10px 25px rgba(85,109,149,.08); font-size: 1.7rem; }
.hdtk-shelf__label { margin-bottom: 2px; font-size: .66rem; }
.hdtk-shelf__head h2 { margin: 0; color: var(--hdtk-ink); font-family: "Baloo 2",sans-serif; font-size: clamp(2rem,4vw,3rem); line-height: 1.05; letter-spacing: -.025em; }
.hdtk-shelf__head p:not(.hdtk-shelf__label) { margin: 7px 0 0; color: var(--hdtk-muted); font-size: .92rem; }
.hdtk-more { flex: 0 0 auto; min-height: 43px; display: inline-flex; align-items: center; gap: 9px; padding: 0 16px; border: 1px solid var(--hdtk-line); border-radius: 14px; background: rgba(255,255,255,.76); color: #5c75a1; font-size: .82rem; font-weight: 800; }

.hdtk-books { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 20px; }
.hdtk-book { min-width: 0; }
.hdtk-book__link { display: block; }
.hdtk-book__cover { position: relative; aspect-ratio: 2 / 2.85; overflow: hidden; border-radius: var(--hdtk-radius-md); background: #e8eef6; box-shadow: 0 13px 25px rgba(54,76,112,.13); }
.hdtk-book__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.2,.75,.2,1); }
.hdtk-book:hover .hdtk-book__cover img { transform: scale(1.045); }
.hdtk-book__badge { position: absolute; top: 12px; left: 12px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.8); border-radius: 999px; color: #4d668f; background: rgba(255,255,255,.87); backdrop-filter: blur(8px); font-size: .59rem; font-weight: 900; letter-spacing: .08em; }
.hdtk-book__shine { position: absolute; inset: 0; background: linear-gradient(120deg,transparent 35%,rgba(255,255,255,.22),transparent 65%); transform: translateX(-100%); transition: transform .55s ease; }
.hdtk-book:hover .hdtk-book__shine { transform: translateX(100%); }
.hdtk-book__body { padding: 15px 4px 2px; }
.hdtk-book__eyebrow { margin: 0 0 5px; overflow: hidden; color: #ca819d; font-size: .64rem; font-weight: 800; letter-spacing: .09em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.hdtk-book h3 { display: -webkit-box; min-height: 2.7em; margin: 0; overflow: hidden; color: var(--hdtk-ink); font-family: "Baloo 2",sans-serif; font-size: 1.05rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.hdtk-book__meta { display: flex; align-items: center; gap: 7px; margin-top: 6px; overflow: hidden; color: var(--hdtk-muted); font-size: .72rem; white-space: nowrap; }
.hdtk-book__meta span:first-child { overflow: hidden; text-overflow: ellipsis; }
.hdtk-empty { position: relative; z-index: 2; min-height: 170px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed rgba(81,113,161,.23); border-radius: 22px; color: var(--hdtk-muted); background: rgba(255,255,255,.45); }
.hdtk-empty span { font-size: 2rem; }.hdtk-empty p { margin: 0; }

@media (max-width: 980px) {
  .hdtk-hero { grid-template-columns: 1fr .58fr; gap: 24px; min-height: 450px; }
  .hdtk-hero__art { min-height: 260px; }
  .hdtk-cake-card { width: 230px; }
  .hdtk-books { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hdtk-book:nth-child(n+7) { display: none; }
}

@media (max-width: 720px) {
  .hdtk-home { width: min(100% - 24px, 1180px); padding-top: 8px; }
  .hdtk-hero { min-height: auto; grid-template-columns: 1fr; padding: 38px 25px 30px; border-radius: 28px; }
  .hdtk-hero h1 { font-size: clamp(2.45rem,11vw,3.65rem); }
  .hdtk-hero__lead { font-size: .96rem; }
  .hdtk-hero__art { min-height: 170px; margin-top: 5px; }
  .hdtk-cake-card { width: 145px; border-width: 6px; border-radius: 40% 40% 20px 20px; }
  .hdtk-cake-card::before { font-size: 3.3rem; }
  .hdtk-cake-card b { font-size: 1.1rem; }
  .hdtk-categories { gap: 12px; margin: 14px 0 28px; }
  .hdtk-categories > a { min-height: 88px; gap: 11px; padding: 14px; border-radius: 21px; }
  .hdtk-categories__icon { width: 48px; height: 48px; font-size: 1.35rem; }
  .hdtk-categories b { font-size: 1.1rem; }
  .hdtk-categories small,.hdtk-categories i { display: none; }
  .hdtk-featured { min-height: 310px; border-radius: 28px; }
  .hdtk-featured__copy { left: 25px; width: calc(100% - 50px); }
  .hdtk-featured__shade { background: linear-gradient(90deg,rgba(33,48,76,.83),rgba(33,48,76,.35)); }
  .hdtk-shelf { padding: 27px 20px; border-radius: 28px; }
  .hdtk-shelf__head { align-items: flex-start; }
  .hdtk-shelf__icon { width: 49px; height: 49px; border-radius: 17px; }
  .hdtk-shelf__head h2 { font-size: 2rem; }
  .hdtk-shelf__head p:not(.hdtk-shelf__label) { display: none; }
  .hdtk-more { min-height: 38px; padding: 0 12px; font-size: .75rem; }
  .hdtk-books { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 13px; }
  .hdtk-book:nth-child(n+7) { display: block; }
  .hdtk-book__cover { border-radius: 16px; }
}

@media (max-width: 390px) {
  .hdtk-hero__actions { display: grid; }
  .hdtk-button { width: 100%; }
  .hdtk-categories > a { padding: 11px; }
  .hdtk-categories__icon { width: 42px; height: 42px; }
  .hdtk-shelf__title { gap: 10px; }
  .hdtk-shelf__icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hdtk-home *, .hdtk-home *::before, .hdtk-home *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
