/*
Theme Name: Janus Shop
Theme URI: https://janus-audio.com
Description: Janus Audio's shop theme — a Twenty Twenty-Five child theme styled like janus-audio.com. Colors and fonts live in theme.json and mirror the main site's css/style.css.
Author: Janus Audio
Template: twentytwentyfive
Version: 1.0.1
Requires at least: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: janus-shop
*/

/* ================================================================
   0. PAGE LAYOUT — footer stays at the bottom on short pages
   ================================================================ */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}

.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: auto;
}


/* ================================================================
   1. HEADER — sticky, like the main site
   ================================================================ */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}

.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.janus-header__inner {
	min-height: 72px;
	gap: var(--wp--preset--spacing--40);
}

.janus-logo {
	display: flex;
	flex-shrink: 0;
}

.janus-logo img {
	display: block;
	height: 40px;
	width: auto;
}

.janus-logo--footer img {
	height: 32px;
}

.janus-header__actions {
	gap: var(--wp--preset--spacing--40);
}

/* Nav links: muted uppercase with an accent underline on hover (main site .nav__link) */
.janus-nav .wp-block-navigation-item__content {
	position: relative;
	color: var(--wp--preset--color--accent-4);
	padding-block: 0.25rem;
	transition: color 150ms ease;
}

.janus-nav .wp-block-navigation-item__content::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 0;
	height: 1px;
	background: var(--wp--preset--color--accent-3);
	transition: width 300ms ease;
}

.janus-nav .wp-block-navigation-item__content:hover,
.janus-nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
}

.janus-nav .wp-block-navigation-item__content:hover::after {
	width: 100%;
}

/* Mobile overlay menu */
.janus-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.25rem;
	color: var(--wp--preset--color--contrast);
}

/* Account + mini-cart icons in text color */
.janus-header .wc-block-customer-account a,
.janus-header .wc-block-mini-cart__button {
	color: var(--wp--preset--color--accent-4);
}

.janus-header .wc-block-customer-account a:hover,
.janus-header .wc-block-mini-cart__button:hover {
	color: var(--wp--preset--color--contrast);
}

.wc-block-mini-cart__badge {
	background: var(--wp--preset--color--accent-3) !important;
	color: #fff !important;
}


/* ================================================================
   2. SOCIAL ICONS + FOOTER
   ================================================================ */
.janus-social {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.janus-social__icon {
	display: flex;
	color: var(--wp--preset--color--accent-4);
	transition: color 150ms ease;
}

.janus-social__icon:hover {
	color: var(--wp--preset--color--contrast);
}

.janus-social__icon svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.janus-footer__inner {
	gap: var(--wp--preset--spacing--40);
}

.janus-legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.6rem;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--dim);
}

.janus-legal__link {
	color: var(--wp--preset--color--accent-4);
}

.janus-legal__link:hover {
	color: var(--wp--preset--color--contrast);
}

@media (max-width: 781px) {
	.janus-header .janus-social {
		display: none;
	}

	.janus-footer__inner {
		flex-direction: column;
		align-items: flex-start !important;
	}
}


/* ================================================================
   3. FORM CONTROLS — dark inputs everywhere (catalog, cart, checkout)
   ================================================================ */
select,
textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
.quantity .qty,
.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-quantity-selector {
	background-color: var(--wp--preset--color--surface-2) !important;
	color: var(--wp--preset--color--contrast) !important;
	border: 1px solid var(--wp--preset--color--accent-6) !important;
	border-radius: 2px !important;
	font-family: inherit;
}

select:focus,
textarea:focus,
input:focus,
.wc-block-components-text-input input:focus,
.wc-blocks-components-select .wc-blocks-components-select__select:focus {
	border-color: var(--wp--preset--color--accent-3) !important;
	outline: none;
	box-shadow: none !important;
}

.wc-block-components-text-input label,
.wc-blocks-components-select .wc-blocks-components-select__label,
.wc-block-components-textarea::placeholder {
	color: var(--wp--preset--color--accent-4) !important;
}

.wc-block-components-quantity-selector input,
.wc-block-components-quantity-selector button {
	background: transparent !important;
	border: none !important;
	color: var(--wp--preset--color--contrast) !important;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"],
.wc-block-components-radio-control__input {
	background-color: var(--wp--preset--color--surface-2) !important;
	border-color: var(--wp--preset--color--accent-4) !important;
}

.wc-block-components-checkbox .wc-block-components-checkbox__mark {
	fill: var(--wp--preset--color--accent-1) !important;
}

.wc-block-components-radio-control__input:checked::before {
	background: var(--wp--preset--color--accent-1) !important;
}

/* Outline buttons (e.g. "View cart" in the mini-cart) */
.wp-element-button.is-style-outline,
.is-style-outline > .wp-element-button {
	background: transparent !important;
	color: var(--wp--preset--color--contrast) !important;
	border: 1px solid var(--wp--preset--color--accent-6) !important;
}

.wp-element-button.is-style-outline:hover,
.is-style-outline > .wp-element-button:hover {
	border-color: var(--wp--preset--color--accent-3) !important;
	color: var(--wp--preset--color--accent-3) !important;
}


/* ================================================================
   4. PRODUCT GRID — cards like the main site's product cards
   ================================================================ */
.wc-block-product-template .wc-block-product {
	background: var(--wp--preset--color--surface-2);
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 4px;
	overflow: hidden;
	padding-bottom: 1.5rem;
	transition: transform 300ms ease;
}

.wc-block-product-template .wc-block-product:hover {
	transform: translateY(-4px);
}

/* Image stage: dark with a faint grid and glow */
.wc-block-product .wc-block-components-product-image {
	background-color: var(--wp--preset--color--base);
	background-image:
		radial-gradient(ellipse at center, rgba(235, 211, 70, 0.05) 0%, transparent 60%),
		linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: auto, 24px 24px, 24px 24px;
	padding: 2rem;
	margin-bottom: 1.25rem !important;
}

.wc-block-product .wc-block-components-product-image img {
	aspect-ratio: 3 / 4 !important;
	object-fit: contain !important;
	filter: drop-shadow(0 12px 36px rgba(0, 0, 0, 0.7));
	transition: transform 600ms ease;
}

.wc-block-product:hover .wc-block-components-product-image img {
	transform: scale(1.03);
}

.wc-block-product .wp-block-post-title {
	font-size: 1.4rem !important;
	letter-spacing: 0.04em;
}

.wc-block-components-product-price {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	letter-spacing: 0.04em;
}

.wc-block-components-product-sale-badge,
.wc-block-components-product-badge {
	background: var(--wp--preset--color--accent-3) !important;
	border: none !important;
	color: #fff !important;
	border-radius: 2px !important;
}

.woocommerce-breadcrumb,
.wc-block-breadcrumbs {
	color: var(--wp--preset--color--accent-4);
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}


/* ================================================================
   5. SINGLE PRODUCT — specs table + tabs
   ================================================================ */
.wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery__image {
	background: var(--wp--preset--color--accent-5);
}

.woocommerce-tabs ul.tabs {
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}

.woocommerce-tabs ul.tabs li a {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-4);
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
	color: var(--wp--preset--color--contrast);
}

.woocommerce-tabs ul.tabs li.active {
	border-bottom-color: var(--wp--preset--color--accent-3) !important;
}

/* Specifications = main site .product-card__specs */
table.woocommerce-product-attributes {
	width: 100%;
	max-width: 640px;
	border-collapse: collapse;
	border-top: 1px solid var(--wp--preset--color--accent-6);
}

table.woocommerce-product-attributes th,
table.woocommerce-product-attributes td {
	padding: 0.6rem 0;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
	background: none !important;
	font-size: 0.9375rem;
	font-style: normal;
}

table.woocommerce-product-attributes th {
	width: auto;
	text-align: left;
	color: var(--wp--preset--color--accent-2);
	font-weight: 600;
	letter-spacing: 0.04em;
}

table.woocommerce-product-attributes td {
	text-align: right;
	font-weight: 500;
}

table.woocommerce-product-attributes td p {
	margin: 0;
}


/* ================================================================
   6. CART, CHECKOUT, MINI-CART, NOTICES
   ================================================================ */
.wc-block-components-drawer,
.wc-block-mini-cart__drawer .components-modal__content {
	background: var(--wp--preset--color--accent-5) !important;
	color: var(--wp--preset--color--contrast);
}

.wc-block-components-panel,
.wc-block-components-totals-wrapper,
.wc-block-components-order-summary,
.wc-block-checkout__sidebar,
.wp-block-woocommerce-checkout-order-summary-block,
.wc-block-components-sidebar-layout .wc-block-components-main,
.wc-block-cart-items,
.wc-block-cart-items td,
.wc-block-cart-items th {
	border-color: var(--wp--preset--color--accent-6) !important;
}

.wp-block-woocommerce-checkout-order-summary-block {
	background: var(--wp--preset--color--accent-5);
	border-radius: 4px;
}

.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--accent-4) !important;
}

.wc-block-components-notice-banner {
	background: var(--wp--preset--color--accent-5) !important;
	color: var(--wp--preset--color--contrast) !important;
	border-color: var(--wp--preset--color--accent-6) !important;
}

.wc-block-components-notice-banner.is-error {
	border-color: var(--wp--preset--color--accent-3) !important;
}

.wc-block-components-notice-banner > svg {
	background: var(--wp--preset--color--accent-3) !important;
	fill: #fff !important;
}

.wc-block-components-product-metadata,
.wc-block-components-formatted-money-amount,
.wc-block-components-totals-item__description {
	color: inherit;
}

/* Order summary in the checkout sidebar ships with a light background */
.wc-block-components-order-summary,
.wc-block-components-order-summary.is-large {
	background: transparent !important;
}

.wc-block-components-order-summary-item__quantity {
	background: var(--wp--preset--color--accent-5) !important;
	border-color: var(--wp--preset--color--accent-4) !important;
	color: var(--wp--preset--color--contrast) !important;
	box-shadow: none !important;
}

/* Checkout header "Back to cart" */
.janus-header__back {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-4);
}

.janus-header__back:hover {
	color: var(--wp--preset--color--contrast);
}

/* WooCommerce sets attribute values in italics */
.woocommerce table.shop_attributes td,
.woocommerce table.shop_attributes th {
	font-style: normal;
	background: none;
}

/* Germanized "plus shipping costs" under catalog prices */
.wc-block-product .wc-gzd-additional-info-loop {
	text-align: center;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--accent-4);
	margin: 0.5rem 0 0;
}

.wc-gzd-additional-info a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td {
	border-top: 0;
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}

@media (max-width: 600px) {
	.wc-block-product-template.wc-block-product-template__responsive {
		grid-template-columns: 1fr !important;
	}

	.wc-block-product .wc-block-components-product-image {
		padding: 1.25rem;
	}
}
