/* ==========================================================================
   Swinyl – Detail-Styles
   Farben, Schriften und Abstände kommen aus theme.json (Website-Editor ›
   Stile). Hier nur, was theme.json nicht abbilden kann.
   ========================================================================== */

:root {
	--swinyl-mono: var(--wp--preset--font-family--mono);
	--swinyl-line: 1px solid var(--wp--preset--color--border);
}

/* ---------- Typografie-Stile (im Editor unter «Stile» wählbar) ---------- */

.is-style-mono-label {
	font-family: var(--swinyl-mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.12em;
	line-height: 1.5;
	text-transform: uppercase;
}

h1.is-style-grotesk,
h2.is-style-grotesk,
h3.is-style-grotesk {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 0.94;
}

.swinyl-ch::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 10px;
	background: var(--wp--preset--color--swiss-red);
	vertical-align: 1px;
}

.swinyl-dot-red { color: var(--wp--preset--color--swiss-red); }

:where(p, h1, h2, h3, h4, h5, h6) { text-wrap: pretty; }

/* ---------- Header ---------- */

.swinyl-topbar p { margin: 0; }

.swinyl-header { gap: 1.5rem; }
.swinyl-brand { gap: 0.9rem; align-items: baseline; }
.swinyl-brand .wp-block-site-title { margin: 0; }
.swinyl-brand p { margin: 0; }
.swinyl-nav .wp-block-navigation-item__content { text-decoration: none; }
.swinyl-nav .wp-block-navigation-item__content:hover { text-decoration: underline; text-underline-offset: 6px; }
.swinyl-header-actions .wp-block-search__button,
.swinyl-header-actions .wc-block-mini-cart__button,
.swinyl-header-actions .wc-block-customer-account a {
	min-width: 44px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 0;
	padding: 0 0.5rem;
}
.swinyl-header-actions .wp-block-search__button svg { fill: currentColor; }
.wc-block-mini-cart__badge {
	background: var(--wp--preset--color--orange);
	color: #fff;
	font-family: var(--swinyl-mono);
}

@media (max-width: 781px) {
	.swinyl-hide-mobile { display: none !important; }
	.swinyl-topbar { justify-content: center !important; }
	.swinyl-header { flex-wrap: nowrap; }
	.swinyl-header .wp-block-site-title { font-size: 1.75rem; }
}

/* ---------- Flächen-Stile ---------- */

.is-style-grid-dark {
	background-color: var(--wp--preset--color--surface-dark);
	background-image:
		linear-gradient(#2c2724 1px, transparent 1px),
		linear-gradient(90deg, #2c2724 1px, transparent 1px);
	background-size: 24px 24px;
	color: var(--wp--preset--color--paper);
}

.is-style-grid-light {
	background-color: var(--wp--preset--color--surface);
	background-image:
		linear-gradient(#ddd3c2 1px, transparent 1px),
		linear-gradient(90deg, #ddd3c2 1px, transparent 1px);
	background-size: 32px 32px;
}

.is-style-record {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.is-style-record::after {
	content: "";
	position: absolute;
	z-index: -1;
	right: -28%;
	top: 12%;
	width: 78%;
	aspect-ratio: 1;
	border-radius: 50%;
	background:
		radial-gradient(circle, var(--wp--preset--color--ink) 0 2%, var(--wp--preset--color--orange) 2.2% 17%, transparent 17.4%),
		repeating-radial-gradient(circle, #1c1917 0 1px, #2a2521 1px 3px);
}

/* Ganze Kachel klickbar: der erste Link in der Gruppe überdeckt die Fläche. */
.is-style-card-link {
	position: relative;
	transition: transform 0.25s ease;
}
.is-style-card-link a { text-decoration: none; color: inherit; }
.is-style-card-link a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.is-style-card-link:hover { transform: translateY(-4px); }
.is-style-card-link:focus-within { outline: 2px solid var(--wp--preset--color--orange); outline-offset: 3px; }

.swinyl-tile { min-height: clamp(220px, 30vw, 420px); }

/* ---------- Listen ---------- */

.is-style-index {
	list-style: none;
	padding-left: 0;
	counter-reset: swinyl;
	font-family: var(--swinyl-mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.is-style-index > li {
	counter-increment: swinyl;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.is-style-index > li::before {
	content: counter(swinyl, decimal-leading-zero);
	color: var(--wp--preset--color--muted);
}
.swinyl-hero-index {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	padding-top: 1.25rem !important;
	border-top: var(--swinyl-line);
	margin: 0;
}
@media (max-width: 781px) {
	.swinyl-hero-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.swinyl-steps .wp-block-column + .wp-block-column {
	border-left: var(--swinyl-line);
	padding-left: var(--wp--preset--spacing--30);
}
@media (max-width: 781px) {
	.swinyl-steps .wp-block-column + .wp-block-column { border-left: 0; padding-left: 0; }
}

.swinyl-rows > * {
	margin: 0 !important;
	padding: 1rem 0;
	border-top: var(--swinyl-line);
}
.swinyl-rows > *:last-child { border-bottom: var(--swinyl-line); }

/* ---------- Buttons ---------- */

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: currentColor;
	border: 1.5px solid currentColor;
	padding: calc(1.05rem - 1.5px) calc(1.75rem - 1.5px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	border-color: var(--wp--preset--color--ink);
}

.swinyl-textlink a,
a.swinyl-textlink {
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-underline-offset: 5px;
}

/* ---------- Bilder ---------- */

.swinyl-cover-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Footer ---------- */

.swinyl-footer a { color: var(--wp--preset--color--paper); }
.swinyl-footer a:hover { color: var(--wp--preset--color--orange); }
.swinyl-footer-links {
	list-style: none;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}
.swinyl-footer-links a { text-decoration: none; }
.swinyl-footer-bottom p { margin: 0; }
.swinyl-footer-bottom a { color: inherit; }
.swinyl-wordmark {
	font-family: var(--wp--preset--font-family--display);
	line-height: 0.8 !important;
	letter-spacing: -0.03em;
	margin: 0;
	white-space: nowrap;
}
.swinyl-wordmark::after { content: "."; color: var(--wp--preset--color--orange); }

/* ==========================================================================
   WooCommerce
   ========================================================================== */

/* Preise immer in Mono */
.price,
.woocommerce-Price-amount,
.wc-block-components-product-price,
.wc-block-formatted-money-amount,
.wc-block-components-totals-item__value {
	font-family: var(--swinyl-mono);
	font-weight: 500;
}

/* Badges */
.swinyl-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0.75rem; }
.swinyl-badge {
	font-family: var(--swinyl-mono);
	font-size: 0.625rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1;
	padding: 6px 8px;
	border: 1px solid transparent;
}
.swinyl-badge.is-ink { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }
.swinyl-badge.is-orange { background: var(--wp--preset--color--orange); color: #fff; }
.swinyl-badge.is-moss { background: var(--wp--preset--color--moss); color: #fff; }
.swinyl-badge.is-red { background: var(--wp--preset--color--red); color: #fff; }
.swinyl-badge.is-outline { border-color: currentColor; }
.swinyl-badge.is-dashed { border: 1px dashed currentColor; }
.swinyl-badge.is-light { background: var(--wp--preset--color--paper); border-color: var(--wp--preset--color--border); color: var(--wp--preset--color--ink); }

.swinyl-eyebrow {
	font-family: var(--swinyl-mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin: 0 0 0.25rem;
}
.is-style-grid-dark .swinyl-eyebrow,
.has-ink-background-color .swinyl-eyebrow { color: var(--wp--preset--color--muted-light); }

/* Produktkarten (Shortcode-Listen) */
.woocommerce ul.products,
.wp-block-shortcode ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	display: flex;
	flex-direction: column;
	position: relative;
}
@media (max-width: 781px) {
	.woocommerce ul.products,
	.wp-block-shortcode ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 0.75rem; }
}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	flex-grow: 1;
}
.woocommerce ul.products li.product a img {
	aspect-ratio: 1;
	object-fit: cover;
	background: var(--wp--preset--color--surface);
	margin: 0 0 1rem !important;
	box-shadow: 0 1px 0 var(--wp--preset--color--border);
}
.woocommerce ul.products li.product .swinyl-badges {
	position: absolute;
	top: 12px;
	left: 12px;
	margin: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1.25rem !important;
	font-weight: 700;
	letter-spacing: -0.01em;
	padding: 0 !important;
	margin: 0 0 0.75rem;
}
.woocommerce ul.products li.product .price {
	color: var(--wp--preset--color--ink) !important;
	font-size: 0.9375rem !important;
	padding-top: 0.75rem;
	border-top: var(--swinyl-line);
	margin-top: auto !important;
}
.woocommerce ul.products li.product .button {
	margin-top: 0.75rem;
	width: 100%;
	text-align: center;
}

/* Woo-Buttons an das Theme angleichen */
.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.wc-block-components-button:not(.is-link) {
	background: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--paper) !important;
	border-radius: 0 !important;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 0.8125rem;
	padding: 0.95rem 1.25rem;
}
.woocommerce .button:hover,
.wc-block-components-button:not(.is-link):hover { background: var(--wp--preset--color--charcoal) !important; }

.is-style-grid-dark .woocommerce ul.products li.product .price,
.has-ink-background-color .woocommerce ul.products li.product .price { color: var(--wp--preset--color--paper) !important; border-color: #3a3430; }
.has-ink-background-color .woocommerce .button { background: var(--wp--preset--color--paper) !important; color: var(--wp--preset--color--ink) !important; }

/* Produktseite */
.swinyl-product-info { position: sticky; top: 1.5rem; }
@media (max-width: 781px) { .swinyl-product-info { position: static; } }
.swinyl-product-info .wp-block-post-title {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
}
.swinyl-specs {
	display: grid;
	grid-template-columns: minmax(120px, 38%) 1fr;
	margin: 1.5rem 0 0;
	font-family: var(--swinyl-mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	border-top: 1.5px solid var(--wp--preset--color--ink);
}
.swinyl-specs dt,
.swinyl-specs dd {
	margin: 0;
	padding: 0.7rem 0;
	border-bottom: var(--swinyl-line);
}
.swinyl-specs dt { color: var(--wp--preset--color--muted); text-transform: uppercase; }

.woocommerce div.product form.cart .quantity .qty,
.wc-block-components-quantity-selector {
	min-height: 52px;
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: 0;
	font-family: var(--swinyl-mono);
}
.woocommerce div.product form.cart { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.woocommerce div.product form.cart .single_add_to_cart_button { flex-grow: 1; min-height: 52px; }

.woocommerce-tabs ul.tabs { padding: 0 !important; border-bottom: var(--swinyl-line); }
.woocommerce-tabs ul.tabs li { background: transparent !important; border: 0 !important; border-radius: 0 !important; }
.woocommerce-tabs ul.tabs li.active { border-bottom: 2px solid var(--wp--preset--color--ink) !important; }
.woocommerce-tabs ul.tabs::before,
.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after { display: none !important; }

/* Formulare (Checkout, Konto, Newsletter) */
.wc-block-components-text-input input,
.wc-block-components-combobox .components-combobox-control__input,
.wc-blocks-components-select__select,
.woocommerce form .input-text,
.wp-block-search__input {
	border-radius: 0 !important;
	border-color: var(--wp--preset--color--muted-light) !important;
	background: #fff;
}
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option { border-radius: 0 !important; }

/* Mini-Warenkorb (Drawer von rechts) */
.wc-block-mini-cart__drawer .components-modal__content,
.wc-block-mini-cart__drawer .wc-block-components-drawer__content { background: var(--wp--preset--color--paper); }
.wc-block-mini-cart__title { font-family: var(--wp--preset--font-family--display); font-weight: 400; }
.swinyl-cart-note {
	font-family: var(--swinyl-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
}

/* Hinweise */
.woocommerce-message,
.woocommerce-info,
.wc-block-components-notice-banner { border-radius: 0 !important; }

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

/* Volle Breite ohne «constrained»-Layout: Seitenränder wie der Rest der Seite */
.swinyl-topbar,
.swinyl-header {
	padding-left: var(--wp--style--root--padding-left, clamp(1rem, 4.5vw, 4rem)) !important;
	padding-right: var(--wp--style--root--padding-right, clamp(1rem, 4.5vw, 4rem)) !important;
}

.swinyl-col-between {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--50);
}
.woocommerce.columns-2 ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.woocommerce.columns-3 ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.swinyl-card { position: relative; transition: transform 0.25s ease; }
.swinyl-card a { text-decoration: none; color: inherit; }
.swinyl-card a::after { content: ""; position: absolute; inset: 0; }
.swinyl-card:hover { transform: translateY(-4px); }
.swinyl-card:focus-within { outline: 2px solid var(--wp--preset--color--orange); outline-offset: 3px; }
.swinyl-card p, .swinyl-card h3 { margin: 0; }

/* Journal (Neueste Beiträge) */
.wp-block-latest-posts.is-grid li { margin: 0; }
.wp-block-latest-posts__featured-image img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.wp-block-latest-posts__post-title {
	display: block;
	margin-top: 0.75rem;
	text-decoration: none;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
}
.swinyl-related .related > h2 { display: none; }
.swinyl-related .related { margin-top: 0; }

/* ==========================================================================
   Cover + Vinyl (Produktbild = Cover, 1. Galeriebild = Vinyl)
   ========================================================================== */
@keyframes swinyl-spin { to { transform: rotate(360deg); } }

.swinyl-sleeve-wrap {
	position: relative;
	aspect-ratio: 1;
	margin: 0 0 1rem;
}
.swinyl-sleeve-wrap img { margin: 0 !important; box-shadow: none !important; }
.swinyl-sleeve-wrap .swinyl-vinyl {
	position: absolute;
	left: 3%;
	top: 3%;
	width: 94% !important;
	height: 94% !important;
	aspect-ratio: 1;
	border-radius: 50%;
	object-fit: cover;
	background: #0e0c0b;
	transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
	z-index: 0;
}
.swinyl-sleeve-wrap .swinyl-cover {
	position: relative;
	z-index: 1;
	height: 100%;
	transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.7s;
}
.swinyl-sleeve-wrap .swinyl-cover img,
.swinyl-sleeve-wrap .swinyl-cover .wc-block-components-product-image,
.swinyl-sleeve-wrap .swinyl-cover a { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }

/* Hover / Tippen: Platte gleitet heraus und dreht */
li.product:hover .swinyl-vinyl,
li.product:focus-within .swinyl-vinyl,
.wc-block-product:hover .swinyl-vinyl,
.swinyl-sleeve-wrap:active .swinyl-vinyl { transform: translateX(36%) rotate(140deg); }
li.product:hover .swinyl-cover,
.wc-block-product:hover .swinyl-cover { transform: translateX(-3%); box-shadow: 0 18px 30px rgba(21, 19, 17, 0.22); }
li.product:hover,
.wc-block-product:hover { z-index: 2; position: relative; }

/* Produktseite: Platte steht halb draussen und läuft mit 33⅓ */
.swinyl-now-playing { margin: 1.5rem 0 0; padding-right: 30%; }
.swinyl-now-playing .swinyl-vinyl { translate: 42% 0; animation: swinyl-spin 1.8s linear infinite; }
.swinyl-now-playing figcaption {
	font-family: var(--swinyl-mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-top: 0.75rem;
}

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