/* ==========================================================================
   Category Showcase Tree Section CSS — Molvizadah Sons
   Signature Theme Colors: Dark Forest Green #102A1D, Theme Green #285A35, Clean White #FFFFFF
   ========================================================================== */

.ms-cs-section,
.showcase-sec.light-showcase {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #FFFFFF;
    padding: 60px 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.ms-cs-container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 32px;
    box-sizing: border-box;
}

/* ── Section Header ── */
.ms-cs-header {
    margin-bottom: 45px;
    text-align: left;
}

.ms-cs-tagline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #285A35;
    margin-bottom: 12px;
}

.ms-cs-tagline-dash {
    display: inline-block;
    width: 24px;
    height: 1.5px;
    background-color: #285A35;
}

.ms-cs-title {
    font-size: clamp(34px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.12;
    color: #102A1D;
    margin: 0 0 14px 0;
    letter-spacing: -0.01em;
}

.ms-cs-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #556057;
    max-width: 680px;
    margin: 0;
}

/* ── Interactive Showcase Layout ── */
.ms-cs-body {
    display: grid;
    grid-template-columns: 210px minmax(320px, 380px) minmax(340px, 1fr);
    gap: 32px;
    align-items: center;
    position: relative;
    margin-top: 10px;
}

/* ── Column 1: Root Portfolio Card ── */
.ms-cs-root-wrapper {
    position: relative;
    z-index: 5;
}

.ms-cs-root-card {
    background: #FFFFFF;
    border: 1px solid #E2E8E1;
    border-radius: 6px;
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(16, 42, 29, 0.04);
    position: relative;
    z-index: 2;
}

/* Horizontal stem out from Root Card right side */
.ms-cs-root-card::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -32px;
    width: 32px;
    height: 1.5px;
    border-top: 1.5px dashed rgba(40, 90, 53, 0.35);
    transform: translateY(-50%);
}

.ms-cs-root-sublabel {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #285A35;
    margin-bottom: 10px;
}

.ms-cs-root-title {
    font-size: 22px;
    font-weight: 600;
    color: #102A1D;
    margin: 0 0 18px 0;
    line-height: 1.25;
}

.ms-cs-root-stats {
    display: flex;
    gap: 20px;
    border-top: 1px solid #EBF0EA;
    padding-top: 14px;
}

.ms-cs-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ms-cs-stat-num {
    font-size: 12px;
    font-weight: 700;
    color: #102A1D;
}

.ms-cs-stat-lbl {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #285A35;
}

/* ── Column 2: Tree Branches & Category List ── */
.ms-cs-tree-wrapper {
    position: relative;
    padding-left: 24px;
    z-index: 5;
}

/* Vertical main stem line down left of category list */
.ms-cs-tree-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 0;
    width: 1.5px;
    border-left: 1.5px dashed rgba(40, 90, 53, 0.35);
}

.ms-cs-cat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.ms-cs-cat-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    background: #F9FAF8;
    border: 1px solid #E2E8E1;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease-in-out;
    position: relative;
    box-sizing: border-box;
}

/* Horizontal branch line from main vertical line to button */
.ms-cs-cat-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -24px;
    width: 24px;
    height: 1.5px;
    border-top: 1.5px dashed rgba(40, 90, 53, 0.35);
    transform: translateY(-50%);
}

.ms-cs-cat-btn:hover {
    background: #FFFFFF;
    border-color: #285A35;
}

/* Active Category Button Styling */
.ms-cs-cat-btn.is-active {
    background: #FFFFFF;
    border: 1.5px solid #285A35 !important;
    box-shadow: 0 4px 14px rgba(40, 90, 53, 0.1);
}

/* Horizontal dashed line from active category button to right details panel */
.ms-cs-cat-btn.is-active::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -32px;
    width: 32px;
    height: 1.5px;
    border-top: 1.5px dashed #285A35;
    transform: translateY(-50%);
    z-index: 10;
}

.ms-cs-cat-btn-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.ms-cs-radio-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid #285A35;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.ms-cs-radio-dot::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.ms-cs-cat-btn.is-active .ms-cs-radio-dot {
    border-color: #285A35;
}

.ms-cs-cat-btn.is-active .ms-cs-radio-dot::after {
    background-color: #285A35;
}

.ms-cs-cat-name {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2D3830;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: color 0.2s ease;
}

.ms-cs-cat-btn.is-active .ms-cs-cat-name {
    color: #102A1D;
}

.ms-cs-cat-count {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #285A35;
    flex-shrink: 0;
    margin-left: 8px;
}

/* ── Column 3: Right Details & Products Panel ── */
.ms-cs-details-panel {
    border-left: 1.5px dashed rgba(40, 90, 53, 0.35);
    padding-left: 36px;
    position: relative;
    z-index: 2;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ms-cs-details-content {
    transition: opacity 0.15s ease;
    transform: none !important;
}

.ms-cs-details-content.is-animating {
    opacity: 0;
    transform: none !important;
}

.ms-cs-active-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ms-cs-active-title {
    font-size: clamp(24px, 2.5vw, 36px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #102A1D;
    margin: 0;
    line-height: 1.2;
}

.ms-cs-active-count-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #285A35;
}

.ms-cs-active-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: #556057;
    margin-bottom: 28px;
    max-width: 580px;
}

/* Products Grid in Right Panel */
.ms-cs-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 20px;
    margin-bottom: 24px;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 6px;
}

.ms-cs-product-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: #102A1D;
    text-decoration: none;
    line-height: 1.35;
    padding: 2px 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.ms-cs-product-item:hover {
    color: #285A35;
    transform: translateX(3px);
}

.ms-cs-product-leader {
    color: #C0CFC3;
    letter-spacing: -1px;
    font-size: 11px;
    user-select: none;
}

/* Category Link Button */
.ms-cs-open-category-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #285A35;
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 1.5px solid #285A35;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.ms-cs-open-category-btn:hover {
    color: #102A1D;
    border-bottom-color: #102A1D;
}

/* ── Responsive Layout ── */
@media (max-width: 1024px) {
    .ms-cs-body {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .ms-cs-root-card::after,
    .ms-cs-tree-wrapper::before,
    .ms-cs-cat-btn::before,
    .ms-cs-cat-btn.is-active::after {
        display: none !important;
    }
    .ms-cs-tree-wrapper {
        padding-left: 0;
    }
    .ms-cs-details-panel {
        border-left: none;
        border-top: 1.5px dashed rgba(40, 90, 53, 0.35);
        padding-left: 0;
        padding-top: 28px;
    }
    .ms-cs-root-card {
        max-width: 280px;
    }
}

@media (max-width: 640px) {
    .ms-cs-section,
    .showcase-sec.light-showcase {
        padding: 50px 0;
    }
    .ms-cs-title {
        font-size: 32px;
    }
    .ms-cs-products-grid {
        grid-template-columns: 1fr;
    }
}
