/* ---- Layout ---- */

.mpp-presety {
    background: var(--mpp-bg, #f3f1ed);
    padding: 60px 20px;
    font-family: inherit;
    box-sizing: border-box;
}

.mpp-presety *, .mpp-presety *::before, .mpp-presety *::after {
    box-sizing: border-box;
}

/* ---- Header ---- */

.mpp-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
}

.mpp-heading {
    font-size: 50px;
    color: var(--mpp-heading, #342b24);
    margin: 0 0 15px;
    font-weight: 700;
    line-height: 1.15;
}

.mpp-subheading {
    font-size: 18px;
    color: var(--mpp-text, #655850);
    margin: 0;
    line-height: 1.6;
}

/* ---- Category tabs (outlined pills) ---- */

.mpp-category-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: var(--mpp-spacing-tabs, 40px);
}

.mpp-cat-tab {
    background: transparent;
    border: 1px solid var(--mpp-border, #d5cfc7);
    font-size: 15px;
    font-weight: 600;
    color: var(--mpp-text, #655850);
    padding: 12px 32px;
    cursor: pointer;
    transition: all 0.25s ease;
    line-height: 1.4;
}

.mpp-cat-tab:first-child {
    border-radius: 6px 0 0 6px;
}

.mpp-cat-tab:last-child {
    border-radius: 0 6px 6px 0;
}

.mpp-cat-tab:not(:first-child) {
    border-left: none;
}

.mpp-cat-tab:hover {
    background: var(--mpp-accent-10, rgba(155, 143, 125, 0.1));
    color: var(--mpp-heading, #342b24);
}

.mpp-cat-tab.active {
    background: var(--mpp-active-bg, #fff);
    color: var(--mpp-heading, #342b24);
    border-color: var(--mpp-accent, #9B8F7D);
}

/* ---- Category panels ---- */

.mpp-category-panel {
    display: none;
}

.mpp-category-panel.active {
    display: block;
}

/* ---- Preset layout (sidebar + content) ---- */

.mpp-preset-layout {
    display: flex;
    gap: var(--mpp-spacing-sidebar, 40px);
    max-width: 1100px;
    margin: 0 auto;
    align-items: flex-start;
}

/* ---- Preset sidebar ---- */

.mpp-preset-sidebar {
    width: 340px;
    flex-shrink: 0;
}

.mpp-preset-list-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--mpp-heading, #342b24);
    margin: 0 0 20px;
    font-style: italic;
}

/* ---- Preset tabs (card list) ---- */

.mpp-preset-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mpp-preset-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: 1px solid var(--mpp-border, #d5cfc7);
    border-radius: 8px;
    text-align: left;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--mpp-text, #655850);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mpp-preset-tab:hover {
    border-color: var(--mpp-accent, #9B8F7D);
    color: var(--mpp-heading, #342b24);
    background: var(--mpp-active-bg-50, rgba(255, 255, 255, 0.5));
}

.mpp-preset-tab.active {
    border-color: var(--mpp-accent, #9B8F7D);
    color: var(--mpp-heading, #342b24);
    background: var(--mpp-active-bg, #fff);
    font-weight: 600;
}

.mpp-preset-tab-check {
    display: none;
    color: var(--mpp-accent, #9B8F7D);
    font-size: 16px;
}

.mpp-preset-tab.active .mpp-preset-tab-check {
    display: inline;
}

/* ---- Preset summary ---- */

.mpp-preset-summary {
    margin-top: 16px;
    padding: 16px 18px;
    background: var(--mpp-accent-08, rgba(155, 143, 125, 0.08));
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--mpp-text, #655850);
}

.mpp-preset-summary strong {
    color: var(--mpp-heading, #342b24);
}

/* ---- Preset panels ---- */

.mpp-preset-panels {
    flex: 1;
    min-width: 0;
}

.mpp-preset-panel {
    display: none;
}

.mpp-preset-panel.active {
    display: block;
}

/* ---- Active preset name (below slider) ---- */

.mpp-active-preset-name {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--mpp-heading, #342b24);
    margin: 20px 0 0;
}

/* ---- Gallery navigation ---- */

.mpp-gallery-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.mpp-gallery-prev,
.mpp-gallery-next {
    background: var(--mpp-bg, #f3f1ed);
    border: 1px solid var(--mpp-border, #d5cfc7);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: var(--mpp-text, #655850);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mpp-gallery-prev:hover,
.mpp-gallery-next:hover {
    background: var(--mpp-heading, #342b24);
    color: var(--mpp-active-bg, #fff);
    border-color: var(--mpp-heading, #342b24);
}

.mpp-gallery-counter {
    font-size: 14px;
    color: var(--mpp-accent, #9B8F7D);
    font-weight: 600;
}

.mpp-gallery-item {
    display: none;
}

.mpp-gallery-item.active {
    display: block;
}

.mpp-pair-label {
    text-align: center;
    font-size: 13px;
    color: var(--mpp-accent, #9B8F7D);
    font-weight: 600;
    margin: 10px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Before / After slider ---- */

.mpp-ba-slider {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
    line-height: 0;
    background: #e8e4df;
}

.mpp-ba-slider:focus {
    outline: 2px solid var(--mpp-accent, #9B8F7D);
    outline-offset: 2px;
}

.mpp-ba-before,
.mpp-ba-after {
    display: block;
}

.mpp-ba-before img,
.mpp-ba-after img {
    width: 100%;
    height: auto;
    display: block;
}

.mpp-ba-after {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    clip-path: inset(0 0 0 50%);
}

.mpp-ba-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Labels - top position */

.mpp-ba-label {
    position: absolute;
    top: 12px;
    background: var(--mpp-heading-75, rgba(52, 43, 36, 0.75));
    color: #fff;
    padding: 5px 14px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    pointer-events: none;
}

.mpp-ba-label-before {
    left: 12px;
}

.mpp-ba-label-after {
    right: 12px;
}

/* Handle - minimal circle + line */

.mpp-ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 5;
}

.mpp-ba-handle-line {
    flex: 1;
    width: 2px;
    background: var(--mpp-active-bg-80, rgba(255, 255, 255, 0.8));
}

.mpp-ba-handle-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--mpp-active-bg-90, rgba(255, 255, 255, 0.9));
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.mpp-ba-active .mpp-ba-handle-circle {
    transform: scale(1.15);
}

/* ---- Scrubber bar (below slider) ---- */

.mpp-scrubber {
    padding: 14px 0 4px;
}

.mpp-scrubber-track {
    position: relative;
    height: 4px;
    background: var(--mpp-border, #d5cfc7);
    border-radius: 2px;
    cursor: pointer;
}

.mpp-scrubber-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: var(--mpp-accent, #9B8F7D);
    border-radius: 2px;
}

.mpp-scrubber-thumb {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    margin-left: -7px;
    background: var(--mpp-active-bg, #fff);
    border: 2px solid var(--mpp-accent, #9B8F7D);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.mpp-scrubber-thumb:hover {
    transform: scale(1.2);
}

/* ---- Missing image fallback ---- */

.mpp-missing {
    padding: 40px;
    text-align: center;
    color: var(--mpp-accent, #9B8F7D);
    background: #faf9f7;
    border-radius: 8px;
    font-style: italic;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .mpp-presety {
        padding: 40px 15px;
    }

    .mpp-heading {
        font-size: 32px;
    }

    .mpp-subheading {
        font-size: 16px;
    }

    .mpp-preset-layout {
        flex-direction: column;
        gap: 25px;
    }

    .mpp-preset-sidebar {
        width: 100%;
    }

    .mpp-preset-tabs {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding-bottom: 4px;
    }

    .mpp-preset-tab {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 13px;
    }

    .mpp-preset-list-heading {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .mpp-preset-summary {
        display: none;
    }

    .mpp-ba-label {
        font-size: 11px;
        padding: 4px 10px;
        top: 8px;
    }

    .mpp-ba-label-before { left: 8px; }
    .mpp-ba-label-after { right: 8px; }

    .mpp-ba-handle-circle {
        width: 24px;
        height: 24px;
    }

    .mpp-category-tabs {
        gap: 0;
    }

    .mpp-cat-tab {
        font-size: 13px;
        padding: 10px 18px;
    }

    .mpp-active-preset-name {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .mpp-heading {
        font-size: 26px;
    }

    .mpp-preset-tab {
        font-size: 12px;
        padding: 8px 12px;
    }

    .mpp-cat-tab {
        font-size: 12px;
        padding: 8px 14px;
    }
}
