/**
 * Mloun Brands Cat - Frontend Styles
 * Reference: dark background, white/light-gray text, uppercase title
 */

/* ── Wrapper ── */
.mloun-brands-cat-wrapper {
    background-color: #1a1a1a;
    padding: 20px;
    box-sizing: border-box;
    font-family: inherit;
}

/* ── Title ── */
.mloun-brands-cat-title,
.mloun-brands-cat-title--mode2 {
    color: #ffffff;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    padding: 0;
    line-height: 1.3;
}

.mloun-brands-cat-title a,
.mloun-brands-cat-title--mode2 a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.mloun-brands-cat-title a:hover,
.mloun-brands-cat-title--mode2 a:hover {
    opacity: 0.8;
}

/* ══════════════════════════════════════════════════
   Mobile Accordion
══════════════════════════════════════════════════ */

/* Accordion Header — always hidden on desktop/tablet */
.mloun-brands-cat-accordion-header {
    display: none !important; /* force hide on non-mobile */
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background-color: #C8A45A;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 12px 16px;
    border: none;
    outline: none;
    cursor: pointer;
    text-align: left;
    margin: 0;
    line-height: 1.4;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 10;
    touch-action: manipulation;
    flex-direction: row;
}

/* Accordion header — alignment variants */
.mloun-brands-cat-accordion-header.align-left {
    justify-content: flex-start;
    text-align: left;
}
.mloun-brands-cat-accordion-header.align-center {
    justify-content: center;
    text-align: center;
}
.mloun-brands-cat-accordion-header.align-right {
    justify-content: flex-end;
    text-align: right;
}

.mloun-brands-cat-accordion-header:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

/* Chevron / plus icon */
.mloun-brands-cat-accordion-icon {
    display: inline-block;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
    color: #ffffff;
}

/* Mobile breakpoint: show header, body hidden by default */
@media (max-width: 767px) {
    /* Show accordion header on mobile */
    .mloun-brands-cat--has-accordion .mloun-brands-cat-accordion-header {
        display: flex !important;
    }

    /* Body hidden by default (no is-open on wrapper) */
    .mloun-brands-cat--has-accordion .mloun-brands-cat-accordion-body {
        display: none !important;
    }

    /* Body shown only when wrapper has is-open */
    .mloun-brands-cat--has-accordion.is-open .mloun-brands-cat-accordion-body {
        display: block !important;
    }

    /* Wrapper: no padding on mobile accordion */
    .mloun-brands-cat-wrapper {
        padding: 0 !important;
    }

    /* Content padding inside accordion body */
    .mloun-brands-cat-accordion-body .mloun-brands-cat-title,
    .mloun-brands-cat-accordion-body .mloun-brands-cat-title--mode2 {
        padding: 14px 16px 0;
        margin-bottom: 0;
    }

    .mloun-brands-cat-accordion-body .mloun-brands-cat-divider {
        margin: 8px 16px;
    }

    .mloun-brands-cat-accordion-body .mloun-brands-cat-list {
        padding: 4px 16px 14px;
    }

    .mloun-brands-cat-accordion-body .mloun-brands-cat-empty {
        padding: 12px 16px;
    }
}

/* ══════════════════════════════════════════════════
   Divider
══════════════════════════════════════════════════ */

/* ── Divider (div 替代 hr，避免被 Elementor 全局 hr 样式覆盖) ── */
.mloun-brands-cat-wrapper .mloun-brands-cat-divider {
    display: block;
    width: 100%;
    height: 1px;
    background-color: #444444;
    border: none;
    outline: none;
    padding: 0;
    margin: 10px 0;
    box-shadow: none;
    flex-shrink: 0;
    overflow: hidden;
    line-height: 0;
    font-size: 0;
}

/* ── List ── */
.mloun-brands-cat-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.mloun-brands-cat-list li {
    padding: 6px 0;
    margin: 0;
    line-height: 1.4;
}

.mloun-brands-cat-list li a,
.mloun-brands-cat-list li span {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9em;
    display: block;
    transition: color 0.2s ease;
    cursor: pointer;
}

.mloun-brands-cat-list li a:hover {
    color: #ffffff;
    text-decoration: none;
}

/* ── Count badge ── */
.mloun-brands-cat-count {
    color: #888888;
    font-size: 0.85em;
    margin-left: 4px;
}

/* ── Empty / notice messages ── */
.mloun-brands-cat-empty,
.mloun-brands-cat-notice,
.mloun-brands-cat-preview-notice {
    color: #aaaaaa;
    font-size: 0.85em;
    margin: 8px 0 0 0;
    padding: 0;
}

.mloun-brands-cat-preview-notice {
    color: #e0a800;
    font-style: italic;
    margin-bottom: 10px;
    font-size: 0.8em;
}

/* ── Elementor editor responsive fixes ── */
@media (max-width: 767px) {
    .mloun-brands-cat-wrapper {
        padding: 15px;
    }
}
