/* 🌟 GIAO DIỆN ĐĂNG NHẬP GIỐNG MS OFFICE PHENIKAA CHUẨN TỈ LỆ */
#welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(36, 2, 2, 0.3), rgba(0, 0, 0, 0.3)),
    url("../photo/phenikaa.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.dangnhap {
  background: white;
  color: #333;
  padding: 36px 44px 0 44px;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 380px;
  box-sizing: border-box;
  text-align: left;
  overflow: hidden;
}

.login-logo {
  width: 100px;
  height: auto;
  margin-bottom: 20px;
  display: block;
}

.dangnhap h2 {
  color: #242424;
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.dangnhap input {
  width: 100%;
  padding: 10px 0;
  margin-bottom: 24px;
  border: none;
  border-bottom: 1px solid #666;
  font-size: 16px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
  background: transparent;
}

.dangnhap input:focus {
  border-bottom: 2px solid #0067b8;
}

.btn-start-learning {
  background: #0067b8;
  color: white;
  border: none;
  padding: 8px 32px;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: 0.2s;
  display: block;
  margin-left: auto;
  margin-bottom: 30px;
}

.btn-start-learning:hover {
  background: #005da3;
}

/* STYLE DẢI BĂNG WELCOME XÁM CHUẨN MICROSOFT */
.welcome-footer {
  background-color: #f3f2f1;
  margin: 0 -44px;
  padding: 20px 44px;
  border-top: 1px solid #e1dfdd;
  font-size: 14px;
  color: #323130;
}

.welcome-footer strong {
  font-weight: 600;
  color: #201f1e;
}

header {
  background: #ffffff;
  color: rgb(0, 51, 102);
  padding: 20px;
  font-size: 32px;
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  overflow: hidden;
}

.logo {
  width: 70px;
  height: 80px;
  object-fit: contain;
}

.rabbit-run {
  position: absolute;
  top: 5px;
  width: 60px;
  animation: rabbitRun 8s linear infinite;
}

@keyframes rabbitRun {
  0% {
    left: -80px;
    transform: scaleX(1);
  }
  50% {
    left: calc(100% - 60px);
    transform: scaleX(1);
  }
  51% {
    transform: scaleX(-1);
  }
  100% {
    left: -80px;
    transform: scaleX(-1);
  }
}

nav {
  background: #132c63;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
}

nav button {
  background: none;
  border: none;
  color: white;
  font-size: 17px;
  margin-right: 18px;
  cursor: pointer;
  padding: 5px 10px;
}

nav button:hover {
  color: #ffd700;
}

.online-counter-box {
  background: rgba(255, 255, 255, 0.15);
  color: #ffd700;
  font-size: 14px;
  font-weight: bold;
  padding: 6px 15px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.online-dot {
  width: 10px;
  height: 10px;
  background-color: #28a745;
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

.section {
  display: none;
}
.active {
  display: block;
}

.search-box {
  width: 60%;
  margin: 25px auto;
  display: flex;
  background: white;
  border-radius: 40px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.search-box input {
  flex: 1;
  border: none;
  padding: 16px;
  border-radius: 40px;
  font-size: 18px;
  outline: none;
}

.search-box button {
  border: none;
  background: #0a1f44;
  color: white;
  padding: 16px 30px;
  border-radius: 40px;
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  padding: 30px;
}

.card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  pointer-events: none;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card h3 {
  margin: 10px;
}
.card p {
  margin: 10px;
  color: #555;
}
.price {
  color: red;
  font-weight: bold;
  margin-left: 10px;
}
.voucher {
  background: #ffd700;
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: 10px;
  font-size: 13px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.back-btn {
  position: absolute;
  top: 25px;
  left: 25px;
  z-index: 10000;
  background: #254196;
  color: white;
  border: none;
  padding: 12px 18px;
  font-size: 16px;
  border-radius: 10px;
  cursor: pointer;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  flex-direction: column;
  gap: 20px;
}

.shopeeicon {
  width: 280px;
  height: 280px;
  object-fit: cover;
  box-shadow: 0 0 40px rgba(255, 80, 50, 0.7);
  border: 10px solid white;
  border-radius: 20px;
}

.tick-btn {
  font-size: 45px;
  background: #ff3b30;
  color: white;
  border: none;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  margin-top: 20px;
}

.title-box {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.main-title {
  font-size: 32px;
  font-weight: bold;
}
.ZALO {
  font-size: 16px;
  opacity: 0.8;
  margin-top: 4px;
}

/* STYLE CSS CHO PHÂN HỆ TRẮC NGHIỆM */
.nenchonmon {
  max-width: 800px;
  margin: 40px auto;
  background: rgb(255, 255, 255);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
}

.mauchuquizi {
  text-align: center;
  color: #0058f0;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: bold;
}

.subject-list,
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.quiz-btn {
  background: #254196;
  color: white;
  border: none;
  padding: 15px 20px;
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
  text-align: left;
}

.quiz-btn:hover {
  background: #132c63;
  transform: translateX(5px);
}

.countdown-screen {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cute-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 20px;
  animation: bounce 1.5s infinite alternate;
}
@keyframes bounce {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-15px);
  }
}
.ready-text {
  font-size: 26px;
  color: #0a1f44;
  font-weight: bold;
  margin-bottom: 20px;
}
.countdown-num {
  font-size: 80px;
  font-weight: bold;
  color: #ff3b30;
  animation: scalePop 1s infinite;
}
@keyframes scalePop {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

.quiz-header-bar {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: bold;
  color: #555;
  margin-bottom: 15px;
}
.question-box {
  background: #0a1f44;
  color: white;
  padding: 25px;
  border-radius: 12px;
  font-size: 20px;
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.5;
  box-shadow: 0 5px 15px rgba(10, 31, 68, 0.3);
}

.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}
@media (max-width: 600px) {
  .answers-grid {
    grid-template-columns: 1fr;
  }
}

.answer-option {
  background: white;
  border: 2px solid #254196;
  color: #333;
  padding: 16px;
  font-size: 16px;
  border-radius: 30px;
  cursor: pointer;
  text-align: left;
  transition: 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.answer-option:hover {
  background: #f0f3ff;
}
.answer-option.correct {
  background: #28a745 !important;
  color: white !important;
  border-color: #28a745 !important;
}
.answer-option.wrong {
  background: #dc3545 !important;
  color: white !important;
  border-color: #dc3545 !important;
}

.quiz-live-score-bar {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 17px;
  font-weight: bold;
  color: #132c63;
  margin-bottom: 20px;
}
.live-score-num {
  color: #28a745;
}

.nav-arrows {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.arrow-btn {
  background: #132c63;
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}
.arrow-btn:hover {
  background: #254196;
}
.arrow-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* BẢNG XẾP HẠNG */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 16px;
}
.leaderboard-table th,
.leaderboard-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
}
.leaderboard-table th {
  background-color: #0a1f44;
  color: white;
}
.leaderboard-table tr:nth-child(even) {
  background-color: #f2f2f2;
}
.leaderboard-table tr:hover {
  background-color: #ddd;
}

.result-screen {
  text-align: center;
  padding: 20px;
}
.score-display {
  font-size: 48px;
  color: #28a745;
  font-weight: bold;
  margin: 20px 0;
}
.summary-text {
  font-size: 18px;
  margin-bottom: 30px;
  color: #333;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}
.result-actions button {
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.btn-restart {
  background: #28a745;
  color: white;
}
.btn-back {
  background: #ff8c00;
  color: white;
}
.btn-leaderboard {
  background: #17a2b8;
  color: white;
}
/* STYLE CHO MẠNG XÃ HỘI THREAD PHENIKAA */
.thread-card {
  background: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
  text-align: left;
  border: 1px solid #f0f0f0;
}
.thread-user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.thread-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #254196;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}
.thread-username {
  font-weight: 600;
  color: #111;
  font-size: 15px;
}
.thread-time {
  font-size: 13px;
  color: #777;
  margin-left: 15px;
}
.thread-text {
  font-size: 15px;
  color: #222;
  line-height: 1.5;
  margin: 0 0 12px 0;
  white-space: pre-wrap;
}
.thread-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #eaeaea;
}
.thread-actions {
  display: flex;
  gap: 20px;
  border-top: 1px solid #f5f5f5;
  border-bottom: 1px solid #f5f5f5;
  padding: 10px 5px;
  font-size: 14px;
  color: #555;
}
.action-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}
.action-btn:hover {
  color: #000;
}
.comment-box {
  background: #f8f9fa;
  padding: 10px;
  margin-top: 10px;
  border-radius: 8px;
}
.comment-item {
  font-size: 14px;
  border-bottom: 1px dashed #eee;
  padding: 6px 0;
}
.comment-item:last-child {
  border: none;
}
/* CSS CHO MENU BA CHẤM THREAD */
.khung-menu-bai-viet {
  position: relative;
  margin-left: auto;
}
.nut-ba-cham-bai-viet {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #777;
  padding: 5px 10px;
  line-height: 1;
  border-radius: 50%;
  transition: 0.2s;
}
.nut-ba-cham-bai-viet:hover {
  background: #f0f0f0;
  color: #000;
}
.menu-lua-chon-tha-xuong {
  display: none;
  position: absolute;
  right: 0;
  top: 30px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  min-width: 120px;
  overflow: hidden;
}
.menu-lua-chon-tha-xuong.hien-thi {
  display: block;
}
.muc-lua-chon-con {
  padding: 10px 15px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  color: #333;
  transition: 0.2s;
}
.muc-lua-chon-con:hover {
  background: #f5f5f5;
}
.muc-lua-chon-con.nut-xoa-bai {
  color: #ff4d4d;
  font-weight: bold;
}
.muc-lua-chon-con.nut-xoa-bai:hover {
  background: #fff5f5;
}

/* 🌟 CSS CHO MENU AVATAR TÀI KHOẢN */
.khung-tai-khoan {
  position: relative;
  display: flex;
  align-items: center;
}
.avatar-menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffd700;
  color: #132c63;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  user-select: none;
  box-sizing: border-box;
}
.avatar-menu-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.menu-con-tai-khoan {
  display: none;
  position: absolute;
  right: 0;
  top: 45px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  min-width: 220px;
  padding: 15px;
  box-sizing: border-box;
}
.menu-con-tai-khoan.hien-thi-user {
  display: block;
}
.thong-tin-user-header {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 10px;
  text-align: left;
}
.nut-chuc-nang-user {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  background: none;
  text-align: left;
  transition: 0.2s;
  color: #333;
}
.nut-chuc-nang-user:hover {
  background: #f5f5f5;
}
.nut-chuc-nang-user.nut-dang-xuat-user {
  color: #ff4d4d;
  font-weight: bold;
  margin-top: 5px;
  border-top: 1px solid #eee;
  border-radius: 0;
  padding-top: 12px;
}
.nut-chuc-nang-user.nut-dang-xuat-user:hover {
  background: #fff5f5;
}

/* =========================================
         📱 CSS TỐI ƯU HÓA ĐẸP MẮT CHO ĐIỆN THOẠI (RESPONSIVE)
         ========================================= */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 12px;
    padding: 15px 10px;
    align-items: stretch;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
  }

  nav button {
    margin-right: 0;
    padding: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    text-align: center;
  }

  nav > div:last-child {
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
  }

  header {
    padding: 12px;
    font-size: 20px;
    gap: 10px;
  }
  .main-title {
    font-size: 20px;
  }
  .ZALO {
    font-size: 13px;
  }
  .logo {
    width: 45px;
  }

  .nenchonmon {
    margin: 15px 10px;
    padding: 15px;
    border-radius: 12px;
  }

  .mauchuquizi {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .thread-card {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
  }
  .thread-text {
    font-size: 14px;
  }
  .thread-img {
    max-height: 250px;
  }
  .comment-item {
    font-size: 13px;
  }

  .dangnhap {
    padding: 24px 20px 0 20px;
    width: 95%;
  }
  .dangnhap h2 {
    font-size: 22px;
  }
  .welcome-footer {
    margin: 0 -20px;
    padding: 15px 20px;
  }

  #emergency-exit-box {
    position: static;
    text-align: right;
    margin-bottom: 10px;
    width: 100%;
  }
  #emergency-exit-box button {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@keyframes vuongMienNhayNhe {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  100% {
    transform: translateX(-50%) translateY(-3px);
  }
}

/* 🌟 ĐỒNG BỘ KHÓA KÍCH THƯỚC CHO KHUNG COMMENT CHỐNG MÉO */
.comment-item .avatar-admin-vip {
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0 !important;
}
.comment-item .avatar-admin-vip::before {
  top: -13px;
  width: 24px;
  height: 20px;
  z-index: 999999999 !important;
  clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 0% 85%);
}
/* 1. Đảm bảo container ảnh chiếm hết chiều rộng và không bị tràn */
.banner-box {
  overflow: hidden;
  width: 100%;
}
.track {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}
.track img {
  width: 100%;
  height: auto;
  object-fit: cover;
  flex-shrink: 0;
  pointer-events: none;
}

/* 2. Logic ẩn/hiện dựa trên màn hình */
@media (min-width: 769px) {
  /* Máy tính: Hiện PC, Ẩn Mobile */
  #carousel-container-mobile {
    display: none !important;
  }
  #carousel-container-pc {
    display: block !important;
  }
}

@media (max-width: 768px) {
  /* Điện thoại: Ẩn PC, Hiện Mobile */
  #carousel-container-pc {
    display: none !important;
  }
  #carousel-container-mobile {
    display: block !important;
  }
}
#home {
  /* Đảm bảo div home luôn hiển thị đủ không gian */
  display: block;
}
/* Banner chỉ hiển thị khi div home là active */
#home:not(.active) .banner-box {
  display: none !important;
}
/* 1. Mở rộng không gian phía trên cho khung avatar bài đăng */
.thread-card .thread-avatar {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  overflow: visible !important; /* Đổi từ hidden thành visible để vương miện không bị cắt */
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  margin-top: 8px !important; /* Đẩy khung ảnh xuống một chút để chừa chỗ cho vương miện bay lên đầu */
}

/* 2. Đảm bảo ảnh tròn bên trong */
.thread-card .thread-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}

/* 3. Chỉnh lại vị trí vương miện bài đăng cho giống bên dưới */
.avatar-admin-vip::before {
  content: "";
  position: absolute;
  top: -20px !important; /* Đẩy vương miện lên ngự trên đầu ảnh */
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 35px !important;
  height: 30px !important;
  background: url("../photo/vuong_mieng1.webp") no-repeat center center;
  background-size: contain;
  z-index: 9999 !important;
  pointer-events: none;
  animation: vuongMienNhayNhe 2s ease-in-out infinite alternate;
}
.search-box-container {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

#inputTimKiem {
  width: 90%;
  padding: 12px 18px;
  font-size: 16px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  transition: all 0.3s ease;
}

#inputTimKiem:focus {
  border-color: #1e3a8a; /* Khớp với màu xanh chủ đạo của menu/nút */
  box-shadow: 0 0 8px rgba(30, 58, 138, 0.2);
}
/* Giao diện Chợ Sinh Viên Phenikaa */
#cho-phenikaa-section {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

.market-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.market-banner h1 {
  margin: 0 0 10px 0;
  font-size: 28px;
}

.market-banner p {
  margin: 0 0 15px 0;
  opacity: 0.9;
}

.banner-btn {
  background: #ffc107;
  color: #333;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.banner-btn:hover {
  background: #e0a800;
}

.banner-icon {
  font-size: 50px;
}

/* Lưới hiển thị sản phẩm */
#luoiSanPham {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.san-pham-card {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.san-pham-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.san-pham-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #f0f0f0;
}

.san-pham-body {
  padding: 15px;
}

.san-pham-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 8px 0;
  color: #2c3e50;
}

.san-pham-price {
  color: #e74c3c;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 10px;
}

.san-pham-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
input[type="file"] {
  display: none; /* Ẩn input file gốc nhưng vẫn giữ chức năng */
}

/* Định dạng chung cho các nút bấm upload ảnh */
label[for="thread-image"],
.nut-chuc-nang-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f3f4;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background 0.2s;
  user-select: none;
}

label[for="thread-image"]:hover,
.nut-chuc-nang-user:hover {
  background: #e4e6e7;
}

/* Đảm bảo các nút bấm đường dẫn trong Chợ và sản phẩm hiển thị chuẩn, không bị mất link */
.san-pham-card button,
.banner-btn {
  cursor: pointer;
  position: relative;
  z-index: 10;
}

/* Khung hiển thị lưới sản phẩm của Chợ Phenikaa */
#luoiSanPham {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
