:root {
  --green-primary: #6ab04c;
  --green-hover: #5a9a3c;
  --text-dark: #333333;
  --text-light: #777777;
  --bg-white: #ffffff;
  --bg-light-gray: #f9f9f9;
  --border-color: #eeeeee;
  --shadow-color: rgba(0, 0, 0, 0.08);
}

/* === THIẾT KẾ & BỐ CỤC MỚI === */
body {
  background-color: var(--bg-white);
  color: var(--text-dark);
  font-family: "Poppins", sans-serif;
  margin: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

header {
  width: 100%;
  background-color: var(--bg-white);
  box-shadow: 0 2px 10px var(--shadow-color);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo img {
  height: 45px;
  margin-right: 10px;
}
.logo span {
  font-weight: 700;
  font-size: 1.8em;
  color: var(--text-dark);
}

.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 40px;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--green-primary);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 25px;
}
.user-actions a {
  color: var(--text-dark);
  font-size: 1.2em;
  text-decoration: none;
}
#cart-icon {
  position: relative;
}
#cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: var(--green-primary);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
}

#mobile-menu-toggle {
  display: none;
}

/* === HERO SECTION === */
.hero {
  padding: 80px 0;
  display: flex;
  align-items: center;
  gap: 60px; /* Increased gap for better spacing */
}
.hero-text {
  flex: 1.5; /* Give text more space */
}
.hero-text h1 {
  font-size: 3.5em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero-text p {
  font-size: 1.1em;
  color: var(--text-light);
  margin-bottom: 30px;
}
.btn-primary {
  background-color: var(--green-primary);
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s;
}
.btn-primary:hover {
  background-color: var(--green-hover);
}

.hero-image {
  flex: 1;
  max-width:300px; /* Set max width for the slideshow container */
  margin: 0 auto;
}
.hero-image img {
  width: 100%; /* Make image fill the container */
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
}

/* === PRODUCTS SECTION === */
.products-section {
  padding: 80px 0;
  background-color: var(--bg-light-gray);
}
.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.section-header h2 {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 10px;
}
.section-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.product-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 20px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.product-card .product-image-wrapper {
  width: 150px;
  height: 150px;
  margin: 0 auto 20px auto;
  border-radius: 50%;
  overflow: hidden;
}
.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card h3 {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
}
.product-card .rating {
  color: #f39c12;
  margin-bottom: 15px;
}
.product-card .description {
  color: var(--text-light);
  font-size: 0.9em;
  margin-bottom: 20px;
  flex-grow: 1;
}
.product-card .price {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--green-primary);
  margin-bottom: 20px;
}

/* === FOOTER SECTION === */
footer {
  background-color: var(--bg-white);
  padding-top: 60px;
  color: var(--text-light);
  border-top: 1px solid var(--border-color);
}
.footer-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding-bottom: 40px;
}
.footer-column h4 {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 20px;
}
.footer-column p {
  line-height: 1.8;
  font-size: 0.9em;
}
.footer-column.contact p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.footer-column.contact i {
  margin-top: 5px;
  color: var(--green-primary);
}
.footer-column.links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-column.links li {
  margin-bottom: 10px;
}
.footer-column.links a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-column.links a:hover {
  color: var(--green-primary);
}
.social-links {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}
.social-links a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--border-color);
  color: var(--text-light);
  transition: all 0.3s;
}
.social-links a:hover {
  background-color: var(--green-primary);
  color: white;
}
.footer-bottom {
  text-align: center;
  padding: 20px 0;
  background-color: var(--bg-light-gray);
  font-size: 0.9em;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-image {
    margin-top: 40px;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 75px;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    padding: 20px 0;
    box-shadow: 0 5px 15px var(--shadow-color);
  }
  .nav-links.active {
    display: flex;
  }
  #mobile-menu-toggle {
    display: block;
    font-size: 1.5em;
    cursor: pointer;
  }
  .user-actions {
    gap: 15px;
  }

  .hero-text h1 {
    font-size: 2.8em;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .product-card {
    max-width: 350px;
    margin: 0 auto;
  }
  .footer-main {
    text-align: center;
  }
  .footer-column.contact p {
    justify-content: center;
  }
  .social-links {
    justify-content: center;
  }
}

/* === FLOATING CONTACT BUBBLES === */
.floating-contact {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phone-bubble {
  background-color: #e74c3c;
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
}
.phone-bubble i {
  font-size: 1.1em;
}
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
/* Thêm nội dung giả để có thể cuộn trang */
body {
  height: 2000px;
  font-family: Arial, sans-serif;
  padding: 20px;
}

/* Container chính, cố định ở góc dưới bên phải */
.chat-bubbles-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  display: flex;
  flex-direction: column; /* Xếp các bong bóng theo chiều dọc */
  align-items: flex-start; /* Căn lề phải */
  gap: 15px; /* Khoảng cách giữa các bong bóng */
  z-index: 1000;
}

/* Kiểu dáng của bong bóng liên hệ */
.bubble {
  display: flex;
  align-items: center;
  width: auto;
  height: 55px;
  background-color: white;
  border: 2px solid #0068ff;
  border-radius: 40px; /* Bo tròn tạo hình viên thuốc */
  padding: 0 20px 0 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Hiệu ứng khi di chuột vào */
.bubble:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.bubble img {
  width: 32px;
  height: 32px;
  margin-right: 12px;
}

.phone-number {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}
/* Thêm nội dung giả để có thể cuộn trang */
body {
  height: 2000px;
  font-family: Arial, sans-serif;
  padding: 20px;
}

/* --- CÀI ĐẶT CHUNG --- */
body {
  /* Thêm nội dung giả để có thể cuộn trang trên mobile */
  min-height: 150vh;
  font-family: sans-serif;
}

/* --- PHONG CÁCH CHO MOBILE (MẶC ĐỊNH) --- */
/* Video sẽ nằm ở cuối trang theo mặc định */
.video-bubble-container {
  width: 95%; /* Chiếm gần hết chiều rộng màn hình mobile */
  max-width: 600px; /* Giới hạn chiều rộng tối đa */
  margin: 30px auto; /* Căn giữa và tạo khoảng cách */
  border: 1px solid #ddd;
  border-radius: 10px;
  background-color: #f9f9f9;
  overflow: hidden; /* Ẩn các góc của iframe bị thừa ra ngoài */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.video-title {
  font-size: 1.1em;
  font-weight: bold;
  padding: 10px;
  text-align: center;
  background-color: #f1f1f1;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* Tỷ lệ 16:9 */
  height: 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- PHONG CÁCH CHO PC (MÀN HÌNH RỘNG HƠN 768px) --- */
/* Sử dụng media query để áp dụng các style này chỉ cho màn hình rộng */
@media (min-width: 768px) {
  .video-bubble-container {
    /* Biến div thành bong bóng nổi */
    position: fixed; /* Cố định vị trí trên màn hình */
    bottom: 20px; /* Cách lề dưới 20px */
    left: 20px; /* Cách lề trái 20px */
    width: 350px; /* Đặt chiều rộng cố định cho bong bóng */
    max-width: none; /* Bỏ giới hạn chiều rộng tối đa */
    z-index: 1000; /* Đảm bảo bong bóng luôn nổi lên trên */
    border: 2px solid #007bff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  }

  .video-title {
    font-size: 0.9em;
    background-color: #007bff;
    color: white;
  }
}

#cart-icon {
  font-size: 2rem;
  cursor: pointer;
  position: relative;
  color: #333;
}

#cart-count {
  position: absolute;
  top: -10px;
  right: -15px;
  background-color: #ff6347;
  color: white;
  border-radius: 50%;
  padding: 0.2em 0.5em;
  font-size: 0.8rem;
  font-weight: bold;
}

/* --- CSS TÙY CHỈNH CHO POPUP --- */
.ui-dialog {
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  padding: 0;
}

.ui-dialog .ui-dialog-titlebar {
  background: linear-gradient(135deg, #0068ff 0%, #00c6ff 100%);
  color: #ffffff;
  border: none;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  padding: 15px 20px;
}

.ui-dialog .ui-dialog-titlebar-close {
  border: none;
  background: transparent;
  color: #fff;
}

.ui-dialog .ui-dialog-content {
  padding: 20px 30px;
  text-align: center;
}

.ui-dialog .ui-dialog-buttonpane .ui-button {
  background: #0068ff;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 25px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.ui-dialog .ui-dialog-buttonpane .ui-button:hover {
  background: #0052cc;
}