/*
Theme Name:        Tony Carroll 2026
Theme URI:         https://tonycarrollbutchers.ie/
Author:            Keltik
Author URI:        https://keltik.ie/
Description:       Block theme for Tony Carroll Family Butchers, Ballinasloe. Shopfront green and butcher red, price-tag specials, opening hours and delivery front and centre. Replaces the Graphene theme.
Version:           1.0.0
Requires at least: 6.6
Tested up to:      7.1
Requires PHP:      8.1
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       tony-carroll
Tags:              block-patterns, full-site-editing, food-and-drink, e-commerce, custom-colors, editor-style
*/

/* ---------- Info strip & header ---------- */
.tc-strip a { color: inherit; text-decoration: none; }
.tc-strip a:hover { text-decoration: underline; }
.tc-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--wp--preset--color--line); }
.admin-bar .tc-header { top: var(--wp-admin--admin-bar--height, 32px); }

/* ---------- Butcher stamp heading style ---------- */
.is-style-stamp {
	display: inline-block;
	padding: .25em .6em .3em;
	border: 3px solid currentColor;
	border-radius: 6px;
	transform: rotate(-2deg);
	color: var(--wp--preset--color--red);
	text-transform: uppercase;
	letter-spacing: .04em;
}

/* ---------- Price-tag specials ---------- */
.tc-specials .wp-block-post-template > li { display: flex; }
.tc-card {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 10px;
	padding: 1.5rem 1.5rem 1.25rem;
	box-shadow: 6px 6px 0 var(--wp--preset--color--green);
	transition: transform .2s ease, box-shadow .2s ease;
}
.tc-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--wp--preset--color--red); }
/* the punched hole of a swing tag */
.tc-card::before {
	content: "";
	position: absolute; top: 14px; right: 16px;
	width: 14px; height: 14px; border-radius: 50%;
	border: 2px solid var(--wp--preset--color--ink);
	background: var(--wp--preset--color--tile);
}
.tc-card .wp-block-post-title { margin: 0; font-size: var(--wp--preset--font-size--large); }
.tc-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.tc-price {
	display: block;
	font-family: var(--wp--preset--font-family--slab);
	font-size: var(--wp--preset--font-size--price);
	line-height: .95;
	color: var(--wp--preset--color--red);
	margin-bottom: .15em;
}
.tc-price__cur { font-size: .55em; vertical-align: .55em; margin-right: .04em; }
.tc-card .wp-block-post-content { font-size: var(--wp--preset--font-size--small); }
.tc-card .wp-block-post-content p:has(img),
.tc-card .wp-block-post-content figure,
.tc-card .wp-block-post-content img,
.tc-is-special .wp-block-post-content > p:has(> img:first-child) { display: none; } /* old red banner graphics */
.tc-card ul, .tc-is-special .wp-block-post-content ul {
	list-style: none; padding: 0; margin: .75rem 0 0;
	text-transform: lowercase;
}
.tc-card ul li, .tc-is-special .wp-block-post-content ul li {
	padding: .45rem 0;
	border-bottom: 1px dashed var(--wp--preset--color--line);
}
.tc-card ul li::first-letter, .tc-is-special .wp-block-post-content ul li::first-letter { text-transform: uppercase; }
.tc-card ul li:last-child { border-bottom: 0; }

/* ---------- Photo tiles ---------- */
.tc-tiles figure { margin: 0; overflow: hidden; border-radius: 8px; }
.tc-tiles img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; transition: transform .5s ease; }
.tc-tiles figure:hover img { transform: scale(1.04); }
.tc-tiles figcaption {
	margin: 0 !important;
	padding: .55rem .75rem !important;
	background: var(--wp--preset--color--green-deep);
	color: var(--wp--preset--color--base) !important;
	font-weight: 700;
	text-align: left !important;
}

/* ---------- Team portraits ---------- */
.tc-team img { aspect-ratio: 3/4; object-fit: cover; object-position: top; border-radius: 8px; width: 100%; }

/* ---------- Hours table ---------- */
.tc-hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tc-hours td { padding: .55rem 0; border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
.tc-hours td:last-child { text-align: right; font-weight: 700; }

/* ---------- Tiled background (subtle shop-wall tiles) ---------- */
.has-tile-background-color {
	background-image:
		linear-gradient(var(--wp--preset--color--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--wp--preset--color--line) 1px, transparent 1px);
	background-size: 44px 44px;
	background-position: -1px -1px;
}

/* ---------- Contact Form 7 ---------- */
.wpcf7 input:not([type=submit]), .wpcf7 textarea {
	width: 100%; padding: .75em .9em; font: inherit;
	border: 2px solid var(--wp--preset--color--line); border-radius: 6px; background: #fff;
}
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 0; border-color: var(--wp--preset--color--green); }
.wpcf7 input[type=submit] {
	background: var(--wp--preset--color--red); color: #fff; border: 0; border-radius: 6px;
	padding: .85em 1.8em; font: inherit; font-weight: 700; cursor: pointer;
}
.wpcf7 input[type=submit]:hover { background: var(--wp--preset--color--red-deep); }

/* Old content: images inserted at 600px stay centred, never stretched */
.wp-block-post-content img { max-width: 100%; height: auto; }
.wp-block-post-content .aligncenter { display: block; margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
	.tc-card, .tc-tiles img { transition: none; }
}

/* Non-special posts (tips) in a card grid: show a short preview */
.wp-block-post:not(.tc-special) .tc-card .wp-block-post-content {
	max-height: 9.5em; overflow: hidden;
	-webkit-mask-image: linear-gradient(#000 60%, transparent);
	mask-image: linear-gradient(#000 60%, transparent);
}
.wp-block-post:not(.tc-special) .tc-card ul { text-transform: none; }
.wp-block-post:not(.tc-special) .tc-card { box-shadow: 6px 6px 0 var(--wp--preset--color--line); }
