/* =========================================
   RESET
========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background: #f8f3ff;
  color: #333;
}

/* =========================================
   TOP AUTH BAR
========================================= */
.auth-bar {
  background: #efe6ff;
  padding: 12px 20px;
  text-align: right;
  font-size: 16px;
}

.auth-btn {
  margin-left: 15px;
  cursor: pointer;
  color: #7b24ff;
  font-weight: bold;
}

.auth-btn:hover {
  text-decoration: underline;
}

.hello {
  color: #5e0fbf;
}

/* =========================================
   HEADER
========================================= */
header {
  background: linear-gradient(90deg, #7b4bff, #9c73ff);
  padding: 22px;
  text-align: center;
  color: white;
  font-size: 28px;
  font-weight: bold;
}

.logo-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* =========================================
   NAV
========================================= */
nav {
  padding: 12px 0;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 3px 6px rgba(0,0,0,0.05);
  background: linear-gradient(90deg, #7b4bff, #9c73ff);
}

nav a {
  color: #ffe6ff;
  font-weight: 600;
  padding: 12px 18px;
  text-decoration: none;
  display: inline-block;
  transition: 0.25s;
}

nav a:hover {
  color: #ffffff;
  transform: scale(1.05);
}

nav a.active {
  color: #ffffff;
  font-weight: 700;
  border-bottom: 2px solid #ffffff;
}

/* =========================================
   BANNER
========================================= */
.banner {
  width: 100%;
  height: 260px;
  background: url('../images/banner.png') center/cover no-repeat;
  margin-bottom: 25px;
  border-bottom: 4px solid #cbb4ff;
}

/* =========================================
   SECTION
========================================= */
.section {
  padding: 40px 8%;
  text-align: center;
}

.section h2 {
  font-size: 26px;
  color: #7b4bff;
  margin-bottom: 25px;
  text-transform: uppercase;
  font-weight: bold;
}

/* =========================================
   FILTER
========================================= */
.filter-box {
  text-align: center;
  margin-bottom: 25px;
}

.filter-box select {
  padding: 10px 18px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #7b4bff;
  background: #f6f0ff;
  color: #4a0b8f;
  font-weight: bold;
}

/* =========================================
   GRID – CARD LIST
========================================= */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  justify-items: center;
}

/* =========================================
   CARD (VUÔNG – CHUẨN)
========================================= */
.card {
  width: 100%;
  max-width: 230px;
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: 0.25s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
}

/* ẢNH VUÔNG */
.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
}

/* TIÊU ĐỀ */
.card h3 {
  font-size: 18px;
  margin: 10px 0 5px;
  color: #4a0b8f;
}

/* META */
.card-meta {
  font-size: 14px;
  color: #555;
  line-height: 1.4;
}


/* =========================================
   CARD BOTTOM
========================================= */
.card-bottom {
  margin-top: auto;
  text-align: center;
}

.price {
  font-weight: bold;
  font-size: 17px;
  color: #d10066;
  margin-bottom: 10px;
}

.btn {
  display: inline-block;
  padding: 8px 18px;
  background: #7b4bff;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 14px;
  transition: 0.2s;
}

.btn:hover {
  background: #5c2fff;
}

/* =========================================
   FOOTER
========================================= */
footer {
  text-align: center;
  padding: 18px;
  background: #e9ddff;
  color: #4a0b8f;
  margin-top: 40px;
  font-size: 14px;
}

/* =========================================
   POPUP
========================================= */
.popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#productDetailBox .popup-content {
  width: 90vw;          /* gần full màn hình */
  max-width: 720px;    /* desktop to đẹp */
  padding: 28px 26px;
  border-radius: 16px;
}


@keyframes pop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.popup-content input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.msg {
  margin: 6px 0;
  font-size: 14px;
  color: red;
}
/* ===== THU GỌN / MỞ RỘNG MÔ TẢ ===== */
.card-desc {
  font-size: 14px;
  margin: 10px 0;
  color: #444;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 🔥 CHỈ bung card được click */
.card.show .card-desc {
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* nút xem thêm */
.more-btn {
  font-size: 13px;
  color: #7b4bff;
  cursor: pointer;
  margin-top: 4px;
  display: inline-block;
}

.more-btn:hover {
  text-decoration: underline;
}
#productDetailBox .popup-content {
  animation: pop .25s ease-out;
}
