.menu-item-kitchen .wrap a {
    color: #000!important;
}
.recipe-thumbnail-container {
    position: relative;
    display: inline-block;
}

/* Make sure position works within the image link */
.post-thumbnail {
    position: relative;
    display: inline-block;
}

/* Fixed styles for the heart icon */
.recipe-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent !important; /* Force transparency */
    border: none !important;
    border-radius: 0 !important; /* Remove any border radius */
    box-shadow: none !important; /* Remove any shadow */
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    padding: 0;
    transition: transform 0.2s ease;
}

.recipe-favorite:hover {
    background: transparent !important;
    transform: scale(1.1);
}

.recipe-favorite i {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: color 0.2s ease;
}

.recipe-favorite:hover i {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.recipe-favorite.favorited i {
    color: #ac1219;
    -webkit-text-stroke: 1px white; /* Add white border to the heart */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.recipe-favorite.favorited:hover i {
    color: #ac1219;
    -webkit-text-stroke: 1.5px white; /* Slightly thicker on hover */
}

/* Additional positioning helpers */
.products .product .post-thumbnail, 
.recipe .post-thumbnail,
.archive .post-thumbnail,
article .post-thumbnail {
    position: relative;
}

/* Animation for favoriting */
.recipe-favorite.favoriting i {
    animation: heart-pulse 0.4s ease;
}

@keyframes heart-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Modal for non-logged in users */
.recipe-favorite-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.recipe-favorite-modal-content {
    background: white;
    padding: 30px;
    border-radius: 5px;
    max-width: 400px;
    text-align: center;
}

.recipe-favorite-modal h3 {
    margin-top: 0;
    color: #333;
}

.recipe-favorite-modal p {
    margin-bottom: 20px;
}

.recipe-favorite-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.recipe-favorite-modal-buttons a {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

.recipe-favorite-modal-login {
    background: #ac1219;
    color: white;
}

.recipe-favorite-modal-signup {
    background: #333;
    color: white;
}

.recipe-favorite-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ccc;
}

/* Favorites page styles */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.recipe-favorites-item {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.2s;
}

.recipe-favorites-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.recipe-favorites-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.recipe-favorites-title {
    padding: 10px;
    margin: 0;
    font-size: 16px;
    text-align: center;
}

.recipe-favorites-link {
    text-decoration: none;
    color: inherit;
}

.recipe-favorite-remove {
    width: 100%;
    padding: 8px;
    background: #ac1219;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.recipe-favorite-remove:hover {
    background: #8e0e15;
}

.recipe-favorites-empty,
.recipe-favorites-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #ACAAAA;
    border-radius: 15px;
}

.recipe-favorites-empty h3,
.recipe-favorites-login-required h3 {
    margin-top: 0;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background: #ac1219;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

/* Favorites menu item styling */
.menu-item-kitchen a {
    display: flex !important;
    align-items: center;
    padding: 10px 15px; /* Adjust to match your other menu items */
    margin: 0; /* Reset any margins */
    line-height: 30px; /* Match your other menu items */
}

.menu-item-kitchen i {
    margin-right: 5px;
    color: #ac1219;
}


/* Highlight when on the favorites page */
.page-id-my-kitchen .menu-item-kitchen > a {
    font-weight: bold;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .menu-item-kitchen a {
        padding-left: 10px;
    }
}

@media (max-width: 480px) {
    .recipe-grid {
        grid-template-columns: 1fr;
    }
}