/* Reset CSS cho các phần tử */
.sfs-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.sfs-countdown-wrapper {
    display: flex;
    align-items: center;
}

.sfs-countdown-label {
    margin-right: 10px;
    font-size: 14px;
}

.sfs-countdown {
    display: flex;
}

.sfs-time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 5px;
}

.sfs-time {
    background-color: #f39c12;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.sfs-time-unit {
    font-size: 12px;
    margin-top: 2px;
    color: #666;
}

.sfs-container {
    margin-bottom: 30px;
}

.sfs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.sfs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sfs-title {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    color: #000;
}

/* Item style */
.sfs-item {
    background-color: #fff;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

/* Hiệu ứng đổi ảnh khi hover */
.sfs-item-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Tỷ lệ 1:1 */
    position: relative;
    overflow: hidden;
	transition: all 0.3s ease;
	position: relative;
}

.sfs-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.sfs-image-main {
    opacity: 1;
}

.sfs-image-hover {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}
.sfs-item:hover .sfs-item-image {
	box-shadow: 0px 0px 6px 0px rgba(50, 50, 93, 0.1), 1px 1px 5px rgba(0, 0, 0, 0.2);
}
.sfs-item:hover .sfs-item-image img {
	transform: scale(0.95);
}

.sfs-item:hover .sfs-image-main {
    opacity: 0;
}

.sfs-item:hover .sfs-image-hover {
    opacity: 1;
}

/* Nếu không có ảnh thứ hai, vẫn áp dụng hiệu ứng scale cho ảnh chính */
.sfs-item:hover .sfs-image-main:only-child {
    opacity: 1;
}

/* Overlay buttons */
.sfs-item-buttons-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
	border-radius: 4px;
	overflow: hidden;
	background: #f5f5f5;
}
.sfs-item-buttons-overlay a {
	margin: 0 !important;
}
.sfs-item:hover .sfs-item-buttons-overlay {
    opacity: 1;
}

.sfs-item-buttons-overlay .button {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #333;
    transition: all 0.3s ease;
	border: none;
	outline: none;
}

.sfs-item-buttons-overlay .button:hover {
    background-color: #f5f5f5;
    color: #c20a01;
}

.sfs-item-buttons-overlay i {
    font-size: 14px;
	margin: 0 !important;
}

/* Item content */
.sfs-item-content {
    padding: 15px 0;
}

.sfs-item-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sfs-item-title a {
    color: #333;
    text-decoration: none;
	font-weight: 600;
	font-size: 17px;
	line-height:.9;
}

.sfs-item-title a:hover {
    opacity: 0.9;
}

.sfs-item-price {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-direction: column;
}

.sfs-item-price-new {
    font-weight: bold;
    color: #d0021b;
    font-size: 16px;
}

.sfs-item-price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

/* Styling cho phần trăm giảm giá */
.sfs-discount-percent {
    color: #e74c3c;
    font-weight: 500;
    margin-left: 15px;
    display: inline-block;
	font-size: 14px;
}

/* Thanh sắp cháy hàng */
.sfs-progress-container {
    margin-top: 15px;
}

.sfs-fire-icon {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.sfs-fire-icon img {
    margin-right: 5px;
    color: #e74c3c;
}

.sfs-progress-bar {
    width: 100%;
    height: 6px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
	margin-top: 8px;
}

.sfs-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #e74c3c, #f39c12);
    border-radius: 10px;
}

/* Nút xem tất cả */
.sfs-view-all {
    display: inline-block;
    padding: 10px 20px;
	border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.sfs-view-all:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.sfs-footer {
	text-align: center;
	margin-top: 10px;
}

/* Flash Sale trong trang chi tiết sản phẩm */
.product-info .product-flashsale {
    margin-bottom: 15px;
    overflow: hidden;
	padding: 10px 0;
}

/* Header với tiêu đề và đồng hồ đếm ngược */
.product-info .flashsale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #FFEFEF;
	border-radius: 4px;
}

.product-info .flashsale-title {
    font-size: 14px;
    font-weight: 700;
    color: #F66566;
}

.product-info .flashsale-timer {
    display: flex;
    align-items: center;
}

.product-info .flashsale-timer-label {
    margin-right: 8px;
    font-size: 14px;
    color: #333;
}

.product-info .sfs-countdown {
    display: flex;
    align-items: center;
    background-color: #000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

.sfs-days, .sfs-hours, .sfs-minutes, .sfs-seconds {
    min-width: 16px;
    text-align: center;
}

.product-info .sfs-divider {
    margin: 0 2px;
}

/* Thanh tiến trình */
.product-info .flashsale-progress {
    padding-top: 10px;
}

.product-info .flashsale-progress-label {
    display: flex;
    align-items: center;
    color: #e74c3c;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.product-info .flashsale-progress-label img {
    margin-right: 5px;
}

.product-info .flashsale-progress-bar {
    width: 100%;
    height: 6px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.product-flashsale .flashsale-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #e74c3c, #f39c12);
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 992px) {
    .sfs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sfs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sfs-header {
        flex-direction: column;
        align-items: center;
    }
    
    .product-info .sfs-countdown-wrapper {
        margin-top: 10px;
    }
	
	.product-info .flashsale-header {
        flex-wrap: wrap;
    }
    
    .product-info .flashsale-timer {
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .sfs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
	
	.product-info .flashsale-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-info .flashsale-timer {
        margin-top: 5px;
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
}


