/* ==========================================================================
   YCH Custom Sidebar Widgets Styling
   ========================================================================== */

/* 1. YCH Modern Latest Products Widget */
.ych-widget-latest-products-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.ych-widget-latest-product-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px dashed #e5e5e5;
    transition: all 0.3s ease;
}

.ych-widget-latest-product-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ych-widget-product-thumb-link {
    flex-shrink: 0;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #eeeeee;
    width: 60px;
    height: 60px;
    position: relative;
}

.ych-widget-product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Thumbnail Zoom Hover Animation */
.ych-widget-latest-product-item:hover .ych-widget-product-thumb {
    transform: scale(1.1);
}

.ych-widget-product-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.ych-widget-product-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #888888;
    letter-spacing: 0.8px;
}

.ych-widget-product-title {
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

.ych-widget-product-title a {
    color: #333e48 !important; /* Electro text color */
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.ych-widget-product-title a:hover {
    color: #0062bd !important; /* Electro link hover blue */
}

.ych-widget-product-view-btn {
    font-size: 11px;
    font-weight: 700;
    color: #fed700; /* Electro yellow brand accent */
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-top: 2px;
    display: inline-block;
    transition: all 0.25s ease;
}

.ych-widget-latest-product-item:hover .ych-widget-product-view-btn {
    color: #333e48;
    transform: translateX(4px);
}


/* 2. YCH Nested Category Products Widget (Tree Structure) */
.ych-widget-category-tree {
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 0 0 !important;
}

.ych-category-tree-node {
    margin-bottom: 18px;
}

.ych-category-tree-node:last-child {
    margin-bottom: 0;
}

.ych-category-tree-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: #333e48;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

.ych-category-tree-icon {
    font-size: 14px;
    opacity: 0.85;
}

.ych-category-tree-title {
    flex-grow: 1;
}

.ych-category-tree-count {
    font-size: 10px;
    font-weight: 700;
    background: #f0f2f5;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Tree branches vertical connectors */
.ych-category-tree-products {
    list-style: none !important;
    padding: 0 0 0 16px !important;
    margin: 0 !important;
    position: relative;
}

/* Vertical line connecting nodes */
.ych-category-tree-products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 4px;
    bottom: 12px;
    width: 1px;
    background-color: #d1d5db; /* Light grey branch connector line */
}

.ych-category-tree-product-item {
    position: relative;
    padding: 4px 0 4px 14px;
}

/* Horizontal line pointing to node item */
.ych-category-tree-product-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 4px;
    width: 8px;
    height: 1px;
    background-color: #d1d5db;
}

.ych-tree-product-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555555 !important;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.ych-tree-product-name {
    line-height: 1.3;
}

/* Hover Bullet Micro-Animation */
.ych-tree-product-bullet {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.2s ease;
}

.ych-tree-product-link:hover {
    color: #0062bd !important;
    transform: translateX(3px);
}

.ych-tree-product-link:hover .ych-tree-product-bullet {
    background-color: #fed700; /* Yellow highlight on hover */
    transform: scale(1.5);
}
