/* Product Derivation Tree - Custom Styles */
/* Version: 1.0.0 */

.tree-node {
    animation: fadeInLeft 0.3s ease-out;
}

.tree-node:hover .flex {
    background: rgba(100, 108, 255, 0.1) !important;
    transition: background 0.2s ease;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#treeView {
    padding: 0;
    overflow: visible;
}

/* Scrollbar Styling */
#treeView::-webkit-scrollbar {
    width: 8px;
}

#treeView::-webkit-scrollbar-track {
    background: rgba(26, 29, 35, 0.5);
    border-radius: 4px;
}

#treeView::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #646cff, #a78bfa);
    border-radius: 4px;
}

#treeView::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c84ff, #b99bfc);
}

/* Product Grid Styles (matching room-history) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding: 16px;
}

/* Product Item Card */
.product-item {
    background: linear-gradient(145deg, rgba(26, 29, 35, 0.6), rgba(18, 21, 26, 0.6));
    border: 1px solid rgba(100, 108, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.product-item:hover {
    transform: translateY(-4px);
    border-color: rgba(100, 108, 255, 0.4);
    box-shadow: 0 12px 48px rgba(100, 108, 255, 0.2);
}

/* Product Image */
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.3);
}

/* Product Name */
.product-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Product Creator */
.product-creator {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Product Price */
.product-price {
    color: #646cff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Button Row */
.button-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.button-row-single {
    display: flex;
    gap: 8px;
}

/* Product Link Buttons */
.product-link {
    flex: 1;
    padding: 8px 12px;
    background: rgba(100, 108, 255, 0.2);
    border: 1px solid rgba(100, 108, 255, 0.4);
    border-radius: 6px;
    color: #a78bfa;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-link:hover {
    background: rgba(100, 108, 255, 0.3);
    color: #ffffff;
    border-color: rgba(100, 108, 255, 0.6);
}

.product-link.hidden-product-btn {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.product-link.hidden-product-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
    border-color: rgba(239, 68, 68, 0.6);
}

.product-link.try-on-btn {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.product-link.try-on-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    color: #ffffff;
    border-color: rgba(16, 185, 129, 0.6);
}

