/* ===== STYLE CHUNG CHO TRANG SẢN PHẨM ===== */
h1 {
    text-align: center;
    margin: 30px 0;
    color: #2c3e50;
    font-size: 2.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 25px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    font-size: 25px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Grid layout cho sản phẩm */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 30px 0;
}

/* Card sản phẩm - Modern Design */
.card.product {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card.product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card.product:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.1);
}

.card.product:hover::before {
    transform: scaleX(1);
}

/* Image container với overlay effect */
.card.product .image-container {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.card.product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card.product:hover img {
    transform: scale(1.1);
}

.card.product .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card.product:hover .image-overlay {
    opacity: 1;
}

/* Category badge */
.card.product .category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

/* Card content */
.card.product .card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card.product h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #2d3748;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card.product p {
    color: #718096;
    font-size: 0.95rem;
    margin: 0 0 15px 0;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price và button */
.card.product .product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.card.product .price {
    color: #e53e3e;
    font-size: 1.4rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card.product .price::before {
    content: '₫';
    font-size: 1rem;
    margin-right: 2px;
}

.card.product .btn {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.card.product .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.card.product .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.card.product .btn:hover::before {
    left: 100%;
}

.card.product .btn i {
    font-size: 0.9rem;
}

/* Loading skeleton với hiệu ứng shimmer */
.card.product .image-container:not(:has(img[src])) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== RESPONSIVE ===== */

/* PC lớn */
@media (min-width: 1000px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* PC rất lớn */
@media (min-width: 1600px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Tablet */
@media (max-width: 768px) {
    h1 {
        font-size: 25px;
        margin: 25px 0;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        padding: 20px 0;
    }
    
    .card.product .image-container {
        height: 200px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    h1 {
        font-size: 25px;
        padding-bottom: 10px;
    }
    
    h1::after {
        width: 80px;
        height: 3px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 15px;
    }
    
    .card.product {
        margin: 0;
        border-radius: 15px;
    }
    
    .card.product .product-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .card.product .btn {
        justify-content: center;
        padding: 12px;
    }
}

/* Màn hình siêu nhỏ */
@media (max-width: 400px) {
    .grid {
        gap: 15px;
    }
    
    .card.product .card-content {
        padding: 15px;
    }
    
    .card.product h3 {
        font-size: 1.2rem;
    }
}

/* ===== TRẠNG THÁI KHÔNG CÓ SẢN PHẨM ===== */
.grid:empty::before {
    content: "🎯 Không có sản phẩm nào";
    display: block;
    text-align: center;
    padding: 80px 20px;
    color: #a0aec0;
    font-size: 1.3rem;
    font-weight: 500;
    grid-column: 1 / -1;
    background: linear-gradient(145deg, #f7fafc, #edf2f7);
    border-radius: 15px;
    margin: 20px 0;
}


.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 15px;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 25px;
}
.btn-hero {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1.1rem;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}
.btn-hero:hover {
  background: linear-gradient(45deg, #764ba2, #667eea);
}

/* Danh mục nổi bật */
.categories {
  text-align: center;
  padding: 50px 20px;
}
.categories h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #2d3748;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 20px;
}
.cat-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  overflow: hidden;
  text-decoration: none;
  color: #2d3748;
  transition: transform 0.3s ease;
}
.cat-card:hover {
  transform: translateY(-5px);
}
.cat-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.cat-card span {
  display: block;
  padding: 12px;
  font-weight: 600;
}

/* Latest product section */
.latest-products {
  padding: 50px 20px;
}
.latest-products h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
  color: #2d3748;
}

.hero {
  position: relative;
  height: 450px; /* chỉnh cao thấp banner */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  /* Ảnh nền */
  background-image: url("https://i.pinimg.com/1200x/0b/2d/f4/0b2df464416fd20f602bd6e91091dcd9.jpg");
  background-size: cover;   /* ảnh phủ hết */
  background-position: center;
  background-repeat: no-repeat;

  /* Tạo lớp phủ mờ */
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); /* lớp mờ */
}

.hero-content {
  position: relative; /* để text nổi lên trên */
  z-index: 1;
}

.hero-content h1{
    color: white;
}
