/* Reskins WooCommerce's default block-theme pages (shop, product, cart,
   checkout, my-account) and the blog (post archive + single posts) to
   match the landing page's "shopfront" design tokens, since the homepage
   is fully custom but everything else still runs on Twenty Twenty-Five's
   default look otherwise. */

/* Once a sold-individually product is already in the cart, hide the real
   Add to Cart form/button (which would otherwise error if clicked again)
   and rely on the "go to checkout" link the mu-plugin adds instead. */
body.td-already-in-cart form.cart,
body.td-already-in-cart .wc-block-components-product-button,
body.td-already-in-cart .wp-block-woocommerce-add-to-cart-form {
	display: none !important;
}

body {
	--td-ink: #17211B;
	--td-ink-soft: #4B5347;
	--td-paper: #EEF0E4;
	--td-paper-raised: #F8F9F1;
	--td-line: #D6D8C8;
	--td-accent: #167A56;
	--td-accent-bright: #1FA06D;
	--td-accent-ink: #F4FBF6;
	--td-radius: 14px;
	background: var(--td-paper) !important;
	color: var(--td-ink) !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
}

/* Auto-injected mini-cart / account icons, and the classic "View cart" link
   that appears next to Add to Cart buttons — this is a single-product,
   buy-now store, not a multi-item shopping experience; nobody needs to
   view a cart. See teledesk-shop-theme.js for the matching fix to the
   "N in cart" button itself, which otherwise re-attempts adding a second
   item (blocked, since it's sold individually) instead of going anywhere. */
.wp-block-woocommerce-customer-account,
.wp-block-woocommerce-mini-cart,
.added_to_cart.wc_forward,
a.added_to_cart {
	display: none !important;
}

a { color: var(--td-accent); }
a:hover { color: var(--td-accent-bright); }

.wp-block-site-title a { color: var(--td-ink) !important; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; }

h1, h2, h3, .wp-block-post-title, .product_title, .entry-title {
	color: var(--td-ink) !important;
	font-weight: 800 !important;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

/* Buttons — primary CTAs (Add to cart, Proceed to Checkout, Place order) */
.wp-element-button,
.wp-block-button__link,
.wc-block-components-button,
.wc-block-cart__submit-button,
.button.alt,
a.button,
button.button,
.checkout-button,
#place_order,
.wc-block-components-checkout-place-order-button {
	background: var(--td-accent) !important;
	border-color: var(--td-accent) !important;
	color: var(--td-accent-ink) !important;
	border-radius: 999px !important;
	font-weight: 700 !important;
	transition: background-color 160ms ease, transform 160ms ease;
}
.wp-element-button:hover,
.wp-block-button__link:hover,
.wc-block-components-button:hover,
.wc-block-cart__submit-button:hover,
.button.alt:hover,
a.button:hover,
button.button:hover,
#place_order:hover {
	background: var(--td-accent-bright) !important;
	border-color: var(--td-accent-bright) !important;
}

/* Price color */
.woocommerce-Price-amount,
.wc-block-components-formatted-money-amount,
.price {
	color: var(--td-accent) !important;
	font-weight: 700;
}

/* Cards / panels: cart totals, checkout sidebar, product summary boxes */
.wc-block-cart__totals-title,
.wc-block-components-totals-wrapper,
.wc-block-checkout__sidebar .wc-block-components-panel,
.wp-block-woocommerce-checkout-order-summary-block,
.wp-block-woocommerce-cart-order-summary-block,
.woocommerce-checkout-review-order,
table.shop_table {
	background: var(--td-paper-raised) !important;
	border: 1px solid var(--td-line) !important;
	border-radius: var(--td-radius) !important;
}

/* Form inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea,
.wc-block-components-text-input input,
.wc-block-components-combobox input {
	background: #fff !important;
	border: 1px solid var(--td-line) !important;
	border-radius: 8px !important;
	color: var(--td-ink) !important;
}
input:focus, select:focus, textarea:focus {
	outline: none !important;
	border-color: var(--td-accent) !important;
	box-shadow: 0 0 0 3px rgba(22, 122, 86, .15) !important;
}

/* Footer / secondary text stays legible against the paper background */
.wp-block-group.has-text-color:not(.has-background) { color: var(--td-ink-soft); }

/* --- Blog (post archive + single post) --- */

.wp-block-post-title a { color: var(--td-ink) !important; }

/* Post excerpts/cards on the archive listing */
.wp-block-post {
	background: var(--td-paper-raised);
	border: 1px solid var(--td-line);
	border-radius: var(--td-radius);
	padding: 1.5rem;
}

.wp-block-post-date,
.wp-block-post-terms,
.wp-block-post-author {
	color: var(--td-ink-soft) !important;
	font-size: .85rem;
}

.wp-block-post-terms a {
	display: inline-block;
	background: var(--td-paper);
	border: 1px solid var(--td-line);
	border-radius: 999px;
	padding: .15rem .7rem;
	font-size: .78rem;
	font-weight: 600;
	text-decoration: none;
}

/* Single-post reading column */
.entry-content {
	font-size: 1.05rem;
	line-height: 1.7;
}
.entry-content > * { max-width: 65ch; }
.entry-content h2, .entry-content h3 { margin-top: 2em; }
.entry-content blockquote {
	border-left: 3px solid var(--td-accent);
	padding-left: 1.2rem;
	color: var(--td-ink-soft);
	font-style: italic;
}
.entry-content code {
	background: var(--td-paper-raised);
	border: 1px solid var(--td-line);
	border-radius: 4px;
	padding: .1em .4em;
	font-size: .9em;
}
.entry-content pre {
	background: var(--td-paper-raised);
	border: 1px solid var(--td-line);
	border-radius: var(--td-radius);
	padding: 1rem;
	overflow-x: auto;
}

/* Pagination + "next/previous post" links */
.wp-block-query-pagination-next,
.wp-block-query-pagination-previous,
.wp-block-post-navigation-link a {
	color: var(--td-accent) !important;
	font-weight: 600;
	text-decoration: none;
}
