/*
Theme Name: Teller Co.
Theme URI: https://tellerco.shop
Author: Teller Co.
Description: The house theme for Teller Co., a vintage storytelling print house. Large, calm type for readers of every age.
Version: 1.0.2
Requires at least: 6.6
Tested up to: 6.9
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: tellerco
*/

/* ---------- Ground, focus, reading ---------- */
body.tc-grain {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .13 0 0 0 0 .12 0 0 0 0 .1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--ink);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--wp--preset--color--parchment);
}

/* Running text is justified with hyphenation; headings, labels and controls stay left. */
.wp-block-post-content > p,
.wp-block-post-content .wp-block-group > p,
.tc-justify p,
p.tc-justify {
	text-align: justify;
	hyphens: auto;
	-webkit-hyphens: auto;
	overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6 { text-wrap: balance; overflow-wrap: break-word; hyphens: manual; }

.tc-eyebrow {
	font-family: var(--wp--preset--font-family--label);
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-soft);
}

.tc-orn { display: flex; align-items: center; gap: 14px; color: var(--wp--preset--color--brass); }
.tc-orn::before, .tc-orn::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.8; }

/* ---------- Buttons and fields: never under 48px ---------- */
.wp-element-button, .wp-block-button__link, .button, button, input[type="submit"] { min-height: 52px; }
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 2px solid var(--wp--preset--color--ink);
}
input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="number"],
input[type="password"], select, textarea {
	min-height: 48px;
	font: inherit;
	font-size: 1.125rem;
	padding: 0 14px;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--old-paper);
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: 2px;
}
textarea { padding: 12px 14px; }
input, select, textarea, button { box-sizing: border-box; max-width: 100%; }

/* ---------- Header ---------- */
.tc-header { border-bottom: 1px solid rgba(33, 30, 27, 0.22); }
.tc-header .tc-header__row { min-height: 96px; gap: 24px; }
.tc-logo { display: block; width: 230px; flex: none; }
.tc-logo img { display: block; width: 100%; height: auto; }
.tc-logo .tc-logo__seal { display: none; width: 56px; }
.tc-header .wp-block-navigation a { padding-block: 15px; text-decoration: none; }
.tc-header .wp-block-navigation .current-menu-item > a { box-shadow: inset 0 -2px 0 var(--wp--preset--color--red); }
.tc-header .wp-block-navigation__responsive-container-open {
	font-family: var(--wp--preset--font-family--label);
	font-size: 1.125rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	min-height: 48px;
	padding: 0 18px;
	border: 2px solid var(--wp--preset--color--ink);
}
.tc-header .wp-block-search__label {
	font-family: var(--wp--preset--font-family--label);
	font-size: 1rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.tc-header .wp-block-search { display: flex; align-items: center; gap: 8px; }
.tc-header .wp-block-search__input { width: 150px; }
.tc-header .wc-block-mini-cart__button { min-height: 48px; min-width: 48px; }
.tc-header .wc-block-mini-cart__badge { background: var(--wp--preset--color--red); color: var(--wp--preset--color--parchment); font-size: 1rem; }

@media (max-width: 1100px) { .tc-header .wp-block-search { display: none; } }
@media (max-width: 600px) {
	.tc-header .tc-header__row { min-height: 76px; gap: 12px; }
	.tc-logo { width: 56px; }
	.tc-logo .tc-logo__lockup { display: none; }
	.tc-logo .tc-logo__seal { display: block; }
}

/* ---------- Footer ---------- */
.tc-footer { margin-top: 96px; }
.tc-footer a { color: var(--wp--preset--color--parchment); }
.tc-footer .wp-block-navigation a { display: inline-block; padding-block: 10px; }
.tc-footer .tc-seal-reversed { width: 140px; }
.tc-footer .tc-legal { border-top: 1px solid rgba(243, 233, 210, 0.3); padding-top: 20px; font-size: 1rem; }

/* ---------- Cards, bands and figures ---------- */
.tc-card { background: var(--wp--preset--color--old-paper); border: 1px solid rgba(33, 30, 27, 0.22); }
.tc-card img { width: 100%; object-fit: cover; }
.tc-poster img { border: 10px solid var(--wp--preset--color--old-paper); box-shadow: 0 22px 40px rgba(33, 30, 27, 0.22); }
.tc-tag {
	justify-self: start;
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--label);
	font-size: 1rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.tc-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tc-collection-card { display: flex; flex-direction: column; color: var(--wp--preset--color--ink); text-decoration: none; }
.tc-collection-card .tc-card__img { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: #d9ccae; }
.tc-collection-card .tc-card__img img { width: 100%; height: 100%; object-fit: cover; }
.tc-collection-card .tc-card__txt { display: grid; gap: 8px; padding: 18px 18px 22px; }
.tc-collection-card strong { font-family: var(--wp--preset--font-family--display); font-size: 1.375rem; line-height: 1.2; }
.tc-collection-card .tc-card__txt > span { font-size: 1rem; line-height: 1.55; color: var(--wp--preset--color--ink-soft); }
@media (max-width: 1000px) { .tc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tc-cards { grid-template-columns: 1fr; } .tc-collection-card .tc-card__img { aspect-ratio: 4 / 3; } }

.tc-trust__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tc-trust__item { display: grid; gap: 6px; border-left: 1px solid rgba(243, 233, 210, 0.35); padding-left: 18px; }
.tc-trust__item span { font-size: 1rem; line-height: 1.5; }
@media (max-width: 800px) { .tc-trust__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tc-trust__row { grid-template-columns: 1fr; } }
.tc-trust strong {
	font-family: var(--wp--preset--font-family--label);
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* Missing images fall back to a calm paper panel instead of a broken box. */
.wp-block-post-featured-image:empty,
.wc-block-components-product-image:empty { min-height: 200px; background: var(--wp--preset--color--old-paper); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Shop ---------- */
.tc-products .wc-block-product-template { gap: 28px; }
.tc-products .wc-block-components-product-image { background: var(--wp--preset--color--old-paper); border: 1px solid rgba(33, 30, 27, 0.22); padding: 16px; }
.tc-products .wc-block-components-product-image img { box-shadow: 0 8px 18px rgba(33, 30, 27, 0.18); }
.tc-products .wp-block-post-title { font-size: 1.375rem; }
.tc-products .wc-block-components-product-price { font-family: var(--wp--preset--font-family--label); font-size: 1.25rem; font-weight: 600; }
.tc-filters .wc-block-product-filters { font-size: 1.125rem; }
.tc-filters input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--wp--preset--color--red); }
.tc-filters label { min-height: 44px; display: flex; align-items: center; gap: 12px; }
@media (max-width: 900px) { .tc-shop { flex-wrap: wrap !important; } .tc-shop > .wp-block-column { flex-basis: 100% !important; } }

/* Missing product images: a calm Parchment panel, not a grey box. */
img.woocommerce-placeholder, .wc-block-components-product-image__placeholder {
	background: var(--wp--preset--color--old-paper);
	border: 1px solid rgba(33, 30, 27, 0.22);
	opacity: 1;
	filter: sepia(0.35);
}

/* ---------- Product ---------- */
.tc-buy { display: grid; gap: 22px; align-content: start; }
.tc-buy .wp-block-post-title { font-size: var(--wp--preset--font-size--h-1); }
.tc-delivery {
	display: flex; gap: 12px; align-items: flex-start; margin: 0;
	background: var(--wp--preset--color--old-paper);
	border-left: 3px solid var(--wp--preset--color--green);
	padding: 14px 16px; font-size: 1rem; line-height: 1.55;
}
.tc-delivery span { color: var(--wp--preset--color--brass); }
.tc-print-size { display: grid; gap: 12px; border: 2px solid var(--wp--preset--color--ink); background: var(--wp--preset--color--old-paper); padding: 18px 20px; margin-bottom: 16px; }
.tc-print-size__big { margin: 0; font-family: var(--wp--preset--font-family--label); font-size: 1.375rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.tc-print-size__sample { background: #fffdf7; border: 1px dashed var(--wp--preset--color--ink-soft); padding: 16px 18px; line-height: 1.5; }
.tc-print-size__sample .tc-eyebrow { display: block; margin-bottom: 8px; }
.tc-format-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.tc-format-button {
	min-height: 64px; padding: 12px 14px; text-align: left; cursor: pointer;
	font-family: var(--wp--preset--font-family--label); font-size: 1.125rem; letter-spacing: 0.06em; text-transform: uppercase;
	color: var(--wp--preset--color--ink); background: var(--wp--preset--color--old-paper);
	border: 2px solid rgba(33, 30, 27, 0.22); border-radius: 2px;
}
.tc-format-button[aria-checked="true"] { border-color: var(--wp--preset--color--red); box-shadow: inset 0 0 0 1px var(--wp--preset--color--red); }
.tc-format-button:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 480px) { .tc-format-buttons { grid-template-columns: 1fr; } }
.tc-visually-hidden { position: absolute !important; width: 1px !important; min-width: 0 !important; height: 1px !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.tc-story h2 { font-size: 1.75rem; display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.tc-story h2::before { content: "\2726"; color: var(--wp--preset--color--brass); font-size: 1rem; }
@media (max-width: 900px) { .tc-pdp { flex-wrap: wrap !important; } .tc-pdp > .wp-block-column { flex-basis: 100% !important; } }

/* ---------- Cart, checkout and account (classic WooCommerce shortcodes) ---------- */
.woocommerce form .form-row label { display: block; margin-bottom: 8px; font-family: var(--wp--preset--font-family--label); font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; }
.woocommerce form .form-row { margin-bottom: 18px; }
.woocommerce form .form-row .input-text, .woocommerce form .form-row select, .woocommerce .select2-container .select2-selection { min-height: 52px; font-size: 1.125rem; }
.woocommerce .select2-container .select2-selection__rendered { line-height: 50px; }
.woocommerce-checkout h3, .woocommerce-cart h2 { font-size: var(--wp--preset--font-size--h-3); }
#place_order {
	min-height: 52px;
	width: 100%;
	font-size: 1.25rem;
	background: var(--wp--preset--color--red);
	color: var(--wp--preset--color--parchment);
	font-family: var(--wp--preset--font-family--label);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border: 0;
	border-radius: 2px;
}
#place_order:hover { background: var(--wp--preset--color--ink); }
.tc-digital-consent { background: var(--wp--preset--color--old-paper); border: 2px solid var(--wp--preset--color--ink); padding: 16px 18px; margin: 20px 0; }
.tc-digital-consent label { display: flex !important; gap: 14px; align-items: flex-start; text-transform: none !important; letter-spacing: 0 !important; font-family: var(--wp--preset--font-family--body) !important; font-size: 1.125rem !important; line-height: 1.5; cursor: pointer; }
.tc-digital-consent input { width: 24px; height: 24px; flex: none; margin-top: 3px; accent-color: var(--wp--preset--color--red); }
.woocommerce-checkout #payment ul.payment_methods li { min-height: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; background: var(--wp--preset--color--old-paper); border: 1px solid rgba(33, 30, 27, 0.22); margin-bottom: 10px; }
.woocommerce table.shop_table { border-collapse: collapse; width: 100%; font-size: 1.125rem; }
.woocommerce table.shop_table th { font-family: var(--wp--preset--font-family--label); font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; text-align: left; }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { padding: 16px 8px; border-bottom: 1px solid rgba(33, 30, 27, 0.22); }
.woocommerce .quantity .qty { width: 84px; min-height: 52px; text-align: center; }
.woocommerce a.button, .woocommerce button.button, .woocommerce .wc-proceed-to-checkout a.checkout-button {
	display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
	background: var(--wp--preset--color--red); color: var(--wp--preset--color--parchment);
	font-family: var(--wp--preset--font-family--label); font-size: 1.125rem; letter-spacing: 0.12em; text-transform: uppercase;
	border: 0; border-radius: 2px; text-decoration: none;
}
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	min-height: 52px;
	padding: 0 16px;
	border: 1px solid rgba(33, 30, 27, 0.22);
	background: var(--wp--preset--color--old-paper);
	font-family: var(--wp--preset--font-family--label);
	font-size: 1.125rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.woocommerce-MyAccount-navigation .is-active a { border-color: var(--wp--preset--color--red); box-shadow: inset 3px 0 0 var(--wp--preset--color--red); }
.woocommerce-info, .woocommerce-message, .woocommerce-error { padding: 16px 18px; border: 1px solid var(--wp--preset--color--green); background: var(--wp--preset--color--old-paper); list-style: none; font-size: 1.125rem; }
.woocommerce-error { border-color: var(--wp--preset--color--red); }

/* ---------- Help: questions that open in place ---------- */
.wp-block-details { border-top: 1px solid rgba(33, 30, 27, 0.22); padding: 6px 0; }
.wp-block-details summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-family: var(--wp--preset--font-family--display); font-size: 1.375rem; font-weight: 700; list-style: none; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-family: var(--wp--preset--font-family--label); font-size: 1.75rem; color: var(--wp--preset--color--red); }
.wp-block-details[open] summary::after { content: "\2212"; }
.wp-block-details p { text-align: justify; hyphens: auto; }

/* ---------- Navigation (classic menus) ---------- */
.tc-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }
.tc-nav__list a, .tc-nav__narrow summary {
	display: inline-flex; align-items: center; min-height: 48px;
	font-family: var(--wp--preset--font-family--label); font-size: 1.125rem; font-weight: 500;
	letter-spacing: 0.12em; text-transform: uppercase; color: var(--wp--preset--color--ink); text-decoration: none;
}
.tc-nav__list .current-menu-item > a, .tc-nav__list .current_page_item > a { box-shadow: inset 0 -2px 0 var(--wp--preset--color--red); }
.tc-nav__list .sub-menu { display: none; list-style: none; margin: 0; padding: 0; }
.tc-nav__wide li { position: relative; }
.tc-nav__wide li:hover > .sub-menu, .tc-nav__wide li:focus-within > .sub-menu {
	display: block; position: absolute; left: 0; top: 100%; z-index: 20; min-width: 260px; padding: 8px 18px;
	background: var(--wp--preset--color--old-paper); border: 1px solid var(--wp--preset--color--ink); box-shadow: 0 14px 30px rgba(33, 30, 27, 0.2);
}
.tc-nav__panel .sub-menu { display: block; padding-left: 16px; }
.tc-nav__search { display: grid; gap: 8px; padding: 12px 0 16px; border-bottom: 1px solid rgba(33, 30, 27, 0.15); }
.tc-nav__search label { font-family: var(--wp--preset--font-family--label); font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; }
.tc-nav__search button { min-height: 48px; background: var(--wp--preset--color--red); color: var(--wp--preset--color--parchment); border: 0; border-radius: 2px; font-family: var(--wp--preset--font-family--label); font-size: 1.125rem; letter-spacing: 0.12em; text-transform: uppercase; }
.tc-nav__narrow { display: none; position: relative; }
.tc-nav__narrow summary { list-style: none; cursor: pointer; padding: 0 18px; border: 2px solid var(--wp--preset--color--ink); border-radius: 2px; }
.tc-nav__narrow summary::-webkit-details-marker { display: none; }
.tc-nav__panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 240px; background: var(--wp--preset--color--old-paper); border: 1px solid var(--wp--preset--color--ink); padding: 8px 18px; box-shadow: 0 14px 30px rgba(33, 30, 27, 0.2); }
.tc-nav__panel .tc-nav__list { flex-direction: column; gap: 0; }
.tc-nav__panel .tc-nav__list a { width: 100%; border-bottom: 1px solid rgba(33, 30, 27, 0.15); }
@media (max-width: 1100px) { .tc-nav__wide { display: none; } .tc-nav__narrow { display: block; } }
.tc-footer-nav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tc-footer-nav__list a { display: inline-flex; align-items: center; min-height: 44px; color: var(--wp--preset--color--parchment); }

/* WooCommerce filter overlay controls and breadcrumbs: big enough to read and to tap. */
.wc-block-product-filters__open-overlay, .wc-block-product-filters__close-overlay,
.wc-block-product-filters__open-overlay span, .wc-block-product-filters__close-overlay span { font-size: 1.125rem !important; }
.wc-block-product-filters__open-overlay, .wc-block-product-filters__close-overlay { min-height: 48px; }
.woocommerce-breadcrumb a, .wc-block-breadcrumbs a { display: inline-block; padding-block: 13px; }

/* Small WooCommerce controls brought up to a comfortable tap size. */
.woocommerce-product-gallery__trigger { width: 48px !important; height: 48px !important; display: grid !important; place-items: center; }
.tc-buy .wp-block-post-terms a { display: inline-block; padding-block: 12px; }
.reset_variations { display: inline-block; padding: 13px 0; font-size: 1.125rem; }
.comment-form-rating .stars a { display: inline-block; width: 44px !important; height: 44px !important; }
.comment-form-cookies-consent input { width: 24px; height: 24px; accent-color: var(--wp--preset--color--red); }
.wp-block-post-terms a { display: inline-block; padding-block: 12px; }
.wp-block-post-title a { display: inline-block; padding-block: 10px; }
.woocommerce-form-login__rememberme input, .woocommerce form input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--wp--preset--color--red); vertical-align: middle; }
.wc-block-components-notice-banner, .wc-block-components-notice-banner__content, .woocommerce-form-coupon-toggle, .showcoupon { font-size: 1.125rem !important; }
.wc-block-cart-link { display: inline-grid; place-items: center; min-width: 48px; min-height: 48px; }
.woocommerce a.remove { display: inline-grid !important; place-items: center; width: 44px !important; height: 44px !important; font-size: 1.75rem !important; line-height: 1 !important; color: var(--wp--preset--color--red) !important; }
.wc-block-mini-cart__drawer a, .showcoupon { display: inline-block; padding-block: 11px; }

/* Variations: the label sits above the format buttons, not beside them. */
.tc-buy table.variations, .tc-buy table.variations tbody, .tc-buy table.variations tr,
.tc-buy table.variations th, .tc-buy table.variations td { display: block; width: 100%; padding: 0; border: 0; }
.tc-buy table.variations th.label label { font-family: var(--wp--preset--font-family--label); font-size: 1.125rem; letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 12px; }
.tc-buy .wc-block-components-product-price, .tc-buy .wc-block-components-product-price .amount { font-family: var(--wp--preset--font-family--label); font-size: 1.75rem; font-weight: 600; letter-spacing: 0.03em; }

.tc-collection-banner { margin: 24px 0 0; }
.tc-collection-banner img { width: 100%; max-height: 260px; object-fit: cover; border: 8px solid var(--wp--preset--color--old-paper); }
