/*
Theme Name: The Perfect Source
Theme URI: https://yourperfectsource.com/
Author: The Perfect Source Ltd
Description: Custom block theme for The Perfect Source Ltd, Wimborne, Dorset. Promotional products, branded merchandise and workwear, with WooCommerce buy-online and request-a-quote support.
Version: 1.0.1
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: Proprietary
Text Domain: perfect-source
*/

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--wp--preset--color--slate); outline-offset: 3px; }

/* ---------- Header ---------- */
.tps-topbar { font-size: 0.875rem; }
.tps-topbar a { color: inherit; text-decoration: none; }
.tps-topbar a:hover { text-decoration: underline; color: inherit; }
.tps-header { border-bottom: 1px solid var(--wp--preset--color--line); position: relative; z-index: 20; background: #fff; }
.tps-header .wp-block-site-logo img { width: auto; max-height: 44px; }
.tps-header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); }
.tps-header-actions .wp-block-button__link { padding: 0.6rem 1.1rem; font-size: 0.9375rem; }

/* ---------- Sections ---------- */
.tps-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.tps-eyebrow { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; font-size: 0.875rem; color: var(--wp--preset--color--primary); margin-bottom: 0.5rem; }
.tps-lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--ink-soft); max-width: 640px; }
.tps-muted { color: var(--wp--preset--color--ink-soft); }
.tps-ticks { font-size: 0.9375rem; color: var(--wp--preset--color--ink-soft); }
.tps-dark, .tps-dark h1, .tps-dark h2, .tps-dark h3 { color: #fff; }
.tps-dark .tps-muted, .tps-dark .tps-lead { color: #D3CADB; }
.tps-dark a:not(.wp-block-button__link) { color: #fff; }

/* Placeholder boxes for photos: replace with an Image block */
.tps-photo { background: var(--wp--preset--color--lilac); border-radius: 24px; min-height: 320px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--wp--preset--color--primary); font-weight: 600; padding: 1.5rem; }
.tps-photo.is-small { min-height: 170px; border-radius: 16px 16px 0 0; }
.wp-block-image.tps-rounded img { border-radius: 24px; }

/* Cards */
.tps-card { border: 1px solid var(--wp--preset--color--line); border-radius: 20px; padding: 1.75rem; background: #fff; height: 100%; box-sizing: border-box; }
.tps-card h3 { margin-top: 0; }
.tps-card.is-flush { padding: 0; overflow: hidden; }
.tps-card.is-flush .tps-card-body { padding: 1.1rem 1.25rem 1.4rem; }
.tps-card-dark { background: #3B2D47; border-radius: 16px; padding: 1.4rem; height: 100%; box-sizing: border-box; }
.tps-card-dark p { margin: 0.3rem 0 0; color: #D3CADB; }
.tps-card-dark h3 { color: #fff; margin: 0; font-family: var(--wp--preset--font-family--body); font-size: 1.2rem; }
.tps-card-dark a { color: #fff; text-decoration: none; }
.tps-card-dark a:hover { text-decoration: underline; }
.tps-review { background: #fff; border-radius: 20px; padding: 1.75rem; height: 100%; box-sizing: border-box; }
.tps-review .tps-review-quote { font-size: 1.125rem; }
.tps-review .tps-review-who { font-weight: 700; color: var(--wp--preset--color--primary); }
.tps-step-num { display: inline-flex; width: 40px; height: 40px; border-radius: 999px; background: var(--wp--preset--color--primary); color: #fff; align-items: center; justify-content: center; font-weight: 700; margin: 0 0 0.75rem; }
.wp-block-columns.tps-grid { gap: 1.25rem; }
.wp-block-columns.tps-grid + .wp-block-columns.tps-grid { margin-top: 1.25rem; }

/* Pills (areas served) */
.tps-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tps-pills .wp-block-button__link { background: var(--wp--preset--color--mist); color: var(--wp--preset--color--primary); padding: 0.6rem 1.1rem; font-weight: 600; }
.tps-pills .wp-block-button__link:hover { background: var(--wp--preset--color--lilac); color: var(--wp--preset--color--primary-dark); }
.tps-dark .tps-pills .wp-block-button__link { background: #3B2D47; color: #fff; }

/* Button styles */
.wp-block-button.is-style-accent .wp-block-button__link { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-accent .wp-block-button__link:hover { background: #AFBCD9; color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; border: 1.5px solid currentColor; color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--mist); color: var(--wp--preset--color--ink); }
.tps-dark .wp-block-button.is-style-outline .wp-block-button__link { color: #fff; }
.tps-dark .wp-block-button.is-style-outline .wp-block-button__link:hover { background: rgba(255,255,255,0.1); }

/* FAQ */
.wp-block-details summary { font-weight: 700; font-size: 1.125rem; cursor: pointer; }
.wp-block-details > p { color: var(--wp--preset--color--ink-soft); margin-top: 0.6rem; }

/* Breadcrumbs */
.tps-breadcrumb { font-size: 0.875rem; color: var(--wp--preset--color--ink-soft); }

/* ---------- Enquiry form ---------- */
.tps-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; background: #fff; color: var(--wp--preset--color--ink); padding: 1.75rem; border-radius: 20px; }
.tps-form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9375rem; }
.tps-form input, .tps-form textarea, .tps-form select { min-height: 46px; border: 1px solid #C3B8CC; border-radius: 10px; padding: 0.5rem 0.75rem; font: inherit; background: #fff; color: inherit; }
.tps-form textarea { min-height: 120px; }
.tps-form .tps-full { grid-column: 1 / -1; }
.tps-form .tps-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tps-form button { min-height: 52px; border: 0; border-radius: 999px; background: var(--wp--preset--color--primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.tps-form button:hover { background: var(--wp--preset--color--primary-dark); }
.tps-form-notice { grid-column: 1 / -1; padding: 0.85rem 1rem; border-radius: 10px; background: var(--wp--preset--color--mist); font-weight: 600; }
.tps-form-notice.is-error { background: #FBE9E9; color: #8A1F1F; }
.tps-form .tps-privacy { font-size: 0.875rem; color: var(--wp--preset--color--ink-soft); font-weight: 400; }
@media (max-width: 640px) { .tps-form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.tps-footer { font-size: 0.9375rem; }
.tps-footer a { color: #D3CADB; text-decoration: none; }
.tps-footer a:hover { color: #fff; text-decoration: underline; }
.tps-footer .tps-footer-heading { color: #fff; font-weight: 700; font-family: var(--wp--preset--font-family--body); font-size: 1rem; margin-bottom: 0.5rem; }
.tps-footer .tps-legal { border-top: 1px solid #4A3B57; font-size: 0.875rem; padding-top: 1rem; }

/* ---------- WooCommerce ---------- */
.woocommerce ul.products li.product { text-align: left; }
.woocommerce ul.products li.product a img { border-radius: 16px; background: var(--wp--preset--color--surface); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--wp--preset--font-family--body); font-weight: 700; font-size: 1.125rem; color: var(--wp--preset--color--ink); }
.woocommerce ul.products li.product .price { color: var(--wp--preset--color--ink-soft); font-weight: 600; }
.tps-badge { display: inline-block; font-size: 0.8125rem; font-weight: 700; padding: 0.2rem 0.65rem; border-radius: 999px; margin-bottom: 0.5rem; }
.tps-badge.is-buy { background: var(--wp--preset--color--primary); color: #fff; }
.tps-badge.is-quote { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--wp--preset--color--primary); color: #fff; border-radius: 999px; padding: 0.8rem 1.5rem; font-weight: 700; }
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover { background: var(--wp--preset--color--primary-dark); color: #fff; }
.woocommerce div.product .product_title { font-size: clamp(2rem, 3vw, 2.6rem); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--wp--preset--color--ink); font-weight: 700; }
.woocommerce div.product div.images img { border-radius: 24px; }
.woocommerce-products-header__title.page-title { margin-top: 0; }
.tps-shop-intro { color: var(--wp--preset--color--ink-soft); max-width: 760px; }
.tps-catalogue-cta { margin-top: 2rem; padding: 1.5rem 1.75rem; border: 1.5px dashed #B3A3C2; border-radius: 20px; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.tps-catalogue-cta a.tps-catalogue-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.4rem; border-radius: 999px; background: var(--wp--preset--color--primary); color: #fff; font-weight: 700; text-decoration: none; }
.tps-catalogue-cta a.tps-catalogue-btn:hover { background: var(--wp--preset--color--primary-dark); color: #fff; }
.tps-trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.9375rem; color: var(--wp--preset--color--ink-soft); border-top: 1px solid var(--wp--preset--color--line); padding-top: 1rem; margin-top: 1.25rem; }
