/* --- Container and Basic Settings --- */
#z-recipe-card {
    font-family: inherit; /* Inherit font */
    background-color: #fff;
    color: #111;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
}
#z-recipe-card * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* --- Element Styling --- */
/* Image */
#z-recipe-img-wrap {
    width: 100%;
    height: 100%;
    display: block;
}
#z-recipe-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Nutrition Info (General Style) */
#z-recipe-nutrition {
    display: flex;
    align-items: center;
    white-space: nowrap;
    text-transform: uppercase;
    font-weight: 600;
    color: #555;
    /* Default spacing */
    gap: 8px;
}
.z-divider { color: #ccc; }
/* Texts and Button */
#z-recipe-title {
    text-transform: uppercase;
    line-height: 1.3;
    font-weight: 700;
    color: #000;
}
#z-recipe-desc {
    font-style: italic;
    line-height: 1.6;
    color: #444;
}
#z-recipe-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #111;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
}
/* =========================================
   MOBILE LAYOUT (Max-width: 768px)
   ========================================= */
@media screen and (max-width: 768px) {
    #z-recipe-card {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding-bottom: 20px;
    }
   
    /* 1. Badge */
    #z-recipe-badge {
        width: 100%;
        text-align: center;
        font-size: 2.5rem;
        font-weight: bold;
        margin-bottom: 5px;
        color: #000;
        background: transparent;
        position: static; /* Cancel absolute positioning */
    }
    /* 2. Title */
    #z-recipe-title {
        text-align: center;
        font-size: 1.4rem;
        padding: 0 15px;
        margin-bottom: 15px;
    }
    /* 3. Image */
    #z-recipe-img-wrap {
        height: 250px;
        margin-bottom: 20px;
    }
    /* 4. Description */
    #z-recipe-desc {
        text-align: center;
        padding: 0 20px;
        margin-bottom: 20px;
        font-size: 1rem;
        display: block; /* Ensure visibility */
    }
    /* 5. Nutrition Info (Smart Size Solution) */
    #z-recipe-nutrition {
        width: 100%;
        justify-content: center; /* Center */
        margin-bottom: 25px;
        padding: 0 10px;
       
        /* Reduce gaps to save space */
        gap: 4px;
       
        /* This magic line: Makes font 3.5% of viewport width */
        /* Ensures text shrinks automatically to fit single line */
        font-size: clamp(9px, 3.2vw, 13px);
    }
    /* 6. Button (at the end) */
    #z-recipe-btn {
        width: calc(100% - 40px);
        margin: 0 auto;
        padding: 16px 0;
        font-size: 0.9rem;
    }
}
/* =========================================
   DESKTOP LAYOUT (Min-width: 769px)
   ========================================= */
@media screen and (min-width: 769px) {
    #z-recipe-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 0 40px;
        align-items: center;
        padding-right: 40px;
    }
    /* Image */
    #z-recipe-img-wrap {
        grid-column: 1 / 2;
        grid-row: 1 / 6;
        height: 100%;
        min-height: 450px;
        position: relative;
    }
    /* Badge (Black Circle in Corner) */
    #z-recipe-badge {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        z-index: 10;
       
        background-color: #000;
        color: #fff;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.2rem;
        font-weight: bold;
        justify-self: start;
        align-self: start;
        /* Offset half outside for corner */
        margin-top: -15px;
        margin-left: -15px;
    }
    /* Text Content */
    #z-recipe-title,
    #z-recipe-desc,
    #z-recipe-nutrition,
    #z-recipe-btn {
        grid-column: 2 / 3;
        text-align: left;
    }
    #z-recipe-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    #z-recipe-desc {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
    #z-recipe-nutrition {
        justify-content: flex-start;
        margin-bottom: 30px;
        /* Reset font size for desktop to be fixed */
        font-size: 0.85rem;
        gap: 10px;
    }
    #z-recipe-btn {
        justify-self: start;
        padding: 14px 40px;
        font-size: 0.9rem;
    }
}