/*
Theme Name: 3D Print For Me
Theme URI: https://3dprintforme.com.au
Author: 3D Print For Me
Description: A clean, friendly block theme for a 3D printing business — shop, gallery and materials guide, with WooCommerce support.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: printforme
Tags: block-patterns, full-site-editing, e-commerce, one-column, wide-blocks, custom-colors
*/

/* ---------- Small touches theme.json can't express ---------- */

html { scroll-behavior: smooth; }
::selection { background: var(--wp--preset--color--primary-soft); }

/* Sticky, softly-blurred header */
.pfm-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
body.admin-bar .pfm-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .pfm-header { top: 46px; } }

/* Logo mark */
.pfm-logo-mark { flex-shrink: 0; }
.pfm-logo-mark img { display: block; border-radius: 10px !important; }

/* Eyebrow label above headings */
.pfm-eyebrow {
	display: block;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700;
	font-size: 0.78rem;
}

/* Card style (Group block → Styles → Card) */
.is-style-pfm-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 20px;
	box-shadow: var(--wp--preset--shadow--soft);
	transition: transform .2s ease, box-shadow .2s ease;
}
.is-style-pfm-card:hover { transform: translateY(-3px); box-shadow: var(--wp--preset--shadow--lift); }

/* Outline button variation */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	padding: calc(0.8rem - 2px) calc(1.6rem - 2px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--contrast);
}

/* Step numbers in "How it works" */
.pfm-step-num {
	width: 3rem; height: 3rem;
	display: grid; place-items: center;
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700; font-size: 1.25rem;
	line-height: 1;
	padding: 0 !important;
	margin: 0 !important;
}

/* Icon tiles */
.pfm-icon img { width: 56px; height: 56px; border-radius: 16px !important; }

/* Material chips */
.pfm-chip {
	display: inline-block;
	padding: 0.25rem 0.75rem !important;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
}

/* Gallery: rounded, gentle zoom */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 16px; }
.wp-block-gallery.has-nested-images figure.wp-block-image { flex-direction: column; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { transition: transform .35s ease, box-shadow .35s ease; }
.wp-block-gallery.has-nested-images figure.wp-block-image:hover img { transform: translateY(-3px); box-shadow: var(--wp--preset--shadow--lift); }
/* Captions sit under the photo instead of over it */
.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { display: none; }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	position: static; background: none; color: var(--wp--preset--color--muted); text-shadow: none;
	text-align: left; padding: 0.6rem 0.25rem 0; max-height: none; overflow: visible;
	font-size: var(--wp--preset--font-size--small); font-weight: 600;
}
.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img { flex: 0 0 auto; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }

/* Tables */
.wp-block-table table { border-collapse: separate; border-spacing: 0; width: 100%; border: 1px solid var(--wp--preset--color--border); border-radius: 16px; overflow: hidden; }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--border); padding: 0.85rem 1rem; text-align: left; vertical-align: top; }
.wp-block-table thead { border-bottom: 0; }
.wp-block-table thead th { background: var(--wp--preset--color--surface); font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 0.95rem; }
.wp-block-table tbody tr:last-child td { border-bottom: 0; }
.wp-block-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--wp--preset--color--surface) 45%, transparent); }
@media (max-width: 700px) { .wp-block-table { overflow-x: auto; } .wp-block-table table { min-width: 620px; } }

/* FAQ (Details block) */
.wp-block-details summary { cursor: pointer; font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--wp--preset--color--primary); transition: transform .2s ease; }
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { color: var(--wp--preset--color--muted); }

/* WooCommerce polish */
.wc-block-components-product-sale-badge, .wc-block-grid__product-onsale { background: var(--wp--preset--color--primary) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important; }
.wp-block-woocommerce-product-image img, .wc-block-components-product-image img { border-radius: 16px; background: var(--wp--preset--color--surface); }
.wp-block-woocommerce-product-template .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.wc-block-mini-cart__badge { background: var(--wp--preset--color--primary) !important; color: #fff !important; }

/* Form fields */
input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="number"], input[type="password"], textarea, select {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	background: #fff;
	padding: 0.6rem 0.85rem;
	font: inherit;
	color: var(--wp--preset--color--contrast);
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--wp--preset--color--secondary); outline-offset: 2px; }
.wp-block-search__input { border-radius: 999px !important; padding-left: 1.1rem !important; }

/* Footer links */
.pfm-footer ul.wp-block-list { list-style: none; }
.pfm-footer ul.wp-block-list li { margin-bottom: 0.35rem; }
.pfm-footer a { text-decoration: none; color: inherit; }
.pfm-footer a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.is-style-pfm-card, .wp-block-gallery img { transition: none !important; }
	.is-style-pfm-card:hover { transform: none; }
}
