/* ==========================================================================
 * Category Bottom Sections
 * ========================================================================== */

.cat-bottom {
    padding: 50px 0 0;
}

/* -------------------------------------------------------------------------
 * Section Title
 * ------------------------------------------------------------------------- */
.cat-section-title {
    margin: 30px 0 15px;
}

.cat-section-title h3,
.cat-section-title h4 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding-bottom: 10px;
    font-style: italic;
}

.cat-section-title--line h4 {
    font-style: normal;
    font-size: 18px;
    border-bottom: 2px solid #c78a2e;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.cat-process-intro {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

/* -------------------------------------------------------------------------
 * Process Steps (Tab UI)
 * ------------------------------------------------------------------------- */
.cat-process {
    display: flex;
    gap: 0;
    margin-bottom: 50px;
}

.cat-process-tabs {
    flex: 0 0 200px;
}

.cat-process-tabs ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cat-process-tabs li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    position: relative;
    transition: color 0.2s;
    border-left: 2px solid #ddd;
}

.cat-process-tabs li:hover {
    color: #c0392b;
}

.cat-process-tabs li.is-active {
    color: #c0392b;
    font-weight: 600;
    border-left-color: #c0392b;
}

.cat-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #ccc;
    flex-shrink: 0;
    position: relative;
    margin-left: -17px;
    background: #fff;
}

.cat-process-tabs li.is-active .cat-step-dot {
    border-color: #c0392b;
    background: #c0392b;
}

.cat-step-label {
    line-height: 1.3;
}

/* Panels */
.cat-process-panels {
    flex: 1;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.cat-process-panel {
    display: flex;
    overflow: hidden;
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.cat-process-panel.is-active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.cat-process-panel img {
    flex: 0 0 68%;
    width: 68%;
    height: 380px;
    object-fit: cover;
    display: block;
    order: 2;
}

.cat-process-panel__info {
    flex: 0 0 32%;
    width: 32%;
    order: 1;
    background: #f5f5f5;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.cat-process-panel__title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    line-height: 1.3;
}

.cat-process-panel__summary {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    line-height: 1.7;
}

.cat-process-panel__cta {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 32px;
    background: #c0392b;
    color: #fff;
    text-decoration: none;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    align-self: flex-start;
}

.cat-process-panel__cta:hover {
    background: #e74c3c;
}

/* -------------------------------------------------------------------------
 * About Section
 * ------------------------------------------------------------------------- */
.cat-bottom-about {
    background: #fafafa;
    padding: 40px 0 50px;
}

/* -------------------------------------------------------------------------
 * Other Furniture Recommended
 * ------------------------------------------------------------------------- */
.cat-recommend {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cat-recommend-row {
    display: grid;
    gap: 20px;
}

.cat-recommend-row--2col {
    grid-template-columns: repeat(2, 1fr);
}

.cat-recommend-row--3col {
    grid-template-columns: repeat(3, 1fr);
}

.cat-recommend-card__link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 16 / 9;
}

.cat-recommend-card__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cat-recommend-card__link:hover img {
    transform: scale(1.06);
}

.cat-recommend-card__label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    pointer-events: none;
}

.cat-recommend-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cat-recommend-card__link:hover .cat-recommend-card__overlay {
    opacity: 1;
}

.cat-recommend-card__plus {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 30px;
    color: #333;
    font-weight: 300;
    line-height: 1;
}

/* =========================================================================
 * Responsive
 * ========================================================================= */

@media (max-width: 960px) {
    .cat-process {
        flex-direction: column;
        gap: 0;
        margin-bottom: 36px;
    }

    .cat-process-tabs {
        flex: none;
        width: 100%;
        margin-bottom: 18px;
        position: relative;
    }

    /* Horizontal scroll-snap chip row — works well for a 6-step list. */
    .cat-process-tabs ul {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 4px 16px 8px;
        margin: 0 -16px; /* break out of container padding so first chip is flush */
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .cat-process-tabs ul::-webkit-scrollbar { display: none; }

    .cat-process-tabs li {
        flex: 0 0 auto;
        scroll-snap-align: start;
        border-left: none;
        border-bottom: none;
        padding: 8px 14px;
        font-size: 13px;
        background: #f4f4f4;
        border-radius: 999px;
        gap: 6px;
    }

    .cat-process-tabs li.is-active {
        border-bottom: none;
        background: #c0392b;
        color: #fff;
    }

    .cat-process-tabs li.is-active .cat-step-dot {
        border-color: #fff;
        background: #fff;
    }

    .cat-step-dot {
        margin-left: 0;
        width: 8px;
        height: 8px;
        border-width: 1.5px;
    }

    .cat-process-panel.is-active {
        flex-direction: column;
    }

    .cat-process-panel img {
        flex: none;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        object-fit: cover;
        order: 1;
    }

    .cat-process-panel__info {
        flex: none;
        width: 100%;
        order: 2;
        padding: 20px 18px 24px;
    }

    .cat-recommend-row--2col,
    .cat-recommend-row--3col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .cat-bottom {
        padding: 30px 0 0;
    }

    .cat-section-title {
        margin: 20px 0 10px;
    }

    .cat-section-title h3,
    .cat-section-title h4 {
        font-size: 18px;
        line-height: 1.35;
    }

    .cat-process-intro {
        font-size: 13px;
        line-height: 1.7;
        margin-bottom: 18px;
    }

    .cat-process-tabs li {
        padding: 7px 12px;
        font-size: 12px;
    }

    .cat-process-panel img {
        aspect-ratio: 4 / 3;
    }

    .cat-process-panel__info {
        padding: 16px 14px 20px;
    }

    .cat-process-panel__title {
        font-size: 16px;
    }

    .cat-process-panel__summary {
        font-size: 13px;
        line-height: 1.6;
    }

    .cat-process-panel__cta {
        font-size: 12px;
        padding: 9px 18px;
        margin-top: 10px;
    }

    .cat-recommend-row--2col,
    .cat-recommend-row--3col {
        grid-template-columns: 1fr;
    }
}
