/* ===== ROOT (BIẾN MÀU) ===== */
:root{
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --gradient: linear-gradient(135deg, #4F46E5, #7C3AED);

  --bg: #F9FAFB;
  --card: #ffffff;

  --text-main: #111827;
  --text-sub: #6B7280;

  --border: #E5E7EB;

  --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px rgba(0,0,0,0.08);
}

/* ===== BODY ===== */
body{
  background: var(--bg);
  font-family: 'Inter', system-ui, sans-serif;
  margin:0;
  padding:0;
  color: var(--text-main);
}

/* ===== NAVBAR ===== */
.navbar{
  padding:14px 0;
  background:#fff !important;
  box-shadow: var(--shadow-sm);
}

.navbar-brand{
  display:flex;
  align-items:center;
  font-weight:700;
  font-size:20px;
}

.logo-text{
  font-weight:700;
  font-size:20px;
  margin-left:6px;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.nav-link{
  color: var(--text-sub) !important;
  font-weight:500;
  transition:0.2s;
}
.nav-link:hover, .nav-link.active{
  color: var(--primary) !important;
}

/* ===== BUTTON ===== */
.btn-post{
  background: var(--gradient);
  border:none;
  color:#fff;
  font-weight:600;
  border-radius:10px;
  padding:8px 16px;
}
.btn-post:hover{
  opacity:0.9;
  color:#fff;
}

/* ===== CARD BDS ===== */
.bds-card{
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--border);
  background: var(--card);
  transition:0.3s;
  height:100%;
}
.bds-card:hover{
  transform:translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* ===== IMAGE ===== */
.bds-img-box{
  width:100%;
  height:200px;
  overflow:hidden;
}
.bds-img-box img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:0.4s;
}
.bds-card:hover img{
  transform:scale(1.07);
}

/* ===== TITLE ===== */
.bds-title{
  font-size:16px;
  font-weight:600;
  color: var(--text-main);
  margin-bottom:6px;
}
.bds-title:hover{
  color: var(--primary);
}

/* ===== PRICE ===== */
.price{
  color: var(--primary);
  font-weight:700;
  font-size:18px;
}

/* ===== INFO ===== */
.bds-info{
  font-size:14px;
  color: var(--text-sub);
}

/* ===== POPUP ===== */
.modal-content{
  border-radius:16px;
  border:none;
}
.popup-img-box{
  width:100%;
  height:420px;
  overflow:hidden;
  border-radius:12px;
  background:#eee;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:12px;
}
.popup-img-box img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Container thumbnail */
.popup-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;       /* cuộn ngang */
  padding-bottom: 5px;
  flex-wrap: nowrap;       /* luôn 1 hàng */
  -webkit-overflow-scrolling: touch; /* mượt trên iOS */
}

/* Ẩn scrollbar nếu muốn */
.popup-thumbs::-webkit-scrollbar {
  height: 6px;
}
.popup-thumbs::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 3px;
}

/* Thumbnail */
.popup-thumb {
  flex: 0 0 auto;          /* không co nhỏ, không giãn */
  width: 70px;
  height: 70px;
  object-fit: cover;       /* giữ tỉ lệ ảnh, không bóp méo */
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.3s;
}
.popup-thumb:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

/* ===== FOOTER ===== */
.footer{
  background:#111827;
  color:#E5E7EB;
  padding:60px 0 30px;
  margin-top:60px;
}

.footer-img{
  max-height:170px;
  object-fit:contain;
}

/* Title */
.footer-title{
  font-size:18px;
  font-weight:700;
  margin-bottom:12px;
  color:#fff;
}

/* Description */
.footer-desc{
  color:#9CA3AF;
  font-size:14px;
  margin-top:10px;
  line-height:1.6;
}

/* Menu */
.footer-menu{
  list-style:none;
  padding:0;
}

.footer-menu li{
  margin-bottom:8px;
}

.footer-menu a{
  text-decoration:none;
  color:#9CA3AF;
  transition:0.2s;
}

.footer-menu a:hover{
  color:#fff;
}

/* Contact */
.footer-text{
  color:#9CA3AF;
  font-size:14px;
  margin-bottom:6px;
}

/* Social icon */
.icon-social{
  width:36px;
  height:36px;
  margin-right:10px;
  transition:0.3s;
}

.icon-social:hover{
  transform:scale(1.1);
}

/* Line */
.footer-line{
  border-color:#374151;
  margin:30px 0;
}

/* Bottom */
.footer-bottom{
  text-align:center;
  color:#6B7280;
  font-size:14px;
}

/* ===== MOBILE ===== */
@media(max-width:768px){

  .footer{
    text-align:center;
  }

  .footer-img{
    max-height:120px;
    margin-bottom:10px;
  }

  .icon-social{
    margin:5px;
  }

}



/* ===== MAIN PRODUCT DETAIL ===== */
.main-bds-image img{
  width:100%;
  height:320px;
  object-fit:cover;
}

/* GALLERY ITEM */
.gallery-thumb{
  min-width:80px;
  height:80px;
  overflow:hidden;
  flex-shrink:0;
  border-radius:6px;
  cursor:pointer;
}
.gallery-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* KHUNG ẢNH CHÍNH */
.main-image-box{
  width:100%;
  aspect-ratio:4/3;
  overflow:hidden;
  border-radius:10px;
}
.main-image-box img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.description-content {
    max-height: 300px;       /* chiều cao rút gọn */
    overflow: hidden;
    position: relative;      /* quan trọng để gradient nếu cần */
    transition: max-height 0.5s ease;
}

/* Optional: gradient fade ở đáy */
.description-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(180deg, rgba(249,250,251,0) 0%, var(--bg) 100%);
    pointer-events: none;
}

/* ============================= */
/* Nút Xem thêm / Thu gọn - phiên bản to rộng */
#toggleDescription {
    display: block;             
    margin: 20px auto 0;        /* căn giữa ngang */
    padding: 15px 40px;         /* tăng padding để nút to hơn */
    min-width: 200px;           /* chiều ngang tối thiểu */
    background-color: var(--primary-color, #1d4ed8); 
    color: #fff;                
    border: none;               
    border-radius: 8px;         /* bo góc hơi lớn hơn */
    font-size: 18px;             /* chữ lớn hơn */
    font-weight: 600;           
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

/* Hover hiệu ứng */
#toggleDescription:hover {
    background-color: var(--primary-color-dark, #1e40af);
    transform: translateY(-2px);
}

/* Nhấn vào */
#toggleDescription:active {
    transform: translateY(0);
}

/* ================= CKEDITOR CONTENT ================= */

.ckeditor-content h1{
font-size:30px;
font-weight:700;
margin-top:28px;
margin-bottom:16px;
}

.ckeditor-content h2{
font-size:22px;
font-weight:700;
margin-top:24px;
margin-bottom:16px;
}

.ckeditor-content h3{
font-size:20px;
font-weight:600;
margin-top:22px;
margin-bottom:14px;
}

.ckeditor-content h4{
font-size:18px;
font-weight:600;
margin-top:20px;
margin-bottom:12px;
}

.ckeditor-content h5{
font-size:16px;
font-weight:600;
margin-top:18px;
margin-bottom:10px;
}

.ckeditor-content h6{
font-size:14px;
font-weight:600;
margin-top:16px;
margin-bottom:8px;
}


/* paragraph */

.ckeditor-content p{
line-height:1.7;
margin-bottom:14px;
}


/* list */

.ckeditor-content ul,
.ckeditor-content ol{
padding-left:22px;
margin-bottom:14px;
}

.ckeditor-content li{
margin-bottom:6px;
}


/* image */

.ckeditor-content img{
max-width:100%;
height:auto;
border-radius:8px;
margin:12px 0;
}


/* table */

.ckeditor-content table{
width:100%;
border-collapse:collapse;
margin:16px 0;
}

.ckeditor-content table td,
.ckeditor-content table th{
border:1px solid #e5e7eb;
padding:8px;
}

/* ===== FIX SCROLL MOBILE ===== */
*{
  box-sizing: border-box;
}

html, body{
  overflow-x: hidden;
  max-width: 100%;
}

img{
  max-width:100%;
  height:auto;
}

/* ===== Zalo phone contact ===== */

.contact-zalo{
    position: fixed;
    left: 20px;
    bottom: 120px;
    display: flex;
    align-items: center;
    background: #0068ff;
    color: #fff;
    padding: 8px 14px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    animation: contactRing 1.2s infinite;
}

.contact-zalo img{
    width: 36px;
    height: 36px;
    margin-right: 8px;
}

.contact-zalo span{
    font-size: 16px;
}

@keyframes contactRing{
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.mobile-contact-bar{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: none;
z-index: 9999;
}

.mobile-contact-bar a{
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
padding: 14px 0;
font-size: 16px;
font-weight: 600;
color: #fff;
text-decoration: none;
}

.mobile-call{
background: linear-gradient(45deg,#0f9d58,#1dbf73);
}

.mobile-zalo{
background: linear-gradient(45deg,#0047cc,#0068ff);
}

@media (max-width:768px){

.mobile-contact-bar{
display: flex;
}

.contact-zalo{
display: none;
}

body{
padding-bottom:60px;
}

}