/*
Theme Name: Cop City Shop
Description: Monochrome dark storefront for the Cop City shop. Black ground, white type, hairline rules, so the all-over prints carry the only colour on the page. Child of Twenty Twenty-Five.
Author: Cop City
Template: twentytwentyfive
Version: 2.0
Requires at least: 6.7
Tested up to: 7.1
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: statecreated-shop
Tags: e-commerce, dark, block-patterns, full-site-editing
*/

:root {
	--sc-black: #000;
	--sc-white: #fff;
	--sc-tile: #0b0b0b;
	--sc-tile-hi: #141414;
	--sc-gray: #a3a3a3;
	--sc-dim: #6e6e6e;
	--sc-rule: rgba(255, 255, 255, 0.22);
	--sc-rule-soft: rgba(255, 255, 255, 0.12);
	--sc-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
	--sc-label: 0.72rem;
	--sc-track: 0.1em;
}

/* ---------------------------------------------------------------- base */

body {
	background: var(--sc-black);
	color: var(--sc-white);
	-webkit-font-smoothing: antialiased;
}

::selection {
	background: var(--sc-white);
	color: var(--sc-black);
}

:where(a):focus-visible,
:where(button):focus-visible,
:where(input):focus-visible,
:where(select):focus-visible,
:where(textarea):focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--sc-white);
	outline-offset: 2px;
}

img {
	height: auto;
}

/* A small uppercase mono label, used for nav, prices, meta and buttons. */
.sc-label,
.wc-block-breadcrumbs,
.woocommerce-result-count,
.wc-block-components-product-sku,
.product_meta {
	font-family: var(--sc-mono);
	font-size: var(--sc-label);
	letter-spacing: var(--sc-track);
	text-transform: uppercase;
	color: var(--sc-gray);
}

/* -------------------------------------------------------------- header */

.sc-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(0, 0, 0, 0.92);
	backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--sc-rule);
}

.sc-header .wp-block-site-title a {
	text-decoration: none;
}

.sc-header .wp-block-navigation {
	gap: clamp(14px, 2.5vw, 28px);
}

.sc-header .wp-block-navigation a {
	color: var(--sc-gray);
	text-decoration: none;
	padding-block: 4px;
	border-bottom: 1px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.sc-header .wp-block-navigation a:hover,
.sc-header .wp-block-navigation .current-menu-item a {
	color: var(--sc-white);
	border-bottom-color: var(--sc-white);
}

/* Mobile overlay menu sits on black, not the default white. */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--sc-black);
	color: var(--sc-white);
	border: 1px solid var(--sc-rule);
}

.sc-tagline {
	font-family: var(--sc-mono);
	font-size: var(--sc-label);
	letter-spacing: var(--sc-track);
	text-transform: uppercase;
	color: var(--sc-dim);
}

/* --------------------------------------------------------- shop header */

.sc-shop-intro {
	border-bottom: 1px solid var(--sc-rule-soft);
}

.sc-shop-intro .wp-block-heading {
	margin: 0;
}

.sc-shop-intro p {
	color: var(--sc-gray);
	max-width: 48ch;
}

.wc-block-breadcrumbs a {
	color: var(--sc-gray);
}

.wc-block-breadcrumbs a:hover {
	color: var(--sc-white);
}

/* ---------------------------------------------------------- store notices */

.wc-block-components-notice-banner {
	background: var(--sc-tile);
	border: 1px solid var(--sc-rule);
	border-radius: 0;
	color: var(--sc-white);
}

.wc-block-components-notice-banner > svg {
	fill: var(--sc-white);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	background: var(--sc-tile);
	border-top: none;
	border: 1px solid var(--sc-rule);
	color: var(--sc-white);
}

/* --------------------------------------------------------- product grid */

.wc-block-product-template,
.products.columns-3,
.products.columns-4 {
	gap: clamp(20px, 3vw, 40px);
}

.wc-block-product-template__responsive {
	gap: clamp(20px, 3vw, 40px);
}

/* The tile: hairline box, image centred, everything else left-aligned. */
.wc-block-product-template li.product,
.wc-block-product-template .wc-block-product,
ul.products li.product {
	position: relative;
	margin: 0;
	text-align: left;
}

.wc-block-product-template .wc-block-components-product-image,
ul.products li.product a img {
	display: block;
	margin: 0 0 1rem;
	background: var(--sc-tile);
	border: 1px solid var(--sc-rule-soft);
	overflow: hidden;
	transition: border-color 0.2s ease;
}

.wc-block-product-template .wc-block-components-product-image img,
ul.products li.product a img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.4s ease, opacity 0.2s ease;
}

.wc-block-product-template li.product:hover .wc-block-components-product-image,
ul.products li.product:hover a img {
	border-color: var(--sc-white);
}

.wc-block-product-template li.product:hover .wc-block-components-product-image img,
ul.products li.product:hover a img {
	transform: scale(1.03);
}

/* Product title in the grid: sentence case, tight, no underline until hover. */
.wc-block-product-template .wp-block-post-title,
ul.products li.product .woocommerce-loop-product__title {
	text-align: left !important;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	margin: 0 0 0.35rem;
}

.wc-block-product-template .wp-block-post-title a {
	text-decoration: none;
}

.wc-block-product-template .wp-block-post-title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wc-block-product-template .wc-block-components-product-price,
ul.products li.product .price {
	display: block;
	text-align: left !important;
	font-family: var(--sc-mono);
	font-size: 0.85rem;
	color: var(--sc-gray);
	margin: 0 0 1rem;
}

.wc-block-product-template .wp-block-woocommerce-product-button,
.wc-block-product-template .wc-block-components-product-button {
	text-align: left !important;
}

.wc-block-components-product-button .wp-block-button__link {
	width: 100%;
	justify-content: center;
}

/* Sale badge: a flat white chip, no pill. */
.wc-block-components-product-sale-badge {
	background: var(--sc-white);
	color: var(--sc-black);
	border: none;
	border-radius: 0;
	font-family: var(--sc-mono);
	font-size: 0.65rem;
	letter-spacing: var(--sc-track);
	text-transform: uppercase;
	padding: 4px 8px;
}

/* ------------------------------------------------------ catalog sorting */

.woocommerce-ordering select,
.wc-block-catalog-sorting select,
select,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea {
	background: var(--sc-tile);
	color: var(--sc-white);
	border: 1px solid var(--sc-rule);
	border-radius: 0;
	padding: 0.7em 0.8em;
	font-family: inherit;
}

select option {
	background: var(--sc-tile);
	color: var(--sc-white);
}

::placeholder {
	color: var(--sc-dim);
}

/* ------------------------------------------------------- single product */

.sc-single .wp-block-post-title {
	margin-bottom: 0.4rem;
}

.woocommerce-product-gallery {
	background: var(--sc-tile);
	border: 1px solid var(--sc-rule-soft);
}

.woocommerce-product-gallery__wrapper img {
	width: 100%;
	height: auto;
}

.woocommerce-product-gallery .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px;
	padding: 0;
	list-style: none;
}

.woocommerce-product-gallery .flex-control-thumbs li {
	flex: 0 0 calc(25% - 6px);
	margin: 0;
}

.woocommerce-product-gallery .flex-control-thumbs img {
	border: 1px solid var(--sc-rule-soft);
	opacity: 0.55;
	cursor: pointer;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.woocommerce-product-gallery .flex-control-thumbs img.flex-active,
.woocommerce-product-gallery .flex-control-thumbs img:hover {
	opacity: 1;
	border-color: var(--sc-white);
}

.woocommerce-product-gallery__trigger {
	background: var(--sc-black);
	border: 1px solid var(--sc-rule);
	color: var(--sc-white);
}

/* The excerpt is the deadpan one-liner; give it room and a lighter grey. */
.sc-single .wp-block-post-excerpt__excerpt {
	color: var(--sc-gray);
	font-size: 1.0625rem;
	line-height: 1.6;
	border-top: 1px solid var(--sc-rule-soft);
	border-bottom: 1px solid var(--sc-rule-soft);
	padding: 1.1rem 0;
	margin: 1.2rem 0;
}

.sc-single .wc-block-components-product-price {
	font-family: var(--sc-mono);
	font-size: 1.5rem;
	letter-spacing: 0.01em;
}

/* Variation picker + quantity. */
.wp-block-woocommerce-add-to-cart-form table.variations {
	width: 100%;
	border: none;
	margin-bottom: 1rem;
}

.wp-block-woocommerce-add-to-cart-form table.variations th,
.wp-block-woocommerce-add-to-cart-form table.variations td {
	border: none;
	padding: 0 0 0.6rem;
	text-align: left;
	vertical-align: middle;
}

.wp-block-woocommerce-add-to-cart-form table.variations th {
	font-family: var(--sc-mono);
	font-size: var(--sc-label);
	letter-spacing: var(--sc-track);
	text-transform: uppercase;
	color: var(--sc-gray);
	font-weight: 400;
	width: 7rem;
}

.woocommerce-variation-price .price {
	font-family: var(--sc-mono);
}

.reset_variations {
	font-family: var(--sc-mono);
	font-size: var(--sc-label);
	color: var(--sc-gray);
}

.quantity input.qty {
	width: 5rem;
	text-align: center;
	background: var(--sc-tile);
	color: var(--sc-white);
	border: 1px solid var(--sc-rule);
}

form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

form.cart.variations_form {
	display: block;
}

form.cart .single_add_to_cart_button {
	flex: 1 1 14rem;
	background: var(--sc-white);
	color: var(--sc-black);
	border: 1px solid var(--sc-white);
	border-radius: 0;
	padding: 0.95em 1.6em;
	font-family: var(--sc-mono);
	font-size: var(--sc-label);
	font-weight: 500;
	letter-spacing: var(--sc-track);
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

form.cart .single_add_to_cart_button:hover {
	background: var(--sc-black);
	color: var(--sc-white);
}

form.cart .single_add_to_cart_button.disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.product_meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.2rem;
	margin-top: 1.4rem;
	padding-top: 1rem;
	border-top: 1px solid var(--sc-rule-soft);
}

.product_meta a {
	color: var(--sc-gray);
}

.product_meta a:hover {
	color: var(--sc-white);
}

/* Product details: the dispatch. Tabs flattened to a plain stack. */
.wp-block-woocommerce-product-details .wc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 1.4rem;
	margin: 0 0 1.4rem;
	padding: 0 0 0.8rem;
	border-bottom: 1px solid var(--sc-rule);
	list-style: none;
}

.wp-block-woocommerce-product-details .wc-tabs li {
	margin: 0;
	padding: 0;
	background: none;
	border: none;
}

.wp-block-woocommerce-product-details .wc-tabs li a {
	font-family: var(--sc-mono);
	font-size: var(--sc-label);
	letter-spacing: var(--sc-track);
	text-transform: uppercase;
	color: var(--sc-dim);
	text-decoration: none;
}

.wp-block-woocommerce-product-details .wc-tabs li.active a {
	color: var(--sc-white);
}

.woocommerce-Tabs-panel h2 {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.woocommerce-Tabs-panel p:first-of-type {
	font-size: 1.0625rem;
}

.woocommerce-Tabs-panel ul {
	padding-left: 1.1rem;
	color: var(--sc-gray);
}

.woocommerce-Tabs-panel li {
	margin-bottom: 0.4rem;
}

/* ---------------------------------------------------- cart and checkout */

.wc-block-cart,
.wc-block-checkout {
	color: var(--sc-white);
}

.wc-block-cart-items th,
.wc-block-cart-items td,
.wc-block-components-sidebar .wc-block-components-totals-item,
.wc-block-components-totals-wrapper {
	border-color: var(--sc-rule-soft) !important;
}

.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-cart .wc-block-cart__totals-title,
.wc-block-components-order-summary__content {
	color: var(--sc-white);
}

.wc-block-components-sidebar-layout .wc-block-components-sidebar {
	background: var(--sc-tile);
	border: 1px solid var(--sc-rule-soft);
	padding: clamp(16px, 3vw, 28px);
}

.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-select__container,
.wc-block-components-combobox-control input {
	background: var(--sc-tile) !important;
	color: var(--sc-white) !important;
	border-color: var(--sc-rule) !important;
	border-radius: 0 !important;
}

.wc-block-components-text-input label,
.wc-block-components-select__label,
.wc-block-components-checkbox__label {
	color: var(--sc-gray) !important;
}

.wc-block-components-button:not(.is-link) {
	background: var(--sc-white);
	color: var(--sc-black);
	border: 1px solid var(--sc-white);
	border-radius: 0;
	font-family: var(--sc-mono);
	font-size: var(--sc-label);
	letter-spacing: var(--sc-track);
	text-transform: uppercase;
}

.wc-block-components-button:not(.is-link):hover {
	background: var(--sc-black);
	color: var(--sc-white);
}

.wc-block-components-product-name,
.wc-block-components-product-metadata {
	color: var(--sc-white);
}

.wc-block-components-quantity-selector {
	border: 1px solid var(--sc-rule);
	border-radius: 0;
	background: var(--sc-tile);
}

.wc-block-components-quantity-selector input,
.wc-block-components-quantity-selector button {
	background: transparent;
	color: var(--sc-white);
}

/* ------------------------------------------------------------ my account */

.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0 0 0.8rem;
	border-bottom: 1px solid var(--sc-rule);
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem;
}

.woocommerce-MyAccount-navigation a {
	font-family: var(--sc-mono);
	font-size: var(--sc-label);
	letter-spacing: var(--sc-track);
	text-transform: uppercase;
	color: var(--sc-gray);
	text-decoration: none;
}

.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation a:hover {
	color: var(--sc-white);
}

.woocommerce table.shop_table,
.woocommerce table.shop_table td,
.woocommerce table.shop_table th {
	border-color: var(--sc-rule-soft);
	color: var(--sc-white);
}

/* --------------------------------------------------------- related block */

.wp-block-woocommerce-related-products > h2,
.sc-section-title {
	font-family: var(--sc-mono);
	font-size: var(--sc-label);
	font-weight: 400;
	letter-spacing: var(--sc-track);
	text-transform: uppercase;
	color: var(--sc-gray);
	padding-bottom: 0.8rem;
	border-bottom: 1px solid var(--sc-rule);
	margin-bottom: clamp(20px, 3vw, 34px);
}

/* -------------------------------------------------------------- footer */

.sc-footer {
	border-top: 1px solid var(--sc-rule);
	color: var(--sc-gray);
}

.sc-footer .wp-block-navigation a {
	color: var(--sc-gray);
	text-decoration: none;
}

.sc-footer .wp-block-navigation a:hover {
	color: var(--sc-white);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sc-footer .wp-block-site-title a {
	color: var(--sc-white);
	text-decoration: none;
}

.sc-colophon {
	font-family: var(--sc-mono);
	font-size: 0.68rem;
	letter-spacing: 0.06em;
	color: var(--sc-dim);
}

/* --------------------------------------------------------------- misc */

.wp-block-query-pagination {
	font-family: var(--sc-mono);
	font-size: var(--sc-label);
	letter-spacing: var(--sc-track);
	margin-top: clamp(30px, 5vw, 60px);
	padding-top: 1.2rem;
	border-top: 1px solid var(--sc-rule-soft);
}

.wp-block-query-pagination .page-numbers.current {
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}
