/* CSS cho trang sản phẩm */

/* Product Card Styles */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.product-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-overlay .btn {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.product-card:hover .product-overlay .btn {
    transform: translateY(0);
}

.product-attribute {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Product title styles moved to inline CSS in blade files */
.product-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: color 0.2s ease;
    position: relative;
    display: block;
    max-height: 2.4em;
}

.product-card:hover .product-title {
    color: var(--primary-pink);
}

.product-price {
    font-weight: 700;
    color: var(
        --accent-color
    ) !important; /* Sử dụng biến màu phụ cho giá sản phẩm */
}

.product-arrow {
    color: #aaa;
    transition: color 0.2s ease;
}

.product-card:hover .product-arrow {
    color: var(--primary-color);
}

/* Responsive adjustments for products */
@media (max-width: 767px) {
    .product-img-container {
        aspect-ratio: 3/2;
    }

    .product-title {
        font-size: 0.8rem;
    }

    .product-price {
        font-size: 0.9rem;
    }
}

/* Product Detail Page */
.main-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 1/1;
}

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

.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.thumbnail-item {
    width: 60px;
    height: 60px;
    border-radius: 0.25rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnail-item:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.thumbnail-item.active {
    border-color: var(--primary-color);
}

/* Price styling in product detail */
.fs-3.fw-bold.text-pink {
    color: var(
        --accent-color
    ) !important; /* Sử dụng biến màu phụ cho giá sản phẩm */
}
