// ═══════════════════════════════════════════════
// FERMENTY — Catalogue styles
// ═══════════════════════════════════════════════

// ── Section title ─────────────────────────────
.catalogue-section-title {
    font-size: $font-size-lg;
    font-weight: $font-weight-bold;
    color: $text-dark;
}

// ── Catalogue cards ──────────────────────────
.catalogue-card {
    background: #fff;
    border: $border-width solid $border-color;
    border-radius: $radius-lg;
    padding: $spacing-lg;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: $transition-base;
    position: relative;

    &:hover {
        border-color: $green-mid;
        transform: translateY(-2px);
    }

    &.catalogue-card-locked {
        opacity: 0.85;

        &:hover { border-color: $orange-main; }
    }

    .catalogue-card-lock-badge {
        position: absolute;
        top: $spacing-sm;
        right: $spacing-sm;
        font-size: $font-size-xs;
        background: $orange-light;
        color: $orange-text;
        padding: 2px $spacing-sm;
        border-radius: $radius-pill;
        font-weight: $font-weight-medium;
    }

    .catalogue-card-image {
        position: relative;
        width: 100%;
        min-height: 170px;
        border-radius: $radius-lg;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        margin-bottom: $spacing-md;
        overflow: hidden;
        display: flex;
        align-items: flex-end;
        padding: $spacing-sm;
        background-color: $green-pale;

        &::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 100%);
            pointer-events: none;
        }

        .catalogue-card-letter {
            width: 56px;
            height: 56px;
            font-size: 1.7rem;
            margin-bottom: 0;
            box-shadow: 0 10px 25px rgba(0,0,0,0.12);
            position: relative;
            z-index: 1;
        }

        .catalogue-card-image-img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            display: block;
        }
    }

    .catalogue-card-body {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .catalogue-card-letter {
        width: 52px;
        height: 52px;
        border-radius: $radius-md;
        background: $green-pale;
        color: $green-main;
        font-size: 1.4rem;
        font-weight: $font-weight-bold;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: $spacing-md;

        &.orange {
            background: $orange-light;
            color: darken($orange-main, 10%);
        }
    }

    .catalogue-card-name {
        font-size: 1.05rem;
        font-weight: $font-weight-bold;
        color: $text-dark;
        margin-bottom: $spacing-sm;
        line-height: 1.2;
        letter-spacing: -0.02em;
    }

    .catalogue-card-desc {
        font-size: $font-size-sm;
        color: $text-muted;
        line-height: 1.5;
        flex: 1;
        margin-bottom: $spacing-md;
    }

    .catalogue-card-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: $spacing-md;
    }

    .catalogue-card-days {
        font-size: $font-size-xs;
        color: $text-muted;
        font-weight: $font-weight-medium;
    }

    .catalogue-card-difficulty {
        font-size: $font-size-xs;
        padding: 2px $spacing-sm;
        border-radius: $radius-pill;
        font-weight: $font-weight-medium;
    }

    .catalogue-card-footer {
        margin-top: auto;
    }
}

// ── Difficulty badges ─────────────────────────
.difficulty-easy   { background: $green-pale;   color: $text-dark; }
.difficulty-medium { background: #FEF9E7;        color: #7A5C00; }
.difficulty-hard   { background: $orange-light;  color: $orange-text; }

// ── Ferment show page ────────────────────────
.ferment-show-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 320px;
    min-height: 220px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.ferment-show-cover-img {
    display: none;
}

.ferment-show-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.28));
}

.ferment-show-card {
    border-radius: $radius-lg;
    overflow: hidden;
}

.ferment-show-letter {
    width: 64px;
    height: 64px;
    border-radius: $radius-lg;
    background: $green-pale;
    color: $green-main;
    font-size: 1.8rem;
    font-weight: $font-weight-bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    &.orange {
        background: $orange-light;
        color: darken($orange-main, 10%);
    }
}

.ferment-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: $spacing-sm 0;
    border-bottom: $border-width solid $green-pale;

    &:last-child { border-bottom: none; }
}

.ferment-info-label {
    font-size: $font-size-sm;
    color: $text-muted;
}

.ferment-info-value {
    font-size: $font-size-sm;
    font-weight: $font-weight-medium;
    color: $text-dark;
}

.ferment-show-side-image {
    width: 100%;
    border-radius: $radius-lg;
    overflow: hidden;
    background: $green-pale;
}

.ferment-show-side-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

// ── Step actions ─────────────────────────────
.step-action {
    display: flex;
    align-items: flex-start;
    gap: $spacing-sm;
    padding: $spacing-xs 0;
    font-size: $font-size-sm;
    color: $text-muted;

    .step-action-type {
        font-size: $font-size-xs;
        padding: 1px $spacing-sm;
        border-radius: $radius-pill;
        font-weight: $font-weight-medium;
        white-space: nowrap;
        flex-shrink: 0;
        background: $green-pale;
        color: $text-dark;

        &.step-action-wait    { background: #EEF4FF; color: #1A3A7A; }
        &.step-action-measure { background: #FFF4E6; color: #7A4A00; }
        &.step-action-bottle  { background: #F0E6FF; color: #4A007A; }
        &.step-action-taste   { background: #FFE6F0; color: #7A003A; }
        &.step-action-stir    { background: $green-pale; color: $text-dark; }
        &.step-action-filter  { background: #E6F4FF; color: #00407A; }
    }
}
