/*
 * This file is part of the UX SDC Bundle
 *
 * (c) Jozef Môstka <https://github.com/tito10047/ux-sdc>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/* Styles for Card component */
@layer components {
    .card {
        background: var(--color-bg-surface-glass);
        border: 1px solid var(--color-border-glass);
        border-radius: var(--radius-lg);
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: transform var(--transition-physical), box-shadow var(--transition-physical);
        position: relative;
        cursor: pointer;
        
        &:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: var(--shadow-premium);
            border-color: var(--color-accent-blue);
            
            & .card__glare {
                opacity: 1;
                transform: translateX(200%);
            }
        }
        
        & .card__image-wrapper {
            position: relative;
            aspect-ratio: 3/4;
            width: 100%;
            overflow: hidden;
            background: rgba(0, 0, 0, 0.3);
        }
        
        & .card__image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        
        & .card__image-placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--color-text-main);
            font-size: 0.875rem;
        }
        
        & .card__glare {
            position: absolute;
            top: 0;
            left: -100%;
            width: 50%;
            height: 100%;
            background: linear-gradient(
                to right,
                rgba(255, 255, 255, 0) 0%,
                rgba(255, 255, 255, 0.1) 50%,
                rgba(255, 255, 255, 0) 100%
            );
            transform: skewX(-20deg);
            opacity: 0;
            transition: transform 0.6s ease, opacity 0.6s ease;
            pointer-events: none;
            z-index: 2;
        }
        
        & .card__content {
            padding: var(--space-md);
            display: flex;
            flex-direction: column;
            flex-grow: 1;
            gap: var(--space-sm);
        }
        
        & .card__title {
            font-size: 1.125rem;
            margin: 0;
            line-height: 1.2;
            color: var(--color-text-heading);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        & .card__details {
            display: flex;
            flex-wrap: wrap;
            gap: var(--space-xs);
            margin-bottom: auto;
        }
        
        & .card__detail {
            font-size: 0.75rem;
            background: rgba(255, 255, 255, 0.05);
            padding: 2px 6px;
            border-radius: var(--radius-sm);
            color: var(--color-text-main);
        }
        
        & .card__footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: var(--space-sm);
            padding-top: var(--space-sm);
            border-top: 1px solid var(--color-border-glass);
        }
        
        & .card__price {
            font-family: var(--font-family-heading);
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--color-text-heading);
        }
    }
}