/*
Theme Name: Specimen
Theme URI: https://example.com/specimen
Author: Font Market
Description: A type-foundry storefront theme built for the Font Market for WooCommerce plugin — live specimen product cards, an editable hero headline, and layouts tuned for the plugin's type tester, license accordion and banner maker. Works as a clean WooCommerce theme without the plugin too.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: specimen
Tags: e-commerce, typography, one-column, custom-logo, custom-menu
*/

/* ---------------------------------------------------------------------
   Tokens
--------------------------------------------------------------------- */
:root {
	--sp-ink: #16181c;
	--sp-ink-soft: #4b4f57;
	--sp-paper: #f7f6f2;
	--sp-card: #ffffff;
	--sp-line: #e5e3dc;
	--sp-accent: #e8541d;
	--sp-accent-ink: #ffffff;
	--sp-radius: 16px;
	--sp-wrap: 1200px;
	--sp-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--sp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------------------------------------------------------------------
   Base
--------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--sp-paper);
	color: var(--sp-ink);
	font-family: var(--sp-font);
	font-size: 16px;
	line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sp-accent); }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 750; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.sp-wrap { max-width: var(--sp-wrap); margin: 0 auto; padding: 0 22px; }
.sp-section { padding: 56px 0; }
.screen-reader-text, .sp-skip { position: absolute; clip: rect(1px,1px,1px,1px); height: 1px; width: 1px; overflow: hidden; }
.sp-skip:focus { clip: auto; height: auto; width: auto; background: var(--sp-ink); color: #fff; padding: 10px 16px; z-index: 10000; left: 10px; top: 10px; border-radius: 8px; }

.sp-btn { display: inline-block; padding: 12px 26px; border: 1.5px solid var(--sp-ink); border-radius: 999px; text-decoration: none; font-weight: 650; transition: all .15s; }
.sp-btn:hover { background: var(--sp-ink); color: #fff; }
.sp-btn-dark { background: var(--sp-ink); color: #fff; }
.sp-btn-dark:hover { background: var(--sp-accent); border-color: var(--sp-accent); color: var(--sp-accent-ink); }

/* ---------------------------------------------------------------------
   Header
--------------------------------------------------------------------- */
.sp-header { position: sticky; top: 0; z-index: 900; background: rgba(247, 246, 242, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--sp-line); }
.sp-header-in { display: flex; align-items: center; gap: 26px; min-height: 68px; }
.sp-brand { flex: 0 0 auto; }
.sp-logotype { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; }
.sp-logomark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--sp-ink); color: #fff; font-weight: 800; font-size: 16px; }
.sp-nav { flex: 1; }
.sp-menu { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.sp-menu a { display: block; padding: 9px 14px; border-radius: 999px; text-decoration: none; font-weight: 560; }
.sp-menu a:hover { background: #ecebe4; color: var(--sp-ink); }
.sp-menu .current-menu-item > a { background: var(--sp-ink); color: #fff; }
.sp-header-actions { display: flex; align-items: center; gap: 10px; }
.sp-cart { position: relative; display: inline-flex; padding: 9px; border-radius: 999px; text-decoration: none; }
.sp-cart:hover { background: #ecebe4; color: var(--sp-ink); }
.sp-cart-count { position: absolute; top: 0; right: 0; min-width: 17px; height: 17px; border-radius: 999px; background: var(--sp-accent); color: #fff; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.sp-nav-toggle { display: none; }

@media (max-width: 820px) {
	.sp-nav-toggle { display: inline-flex; flex-direction: column; gap: 4.5px; background: none; border: 0; padding: 10px; cursor: pointer; }
	.sp-nav-toggle span { width: 20px; height: 2px; background: var(--sp-ink); border-radius: 2px; }
	.sp-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--sp-card); border-bottom: 1px solid var(--sp-line); flex-direction: column; padding: 10px 16px 16px; gap: 2px; box-shadow: 0 20px 40px rgba(0,0,0,.08); }
	.sp-nav-open .sp-menu { display: flex; }
}

/* ---------------------------------------------------------------------
   Hero (front page)
--------------------------------------------------------------------- */
.sp-hero { padding: 88px 0 60px; text-align: center; border-bottom: 1px solid var(--sp-line); background:
	radial-gradient(60% 80% at 50% 0%, #fffdf7 0%, var(--sp-paper) 70%); }
.sp-hero-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: var(--sp-accent); margin: 0 0 14px; }
.sp-hero-line { font-size: clamp(2.6rem, 9vw, 7rem); font-weight: 800; letter-spacing: -0.035em; margin: 0 0 12px; outline: none; border-radius: 12px; padding: 4px 12px; }
.sp-hero-line:focus { background: #fff; box-shadow: 0 0 0 2px var(--sp-line); }
.sp-hero-sub { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--sp-ink-soft); max-width: 640px; margin: 0 auto 26px; }
.sp-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.sp-hero-hint { margin-top: 22px; font-size: 12px; color: var(--sp-ink-soft); opacity: .7; }

.sp-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.sp-section-head a { font-weight: 650; text-decoration: none; }

.sp-strip { background: var(--sp-ink); color: #f2f1ec; }
.sp-strip-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; padding: 52px 22px; }
.sp-step span { font-family: var(--sp-mono); color: var(--sp-accent); font-weight: 700; }
.sp-step h3 { margin: 8px 0 6px; color: #fff; }
.sp-step p { margin: 0; color: #c9c7bf; font-size: 14.5px; }
@media (max-width: 820px) { .sp-strip-in { grid-template-columns: 1fr; gap: 22px; } }

.sp-alphabet { text-align: center; overflow: hidden; }
.sp-alphabet-line { font-size: clamp(1.4rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.sp-alphabet-dim { opacity: .35; font-weight: 400; }

/* ---------------------------------------------------------------------
   Shop: specimen cards
--------------------------------------------------------------------- */
.sp-shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.sp-shop-head h1 { margin: 0; }
.sp-sample-form { flex: 1 1 320px; max-width: 460px; }
.sp-sample-form label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--sp-ink-soft); margin-bottom: 5px; }
.sp-sample-form input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--sp-line); border-radius: 12px; background: var(--sp-card); font: inherit; font-size: 15px; }
.sp-sample-form input:focus { outline: none; border-color: var(--sp-ink); }

.sp-woo ul.products { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .sp-woo ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .sp-woo ul.products { grid-template-columns: 1fr; } }

.sp-card { margin: 0; }
.sp-card-link { display: flex; flex-direction: column; height: 100%; background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: var(--sp-radius); overflow: hidden; text-decoration: none; transition: transform .16s, box-shadow .16s, border-color .16s; }
.sp-card-link:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(22, 24, 28, .1); border-color: #d7d4ca; color: inherit; }
.sp-card-stage { min-height: 168px; display: flex; align-items: center; justify-content: center; padding: 26px 22px; border-bottom: 1px solid var(--sp-line); background: linear-gradient(180deg, #fff 0%, #fbfaf6 100%); overflow: hidden; }
.fm-card-sample { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; text-align: center; word-break: break-word; max-width: 100%; }
.sp-card-stage img { object-fit: cover; width: 100%; }
.sp-card-meta { display: flex; align-items: center; gap: 10px; padding: 14px 18px; flex-wrap: wrap; }
.sp-card-title { font-size: 16.5px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.sp-card-count { font-size: 12px; color: var(--sp-ink-soft); background: #f0efe8; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.sp-card-price { font-size: 13px; font-weight: 700; white-space: nowrap; margin-left: auto; }
.sp-card-price .fm-price-sep { opacity: .4; }
.woocommerce-result-count, .woocommerce-ordering { margin: 0 0 18px; color: var(--sp-ink-soft); font-size: 14px; }
.woocommerce-ordering select { padding: 8px 12px; border: 1.5px solid var(--sp-line); border-radius: 10px; background: #fff; font: inherit; }
.woocommerce-pagination ul { list-style: none; display: flex; gap: 6px; justify-content: center; padding: 26px 0 0; margin: 0; }
.woocommerce-pagination a, .woocommerce-pagination span { display: inline-block; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--sp-line); text-decoration: none; background: #fff; }
.woocommerce-pagination span.current { background: var(--sp-ink); color: #fff; border-color: var(--sp-ink); }

/* ---------------------------------------------------------------------
   Single font product: marketplace split (preview left, license right)
--------------------------------------------------------------------- */
.sp-fp { padding: 34px 22px 20px; }
.sp-fp-head { padding-bottom: 20px; border-bottom: 1px solid var(--sp-line); margin-bottom: 24px; }
.sp-fp-title { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -0.035em; margin: 0 0 8px; }
.sp-fp-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0; }
.sp-fp-count { font-size: 13px; font-weight: 600; background: #f0efe8; border-radius: 999px; padding: 4px 12px; }
.sp-fp-cats { font-size: 13px; color: var(--sp-ink-soft); }
.sp-fp-desc { color: var(--sp-ink-soft); max-width: 620px; margin-top: 12px; }
.sp-fp-desc p { margin: 0; }
.sp-fp-head-price { font-size: 1.1rem; font-weight: 650; white-space: nowrap; }
.sp-fp-head-price .fm-price-sep { opacity: .4; }

/* gallery banner on top (featured + gallery / banner-maker images) */
.sp-fp-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 28px; scroll-snap-type: x mandatory; }
.sp-fp-gallery img { width: 100%; height: auto; border-radius: var(--sp-radius); border: 1px solid var(--sp-line); scroll-snap-align: start; display: block; }
.sp-fp-gallery:only-child, .sp-fp-gallery img:only-child { grid-auto-columns: 1fr; }

/* two-column body: fluid preview LEFT, license rail RIGHT.
   Grid is forced with !important so theme/Woo float rules on the child
   form.cart (the purchase box) can't knock the sidebar out of column. */
.sp-fp-body { display: grid !important; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "main side"; gap: 30px; align-items: start; }
.sp-fp-main { grid-area: main; min-width: 0; float: none; width: auto; }
.sp-fp-side { grid-area: side; position: relative; float: none; width: auto; margin: 0; }
.sp-fp-side-inner { position: sticky; top: 88px; }
.sp-fp-side .fm-buy { float: none !important; width: 100% !important; margin: 0 !important; }

/* the license panel as the marketplace buy box */
.sp-fp-buy { background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: var(--sp-radius); padding: 20px; box-shadow: 0 10px 34px rgba(22,24,28,.06); }
.sp-fp-buy .fm-buy { background: none; border: 0; padding: 0; }

/* the tester fills the wide left column */
.sp-fp-main .fm-tester { background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: var(--sp-radius); padding: 22px; margin: 0; }
.sp-fp-main .fm-tester-sample { font-size: clamp(28px, 4vw, 52px); }

.sp-fp-about { margin-top: 34px; max-width: 760px; }
.sp-fp-about h2 { font-size: 1.4rem; }
.sp-fp .related.products { margin-top: 56px; }
.sp-fp .related.products > h2 { margin-bottom: 18px; }

@media (max-width: 1000px) {
	.sp-fp-body { grid-template-columns: 1fr; grid-template-areas: "side" "main"; }
	.sp-fp-side-inner { position: static; }
}

/* non-font products keep default Woo single layout, lightly themed */
.sp-woo-single .product { display: block; }
.sp-woo-single .product_title { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.03em; }
.sp-woo-single .woocommerce-tabs ul.tabs { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; border-bottom: 1px solid var(--sp-line); }
.sp-woo-single .woocommerce-tabs ul.tabs a { display: block; padding: 9px 16px; border-radius: 10px 10px 0 0; text-decoration: none; font-weight: 600; }
.sp-woo-single .woocommerce-tabs ul.tabs li.active a { background: var(--sp-ink); color: #fff; }

/* ---------------------------------------------------------------------
   Cart / checkout / account
--------------------------------------------------------------------- */
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--sp-line); border-radius: var(--sp-radius); overflow: hidden; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 13px 16px; border-bottom: 1px solid var(--sp-line); text-align: left; }
.woocommerce table.shop_table tr:last-child td { border-bottom: 0; }
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button,
.woocommerce #respond input#submit, button[type=submit] {
	background: var(--sp-ink); color: #fff; border: 0; border-radius: 999px; padding: 11px 24px; font-weight: 650; font-family: inherit; font-size: 15px; cursor: pointer; text-decoration: none; display: inline-block; transition: background .15s;
}
.woocommerce .button:hover, button[type=submit]:hover { background: var(--sp-accent); color: var(--sp-accent-ink); }
.woocommerce .button.alt { background: var(--sp-accent); }
.woocommerce-message, .woocommerce-info, .woocommerce-error { list-style: none; margin: 0 0 20px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--sp-line); background: #fff; }
.woocommerce-error { border-color: #e57373; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
	width: 100%; padding: 11px 14px; border: 1.5px solid var(--sp-line); border-radius: 10px; font: inherit; background: #fff;
}
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce-MyAccount-navigation a { display: block; padding: 9px 16px; border: 1px solid var(--sp-line); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; font-size: 14px; }
.woocommerce-MyAccount-navigation li.is-active a { background: var(--sp-ink); color: #fff; border-color: var(--sp-ink); }
.woocommerce-MyAccount-content { margin-top: 24px; }

/* ---------------------------------------------------------------------
   Blog / pages / footer
--------------------------------------------------------------------- */
.sp-page-head { margin-bottom: 26px; }
.sp-meta { color: var(--sp-ink-soft); font-size: 14px; }
.sp-article .sp-content { max-width: 760px; }
.sp-content :is(h2, h3) { margin-top: 1.6em; }
.sp-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .sp-post-grid { grid-template-columns: 1fr; } }
.sp-post-card { background: #fff; border: 1px solid var(--sp-line); border-radius: var(--sp-radius); padding: 20px; }
.sp-post-card h2 { font-size: 1.2rem; }
.sp-post-card a { text-decoration: none; }
.sp-pagination { margin-top: 30px; }

.sp-footer { background: var(--sp-ink); color: #cfcdc5; margin-top: 70px; }
.sp-footer-in { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; padding: 50px 22px 40px; }
.sp-footer .sp-logomark { background: var(--sp-accent); }
.sp-footer-brand strong { color: #fff; display: inline-block; margin: 0 0 6px 10px; font-size: 18px; }
.sp-footer-brand p { margin: 10px 0 0; max-width: 380px; font-size: 14px; }
.sp-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-footer-menu a { color: #e8e6df; text-decoration: none; }
.sp-footer-menu a:hover { color: var(--sp-accent); }
.sp-footer-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid #2c2f36; padding-top: 22px; font-size: 13px; }
.sp-glyphrow { letter-spacing: .3em; opacity: .5; }
@media (max-width: 700px) { .sp-footer-in { grid-template-columns: 1fr; } }

/* ---------- marketplace polish ---------- */
.sp-fp-crumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--sp-ink-soft); margin: 4px 0 20px; }
.sp-fp-crumb a { text-decoration: none; }
.sp-fp-crumb a:hover { color: var(--sp-accent); }
.sp-fp-crumb strong { color: var(--sp-ink); font-weight: 600; }
.sp-fp-crumb span { opacity: .4; }

.sp-fp-buy-price { display: block; font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--sp-line); }
.sp-fp-buy-price .fm-price-sep { opacity: .35; font-weight: 400; }
.sp-fp-buy-price .fm-dual-price { font-size: 1.1rem; }

.sp-fp-trust { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--sp-line); display: flex; flex-direction: column; gap: 9px; }
.sp-fp-trust li { position: relative; padding-left: 24px; font-size: 13px; color: var(--sp-ink-soft); }
.sp-fp-trust li::before { content: ""; position: absolute; left: 0; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--sp-accent); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/12px no-repeat; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/12px no-repeat; }
