/* Dynamic shop content. Divi layouts provide their own surrounding sections. */
.cn-product-grid, .cn-recipe-grid {
    --cn-shop-ink: #33212c;
    --cn-shop-berry: #813350;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: clamp(16px, 2.2vw, 32px);
    align-items: stretch;
}
body #page-container ul.cn-product-grid {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cn-product-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 0 0 1.15rem;
    color: var(--cn-shop-ink);
    border-bottom: 1px solid #d5c9c4;
}
.cn-product-card .cn-product-overview, .cn-recipe-card a {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}
.cn-product-photo {
    width: 100%;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    margin-bottom: 1.1rem;
    border-radius: 12px;
    background: #f3ece7;
    overflow: hidden;
}
.cn-product-photo img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}
.cn-product-grid .cn-product-card h3, .cn-recipe-grid .cn-recipe-card h3 {
    font-size: clamp(20px, 1.55vw, 26px);
    line-height: 1.22;
    margin: 0 0 .45rem;
    padding: 0;
    color: inherit;
    overflow-wrap: anywhere;
}
.cn-product-card .cn-product-size, .cn-product-card .cn-product-stock {
    color: #65525b;
    font-size: .88rem;
    padding: 0 0 .5rem;
}
.cn-product-card .cn-product-price {
    padding: .2rem 0 .8rem;
    margin: 0;
    color: var(--cn-shop-ink);
    font-weight: 650;
}
.cn-product-grid .cn-product-buy, .cn-product-grid .added_to_cart {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: .55rem 1rem;
    margin-top: auto;
    border: 1px solid var(--cn-shop-berry);
    border-radius: 999px;
    background: transparent;
    color: var(--cn-shop-berry);
    text-decoration: none;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.35;
}
.cn-product-grid .added_to_cart { margin-top: .5rem; }
.cn-product-grid .cn-product-buy:hover, .cn-product-grid .added_to_cart:hover {
    color: white;
    background: var(--cn-shop-berry);
}
.cn-product-card a:focus-visible, .cn-recipe-card a:focus-visible {
    outline: 3px solid #205f57;
    outline-offset: 3px;
}
.cn-shop-empty {
    padding: 1rem 0;
    color: #64515a;
}
.cn-recipe-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.cn-recipe-card {
    padding: clamp(18px, 2vw, 30px);
    color: var(--cn-shop-ink);
    border: 1px solid #dfd6ce;
    border-radius: 12px;
    background: #fbf7f0;
}
.cn-recipe-card a:hover h3, .cn-product-card .cn-product-overview:hover h3 { text-decoration: underline; }
.cn-recipe-card p { margin: .6rem 0 0; line-height: 1.6; }
.cn-recipe-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.cn-recipe-ideas .cn-recipe-card:nth-child(4n+2) { background: #f4e9e9; }
.cn-recipe-ideas .cn-recipe-card:nth-child(4n+3) { background: #f1eee1; }
.cn-recipe-ideas .cn-recipe-card:nth-child(4n) { background: #edf2e7; }

/* Shared storefront style for native WooCommerce templates and blocks. */
body.cn-commerce {
    --cn-order-ink: #30242a;
    --cn-order-line: #d7cac5;
    --cn-order-button: #80364e;
    --cn-order-surface: #fcf9f4;
}
body.cn-commerce #main-content { background-color: var(--cn-order-surface); }
.cn-commerce #main-content :is(h1, h2, h3, .product_title) { color: var(--cn-order-ink); }
.cn-commerce .woocommerce-breadcrumb { font-size: .875rem; line-height: 1.5; }
.cn-commerce :is(.woocommerce-breadcrumb, .woocommerce-breadcrumb a) { color: #695b60; }
.cn-commerce :is(.products .product img, .woocommerce-product-gallery img, .wc-block-components-product-image img) {
    border-radius: 10px;
}
.cn-commerce :is(.summary .price, .woocommerce-Price-amount, .wp-block-woocommerce-product-price) {
    font-variant-numeric: tabular-nums;
}
.cn-commerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
    border-radius: 7px;
    line-height: 1.5;
}
body.cn-commerce #page-container :is(.single_add_to_cart_button.button, .checkout-button.button, #place_order, .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: .7rem 1.5rem;
    border: 1px solid var(--cn-order-button);
    border-radius: 999px;
    background: var(--cn-order-button);
    color: white;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.4;
    text-align: center;
}
body.cn-commerce #page-container :is(.single_add_to_cart_button.button, .checkout-button.button, #place_order, .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button):hover {
    background: #64273d;
    border-color: #64273d;
}
body.cn-commerce #page-container :is(.single_add_to_cart_button.button, .checkout-button.button, #place_order)::after {
    display: none;
}
body.cn-commerce .woocommerce :is(.shop_table, #payment), .cn-commerce .wc-block-components-sidebar {
    border-color: var(--cn-order-line);
    border-radius: 10px;
}
.cn-commerce .woocommerce table.shop_table td, .cn-commerce .woocommerce table.shop_table th {
    padding: .85rem;
    line-height: 1.5;
}
.cn-commerce .woocommerce :is(.form-row input.input-text, .form-row select, .form-row textarea, .variations select) {
    width: 100%;
    max-width: 100%;
    background: white;
    border: 1px solid #93828a;
    border-radius: 6px;
    min-height: 44px;
    padding: .65rem .8rem;
    color: var(--cn-order-ink);
    font-size: 1rem;
}
.cn-commerce .woocommerce form .form-row.woocommerce-invalid :is(input, select, textarea) {
    border-color: #a62232;
}
.cn-commerce .woocommerce form .form-row label {
    line-height: 1.5;
    margin-bottom: .35rem;
}
.cn-commerce .woocommerce :is(.cart_totals, .woocommerce-order-details, .woocommerce-customer-details) h2,
.cn-commerce .wc-block-components-title { overflow-wrap: break-word; }
.cn-commerce #main-content :is(a, button, select, input, textarea):focus-visible {
    outline: 3px solid #265e52;
    outline-offset: 3px;
}
@media (max-width: 767px) {
    .cn-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
    .cn-product-grid .cn-product-card h3 { font-size: 18px; }
    .cn-product-grid .cn-product-buy { padding: .5rem .65rem; }
    .cn-commerce form.cart .single_add_to_cart_button { margin-bottom: .5rem; }
    .cn-commerce .woocommerce table.shop_table td, .cn-commerce .woocommerce table.shop_table th { padding: .7rem .45rem; }
    .cn-commerce .woocommerce .cart-collaterals .cart_totals { width: 100%; }
    .cn-commerce .woocommerce form.checkout .form-row { min-width: 0; }
}
@media (max-width: 359px) {
    .cn-product-grid { grid-template-columns: 1fr; }
}

/* Recipe body is editable in WordPress. The theme renders its title and featured photo. */
body.single-post .cn-recipe-article {
    max-width: 720px;
    margin-inline: auto;
    color: #372b31;
    font-size: clamp(16px, 1.15vw, 19px);
    line-height: 1.72;
}
.cn-recipe-article .cn-recipe-intro { font-size: 1.1em; }
body.single-post .cn-recipe-article h2 {
    margin: 1.5em 0 .45em;
    padding: 0;
    font-size: clamp(22px, 2.4vw, 36px);
    line-height: 1.2;
    color: #38252d;
}
.cn-recipe-article :is(ul, ol) { padding-inline-start: 1.6em; }
.cn-recipe-article li + li { margin-top: .5em; }
.cn-recipe-article .cn-recipe-product {
    padding: clamp(18px, 3vw, 30px);
    background: #f3ece7;
    border-radius: 12px;
    margin-block: 2rem;
}
body.single-post .cn-recipe-product h2 { font-size: 1.22em; margin: 0 0 .6em; }
.cn-recipe-product a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: .2em;
    color: #80364e;
}
.cn-recipe-product a:focus-visible { outline: 3px solid #205f57; outline-offset: 3px; }
.cn-related-recipes {
    clear: both;
    padding: clamp(18px, 3vw, 32px);
    margin-block: 2rem;
    background: #f3ece7;
    border-radius: 12px;
}
.cn-related-recipes a { color: #80364e; text-decoration: underline; text-underline-offset: .2em; }
