
/* ===== BANNER ===== */
.bannertop {
    background: linear-gradient(90deg, #fd8a06, #fd8801);
    
    color: white;
    text-align: center;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border-radius: 12px;
    margin: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.bannertop h1 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.bannertop p {
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    line-height: 1.4;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    column-gap:5px;
    row-gap: 10px; /* tăng khoảng cách trên-dưới */
    padding: 5px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 2px;
    display: flex;
    flex-direction: column;
   
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
   
}


.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 300px; /* hoặc 180px, tuỳ giao diện */
    object-fit: cover;
    border-radius: 8px;
}


.product-card ul.product-info {
    list-style: none;
    padding-left: 0;
    margin: 0 0 10px;
    font-size: 13px;
    color: #666;
    text-align: left;
}

.product-card ul.product-info li {
    margin-bottom: 3px;
}

/* xử lí overlay nút chi tiết lên hình */
.image-container {
    position: relative;
    aspect-ratio: 1/1; /* hoặc 1/1 nếu muốn hình vuông */
    overflow: hidden;
    border-radius: 8px;
}
.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-toggle-button {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10; /* cao hơn text */
    background: rgba(255, 255, 255, 0.85); /* hơi trong suốt */
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}
.detail-toggle-button:hover {
    background: rgba(255, 255, 255, 1);
}

.product-detail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Bỏ background nền mờ toàn phần đi */
    color: #FFD700;
    padding: 10px 15px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 0.7rem;
    line-height: 1.4;
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
    z-index: 5;
    box-sizing: border-box;
    display: none;
}
.product-detail-overlay ul li {
  background: rgba(0, 0, 0, 0.7); /* nền đen mờ */
  padding: 3px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  display: inline-block; /* để nền vừa ô text */
  color: #FFD700; /* chữ vàng */
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
}


.product-detail-overlay ul li {
    margin-bottom: 6px;
}

/*PRICE CONTAINER*/
.price-container{
    display: flex;
    justify-content: space-between;
    margin:5px;
}



/* ===== COUNTDOWN ===== */
.countdown {
    font-size: 14px;
    font-weight: bold;
    color: #d9534f; /* đỏ nhạt */
    background-color: #fff4f4;
    padding: 4px 10px;
    border-radius: 6px;
    margin: 5px;
    border: 1px solid #f5c6cb;
    font-family: 'Segoe UI', sans-serif;
    display:flex;
    justify-content: center;
}

.countdown.expired {
    background: #eee;
    color: #999;
    border-color: #ccc;
}



/* ===== BUTTON ===== */
.product-card .btn-buy {
    background-color: #000;
    color: white;
   
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
   
}

.product-card .btn-buy:hover {
    background-color: #333;
}
@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bannertop {
        padding: 25px 15px;
        margin: 10px;
    }

    .bannertop h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .bannertop p {
        font-size: 1rem;
    }

    .product-detail-overlay {
        font-size: 0.65rem !important;
        padding: 6px 6px !important;
        line-height: 1.2;
        max-height: 100px;
        overflow-y: auto;
        background-color: rgba(0, 0, 0, 0.6); /* Có thể điều chỉnh hoặc bỏ */
        border-radius: 4px;
    }

    .product-detail-overlay ul li {
        padding: 2px 4px;
        margin-bottom: 2px;
        font-size: 0.6rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .detail-toggle-button {
        font-size: 0.65rem;
        padding: 4px 6px;
        top: 6px;
        left: 6px;
    }
}
