/* Products.css */
.products-tree-section {
    padding: 6rem 0;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-secondary);
}

.tree-container {
    position: relative;
    max-width: 1200px;
    margin: 4rem auto 0;
    min-height: 1200px;
}

/* SVG Container */
.tree-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Product Nodes */
.product-node {
    position: absolute;
    width: 280px;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s var(--ease-out);
    z-index: 10;
    text-align: center;
    border: 3px solid var(--color-accent);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-node:hover {
    transform: scale(1.05);
    z-index: 20;
    box-shadow: 0 20px 50px rgba(1, 101, 47, 0.3);
}

.product-node img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    background: #fff;
}

.product-node h3 {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.product-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Node Positions (Triangle/Pyramid Layout) */

/* Level 1: Top Center Node (Apex) */
/* Top: 20px */
.node-1 {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.node-1:hover {
    transform: translateX(-50%) scale(1.05);
}

/* Level 2: Middle Nodes */
.node-2 {
    top: 400px;
    left: 20%;
}

.node-3 {
    top: 400px;
    right: 20%;
}

/* Level 3: Bottom Nodes */
.node-4 {
    top: 800px;
    left: 5%;
}

.node-5 {
    top: 800px;
    right: 5%;
}

/* Leaves on Branches */
.branch-leaf {
    position: absolute;
    width: 47px;
    /* Reduced by 50% from 80px */
    height: 47px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 5;
    pointer-events: none;
    animation: sway 5s ease-in-out infinite alternate;
}

@keyframes sway {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(15deg);
    }
}

@media (max-width: 1024px) {
    .tree-container {
        display: flex;
        flex-direction: column;
        gap: 4rem;
        align-items: center;
        min-height: auto;
        padding-top: 2rem;
    }

    .tree-svg {
        display: none;
    }

    .product-node,
    .node-1 {
        position: static;
        width: 100%;
        max-width: 450px;
        transform: none !important;
        margin: 0 !important;
    }

    .branch-leaf {
        display: none;
    }
}