/* ── Category Extra Description Read More — v1.3.0 ── */
/* Targets ONLY the WoodMart "Extra description" block (.wd-term-desc.wd-entry-content) */
/* Δεν επηρεάζει το κανονικό WooCommerce category description (.term-description) */

/* Κρύβει αμέσως πριν φορτώσει το JS — αποτρέπει το flash */
.wd-term-desc.wd-entry-content {
    position: relative;
    max-height: 160px;
    overflow: hidden;
    width: 100%;
}

/* Fade αμέσως ορατό από CSS, πριν το JS */
.wd-term-desc.wd-entry-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: linear-gradient(to bottom, transparent 0%, #ffffff 100%);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.35s ease;
}

/* Μόλις το JS τρέξει, αφαιρεί τα παραπάνω και βάζει δικά του */
.wd-term-desc.wd-entry-content.mel-ready {
    max-height: none;
    overflow: visible;
}
.wd-term-desc.wd-entry-content.mel-ready::after {
    display: none;
}

/* ── Wrapper ── */
.mel-desc-wrapper {
    position: relative;
    width: 100%;
}

/* Collapsed */
.mel-desc-inner {
    position: relative;
    max-height: 160px;
    overflow: hidden;
    transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.mel-desc-inner.is-open {
    max-height: 9999px;
}

/* Gradient fade */
.mel-desc-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: linear-gradient(to bottom, transparent 0%, #ffffff 100%);
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 2;
}

.mel-desc-inner.is-open .mel-desc-fade {
    opacity: 0;
    pointer-events: none;
}

/* Κείμενο */
.mel-desc-inner p {
    font-size: 15px;
    line-height: 1.85;
    color: #1a1a1a;
    margin: 0 0 1em;
}

.mel-desc-inner p:last-child {
    margin-bottom: 0;
}

.mel-desc-inner h2,
.mel-desc-inner h3,
.mel-desc-inner h4 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #555555;
    margin: 1.4em 0 0.4em;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
}

.mel-desc-inner ul {
    margin: 0 0 1em;
    padding: 0;
    list-style: none;
}

.mel-desc-inner ul li {
    font-size: 15px;
    line-height: 1.75;
    color: #1a1a1a;
    padding-left: 1.1em;
    position: relative;
}

.mel-desc-inner ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: #888888;
}

/* Κουμπί */
.mel-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: #2d6a4f;
    background: transparent;
    border: 1.5px solid #2d6a4f;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1;
    box-shadow: none;
}

.mel-toggle-btn:hover,
.mel-toggle-btn:focus-visible {
    background: #2d6a4f;
    color: #ffffff;
    outline: none;
    box-shadow: none;
}

.mel-arrow {
    flex-shrink: 0;
    transition: transform 0.35s ease;
}

.mel-toggle-btn.is-open .mel-arrow {
    transform: rotate(180deg);
}
