/* ================= ROOT ================= */
:root {
  --primary: #B33A2E;
  --secondary: #2A508C;

  --bg-main: #F4EEDD;
  --bg-card: #FFFFFF;

  --text-main: #2B2B2B;
  --text-light: #666;

  --accent: #D4A373;

  --font-heading: "Abygaer";
  --font-body: "Shopee";
  --font-bold: "Shopee Bold";
}

body {
  font-family: var(--font-body);
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}
.home-wrapper {
  min-height: 100vh; 
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
}
/* ===== PAGE ===== */
.home-header {
  background: var(--primary);
  color: #fff;

  padding: 22px 16px 28px; 
  text-align: center;

  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.home-header h1 {
  margin: 0;
  font-size: 22px; /* 👈 nhỏ lại */
}

.home-title-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-search-toggle {
  position: absolute;
  right: 0;

  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.home-search-toggle[aria-expanded="true"] {
  background: rgba(255,255,255,0.14);
}

.home {
  background: var(--bg-main);
  padding: 20px 16px 80px;
  margin-top: 18px;
}

/* ===== TITLE ===== */
.home-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 26px;
  margin-bottom: 20px;
}

/* ===== SEARCH ===== */
.home-search {
  display: flex;
  align-items: center;
  gap: 8px;

  width: min(100%, 420px);
  margin: 20px auto 0;
  padding: 12px 14px;

  background: #C63831;
  border-radius: 0 0 6px 6px;
  box-sizing: border-box;
}

.home-search[hidden] {
  display: none;
}

.home-search.is-open {
  animation: searchDrop 0.18s ease;
}

.home-search-icon {
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
  line-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.home-search input {
  min-width: 0;
  flex: 1;

  border: 0;
  outline: none;
  background: transparent;

  color: #fff;
  font: inherit;
  font-size: 14px;
}

.home-search input::placeholder {
  color: rgba(255,255,255,0.95);
}

.home-search button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;

  background: transparent;
  color: #fff;

  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

@keyframes searchDrop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== GRID ===== */
.home-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.home-empty {
  margin: 36px 0 0;
  color: var(--primary);
  text-align: center;
  font-size: 15px;
}

/* ===== CARD ===== */
.home-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
}

/* image */
.home-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

/* ===== OVERLAY ĐỎ ===== */
.home-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;

  background: var(--primary);
  color: #fff;

  padding: 10px 10px 12px;
}

/* name */
.home-overlay h3 {
  margin: 0;
  font-size: 18px;   
  font-family: var(--font-heading);
  line-height: 1.2;
}

/* year */
.home-overlay span {
  font-size: 13px;
  opacity: 0.9;
}

/* button */
.home-overlay button {
  margin-top: 6px;

  border: none;
  border-radius: 20px;
  padding: 4px 10px;

  font-size: 10px;
  cursor: pointer;

  background: var(--bg-main);
  color: var(--primary);
}
.home-meta {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  margin-top: 6px;
}
.home-meta span {
  font-size: 12px;
  opacity: 0.95;
}
.home-meta span {
  font-size: 12px;
  opacity: 0.95;
}
.home-meta button {
  border: none;
  border-radius: 20px;
  padding: 4px 12px;

  font-size: 11px;
  cursor: pointer;

  background: var(--bg-main);
  color: var(--primary);

  white-space: nowrap; 
}
