/* =========================================================
   Culina Custom – Chefs List
   (Brand tokens are defined in cucu-tokens.css)
   ========================================================= */

/* ---- Grid wrapper ---------------------------------------- */
.cucu-chefs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 20px 0;
    justify-content: flex-start;
    font-family: var(--cucu-font);
}

/* ---- WCFM [wcfm_stores] store-list overrides ------------- */
/*
 * WCFM uses high-specificity rules anchored to #wcfmmp-stores-wrap, e.g.:
 *   #wcfmmp-stores-wrap ul.wcfmmp-store-wrap { float-clearfix, margin }
 *   #wcfmmp-stores-wrap ul.wcfmmp-store-wrap li { float:left; padding:0 15px }
 *   #wcfmmp-stores-wrap ul.wcfmmp-store-wrap li.coloum-3 { width:33.33% }
 * We need the same ID in our selector to win the cascade, then reset floats
 * and switch to CSS Grid so our cucu-chef-card looks identical to [chefs_list].
 */

/* Re-dress the <ul> as a CSS grid (overrides WCFM's float clearfix) */
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 28px !important;
    list-style: none !important;
    padding: 20px 0 !important;
    margin: 0 !important;
    font-family: var(--cucu-font);
}

#wcfmmp-stores-wrap ul.wcfmmp-store-wrap::before,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap::after {
    content: none !important;
}

/* Kill the float + width that WCFM sets on every <li> and coloum-N variants.
 * display:flex lets the card inside stretch to fill the grid cell height. */
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li.coloum-1,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li.coloum-2,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li.coloum-3,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li.coloum-4,
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li.coloum-5 {
    float: none !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
}

/* Undo WCFM classic CSS absolute-positioning on .store-footer/.store-content.
 * Scope tightly: only reset direct section children of our card (header,
 * description, products, footer) — NOT grandchildren like image thumbnails
 * which rely on explicit height/width. */
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .cucu-chef-card > * {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
}

/* But DO allow position:relative on the card itself (for hover states etc.) */
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .cucu-chef-card {
    position: relative !important;
}

/* Allow the "+N more" overlay label to use absolute positioning */
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .cucu-product-thumb--more {
    position: relative !important;
}
#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .cucu-product-more-label {
    position: absolute !important;
}

/* Responsive: collapse to 2 then 1 column on smaller screens */
@media (max-width: 900px) {
    .cucu-chefs-grid,
    #wcfmmp-stores-wrap ul.wcfmmp-store-wrap {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .cucu-chefs-grid,
    #wcfmmp-stores-wrap ul.wcfmmp-store-wrap {
        grid-template-columns: 1fr !important;
    }
}



.cucu-chefs-grid * {
    box-sizing: border-box;
}

.cucu-chefs-grid a {
    box-sizing: border-box;
    text-decoration: none !important;
}

/* ---- Individual card ------------------------------------- */
.cucu-chef-card {
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid #ddd;
    width: 100%;
    height: 100%;
    margin-inline: auto;
}

/* ---- Chef header (avatar + meta) ------------------------- */
.cucu-chef-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.cucu-chef-avatar {
    width: 68px !important;
    height: 68px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    border: 1px solid #ddd !important;
}

.cucu-chef-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cucu-chef-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.cucu-chef-slug {
    margin: 0 !important;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cucu-primary);
}

.cucu-chef-link {
    text-decoration: none;
    outline: none;
    box-shadow: none;

    &:hover {
        opacity: 0.9;
    }
}

.cucu-chef-rating {
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #555;
}

.cucu-star-icon {
    width: 14px;
    height: 14px;
    fill: #555;
    flex-shrink: 0;
}

/* ---- Short description ----------------------------------- */
.cucu-chef-description {
    margin: 0 !important;
    font-size: 0.88rem;
    color: #444;
    line-height: 1.6;
    flex-grow: 1;
}

/* ---- Product thumbnails ---------------------------------- */
.cucu-chef-products {
    display: flex;
    gap: 20px;
}

.cucu-product-thumb {
    display: block;
    flex: 1;
    min-width: 0;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    outline: none;
    box-shadow: none;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.2s ease;
    }
}

.cucu-product-thumb:hover img {
    transform: scale(1.05);
}

/* "N more" third thumbnail slot */
.cucu-product-thumb--more {
    position: relative;
    text-decoration: none !important;
}

.cucu-product-thumb--more img {
    filter: brightness(0.45);
}

.cucu-product-thumb--more:hover img {
    transform: scale(1.05);
    filter: brightness(0.35);
}

.cucu-product-more-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    pointer-events: none;
}

/* ---- Footer / CTA button --------------------------------- */
.cucu-chef-footer {
    margin-top: auto;
}

.cucu-btn-view-menu {
    display: block;
    width: 100%;
    padding: 13px 0;
    background-color: var(--cucu-primary);
    color: #ffffff;
    text-align: center;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none !important;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.cucu-btn-view-menu:hover,
.cucu-btn-view-menu:focus {
    background-color: var(--cucu-primary-dark);
    color: #ffffff;
}
