/*
 * Astra theme sets .ast-primary-header-bar { background-color: #ffffff; }
 * site-wide. This overrides it to match the page's beige background, but
 * only on single Recipe pages (the "single-recipe" body class WordPress
 * adds automatically), so every other page keeps the white header.
 * Falls back to a warm off-white if the theme's own beige variable isn't
 * defined on your site â never falls back to black.
 */
body.single-recipe .ast-primary-header-bar {
	background-color: var( --ast-global-color-subtle-background, #f5f0e6 ) !important;
	background-image: none !important;
}

/*
 * Defined on :root (not just .rc-recipe) so these variables and the base
 * typography still apply when individual [recipe_*] shortcodes are placed
 * separately (e.g. as Elementor widgets) instead of inside one wrapper.
 */
:root {
	--rc-accent: #c8102e;
	--rc-text: #222;
	--rc-muted: #666;
	--rc-border: #e5e5e5;
	--rc-bg-soft: #f8f7f5;
}
.rc-hero,
.rc-tags,
.rc-facts,
.rc-intro,
.rc-actions,
.rc-ingredients,
.rc-nutrition,
.rc-steps,
.rc-tip,
.rc-share,
.rc-products,
.rc-related,
.rc-recipe {
	color: var(--rc-text);
	font-size: 16px;
	line-height: 1.6;
}
.rc-recipe {
	max-width: 900px;
	margin: 0 auto;
}

.rc-hero {
	margin: 0 0 20px;
	border-radius: 8px;
	overflow: hidden;
}
.rc-hero img {
	width: 100%;
	height: auto;
	display: block;
}

.rc-tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
	padding: 0;
}
.rc-tags a {
	display: inline-block;
	padding: 4px 10px;
	background: var(--rc-bg-soft);
	border-radius: 20px;
	font-size: 13px;
	text-decoration: none;
	color: var(--rc-muted);
}
.rc-tags a:hover {
	background: var(--rc-accent);
	color: #fff;
}

.rc-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin: 0 0 16px;
	padding: 14px 0;
	border-top: 1px solid var(--rc-border);
	border-bottom: 1px solid var(--rc-border);
}
.rc-fact {
	display: flex;
	flex-direction: column;
	font-size: 13px;
	color: var(--rc-muted);
}
.rc-fact strong {
	font-size: 16px;
	color: var(--rc-text);
}

.rc-intro {
	font-size: 17px;
	color: #444;
	margin-bottom: 20px;
}

.rc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 28px;
}

.rc-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	border-radius: 4px;
	border: 1px solid var(--rc-border);
	background: #fff;
	color: var(--rc-text);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.rc-btn:hover {
	border-color: var(--rc-accent);
	color: var(--rc-accent);
}
.rc-btn-primary {
	background: var(--rc-accent);
	border-color: var(--rc-accent);
	color: #fff;
}
.rc-btn-primary:hover {
	opacity: 0.9;
	color: #fff;
}
.rc-btn-small {
	padding: 6px 12px;
	font-size: 13px;
}

.rc-cols {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 32px;
	margin-bottom: 32px;
	align-items: start;
}
@media ( max-width: 700px ) {
	.rc-cols {
		grid-template-columns: 1fr;
	}
}

.rc-ingredients h2,
.rc-steps h2,
.rc-nutrition h2,
.rc-products h2,
.rc-related h2 {
	font-size: 22px;
	margin: 0 0 14px;
}

.rc-servings {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	padding: 8px 14px;
	background: var(--rc-bg-soft);
	border-radius: 30px;
}
.rc-serv-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid var(--rc-border);
	background: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.rc-serv-btn:hover {
	background: var(--rc-accent);
	border-color: var(--rc-accent);
	color: #fff;
}
.rc-serv-text {
	font-size: 14px;
	min-width: 90px;
	text-align: center;
}

.rc-group-title {
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--rc-muted);
	margin: 18px 0 8px;
}
.rc-ing-list {
	list-style: none;
	margin: 0 0 6px;
	padding: 0;
}
.rc-ing {
	display: flex;
	gap: 10px;
	padding: 7px 0;
	border-bottom: 1px dashed var(--rc-border);
	font-size: 15px;
}
.rc-qty {
	min-width: 70px;
	font-weight: 600;
	color: var(--rc-accent);
	flex-shrink: 0;
}
.rc-name a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--rc-border);
}

.rc-nutrition {
	background: var(--rc-bg-soft);
	border-radius: 8px;
	padding: 18px 20px;
}
.rc-nutrition h2 small {
	font-size: 12px;
	font-weight: normal;
	color: var(--rc-muted);
}
.rc-nutrition dl {
	margin: 0;
}
.rc-nutrition dl div {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px solid #e9e7e2;
	font-size: 14px;
}
.rc-nutrition dt {
	color: var(--rc-muted);
}
.rc-nutrition dd {
	margin: 0;
	font-weight: 600;
}

.rc-step-list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: rc-step;
}
.rc-step {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 20px;
	padding: 20px 0;
	border-bottom: 1px solid var(--rc-border);
}
.rc-step:last-child {
	border-bottom: none;
}
@media ( max-width: 640px ) {
	.rc-step {
		grid-template-columns: 1fr;
	}
}
.rc-step-media img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}
.rc-step-num {
	display: inline-block;
	font-weight: 700;
	color: var(--rc-accent);
	margin-bottom: 6px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.rc-step-ings {
	list-style: none;
	margin: 0 0 10px;
	padding: 10px 12px;
	background: var(--rc-bg-soft);
	border-radius: 6px;
	font-size: 14px;
}
.rc-step-ings li {
	padding: 2px 0;
}
.rc-step-text p:first-child {
	margin-top: 0;
}
.rc-step-text p:last-child {
	margin-bottom: 0;
}

.rc-tip {
	background: #fff8e6;
	border: 1px solid #f0dfa8;
	border-radius: 6px;
	padding: 14px 16px;
	margin-bottom: 28px;
	font-size: 15px;
}

.rc-extra {
	margin-bottom: 28px;
}

.rc-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 18px 0;
	border-top: 1px solid var(--rc-border);
	margin-bottom: 28px;
}
.rc-share-label {
	font-weight: 600;
	margin-right: 6px;
}

.rc-products {
	margin-bottom: 32px;
}
.rc-products ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 220px, 1fr ) );
	gap: 14px;
}
.rc-products li {
	background: var(--rc-bg-soft);
	border-radius: 8px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.rc-products li strong {
	font-size: 15px;
}
.rc-products li span {
	font-size: 13px;
	color: var(--rc-muted);
}
.rc-products a {
	align-self: flex-start;
}

.rc-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat( 3, 1fr );
}
.rc-cols-1 { grid-template-columns: 1fr; }
.rc-cols-2 { grid-template-columns: repeat( 2, 1fr ); }
.rc-cols-4 { grid-template-columns: repeat( 4, 1fr ); }
@media ( max-width: 780px ) {
	.rc-grid { grid-template-columns: repeat( 2, 1fr ); }
}
@media ( max-width: 480px ) {
	.rc-grid { grid-template-columns: 1fr; }
}

.rc-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--rc-border);
	transition: box-shadow 0.15s, transform 0.15s;
}
.rc-card:hover {
	box-shadow: 0 6px 18px rgba(0,0,0,0.08);
	transform: translateY(-2px);
}
.rc-card-img img {
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
	display: block;
}
.rc-card-body {
	display: block;
	padding: 12px 14px;
}
.rc-card-title {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 4px;
}
.rc-card-time {
	display: block;
	font-size: 12px;
	color: var(--rc-muted);
}

/* ---------------- Cook mode ---------------- */

.rc-cookmode {
	position: fixed;
	inset: 0;
	background: #fff;
	z-index: 100000;
	display: flex;
	flex-direction: column;
}
.rc-cookmode-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid var(--rc-border);
}
.rc-cookmode-close {
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
}
.rc-cookmode-body {
	flex: 1;
	overflow-y: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.rc-cookmode-step {
	max-width: 700px;
	width: 100%;
	text-align: center;
}
.rc-cookmode-step img {
	max-width: 100%;
	max-height: 40vh;
	border-radius: 10px;
	margin-bottom: 20px;
}
.rc-cookmode-step .rc-step-num {
	font-size: 16px;
}
.rc-cookmode-step .rc-step-text {
	font-size: 20px;
	text-align: left;
}
.rc-cookmode-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-top: 1px solid var(--rc-border);
}
.rc-cookmode-dots {
	display: flex;
	gap: 6px;
}
.rc-cookmode-dots span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--rc-border);
}
.rc-cookmode-dots span.is-active {
	background: var(--rc-accent);
}

@media print {
	.rc-actions,
	.rc-share,
	.rc-related,
	.rc-servings,
	.rc-tags {
		display: none !important;
	}
	.rc-cols {
		grid-template-columns: 1fr;
	}
}
