/* ==========================================================================
   WE Coffee — Globalne style sklepu
   Oparte na tokenach z shop-variables.css.
   Mobile-first, standardowe breakpointy: 768 / 1024 / 1280.
   ========================================================================== */

/* ---- Reset & Base ---- */

body {
	font-family: var(--wecoffee-font-body);
	font-size: var(--wecoffee-text-body);
	line-height: 1.6;
	color: var(--wecoffee-color-text);
	background-color: var(--wecoffee-color-background);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

/* ---- Typografia — Dramatic Hierarchy ---- */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--wecoffee-font-heading);
	color: var(--wecoffee-color-primary);
	font-weight: 700;
	margin-top: 0;
}

h1 {
	font-size: var(--wecoffee-text-h1);
	line-height: 1.05;
	letter-spacing: -0.01em;
}

h2 {
	font-size: var(--wecoffee-text-h2);
	line-height: 1.15;
	letter-spacing: -0.01em;
}

h3 {
	font-size: var(--wecoffee-text-h3);
	line-height: 1.25;
}

h4 {
	font-size: var(--wecoffee-text-h4);
	line-height: 1.3;
}

h5 {
	font-size: var(--wecoffee-text-h5);
	line-height: 1.4;
	letter-spacing: 0.04em;
}

h6 {
	font-size: var(--wecoffee-text-h6);
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

p {
	margin-top: 0;
	margin-bottom: var(--wecoffee-space-md);
}

/* ---- Linki ---- */

a {
	color: var(--wecoffee-color-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	transition: color var(--wecoffee-transition);
}

a:hover {
	color: var(--wecoffee-color-secondary);
}

/* ---- Przyciski ---- */

.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.woocommerce button.button,
.woocommerce button.button.alt,
.woocommerce a.button,
.woocommerce a.button.alt,
.wp-block-button__link,
.wc-block-components-button,
.ast-custom-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wecoffee-space-xs);
	background-color: var(--wecoffee-color-primary) !important;
	color: var(--wecoffee-color-white) !important;
	border: 1px solid var(--wecoffee-color-primary) !important;
	border-radius: var(--wecoffee-radius-pill);
	padding: 0.75rem 1.5rem;
	font-family: var(--wecoffee-font-body);
	font-size: var(--wecoffee-text-small);
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color var(--wecoffee-transition),
		color var(--wecoffee-transition),
		border-color var(--wecoffee-transition),
		box-shadow var(--wecoffee-transition);
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.woocommerce button.button:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button:hover,
.woocommerce a.button.alt:hover,
.wp-block-button__link:hover {
	background-color: var(--wecoffee-color-secondary) !important;
	border-color: var(--wecoffee-color-secondary) !important;
	color: var(--wecoffee-color-white) !important;
}

.button:focus-visible,
button:focus-visible,
input[type="button"]:focus-visible,
input[type="reset"]:focus-visible,
input[type="submit"]:focus-visible,
.woocommerce button.button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 3px solid var(--wecoffee-color-secondary);
	outline-offset: 3px;
}

/* Przycisk outline (secondary) */
.woocommerce a.button.alt.disabled,
.woocommerce button.button:disabled,
button:disabled,
input[type="submit"]:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.is-style-outline .wp-block-button__link,
.woocommerce a.button:not(.alt) {
	background-color: transparent !important;
	color: var(--wecoffee-color-primary) !important;
	border-color: var(--wecoffee-color-primary) !important;
}

.is-style-outline .wp-block-button__link:hover,
.woocommerce a.button:not(.alt):hover {
	background-color: var(--wecoffee-color-primary) !important;
	color: var(--wecoffee-color-white) !important;
}

/* ---- Formularze ---- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
	display: block;
	width: 100%;
	border: 1px solid var(--wecoffee-color-border);
	border-radius: var(--wecoffee-radius-md);
	padding: 0.75rem 1rem;
	font-family: var(--wecoffee-font-body);
	font-size: var(--wecoffee-text-body);
	color: var(--wecoffee-color-text);
	background-color: var(--wecoffee-color-surface);
	height: auto;
	line-height: 1.5;
	transition:
		border-color var(--wecoffee-transition),
		box-shadow var(--wecoffee-transition);
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--wecoffee-color-secondary);
	box-shadow: 0 0 0 3px rgba(196, 168, 130, 0.15);
}

label {
	display: block;
	font-size: var(--wecoffee-text-small);
	font-weight: 500;
	margin-bottom: var(--wecoffee-space-2xs);
	color: var(--wecoffee-color-text);
}

/* ==========================================================================
   SINGLE PRODUCT — Editorial-style product page
   Asymetryczna siatka 55/45, sticky summary, premium CTA.
   ========================================================================== */

/* ---- Breadcrumb — delikatny, dyskretny ---- */

.woocommerce.single-product .woocommerce-breadcrumb {
	font-size: var(--wecoffee-text-caption) !important;
	color: var(--wecoffee-color-text-muted) !important;
	letter-spacing: 0.03em;
	margin-bottom: var(--wecoffee-space-lg) !important;
	padding: 0 !important;
}

.woocommerce.single-product .woocommerce-breadcrumb a {
	color: var(--wecoffee-color-text-muted) !important;
	text-decoration: none !important;
	transition: color var(--wecoffee-transition);
}

.woocommerce.single-product .woocommerce-breadcrumb a:hover {
	color: var(--wecoffee-color-primary) !important;
}

/* ---- Kontener produktu — page-builder full width ---- */

.woocommerce.single-product div.product {
	max-width: var(--wecoffee-content-width) !important;
	margin-inline: auto !important;
	padding-inline: var(--wecoffee-gutter) !important;
}

/* ---- Reset floatów Astry ---- */

.woocommerce.single-product div.product .woocommerce-product-gallery,
.woocommerce.single-product div.product .summary.entry-summary {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin: 0 !important;
}

.woocommerce.single-product div.product .woocommerce-product-gallery {
	margin-bottom: var(--wecoffee-space-xl) !important;
}

/* ---- Desktop: Asymetryczny grid 55% / 45% ---- */

@media (min-width: 1024px) {
	.woocommerce.single-product div.product {
		display: grid !important;
		grid-template-columns: 55fr 45fr !important;
		column-gap: clamp(2rem, 4vw, 4rem) !important;
		row-gap: 0 !important;
		align-items: start !important;
	}

	/* Domyślnie dzieci na pełną szerokość (taby, related, notices) */
	.woocommerce.single-product div.product > * {
		grid-column: 1 / -1 !important;
	}

	/* Galeria — pierwszy wiersz lewej kolumny */
	.woocommerce.single-product div.product .woocommerce-product-gallery {
		grid-column: 1 / 2 !important;
		grid-row: 1 !important;
		margin-bottom: 0 !important;
	}

	/* Pełny opis — bezpośrednio pod galerią, niezależnie od wysokości panelu zakupu */
	.woocommerce.single-product div.product .woocommerce-tabs {
		grid-column: 1 / 2 !important;
		grid-row: 2 !important;
		margin-top: var(--wecoffee-space-lg) !important;
		padding-top: var(--wecoffee-space-md) !important;
	}

	.woocommerce.single-product div.product .woocommerce-tabs ul.tabs {
		margin-bottom: var(--wecoffee-space-lg) !important;
	}

	/* Panel zakupu — prawa kolumna, obejmuje wysokość galerii i opisu */
	.woocommerce.single-product div.product .summary.entry-summary {
		grid-column: 2 / 3 !important;
		grid-row: 1 / span 2 !important;
	}
}

/* ---- Galeria — zaokrąglone rogi ---- */

.woocommerce.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
	border-radius: var(--wecoffee-radius-lg) !important;
}

.woocommerce.single-product .woocommerce-product-gallery .flex-control-thumbs {
	gap: var(--wecoffee-space-xs) !important;
	margin-top: var(--wecoffee-space-sm) !important;
}

.woocommerce.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
	border-radius: var(--wecoffee-radius-md) !important;
	opacity: 0.6;
	transition: opacity var(--wecoffee-transition);
}

.woocommerce.single-product .woocommerce-product-gallery .flex-control-thumbs li img:hover,
.woocommerce.single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
	opacity: 1;
}

/* ---- Kategoria nad tytułem ---- */

.woocommerce.single-product .product_meta .posted_in,
.woocommerce.single-product div.product .posted_in {
	display: block !important;
	font-family: var(--wecoffee-font-body) !important;
	font-size: var(--wecoffee-text-caption) !important;
	text-transform: uppercase !important;
	letter-spacing: 0.1em !important;
	color: var(--wecoffee-color-text-muted) !important;
	margin-bottom: var(--wecoffee-space-2xs) !important;
	font-weight: 600 !important;
}

/* ---- Nazwa produktu — dramatic editorial ---- */

.woocommerce.single-product div.product .product_title {
	font-family: var(--wecoffee-font-heading) !important;
	font-size: var(--wecoffee-text-h1) !important;
	color: var(--wecoffee-color-primary) !important;
	font-weight: 700 !important;
	line-height: 1.15 !important;
	margin-top: 0 !important;
	margin-bottom: var(--wecoffee-space-sm) !important;
	letter-spacing: -0.01em !important;
}

/* ---- Cena — bold, czytelna ---- */

.woocommerce.single-product div.product p.price,
.woocommerce.single-product div.product span.price {
	font-family: var(--wecoffee-font-body) !important;
	font-size: clamp(1.25rem, 2vw, 1.5rem) !important;
	font-weight: 700 !important;
	color: var(--wecoffee-color-primary) !important;
	margin-bottom: var(--wecoffee-space-md) !important;
}

.woocommerce.single-product div.product p.price del {
	color: var(--wecoffee-color-text-muted) !important;
	font-weight: 400 !important;
}

.woocommerce.single-product div.product p.price ins {
	text-decoration: none !important;
}

/* ---- Krótki opis / excerpt ---- */

.woocommerce.single-product div.product .wecoffee-whols-price-table {
	align-items: center;
	background: var(--wecoffee-color-surface);
	box-sizing: border-box;
	display: flex;
	gap: var(--wecoffee-space-md);
	justify-content: space-between;
	margin: 0 0 var(--wecoffee-space-md);
	padding: var(--wecoffee-space-md);
	width: 100%;
}

.woocommerce.single-product div.product .wecoffee-whols-price-table__label,
.woocommerce.single-product div.product .wecoffee-whols-price-table__amount {
	color: var(--wecoffee-color-text);
	font-family: var(--wecoffee-font-body);
	font-size: var(--wecoffee-text-body);
	line-height: 1.4;
	margin: 0;
}

.woocommerce.single-product div.product .wecoffee-whols-price-table__label {
	font-weight: 600;
}

.woocommerce.single-product div.product .wecoffee-whols-price-table__amount {
	flex-shrink: 0;
	font-weight: 400;
	text-align: right;
	white-space: nowrap;
}

.woocommerce.single-product div.product .woocommerce-product-details__short-description {
	font-size: var(--wecoffee-text-body) !important;
	color: var(--wecoffee-color-text-muted) !important;
	line-height: 1.65 !important;
	margin-bottom: var(--wecoffee-space-lg) !important;
}

/* ---- Separator pod ceną ---- */

.woocommerce.single-product div.product .summary .variations,
.woocommerce.single-product div.product .summary .cart {
	/*border-top: 1px solid var(--wecoffee-color-border) !important;
	padding-top: var(--wecoffee-space-lg) !important;
	margin-top: var(--wecoffee-space-md) !important;*/
}

/* ---- Warianty (select) — wyrafinowane ---- */

.woocommerce.single-product div.product .variations td.label label {
	font-family: var(--wecoffee-font-body) !important;
	font-size: var(--wecoffee-text-small) !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
	color: var(--wecoffee-color-text) !important;
}

.woocommerce.single-product div.product .variations select {
	border: 1px solid var(--wecoffee-color-border) !important;
	border-radius: var(--wecoffee-radius-md) !important;
	padding: 0.75rem 1rem !important;
	font-family: var(--wecoffee-font-body) !important;
	font-size: var(--wecoffee-text-body) !important;
	color: var(--wecoffee-color-text) !important;
	background-color: var(--wecoffee-color-surface) !important;
	width: 100% !important;
	height: auto !important;
	line-height: 1.5 !important;
	transition: border-color var(--wecoffee-transition), box-shadow var(--wecoffee-transition);
}

.woocommerce.single-product div.product .variations select:focus {
	border-color: var(--wecoffee-color-secondary) !important;
	box-shadow: 0 0 0 3px rgba(196, 168, 130, 0.15) !important;
	outline: none !important;
}

/* Ukryj domyślną tabelę variations i pokaż jako stack */
.woocommerce.single-product div.product .variations {
	border: none !important;
}

.woocommerce.single-product div.product .variations tr {
	display: flex !important;
	flex-direction: column !important;
	gap: var(--wecoffee-space-2xs) !important;
	margin-bottom: var(--wecoffee-space-md) !important;
}

.woocommerce.single-product div.product .variations td {
	padding: 0 !important;
	border: none !important;
}

.woocommerce.single-product div.product .variations td.value {
	margin-top: var(--wecoffee-space-2xs) !important;
}

/* ---- Quantity input ---- */

.woocommerce.single-product div.product .quantity .qty {
	border: 1px solid var(--wecoffee-color-border) !important;
	border-radius: var(--wecoffee-radius-md) !important;
	padding: 0.75rem !important;
	width: 4.5rem !important;
	text-align: center !important;
	font-family: var(--wecoffee-font-body) !important;
	font-size: var(--wecoffee-text-body) !important;
}

/* ---- CTA: Dodaj do koszyka — PREMIUM full-width button ---- */

.woocommerce.single-product div.product .single_add_to_cart_button {
	display: block !important;
	width: 100% !important;
	background-color: var(--wecoffee-color-primary) !important;
	color: var(--wecoffee-color-white) !important;
	border: 1px solid var(--wecoffee-color-primary) !important;
	border-radius: var(--wecoffee-radius-pill) !important;
	padding: 1rem 2rem !important;
	font-family: var(--wecoffee-font-body) !important;
	font-size: var(--wecoffee-text-body) !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.1em !important;
	cursor: pointer !important;
	transition: background-color var(--wecoffee-transition), color var(--wecoffee-transition), transform 150ms ease !important;
}

.woocommerce.single-product div.product .single_add_to_cart_button:hover {
	background-color: transparent !important;
	color: var(--wecoffee-color-primary) !important;
}

.woocommerce.single-product div.product .single_add_to_cart_button:active {
	transform: scale(0.98) !important;
}

/* ---- Quantity + button w jednym wierszu ---- */

.woocommerce.single-product div.product form.cart {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: var(--wecoffee-space-sm) !important;
	align-items: flex-end !important;
}

.woocommerce.single-product div.product form.cart .quantity {
	flex-shrink: 0 !important;
}

.woocommerce.single-product div.product form.cart .single_add_to_cart_button {
	flex: 1 !important;
	min-width: 0 !important;
}

/* ---- Product meta (SKU, kategoria) — delikatne ---- */

.woocommerce.single-product div.product .product_meta {
	margin-top: var(--wecoffee-space-lg) !important;
	padding-top: var(--wecoffee-space-md) !important;
	border-top: 1px solid var(--wecoffee-color-border) !important;
	font-size: var(--wecoffee-text-small) !important;
	color: var(--wecoffee-color-text-muted) !important;
}

.woocommerce.single-product div.product .product_meta>span {
	display: block !important;
	margin-bottom: var(--wecoffee-space-2xs) !important;
}

.woocommerce.single-product div.product .product_meta a {
	color: var(--wecoffee-color-secondary) !important;
	text-decoration: none !important;
	transition: color var(--wecoffee-transition);
}

.woocommerce.single-product div.product .product_meta a:hover {
	color: var(--wecoffee-color-primary) !important;
}

/* ==========================================================================
   COFFEE ATTRIBUTES — Premium mini-cards
   ========================================================================== */

.wecoffee-product-attributes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: var(--wecoffee-space-xs);
	margin-top: var(--wecoffee-space-xl);
	margin-bottom: var(--wecoffee-space-md);
	padding: 0;
	background-color: transparent;
	border: none;
	border-radius: 0;
	overflow: visible;
}

.wecoffee-attr {
	display: flex;
	flex-direction: column;
	gap: var(--wecoffee-space-2xs);
	padding: var(--wecoffee-space-md);
	background-color: var(--wecoffee-color-surface-alt);
	border-radius: var(--wecoffee-radius-lg);
	border: none;
	transition: box-shadow var(--wecoffee-transition-slow);
}

.wecoffee-attr:hover {
	box-shadow: var(--wecoffee-shadow-sm);
}

.wecoffee-attr:last-child {
	border-bottom: none;
}

@media (min-width: 768px) {
	.wecoffee-product-attributes {
		grid-template-columns: repeat(2, 1fr);
	}

	.wecoffee-attr {
		border-bottom: none;
		border-right: none;
	}

	.wecoffee-attr:nth-child(2n) {
		border-right: none;
	}

	.wecoffee-attr:nth-last-child(-n+2) {
		border-bottom: none;
	}
}

.wecoffee-attr-label {
	font-family: var(--wecoffee-font-body);
	font-size: var(--wecoffee-text-caption);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wecoffee-color-text-muted);
	font-weight: 600;
}

.wecoffee-attr-value {
	font-family: var(--wecoffee-font-heading);
	font-size: var(--wecoffee-text-h4);
	color: var(--wecoffee-color-primary);
	font-weight: 600;
	line-height: 1.3;
}

/* ---- Graficzne ziarna kawy ---- */

.wecoffee-beans {
	display: flex;
	gap: var(--wecoffee-space-2xs);
	align-items: center;
	margin-top: var(--wecoffee-space-2xs);
}

.wecoffee-bean-icon {
	width: 20px;
	height: auto;
	object-fit: contain;
	opacity: 0.9;
}

/* ==========================================================================
   PRODUCT TABS — Underline style, minimal
   ========================================================================== */

.woocommerce.single-product div.product .woocommerce-tabs {
	margin-top: var(--wecoffee-space-2xl) !important;
	padding-top: var(--wecoffee-space-xl) !important;
	border-top: 1px solid var(--wecoffee-color-border) !important;
}

.woocommerce.single-product div.product .woocommerce-tabs ul.tabs {
	list-style: none !important;
	display: flex !important;
	gap: var(--wecoffee-space-lg) !important;
	padding: 0 !important;
	margin: 0 0 var(--wecoffee-space-xl) 0 !important;
	border-bottom: 1px solid var(--wecoffee-color-border) !important;
	background: none !important;
}

.woocommerce.single-product div.product .woocommerce-tabs ul.tabs::before,
.woocommerce.single-product div.product .woocommerce-tabs ul.tabs::after {
	display: none !important;
}

.woocommerce.single-product div.product .woocommerce-tabs ul.tabs li {
	background: none !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

.woocommerce.single-product div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce.single-product div.product .woocommerce-tabs ul.tabs li::after {
	display: none !important;
}

.woocommerce.single-product div.product .woocommerce-tabs ul.tabs li a {
	display: inline-block !important;
	padding: var(--wecoffee-space-xs) 0 !important;
	font-family: var(--wecoffee-font-body) !important;
	font-size: var(--wecoffee-text-small) !important;
	font-weight: 500 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
	color: var(--wecoffee-color-text-muted) !important;
	text-decoration: none !important;
	border-bottom: 2px solid transparent !important;
	transition: color var(--wecoffee-transition), border-color var(--wecoffee-transition) !important;
	margin-bottom: -1px !important;
	background: none !important;
}

.woocommerce.single-product div.product .woocommerce-tabs ul.tabs li a:hover {
	color: var(--wecoffee-color-primary) !important;
}

.woocommerce.single-product div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--wecoffee-color-primary) !important;
	font-weight: 600 !important;
	border-bottom-color: var(--wecoffee-color-primary) !important;
}

/* Tab content */
.woocommerce.single-product div.product .woocommerce-tabs .woocommerce-Tabs-panel {
	padding: 0 !important;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	font-size: var(--wecoffee-text-body) !important;
	line-height: 1.7 !important;
	color: var(--wecoffee-color-text) !important;
}

.woocommerce.single-product div.product .woocommerce-tabs .woocommerce-Tabs-panel h2 {
	display: none !important;
}

/* ==========================================================================
   RELATED PRODUCTS — Elegancki separator
   ========================================================================== */

.woocommerce.single-product .related.products {
	margin-top: var(--wecoffee-space-2xl) !important;
	padding-top: var(--wecoffee-space-xl) !important;
	border-top: 1px solid var(--wecoffee-color-border) !important;
}

.woocommerce.single-product .related.products>h2 {
	font-family: var(--wecoffee-font-heading) !important;
	font-size: var(--wecoffee-text-h2) !important;
	color: var(--wecoffee-color-primary) !important;
	font-weight: 700 !important;
	margin-bottom: var(--wecoffee-space-xl) !important;
	text-align: center !important;
}


/* ==========================================================================
   PRODUCT GRID — Siatka produktów (2-kolumnowy editorial)
   ========================================================================== */

ul.products,
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: var(--wecoffee-space-xl);
	list-style: none;
	padding: 0;
	margin: 0;
}

@media (min-width: 768px) {

	ul.products,
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

ul.products li.product {
	position: relative;
	border-radius: var(--wecoffee-radius-lg);
	overflow: hidden;
	background-color: var(--wecoffee-color-surface);
	transition: box-shadow var(--wecoffee-transition-slow);
	/* Flexbox layout — poprawne wypełnienie pionowe */
	display: flex !important;
	flex-direction: column !important;
}

ul.products li.product:hover {
	box-shadow: var(--wecoffee-shadow-md);
}

/* Zdjęcie produktu — scale na hover */
ul.products li.product a img,
ul.products li.product .attachment-woocommerce_thumbnail {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform var(--wecoffee-transition-slow);
}

ul.products li.product:hover a img,
ul.products li.product:hover .attachment-woocommerce_thumbnail {
	transform: scale(1.03);
}

/* Wrapper na treść pod zdjęciem */
ul.products li.product .astra-shop-summary-wrap {
	padding: 1rem !important;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

/* Treść pod zdjęciem */
ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wecoffee-font-heading);
	font-size: var(--wecoffee-text-h3);
	color: var(--wecoffee-color-primary);
	padding: 0 0 0.25rem 0 !important;
	margin: 0 !important;
	line-height: 1.25;
}

ul.products li.product .price {
	color: var(--wecoffee-color-text);
	font-weight: 600;
	font-size: var(--wecoffee-text-body);
	padding: 0 0 0.75rem 0 !important;
	margin: 0 !important;
	margin-top: auto !important;
}

ul.products li.product .price del {
	color: var(--wecoffee-color-text-muted);
	font-weight: 400;
}

ul.products li.product .price ins {
	text-decoration: none;
	color: var(--wecoffee-color-primary);
}

/* ---- Badges produktowe ---- */

.wecoffee-product-badges {
	position: absolute;
	top: var(--wecoffee-space-sm);
	left: var(--wecoffee-space-sm);
	display: flex;
	flex-wrap: wrap;
	gap: var(--wecoffee-space-2xs);
	z-index: 2;
}

.wecoffee-badge {
	font-family: var(--wecoffee-font-body);
	font-size: var(--wecoffee-text-caption);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: var(--wecoffee-space-2xs) var(--wecoffee-space-xs);
	border-radius: var(--wecoffee-radius-sm);
	font-weight: 600;
	line-height: 1.2;
}

.wecoffee-badge--purpose {
	background-color: var(--wecoffee-color-primary);
	color: var(--wecoffee-color-white);
}

.wecoffee-badge--roast {
	background-color: var(--wecoffee-color-parchment);
	color: var(--wecoffee-color-primary);
}

/* Add to cart na karcie */
ul.products li.product .button,
ul.products li.product .add_to_cart_button {
	margin: 0 0 1rem 0 !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

/* Globalne ukrycie ikony-koszyka Astry na hover (duplikuje główny przycisk) */
ul.products li.product .astra-shop-thumbnail-wrap .button,
ul.products li.product .astra-shop-thumbnail-wrap .ast-shop-interactive-button,
ul.products li.product .astra-shop-thumbnail-wrap .add_to_cart_button,
.wc-block-product-template .astra-shop-thumbnail-wrap .button,
.wc-block-product-template .astra-shop-thumbnail-wrap .ast-shop-interactive-button,
.wc-block-product-template .astra-shop-thumbnail-wrap .add_to_cart_button {
	display: none !important;
}

/* Sale badge WooCommerce */
.woocommerce span.onsale {
	background-color: var(--wecoffee-color-secondary);
	color: var(--wecoffee-color-white);
	border-radius: var(--wecoffee-radius-sm);
	font-size: var(--wecoffee-text-caption);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: var(--wecoffee-space-2xs) var(--wecoffee-space-xs);
	min-height: auto;
	min-width: auto;
	line-height: 1.4;
}

/* ==========================================================================
   KOSZYK I ZAMÓWIENIE (CART & CHECKOUT)
   ========================================================================== */

.woocommerce-cart .quantity input.qty,
.woocommerce-checkout input.input-text,
.woocommerce-checkout select {
	padding: 0.75rem 1rem;
	border-radius: var(--wecoffee-radius-md);
	border: 1px solid var(--wecoffee-color-border);
	font-family: var(--wecoffee-font-body);
}

.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout select:focus {
	border-color: var(--wecoffee-color-secondary);
	box-shadow: 0 0 0 3px rgba(196, 168, 130, 0.15);
	outline: none;
}

/* Wyróżnienie sekcji płatności i dostawy */
#shipping_method,
.woocommerce-checkout-payment {
	background-color: var(--wecoffee-color-surface-alt);
	border-radius: var(--wecoffee-radius-lg);
	padding: var(--wecoffee-space-lg);
	border: 1px solid var(--wecoffee-color-border);
}

/* Checkout headings */
.woocommerce-checkout h3 {
	font-size: var(--wecoffee-text-h3);
	margin-bottom: var(--wecoffee-space-lg);
}

/* Order review table */
.woocommerce-checkout-review-order-table {
	border-collapse: collapse;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
	padding: var(--wecoffee-space-sm) var(--wecoffee-space-md);
	border-bottom: 1px solid var(--wecoffee-color-border);
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
	font-family: var(--wecoffee-font-heading);
	font-size: var(--wecoffee-text-h4);
	font-weight: 700;
	color: var(--wecoffee-color-primary);
	border-bottom: none;
	padding-top: var(--wecoffee-space-md);
}

/* Uproszczony Checkout (ukrycie rozpraszaczy) */
body.wecoffee-simplified-checkout .site-footer,
body.wecoffee-simplified-checkout .ast-primary-header-bar .main-header-menu {
	display: none;
}

body.wecoffee-simplified-checkout .site-header {
	border-bottom: 1px solid var(--wecoffee-color-border);
}

/* Cart table */
.woocommerce-cart-form .shop_table {
	border-collapse: collapse;
}

.woocommerce-cart-form .shop_table th,
.woocommerce-cart-form .shop_table td {
	padding: var(--wecoffee-space-md);
	border-bottom: 1px solid var(--wecoffee-color-border);
	vertical-align: middle;
}

.woocommerce-cart-form .shop_table .product-thumbnail img {
	border-radius: var(--wecoffee-radius-md);
	max-width: 80px;
}

.woocommerce-cart-form .shop_table .product-name a {
	font-family: var(--wecoffee-font-heading);
	font-weight: 600;
	color: var(--wecoffee-color-primary);
	text-decoration: none;
}

.woocommerce-cart-form .shop_table .product-name a:hover {
	color: var(--wecoffee-color-secondary);
}

/* Cart totals */
.cart_totals {
	background-color: var(--wecoffee-color-surface-alt);
	border-radius: var(--wecoffee-radius-lg);
	padding: var(--wecoffee-space-lg);
}

.cart_totals h2 {
	font-size: var(--wecoffee-text-h3);
	margin-bottom: var(--wecoffee-space-md);
}

/* ==========================================================================
   SCROLL-TRIGGERED REVEAL ANIMATIONS
   ========================================================================== */

[data-wecoffee-reveal] {
	opacity: 0;
	transform: translateY(1.5rem);
	transition:
		opacity var(--wecoffee-duration-slow) var(--wecoffee-ease),
		transform var(--wecoffee-duration-slow) var(--wecoffee-ease);
}

[data-wecoffee-reveal].wecoffee-revealed {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	[data-wecoffee-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ==========================================================================
   GLOBAL FOCUS — Accessibility
   ========================================================================== */

:is(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wecoffee-color-secondary);
	outline-offset: 3px;
}

/* ==========================================================================
   ASTRA CORE OVERRIDES
   ========================================================================== */

.ast-single-post.ast-page-builder-template .site-main>article,
.woocommerce.ast-page-builder-template .site-main,
.ast-page-builder-template .post-navigation {
	padding-top: 0 !important;
}

/* Nie ukrywaj focus outline na elementach interaktywnych */
:focus:not(:focus-visible) {
	outline: none;
}

/* Wymuszenie proporcji 1:1 dla miniatur produktów (Astra Override) */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img,
.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
	aspect-ratio: 1 / 1 !important;
	object-fit: cover !important;
	width: 100% !important;
	height: auto !important;

}

/* ==========================================================================
   WOOCOMMERCE FILTERS (SIDEBAR & OFF-CANVAS)
   Premium dark theme styles for widgets
   ========================================================================== */

.widget-area .widget,
.ast-woo-sidebar-widget,
.astra-shop-filter-button {
	font-family: var(--wecoffee-font-body);
}

.widget-area .widget,
.ast-woo-sidebar-widget {
	margin-bottom: var(--wecoffee-space-xl) !important;
}

.widget-area .widget:last-child,
.ast-woo-sidebar-widget:last-child {
	margin-bottom: 0 !important;
}

#secondary .widget-area .widget-title,
.widget-area .widget-title,
.ast-woo-sidebar-widget .widget-title {
	font-family: var(--wecoffee-font-heading) !important;
	font-size: var(--wecoffee-text-h3) !important;
	color: var(--wecoffee-color-primary) !important;
	margin-top: 0 !important;
	margin-bottom: var(--wecoffee-space-md) !important;
	padding-bottom: var(--wecoffee-space-xs) !important;
	border-bottom: 1px solid var(--wecoffee-color-border) !important;
	line-height: 1.2 !important;
}

/* Layered Nav list (Filter by attribute) */
.woocommerce-widget-layered-nav-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.woocommerce-widget-layered-nav-list .wc-layered-nav-term {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	padding: var(--wecoffee-space-xs) 0 !important;
	border-bottom: none !important;
}

.woocommerce-widget-layered-nav-list .wc-layered-nav-term:last-child {
	border-bottom: none;
}

.woocommerce-widget-layered-nav-list .wc-layered-nav-term a {
	color: var(--wecoffee-color-text) !important;
	text-decoration: none !important;
	display: flex !important;
	align-items: center !important;
	gap: var(--wecoffee-space-sm) !important;
	font-weight: 500 !important;
	transition: color var(--wecoffee-transition) !important;
}

.woocommerce-widget-layered-nav-list .wc-layered-nav-term a:hover,
.woocommerce-widget-layered-nav-list .wc-layered-nav-term.chosen a {
	color: var(--wecoffee-color-primary);
}

/* Custom Checkbox Look for links */
.woocommerce-widget-layered-nav-list .wc-layered-nav-term a::before {
	content: '';
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 1px solid var(--wecoffee-color-border);
	border-radius: 4px;
	background-color: var(--wecoffee-color-surface-alt);
	transition: background-color var(--wecoffee-transition), border-color var(--wecoffee-transition);
}

.woocommerce-widget-layered-nav-list .wc-layered-nav-term.chosen a::before {
	background-color: var(--wecoffee-color-primary);
	border-color: var(--wecoffee-color-primary);
	/* Simple SVG checkmark */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D0604' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
	background-size: 12px;
	background-position: center;
	background-repeat: no-repeat;
}

.woocommerce-widget-layered-nav-list .wc-layered-nav-term a:hover::before {
	border-color: var(--wecoffee-color-secondary);
}

/* Count badge */
.woocommerce-widget-layered-nav-list .wc-layered-nav-term .count {
	font-size: var(--wecoffee-text-small) !important;
	background-color: transparent !important;
	color: var(--wecoffee-color-text-muted) !important;
	padding: 0 !important;
	margin-left: auto !important;
}

/* Beans visualization in filter */
.wecoffee-beans-filter {
	display: inline-flex;
	margin-left: var(--wecoffee-space-2xs);
}

/* Off-canvas sidebar overrides (if Astra Off-canvas is used) */
.ast-shop-filter-close {
	color: var(--wecoffee-color-primary) !important;
}

#astra-shop-filter {
	background-color: var(--wecoffee-color-background);
	border-left: 1px solid var(--wecoffee-color-border);
}

.astra-shop-filter-button {
	background-color: var(--wecoffee-color-surface-alt);
	color: var(--wecoffee-color-text);
	border: 1px solid var(--wecoffee-color-border);
	border-radius: var(--wecoffee-radius-pill);
	padding: var(--wecoffee-space-sm) var(--wecoffee-space-md);
	font-weight: 600;
	transition: background-color var(--wecoffee-transition);
}

.astra-shop-filter-button:hover {
	background-color: var(--wecoffee-color-surface);
	color: var(--wecoffee-color-primary);
}

/* ==========================================================================
   GLOBAL OFF-CANVAS SIDEBAR (Desktop & Mobile)
   ========================================================================== */

/* Force main content to be full width even if Astra assigns a sidebar class */
.ast-right-sidebar #primary,
.ast-left-sidebar #primary {
	width: 100% !important;
	float: none !important;
}

/* Sidebar container off-canvas behavior */
#secondary {
	position: fixed;
	top: 0;
	left: -340px;
	width: 100%;
	max-width: 320px;
	height: 100vh;
	background-color: var(--wecoffee-color-background);
	z-index: 99999;
	overflow-x: hidden;
	overflow-y: auto;
	touch-action: auto !important;
	/* Allow scroll inside sidebar */
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: var(--wecoffee-space-lg);
	transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
	margin: 0 !important;
	border: none !important;
	box-sizing: border-box;
}

#secondary.wecoffee-sidebar-open {
	left: 0;
}

/* The floating button glued to the screen edge */
.wecoffee-floating-filter-btn {
	position: fixed;
	left: 0;
	top: 150px;
	/* or middle of screen */
	width: 48px !important;
	height: 48px !important;
	padding: 0 !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	background-color: var(--wecoffee-color-primary) !important;
	color: #ffffff !important;
	border: 1px solid var(--wecoffee-color-primary) !important;
	border-left: none !important;
	border-radius: 0 var(--wecoffee-radius-pill) var(--wecoffee-radius-pill) 0 !important;
	cursor: pointer;
	z-index: 999999;
	/* Above sidebar */
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 1 !important;
	transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, transform 0.2s;
	box-shadow: var(--wecoffee-shadow-md);
}

.wecoffee-floating-filter-btn:hover {
	background-color: var(--wecoffee-color-text) !important;
}

/* The SVG icon inside the button */
.wecoffee-floating-filter-btn svg {
	width: 24px !important;
	height: 24px !important;
	fill: none !important;
	stroke: #ffffff !important;
	stroke-width: 2px !important;
	flex-shrink: 0 !important;
	pointer-events: none;
	transition: transform 0.3s ease;
}

/* When sidebar is open, move button to the right edge of sidebar and change to X */
.wecoffee-sidebar-open~.wecoffee-floating-filter-btn,
.wecoffee-floating-filter-btn.wecoffee-sidebar-open {
	left: 320px;
	/* same as sidebar width */
}

/* Handle icon switching via CSS classes */
.wecoffee-floating-filter-btn .icon-filter {
	display: block !important;
}

.wecoffee-floating-filter-btn .icon-close {
	display: none !important;
}

.wecoffee-floating-filter-btn.wecoffee-sidebar-open .icon-filter {
	display: none !important;
}

.wecoffee-floating-filter-btn.wecoffee-sidebar-open .icon-close {
	display: block !important;
}

/* On mobile, adjust the button position if needed */
@media (max-width: 768px) {
	#secondary {
		max-width: calc(100vw - 50px);
		padding: var(--wecoffee-space-lg) var(--wecoffee-space-md) !important;
	}

	#secondary .widget-area .widget-title,
	.widget-area .widget-title,
	.ast-woo-sidebar-widget .widget-title {
		font-size: var(--wecoffee-text-h3) !important;
		margin-bottom: var(--wecoffee-space-sm) !important;
	}

	.widget-area .widget,
	.ast-woo-sidebar-widget {
		margin-bottom: var(--wecoffee-space-lg) !important;
	}

	.woocommerce-widget-layered-nav-list .wc-layered-nav-term {
		padding: var(--wecoffee-space-xs) 0 !important;
	}

	.wecoffee-sidebar-open~.wecoffee-floating-filter-btn,
	.wecoffee-floating-filter-btn.wecoffee-sidebar-open {
		left: calc(100vw - 50px);
		/* max-width of sidebar on mobile */
	}
}

/* Global overlay */
.wecoffee-sidebar-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 99998;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.wecoffee-sidebar-overlay.active {
	display: block;
	opacity: 1;
}

/* Scroll lock when sidebar is open */
.wecoffee-body-lock {
	overflow: hidden !important;
	height: 100vh !important;
	touch-action: none;
}
