/* ============================================================
   produc3d.ro — components.css
   Product cards, tech tags, badges (glass refresh)
   ============================================================ */

/* ===== PRODUCT CARD — Modern, compact, professional ===== */
.product-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    position: relative;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.22s;
}
.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.20);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05),
                0 12px 28px -10px rgba(37, 99, 235, 0.20);
}
.product-card-link { display: block; text-decoration: none; color: inherit; }

/* Image — more compact ratio */
.product-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
}
.product-card-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover .product-card-image img { transform: scale(1.035); }
.product-card-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    gap: 0.4rem;
    position: relative;
}
.product-card-placeholder::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.12) 0, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(0,0,0,0.10) 0, transparent 50%);
    pointer-events: none;
}
.product-card-placeholder svg {
    width: 30px; height: 30px;
    opacity: 0.55;
    position: relative;
}
.product-card-placeholder-text {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
    position: relative;
}

/* Overlay — slides up on hover */
.product-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.65));
    display: flex; align-items: flex-end; justify-content: center;
    gap: 0.5rem;
    padding: 0 0.85rem 0.85rem;
    opacity: 0;
    transition: opacity 0.22s ease;
}
.product-card:hover .product-card-overlay { opacity: 1; }
.product-card-cta {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    padding: 6px 11px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.product-card-demo {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 11px;
    border-radius: 7px;
    background: #2563eb;
    border: 0;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}
.product-card-demo:hover { background: #1d4ed8; transform: translateY(-1px); }

/* Badge */
.product-badge {
    position: absolute; top: 10px; left: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.22s ease;
}
.product-card:hover .product-badge { transform: scale(1.04); }
.product-badge--new     { background: rgba(37, 99, 235, 0.95);  color: #fff; }
.product-badge--popular { background: rgba(245, 158, 11, 0.95); color: #fff; }
.product-badge--sale    { background: rgba(239, 68, 68, 0.95);  color: #fff; }

/* Body */
.product-card-body {
    padding: 0.75rem 0.95rem 0.85rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.product-card-meta { margin: 0; line-height: 1; }

.product-card-category {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin: 0;
    transition: color 0.18s ease;
}
.product-card:hover .product-card-category { color: #2563eb; }

.product-card-title {
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin: 0 0 0.05rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.18s ease;
}
.product-card:hover .product-card-title { color: #2563eb; }

.product-card-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 0.55rem;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    margin-top: auto;
}
.product-price { display: flex; align-items: baseline; gap: 0.4rem; }
.product-price-old {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.72rem;
}
.product-price-current {
    font-family: var(--font-display, inherit);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.012em;
    color: #059669;
}

.product-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.04);
    color: #64748b;
    transition: background 0.18s, color 0.18s, transform 0.18s;
}
.product-card-arrow svg { width: 14px; height: 14px; }
.product-card:hover .product-card-arrow {
    background: rgba(37, 99, 235, 0.10);
    color: #2563eb;
    transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-card-image img,
    .product-card-overlay .btn,
    .product-card-details,
    .product-card-details .product-card-desc,
    .product-card-details .product-card-tech,
    .product-card-details .product-card-footer,
    .product-card-title {
        transition-duration: 0.01s !important;
        transition-delay: 0s !important;
    }
}

/* ===== TECH TAGS ===== */
.tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    background: color-mix(in srgb, var(--tag-color, var(--color-primary)) 8%, transparent);
    color: color-mix(in srgb, var(--tag-color, var(--color-primary)) 78%, #000);
    border: 1px solid color-mix(in srgb, var(--tag-color, var(--color-primary)) 16%, transparent);
}
.tech-tag--lg { padding: 0.4rem 0.9rem; font-size: 0.82rem; border-radius: 99px; }
.tech-tag--more {
    background: rgba(15, 23, 42, 0.04);
    color: #64748b;
    border-color: rgba(15, 23, 42, 0.08);
}

/* ===== BADGES ===== */
.badge-sm {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(37, 99, 235,0.08);
    color: var(--text-secondary);
}
.badge--new     { background: rgba(37, 99, 235,0.12); color: var(--color-primary); }
.badge--popular { background: rgba(96, 165, 250,0.14); color: var(--color-primary-dark); }
.badge--sale    { background: rgba(239,68,68,0.12);  color: #dc2626; }

.status-badge {
    display: inline-block;
    padding: 0.22rem 0.65rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
}
.status--active   { background: rgba(16,185,129,0.12); color: #047857; }
.status--draft    { background: rgba(255,193,7,0.14);  color: #b45309; }
.status--sold     { background: rgba(96, 165, 250,0.14); color: var(--color-primary-dark); }
.status--archived { background: rgba(108,117,125,0.12); color: #475569; }
.status--unread   { background: rgba(37, 99, 235,0.12); color: var(--color-primary); }
.status--read     { background: rgba(108,117,125,0.1);  color: #64748b; }
.status--resolved { background: rgba(16,185,129,0.12); color: #047857; }
/* ============================================================
   products-grid--compact (view "Toate") — minimalist hover-reveal
   ============================================================ */

/* Grid denser for compact mode */
.products-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Card slim body + hover reveal */
.products-grid--compact .product-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.products-grid--compact .product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 18px 36px -12px rgba(37, 99, 235, 0.22);
}

/* Taller image, square-ish for visual attention */
.products-grid--compact .product-card-image {
    aspect-ratio: 4/3;
}

/* Body: only category + title visible, rest hidden */
.products-grid--compact .product-card-body {
    padding: 0.75rem 0.9rem;
    gap: 0.25rem;
    min-height: auto;
}

/* Hide by default: description, tech tags, price-old, arrow */
.products-grid--compact .product-card-desc,
.products-grid--compact .product-card-tech,
.products-grid--compact .product-card-arrow,
.products-grid--compact .product-price-old {
    display: none;
}

/* Title slightly smaller but still strong */
.products-grid--compact .product-card-title {
    font-size: 0.88rem;
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

/* Category label subtle */
.products-grid--compact .product-card-category {
    font-size: 0.55rem;
    letter-spacing: 0.1em;
}

/* Price: compact inline */
.products-grid--compact .product-card-footer {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    justify-content: flex-start;
}
.products-grid--compact .product-price-current {
    font-size: 0.92rem;
    font-weight: 700;
}

/* Meta row stays compact */
.products-grid--compact .product-card-meta { margin: 0; }

/* On hover: reveal description + tech tags with smooth slide */
.products-grid--compact .product-card:hover .product-card-desc,
.products-grid--compact .product-card:hover .product-card-tech {
    display: block;
    animation: compactReveal 0.3s ease;
}
.products-grid--compact .product-card:hover .product-card-tech {
    display: flex;
}
.products-grid--compact .product-card:hover .product-card-arrow {
    display: inline-flex;
}
.products-grid--compact .product-card:hover .product-card-footer {
    justify-content: space-between;
}

@keyframes compactReveal {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Overlay on image — subtle hint always, stronger on hover */
.products-grid--compact .product-card-overlay {
    background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.6) 100%);
    opacity: 0;
}
.products-grid--compact .product-card:hover .product-card-overlay { opacity: 1; }

/* Hide demo button + CTA text on compact view — image gets cleaner */
.products-grid--compact .product-card-demo,
.products-grid--compact .product-card-cta {
    display: none;
}

/* Badge smaller */
.products-grid--compact .product-badge {
    padding: 0.22rem 0.5rem;
    font-size: 0.55rem;
    top: 8px;
    left: 8px;
}

/* Mobile: keep compact view functional */
@media (max-width: 540px) {
    .products-grid--compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .products-grid--compact .product-card-title { font-size: 0.82rem; }
    /* On mobile, always show desc+tech (no hover) */
    .products-grid--compact .product-card-desc,
    .products-grid--compact .product-card-tech {
        display: block;
    }
    .products-grid--compact .product-card-tech { display: flex; }
}
