.product-card {
    border: 1px solid var(--border-light);
    background: var(--white);
    padding: 10px;
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s;
}

.product-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    border-color: var(--accent);
}

.product-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.product-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .3s ease;
}

.product-thumb .img-hover {
    opacity: 0;
}

.product-card:hover .product-thumb .img-hover {
    opacity: 1;
}

.product-card:hover .product-thumb .img-primary {
    opacity: 0;
}

/* Badge giảm giá */
.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--warning-coral);
    color: var(--white);
    font-weight: 600;
    font-size: .7rem;
    padding: 3px 5px;
    border-radius: 2px;
}

/* Wishlist / compare (nếu muốn) – có thể ẩn nếu không dùng */
.corner-icons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
}

.corner-icons .ic {
    width: 28px;
    height: 28px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: .2s;
}

.corner-icons .ic:hover {
    color: var(--text-primary);
}

.product-info {
    padding: 8px 2px 8px;
    margin-top: 12px;
}

.product-title, .product-title a {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 6px 0;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.product-title a {
    text-decoration: none;
    transition: color 0.2s ease;
}
.product-title a:hover {
    color: var(--accent);
}

.rating {
    color: var(--accent-gold);
    font-size: .8rem;
}

.price {
    margin-top: 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    text-align: center;
}

.price .sale {
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
}

.price .base {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: .85rem;
    font-weight: 500;
}

/* Actions luôn hiển thị ở cuối card */
.product-actions {
    padding: 8px;
    display: flex;
    gap: 6px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
    background: var(--surface);
}

/* Update button styles for smaller size */
.product-actions .btn {
    font-size: 0.75rem;
    padding: 6px 8px;
    font-weight: 600;
    border-radius: 2px;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.product-actions .btn:first-child {
    flex: 0 0 36px;
    padding: 6px;
}

.product-actions .btn:last-child {
    flex: 1;
}

.product-actions .btn-outline-primary {
    background: var(--white);
    border: 1px solid var(--border-light) !important;
    color: var(--text-secondary);
}

.product-actions .btn-outline-primary:hover {
    border-color: var(--accent) !important;
    color: var(--accent);
    background: var(--surface);
}

.product-actions .btn-primary {
    background: var(--accent);
    color: var(--white);
}

.product-actions .btn-primary:hover {
    background: var(--accent-hover);
}

.product-actions .btn-warning {
    background: var(--accent-gold);
    color: var(--white);
    flex: 1;
    font-weight: 600;
}

.product-actions .btn-warning:hover {
    background: var(--accent-gold-dark);
}

.product-actions .contact-btn {
    width: 100%;
    justify-content: center;
}

.product-actions .btn-success {
    background: var(--success);
    color: var(--white);
}

/* Legacy button classes for backward compatibility */
.btn-outline {
    flex: 0 0 36px;
    border: 1px solid var(--border-light);
    background: var(--white);
    color: var(--text-primary);
    border-radius: 2px;
    padding: 5px;
    font-weight: 600;
    font-size: .7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-accent {
    flex: 1;
    background: var(--accent);
    color: var(--white);
    border: 1px solid var(--accent);
    border-radius: 2px;
    padding: 5px 6px;
    font-weight: 600;
    font-size: .7rem;
    transition: .2s;
}

.btn-accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Product Contact Modal Styles */
.product-contact-modal {
    border: none;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.product-contact-modal .modal-header {
    background: var(--accent);
    color: white;
    padding: 1.25rem;
}

.product-contact-modal .modal-title {
    font-size: 1.125rem;
    margin: 0;
}

.product-contact-modal .btn-close-white {
    filter: invert(1);
    opacity: 0.8;
}

.product-contact-modal .btn-close-white:hover {
    opacity: 1;
}

/* Fix Bootstrap 5.3 modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.product-contact-modal .modal-body {
    padding: 1.5rem;
    background: var(--surface);
}

.product-info-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 1rem;
}

.product-thumb-small {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--border-light);
}

.product-name {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.product-contact-form .form-control {
    border-radius: 3px;
    border: 1px solid var(--border-light);
    background: var(--white);
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.product-contact-form .form-control:focus {
    border-color: var(--accent);
    background: var(--white);
    outline: none;
}

.product-contact-form .form-control::placeholder {
    color: var(--text-secondary);
}

.product-contact-form .invalid-feedback {
    color: var(--accent);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.product-contact-modal .modal-footer {
    background: var(--white);
    padding: 1.25rem 1.5rem;
}

.submit-product-contact {
    min-width: 120px;
    border-radius: 3px;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    background: var(--accent);
    border: none;
    transition: all 0.2s ease;
}

.submit-product-contact:hover {
    background: var(--accent-hover);
}

@media (max-width: 768px) {
    .product-contact-modal .modal-body {
        padding: 1.25rem;
    }

    .product-contact-modal .modal-footer {
        padding: 1.25rem;
    }

    .product-thumb-small {
        width: 56px;
        height: 56px;
    }

    .product-actions .btn {
        display: block;
    }
}

@media (min-width: 992px) {
    .product-title {
        min-height: 65px;
    }
}
