/* ============================================
   INDEX PAGE CUSTOM STYLES
   ============================================ */

/* Product Rating */
.prodRating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars {
    font-size: 22px;
    letter-spacing: 1px;
    background: linear-gradient(
        90deg,
        #f5a623 96%,
        #ddd 96%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ratingValue {
    font-size: 14px;
    color: #555;
}

/* ============================================
   CATEGORY SECTION STYLES
   ============================================ */

/* --- Khung tổng thể danh mục --- */
.shopByCategoryContainer {
  padding: 30px 20px;
  background-color: #fff;
  font-family: Arial, sans-serif;
}

.shopByCategoryWrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.categorySectionTitle {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  color: #333;
}

/* --- Chia lưới (Grid) cho các danh mục --- */
.categoryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 20px;
  justify-content: center;
}

/* --- Style cho từng item danh mục --- */
.categoryItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s ease;
}

.categoryItem:hover {
  transform: translateY(-4px);
}

/* --- Ô vuông chứa icon/ảnh --- */
.categoryImgBox {
  width: 100px;
  height: 100px;
  background-color: #f7f9fa;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eef0f2;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Hiệu ứng khi rê chuột vào ô vuông */
.categoryItem:hover .categoryImgBox {
  background-color: #fff;
  border-color: #0066cc;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

/* --- Định dạng ảnh bên trong ô vuông --- */
.categoryImgBox img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Hiệu ứng phóng to nhẹ ảnh khi hover */
.categoryItem:hover .categoryImgBox img {
  transform: scale(1.08);
}

/* --- Chữ tên danh mục --- */
.categoryItem span {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: #444;
  transition: color 0.2s ease;
}

.categoryItem:hover span {
  color: #0066cc;
  font-weight: 600;
}

/* ============================================
   PROMO CARD STYLES (darkTheme)
   ============================================ */

/* Card darkTheme - nội dung đè lên ảnh */
.promoCard.mediumCard.darkTheme {
    position: relative;
    overflow: hidden;
}

/* Ảnh làm nền full card */
.promoCard.mediumCard.darkTheme .cardImageContainer {
    position: absolute;
    inset: 0;
    margin: 0 !important;
    z-index: 1;
}

.promoCard.mediumCard.darkTheme .cardImageContainer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Nội dung đè lên ảnh - căn giữa chiều dọc + căn trái */
.promoCard.mediumCard.darkTheme .cardLeftText {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    padding: 24px 28px;
    text-align: left;
    color: #fff;
    text-decoration: none;

    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.4) 55%,
        transparent 100%
    );
}

/* Title */
.promoCard.mediumCard.darkTheme .cardLeftText h3 {
    margin: 0 0 14px;
    text-align: left;
    color: #fff;
    line-height: 1.3;
}

/* Nút Xem chi tiết */
.promoCard.mediumCard.darkTheme .cardLeftText .btnWhiteOutline {
    margin: 0 0 12px;
    align-self: flex-start;
}

/* Mô tả */
.promoCard.mediumCard.darkTheme .cardLeftText p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
    max-width: 85%;
}

.cardHeader span {
    color: #000;
}

.cardHeader {
    z-index: 999;
}

/* ============================================
   FEATURED TECH SECTION
   ============================================ */

.featured-tech {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: #111;
}

/* Grid 2 cột */
.promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Card chung */
.promo-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px 28px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ===== CARD TRÁI (sáng) ===== */
.light-card {
    background: linear-gradient(135deg, #e8f4ff 0%, #d6e9ff 40%, #a8c8f0 100%);
    color: #111;
}

.light-card .card-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.25;
}

.light-card .card-content p {
    font-size: 1rem;
    margin: 0 0 20px;
    opacity: 0.85;
}

.light-card .btn-primary {
    display: inline-block;
    background: #1a73e8;
    color: white;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.light-card .btn-primary:hover {
    background: #1557b0;
}

/* ===== CARD PHẢI (tối) ===== */
.dark-card {
    background: linear-gradient(135deg, #0a3d8f 0%, #0d5bb8 50%, #1a7ad9 100%);
    color: white;
}

.dark-card .badge {
    display: inline-block;
    color: #ffd700;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.dark-card .card-content h3 {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 18px;
    line-height: 1.3;
    max-width: 90%;
}

.dark-card .btn-white {
    display: inline-block;
    background: white;
    color: #0a3d8f;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.dark-card .btn-white:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.dark-card .terms {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 16px;
}

/* Ảnh sản phẩm */
.card-image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 55%;
    height: 70%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Sponsored */
.sponsored {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.45);
    font-weight: 500;
}

.dark-card .sponsored {
    color: rgba(255, 255, 255, 0.55);
}

/* Responsive */
@media (max-width: 768px) {
    .promo-grid {
        grid-template-columns: 1fr;
    }

    .promo-card {
        min-height: 300px;
    }
}
