/* --- Fix: Force Dark Text inside Category Pills --- */
.modern-recipe-card .category-pill,
.modern-recipe-card .category-pill .tag-text,
.modern-recipe-card .category-pill .tag-text a,
.modern-recipe-card .category-pill span,
.modern-recipe-card .category-pill .wprm-recipe-tag-name {
    color: #4A4A4A !important; 
}

/* --- Editorial Section Headings --- */
.editorial-heading {
    text-align: center;
    font-size: 26px; 
    font-weight: 400; /* Keeps the text light and elegant, not overly bold */
    letter-spacing: 4px; /* Wide spacing for that high-end editorial look */
    text-transform: uppercase;
    color: #4A4A4A; /* Matches your category pills and button */
    margin-top: 80px; /* Massive breathing room above */
    margin-bottom: 40px; /* Perfect spacing before the grid starts */
}

/* --- High-End Homepage Button --- */
.homepage-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 80px 0; /* Gives ample breathing room below the grid */
}

.editorial-outline-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #4A4A4A; /* Matches your elegant dark grey text */
    background-color: transparent;
    border: 1px solid #4A4A4A; /* Crisp outline */
    border-radius: 50px; /* Soft pill shape */
    text-decoration: none;
    transition: all 0.4s ease;
}

/* Hover State */
.editorial-outline-btn:hover {
    background-color: #757263; /* Your brand's earthy olive */
    border-color: #757263;
    color: #ffffff; /* Text turns white */
    transform: translateY(-3px); /* Subtle lift */
    box-shadow: 0 6px 20px rgba(117, 114, 99, 0.25); /* Soft olive glow */
}

/* --- Styling the Header Menu --- */
.main-navigation ul li a {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #4A4A4A !important;
    padding: 10px 15px;
    transition: color 0.3s ease;
}

/* Hover state for menu items */
.main-navigation ul li a:hover {
    color: #757263 !important; /* Your signature olive */
}

/* Styling the Dropdown Background */
.main-navigation ul ul {
    background-color: #ffffff;
    border: 1px solid #EAEAEA;
    padding: 10px 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* --- Mobile Fix for Recipe Cards --- */
@media only screen and (max-width: 600px) {
    /* Ensure the pill doesn't force a vertical stack */
    .modern-recipe-card .category-pill {
        white-space: nowrap !important; /* Keeps text on one line */
        padding: 6px 10px !important;    /* Slightly smaller padding for mobile */
        font-size: 10px !important;      /* Smaller text to fit the screen */
        letter-spacing: 1px !important;  /* Tighter tracking for narrow screens */
    }

    /* Force the cards to stack nicely (1 or 2 per row) */
    .wprm-recipe-block-container { 
        width: 100% !important; 
    }
}

/* --- Mobile Menu Editorial Polish --- */
.mobile-menu-container {
    padding: 40px 20px;
    background-color: #ffffff;
}

/* Style the top-level links */
.mobile-menu-container .menu-item > a {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 15px 0;
    display: block;
    color: #4A4A4A;
}

/* Indent and lighten the sub-menu items */
.mobile-menu-container .sub-menu .menu-item > a {
    font-size: 14px;
    text-transform: capitalize;
    letter-spacing: 1px;
    color: #888888;
    padding-left: 20px; /* Creates the hierarchy */
}

/* --- Fix: Floating Dropdown Menus --- */
.main-navigation ul ul {
    position: absolute !important; /* Forces it to float */
    top: 100% !important;          /* Positions it right below the parent item */
    left: 0;
    z-index: 9999 !important;      /* Ensures it stays on top of images */
    min-width: 200px;
    background-color: #ffffff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* Adds a premium depth effect */
    border-radius: 4px;
    margin-top: 10px; /* Small gap between the menu link and the dropdown */
}

/* Ensure the parent menu item container doesn't get pushed */
.main-navigation ul li {
    position: relative !important;
}

/* Force the sub-menu to float absolutely and sit on top */
.wp-block-navigation-submenu__container {
    position: absolute !important;
    top: 100% !important;
    z-index: 9999 !important;
    background-color: white !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
}

/* 1. Force the navigation container to stop wrapping and pushing content */
.wp-block-navigation__container {
    flex-wrap: nowrap !important;
}

/* 2. Make the submenu float absolutely over the content */
.wp-block-navigation-item.has-child .wp-block-navigation__submenu-container {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 9999 !important;
    margin-top: 5px !important;
    min-width: 220px !important;
    background: #ffffff !important;
    border: 1px solid #eee !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

/* 3. Ensure the parent container allows the absolute child to break out */
nav.main-navigation {
    position: relative !important;
    overflow: visible !important;
}

/* 1. Reset the collection wrapper */
.wprmprc-collection {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Replaces the negative margin approach */
    margin: 0 !important;
}

/* 2. Style each recipe card */
.wprmprc-collection-item {
    background: #ffffff !important;
    border: 1px solid #EAEAEA !important;
    border-radius: 12px !important;
    padding: 15px !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03) !important;
}

/* 3. Hover effect for a professional feel */
.wprmprc-collection-item:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.08) !important;
    border-color: #D1CFC2 !important; /* Soft earthy highlight */
}

/* 4. Fix typography for the recipe titles */
.wprmprc-collection-item-name {
    font-family: var(--wp--preset--font-family--work-sans);
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    color: #333333 !important;
    margin-bottom: 10px;
}

/* 5. Clean up the image/layout alignment */
.wprmprc-collection-item-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Container Spacing and Border */
.wprm-recipe-template-chic-template {
    border: 1px solid #e0e0e0;
    border-radius: 8px; /* Slightly rounded corners for a modern feel */
    padding: 30px !important;
    background-color: #ffffff;
    max-width: 800px;
    margin: 40px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Soft shadow for depth */
}

/* Typography Enhancements */
.wprm-recipe-template-chic-template .wprm-recipe-name {
    font-size: 2.2em;
    letter-spacing: -0.5px;
    margin-bottom: 10px !important;
}

/* Section Header Styling */
.wprm-recipe-template-chic-template .wprm-recipe-header {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
}

/* Buttons Styling */
.wprm-recipe-template-chic-template .wprm-template-chic-buttons .wprm-recipe-button {
    transition: background 0.3s ease;
}

.wprm-recipe-template-chic-template .wprm-template-chic-buttons .wprm-recipe-button:hover {
    opacity: 0.9;
}

/* Metadata & Icons */
.wprm-recipe-template-chic-template .wprm-recipe-meta-container {
    margin: 15px 0;
}

/* Container: Premium spacing and shadow */
.wprm-recipe-template-chic-template {
    background-color: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px; /* Softer, modern edges */
    padding: 40px !important; /* Increased padding for breathing room */
    max-width: 900px;
    margin: 40px auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06); /* Subtle depth */
}

/* Typography: Clean and high-contrast */
.wprm-recipe-template-chic-template .wprm-recipe-name {
    font-size: 2.8em;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 20px !important;
}

/* Section Headers: Uppercase, spaced, and minimal */
.wprm-recipe-template-chic-template .wprm-recipe-header {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85em;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px !important;
}

/* Meta Container: Use icons and whitespace */
.wprm-recipe-template-chic-template .wprm-recipe-meta-container {
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #f9f9f9;
}

/* 1. Container: Modern, spacious, and elevated */
.wprm-recipe-template-chic-template {
    background-color: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 40px !important;
    margin: 40px auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    max-width: 850px; /* Optimal reading width */
}

/* 2. Typography: Clean and high-contrast */
.wprm-recipe-template-chic-template .wprm-recipe-name {
    font-size: 2.8em;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 20px !important;
}

/* 3. Section Headers: Clean uppercase styling */
.wprm-recipe-template-chic-template .wprm-recipe-header {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85em;
    font-weight: 700;
    color: #222;
    margin-bottom: 25px !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px !important;
}

/* 4. Metadata: Spaced out for readability */
.wprm-recipe-template-chic-template .wprm-recipe-meta-container {
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid #f9f9f9;
}

/* 1. Reset & Card Container */
.wprm-recipe-template-chic-template {
    background: #ffffff;
    border: none !important; /* Remove thin borders */
    padding: 60px !important; /* More breathing room */
    margin: 0 auto;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1); /* Soft, modern shadow */
    border-radius: 20px;
}

/* 2. Headline Styling */
.wprm-recipe-template-chic-template .wprm-recipe-name {
    font-size: 3em !important;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px !important;
    color: #1a1a1a;
}

/* 3. Section Header styling (Modern & Minimal) */
.wprm-recipe-template-chic-template .wprm-recipe-header {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8em;
    font-weight: 700;
    color: #999;
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 10px;
    margin-bottom: 25px !important;
}

/* 4. Cleaner Button Styling */
.wprm-template-chic-buttons .wprm-recipe-button {
    background: #f4f4f4 !important;
    border: none !important;
    color: #333 !important;
    font-weight: 600;
    padding: 12px 20px !important;
    border-radius: 50px !important; /* Pill shape is very modern */
}

/* 5. Ingredients & Instructions */
.wprm-recipe-ingredients li, .wprm-recipe-instructions li {
    padding-bottom: 15px !important;
    line-height: 1.6;
}

/* Styling the Meta Container to look like a modern dashboard */
.wprm-recipe-template-chic-template .wprm-recipe-meta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfdfd;
    padding: 20px !important;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
}

/* Cleaning up the labels to look premium */
.wprm-recipe-template-chic-template .wprm-recipe-details-label {
    text-transform: uppercase;
    font-size: 0.7em !important;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

/* Making the values pop */
.wprm-recipe-template-chic-template .wprm-recipe-details-value {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}