/* ================================
   🎨 Biến màu chủ đạo & Reset
================================ */
:root {
  --blue-light: #87ceeb;
  --dark-green-black: #0d1b1e;
  --text-light: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Open Sans", sans-serif; }

/* ================================
   ⚙️ Container & Flex utilities
================================ */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ================================
   🏠 Header
================================ */
.site-header {
  background: var(--dark-green-black);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--blue-light);
}
.logo span { color: var(--text-light); }

.menu {
  list-style: none;
  display: flex;
  gap: 20px;
}
.menu a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text-light);
  transition: color 0.3s;
}
.menu a:hover { color: var(--blue-light); }

.menu-toggle {
  display: none;
  font-size: 22px;
  background: var(--blue-light);
  color: var(--dark-green-black);
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* Responsive menu */
@media (max-width: 768px) {
  .menu {
    display: none;
    flex-direction: column;
    background: var(--dark-green-black);
    position: absolute;
    top: 60px;
    right: 20px;
    padding: 15px;
    border-radius: 6px;
  }
  .menu.show { display: flex; }
  .menu-toggle { display: inline-block; }
}

/* ================================
   🌄 Hero
================================ */
.hero {
  width: 100%;
  overflow: hidden;
  margin-bottom: 10px;
}
.hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.hero-text {
  background: #f9f9f9;
  padding: 40px 20px;
  text-align: center;
}
.hero-text h1 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}
.hero-text h1::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  background: #ff6600;
  margin: 10px auto 0;
}
.hero-text p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 25px;
}
.sub-tagline {
  display: block;
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 25px;
}
.btn-cta {
  display: inline-block;
  background: var(--dark-green-black);
  color: var(--text-light) !important;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
}
.btn-cta:hover {
  background: #000;
  transform: translateY(-2px);
}

/* Responsive Hero */
@media (min-width: 993px) {
  .hero-text h1 { font-size: 3.7rem; }
  .hero-text p { font-size: 1.6rem; }
  .sub-tagline { font-size: 1.2rem; }
  .btn-cta { font-size: 1rem; padding: 15px 28px; }
}
@media (max-width: 992px) {
  .hero-text h1 { font-size: 1.8rem; }
  .hero-text p { font-size: 1rem; }
  .sub-tagline { font-size: 0.85rem; }
  .btn-cta { font-size: 0.95rem; padding: 10px 24px; }
}
@media (max-width: 600px) {
  .hero-text h1 { font-size: 1.8rem; }
  .hero-text p { font-size: 1.1rem; }
  .sub-tagline { font-size: 0.9rem; }
  .btn-cta { font-size: 1rem; padding: 10px 20px; }
}

/* ================================
   🏆 Bestseller Slider
================================ */
.bestseller {
  position: relative;
  padding: 15px;
  text-align: center;
  margin: 10px auto;
  width: calc(100% - 30px);
  max-width: 1200px;
  background: #e6e6e6;
  border-radius: 20px;
  z-index: 1;
}
.bestseller h2 {
  margin-bottom: 25px;
  font-size: 1.8rem;
  color: #ff5722;
}
.slider {
  display: flex;
  gap: 15px;
  overflow: hidden;
}

/* Card sản phẩm */
.slide {
  flex: 0 0 auto;
  width: 200px;   /* desktop */
  height: 320px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: space-between;
  box-sizing: border-box;
}
.product-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rating {
  margin-top: 8px;
  font-weight: bold;
  color: #ff9800;
  font-size: 0.85rem;
}
.slide h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 6px 0;
  color: #333;
  line-height: 1.3;
  min-height: 38px;
}
.btn-buy {
  display: inline-flex;        /* hiển thị theo flex, nằm cùng hàng */
  align-items: center;         /* căn giữa icon và chữ theo chiều dọc */
  justify-content: center;
  gap: 6px;                    /* khoảng cách icon và chữ */

  width: 100%;
  max-width: 160px;
  margin: 8px auto 0;
  padding: 8px 12px;
  background: #ff5722;
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-buy:hover {
  background: #e64a19;
}

.icon-shopee {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;   /* đảm bảo icon thẳng hàng */
}




/* Responsive */
@media (max-width: 992px) {
  .slide { width: 160px; height: 260px; }
}
@media (max-width: 600px) {
  .slide { width: 160px; height: 230px; }
  .slide h3 { font-size: 0.8rem; min-height: 32px; }
  .btn-buy { font-size: 0.75rem; padding: 5px 10px; }
}

/* ================================
   🗂 Category Slider
================================ */
.category-slider {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 15px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--dark-green-black) #e0e0e0;
  user-select: none;
}
.category-item {
  flex: 0 0 auto;
  width: 90px;
  text-align: center;
  scroll-snap-align: start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cat-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ccc;
  border-radius: 10px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cat-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.category-item p {
  font-size: 0.85rem;
  color: #333;
  margin-top: 4px;
}

/* Scrollbar style */
.category-slider::-webkit-scrollbar { height: 6px; }
.category-slider::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 4px;
}
.category-slider::-webkit-scrollbar-thumb {
  background: var(--dark-green-black);
  border-radius: 4px;
}
.category-slider::-webkit-scrollbar-thumb:hover { background: #000; }
@media (min-width: 993px) {
  .category-slider { cursor: default; overflow-x: visible; }
  .category-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  }
}
.category-item {
  display: block;
  text-decoration: none;   /* bỏ gạch chân */
  color: inherit;          /* giữ màu chữ như cũ */
}

.category-item:hover p {
  color: var(--blue-light); /* khi hover đổi màu chữ */
}

/* ================================
   📄 Content Layout
================================ */
.content {
  display: flex;
  gap: 30px;
  margin: 40px auto;
}
.main-column { flex: 0 0 70%; }
.sidebar { flex: 0 0 30%; }
.sidebar-box {
  background: #f9f9f9;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.sidebar-box h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  color: #ff5722;
}
.sidebar-box ul { list-style: none; }
.sidebar-box li { margin-bottom: 8px; }
.sidebar-box a {
  text-decoration: none;
  color: var(--dark-green-black);
  transition: color 0.3s;
}
.sidebar-box a:hover { color: var(--blue-light); }
@media (max-width: 992px) {
  .content { flex-direction: column; }
  .main-column, .sidebar { flex: 0 0 100%; }
}

/* ================================
   📰 Post Cards
================================ */
.post-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #fff;
  margin-bottom: 25px;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.thumb {
  flex: 0 0 30%;
  max-width: 150px;
  aspect-ratio: 4/3;
  border-radius: 8px;
  background: #ccc;
}
.post-content { flex: 1; }
.post-content h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--dark-green-black);
}
.post-content p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 12px;
}
.read-more {
  display: inline-block;
  color: var(--blue-light);
  font-weight: 600;
  text-decoration: none;
}
.read-more:hover { text-decoration: underline; }
@media (max-width: 768px) {
  .main-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .post-card {
    flex-direction: column;
    padding: 10px;
  }
  .thumb {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
  }
  .post-content h2 { font-size: 1rem; }
  .post-content p { display: none; }
}
