/* =========================================================
   Comfyo — shop / category archive + product card
   ========================================================= */

.woocommerce ul.products,
.woocommerce-page ul.products{
	list-style: none;
	margin: 0 0 2rem !important;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem 1.25rem;
	clear: both;
}
@media (min-width: 700px){
	.woocommerce ul.products,
	.woocommerce-page ul.products{
		grid-template-columns: repeat(3, 1fr);
		gap: 2rem 1.5rem;
	}
}
@media (min-width: 1100px){
	.woocommerce ul.products,
	.woocommerce-page ul.products{
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ---------------------------------------------------------
   Hero + breadcrumbs
   --------------------------------------------------------- */
.woocommerce-breadcrumb{
	font-family: var(--font-sans);
	font-size: 0.82rem;
	color: var(--c-taupe);
	margin: 1.5rem 0 0 !important;
	padding: 0 !important;
}
.woocommerce-breadcrumb a{
	color: var(--c-taupe);
}
.woocommerce-breadcrumb a:hover{
	color: var(--c-accent);
}

.comfyo-shop-hero{
	padding: 1.25rem 0 2rem;
	text-align: center;
}
.comfyo-shop-hero__title{
	font-size: clamp(2rem, 4vw, 2.8rem);
	margin: 0 0 0.75rem;
}
.comfyo-shop-hero__desc{
	max-width: 620px;
	margin: 0 auto;
	color: var(--c-body);
	line-height: 1.7;
}
.comfyo-shop-hero__desc p{
	margin: 0;
}

/* ---------------------------------------------------------
   Category chips
   --------------------------------------------------------- */
.comfyo-cat-chips{
	display: flex;
	gap: 0.6rem;
	overflow-x: auto;
	padding: 0.25rem 0 1.75rem;
	scrollbar-width: thin;
}
.comfyo-chip{
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	padding: 0.55rem 1.15rem;
	border-radius: 999px;
	border: 1px solid var(--c-line);
	font-family: var(--font-sans);
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	white-space: nowrap;
	color: var(--c-ink);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
a.comfyo-chip:hover{
	border-color: var(--c-ink);
}
.comfyo-chip.is-active{
	background: var(--c-ink);
	border-color: var(--c-ink);
	color: var(--c-cream);
}
.comfyo-chip--soon{
	color: var(--c-taupe);
	cursor: default;
	border-style: dashed;
}

/* ---------------------------------------------------------
   Toolbar (count + sort + filter trigger)
   --------------------------------------------------------- */
.comfyo-shop-toolbar{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 1rem 0;
	border-top: 1px solid var(--c-line);
	border-bottom: 1px solid var(--c-line);
	margin-bottom: 2rem;
}
.comfyo-shop-toolbar__count{
	margin: 0;
	font-size: 0.85rem;
	color: var(--c-taupe);
}
.comfyo-shop-toolbar__actions{
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-left: auto;
}
.comfyo-filter-toggle{
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 1.1rem;
	border-radius: 999px;
	border: 1px solid var(--c-ink);
	background: transparent;
	color: var(--c-ink);
	font-family: var(--font-sans);
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.comfyo-filter-toggle svg{
	width: 1rem;
	height: 1rem;
}
.comfyo-filter-toggle:hover{
	background: var(--c-ink);
	color: var(--c-cream);
}

.comfyo-shop-toolbar__sort .orderby,
.woocommerce-ordering select{
	font-family: var(--font-sans);
	font-size: 0.82rem;
	border: 1px solid var(--c-line);
	border-radius: 999px;
	padding: 0.55rem 2.2rem 0.55rem 1.1rem;
	background-color: var(--c-white);
	color: var(--c-ink);
	cursor: pointer;
}
.woocommerce-ordering{
	margin: 0;
}

/* ---------------------------------------------------------
   Filter drawer
   --------------------------------------------------------- */
.comfyo-filters-overlay{
	position: fixed;
	inset: 0;
	background: rgba(33, 31, 27, 0.45);
	opacity: 0;
	transition: opacity 0.25s ease;
	z-index: 1000;
}
.comfyo-filters-overlay.is-open{
	opacity: 1;
}
.comfyo-filters-panel{
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(400px, 100vw);
	background: var(--c-cream);
	z-index: 1001;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	box-shadow: -20px 0 50px rgba(33, 31, 27, 0.2);
}
.comfyo-filters-panel.is-open{
	transform: translateX(0);
}
.comfyo-filters-panel__head{
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem 1.5rem 1rem;
	border-bottom: 1px solid var(--c-line);
}
.comfyo-filters-panel__head h2{
	margin: 0;
	font-size: 1.3rem;
}
.comfyo-filters-panel__close{
	background: none;
	border: none;
	cursor: pointer;
	color: var(--c-ink);
	padding: 0.4rem;
}
.comfyo-filters-panel__close svg{
	width: 1.2rem;
	height: 1.2rem;
}
.comfyo-filters-panel__body{
	flex: 1;
	overflow-y: auto;
	padding: 1.25rem 1.5rem;
}
.comfyo-filter-group{
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--c-line);
}
.comfyo-filter-group:first-child{
	padding-top: 0;
}
.comfyo-filter-group h3{
	font-family: var(--font-sans);
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--c-ink);
	margin: 0 0 1rem;
}

.comfyo-filter-swatches{
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}
.comfyo-filter-swatch{
	position: relative;
}
.comfyo-filter-swatch input{
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.comfyo-filter-swatch span{
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 2.6rem;
	height: 2.6rem;
	padding: 0 0.5rem;
	border: 1px solid var(--c-line);
	border-radius: 6px;
	font-size: 0.82rem;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
.comfyo-filter-swatch input:checked + span{
	border-color: var(--c-ink);
	background: var(--c-ink);
	color: var(--c-cream);
}

.comfyo-filter-colors{
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
}
.comfyo-filter-color input{
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.comfyo-filter-color span{
	display: block;
	width: 1.9rem;
	height: 1.9rem;
	border-radius: 50%;
	border: 1px solid var(--c-line);
	cursor: pointer;
	box-shadow: 0 0 0 2px var(--c-cream);
}
.comfyo-filter-color input:checked + span{
	box-shadow: 0 0 0 2px var(--c-cream), 0 0 0 4px var(--c-ink);
}

.comfyo-filter-list{
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.comfyo-filter-check{
	display: flex;
	align-items: center;
	gap: 0.65rem;
	font-size: 0.9rem;
	cursor: pointer;
}
.comfyo-filter-check input{
	width: 1.05rem;
	height: 1.05rem;
	accent-color: var(--c-ink);
}

.comfyo-filters-panel__foot{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-top: 1px solid var(--c-line);
}

/* ---------------------------------------------------------
   Empty state
   --------------------------------------------------------- */
.comfyo-shop-empty{
	text-align: center;
	max-width: 480px;
	margin: 2rem auto 5rem;
	padding: 3rem 1.5rem;
}
.comfyo-shop-empty__icon{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	background: var(--c-blush);
	color: var(--c-accent-dark);
	margin-bottom: 1.5rem;
}
.comfyo-shop-empty__icon svg{
	width: 1.8rem;
	height: 1.8rem;
}
.comfyo-shop-empty h2{
	font-size: 1.6rem;
	margin: 0 0 0.75rem;
}
.comfyo-shop-empty p{
	color: var(--c-body);
	line-height: 1.7;
	margin: 0 0 2rem;
}
.comfyo-shop-empty__actions{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

/* ---------------------------------------------------------
   Product card
   --------------------------------------------------------- */
.woocommerce ul.products li.product{
	position: relative;
	margin: 0;
	text-align: left;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link{
	display: flex;
	flex-direction: column;
	flex: 1;
	text-decoration: none;
	color: inherit;
}
/*
 * Comfyo titles vary a lot in length ("Beżowa spódnica" vs "Beżowy komplet
 * dresowy ze spodniami Neele"), and CSS Grid stretches every card in a row
 * to the same overall height — without this, the hover "Dodaj do koszyka"
 * button below the title+price block would land at a different vertical
 * position from card to card in the same row. Clamping the title to 2 lines
 * gives every card the same text-block height, and margin-top:auto on the
 * button pins it to the bottom of whatever space remains.
 */
.woocommerce ul.products li.product .woocommerce-loop-product__title{
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	min-height: calc(0.98rem * 1.35 * 2);
}

.comfyo-card__media{
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 6px;
	background: var(--c-cream-deep);
	margin-bottom: 0.9rem;
}
/*
 * !important: a base "responsive images" rule (img{height:auto}) from
 * WooCommerce/Astra core CSS otherwise wins over height:100% here, which
 * left the image at its native square ratio inside this 4:5 box (a visible
 * gap of card background below the photo) instead of covering it.
 */
.comfyo-card__media img{
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	transition: opacity 0.4s ease, transform 0.5s ease;
}
.comfyo-card__hover-img{
	opacity: 0;
}
@media (hover: hover){
	.comfyo-card__media:hover .comfyo-card__hover-img{
		opacity: 1;
	}
	.comfyo-card__media:hover img:not(.comfyo-card__hover-img){
		opacity: 0;
	}
}

.comfyo-card__badges{
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	z-index: 2;
}
.comfyo-badge{
	display: inline-block;
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	font-family: var(--font-sans);
	font-size: 0.68rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: var(--c-white);
	color: var(--c-ink);
}
.comfyo-badge.is-new{
	background: var(--c-ink);
	color: var(--c-cream);
}
.comfyo-badge.is-bestseller{
	background: var(--c-accent);
	color: var(--c-white);
}
.comfyo-badge.is-sale{
	background: #A24632;
	color: var(--c-white);
}
.comfyo-badge.is-outofstock{
	background: var(--c-taupe);
	color: var(--c-white);
}

.comfyo-wishlist-btn{
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 50%;
	border: none;
	background: rgba(255, 252, 248, 0.9);
	color: var(--c-ink);
	cursor: pointer;
	transition: transform 0.2s ease;
}
.comfyo-wishlist-btn:hover{
	transform: scale(1.08);
}
/* Same fix as the inline PDP wishlist button in comfyo-product.css: this is
   a plain <button>, so without an explicit :focus background it falls
   through to Astra's default global-palette blue. */
.comfyo-wishlist-btn:focus{
	background: rgba(255, 252, 248, 0.9);
	outline: none;
}
.comfyo-wishlist-btn:focus-visible{
	outline: 2px solid var(--c-accent);
	outline-offset: 2px;
}
.comfyo-wishlist-btn svg{
	width: 1.05rem;
	height: 1.05rem;
}
.comfyo-wishlist-btn__icon-on{
	display: none;
	color: var(--c-accent);
}
.comfyo-wishlist-btn.is-active .comfyo-wishlist-btn__icon-off{
	display: none;
}
.comfyo-wishlist-btn.is-active .comfyo-wishlist-btn__icon-on{
	display: block;
}

.comfyo-card__cat{
	display: block;
	font-family: var(--font-sans);
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--c-taupe);
	margin-bottom: 0.3rem;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title{
	font-family: var(--font-sans);
	font-size: 0.98rem;
	font-weight: 500;
	color: var(--c-ink);
	margin: 0 0 0.35rem;
}

.woocommerce ul.products li.product .price{
	font-family: var(--font-sans);
	font-size: 0.95rem;
	color: var(--c-ink);
}
.woocommerce ul.products li.product .price del{
	color: var(--c-taupe);
	opacity: 1;
	margin-right: 0.5rem;
	font-size: 0.85em;
}
.woocommerce ul.products li.product .price ins{
	text-decoration: none;
	color: var(--c-accent-dark);
	font-weight: 600;
}

.woocommerce ul.products li.product .button.add_to_cart_button{
	display: inline-block;
	margin-top: auto;
	padding: 0.5rem 1.1rem;
	border-radius: 999px;
	border: 1px solid var(--c-ink);
	background: transparent;
	color: var(--c-ink);
	font-family: var(--font-sans);
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.woocommerce ul.products li.product:hover .button.add_to_cart_button,
.woocommerce ul.products li.product .button.add_to_cart_button.added{
	opacity: 1;
}
.woocommerce ul.products li.product .button.add_to_cart_button:hover{
	background: var(--c-ink);
	color: var(--c-cream);
}
@media (hover: none){
	.woocommerce ul.products li.product .button.add_to_cart_button{
		opacity: 1;
	}
}

/* ---------------------------------------------------------
   Pagination
   --------------------------------------------------------- */
.woocommerce-pagination{
	margin-top: 1rem;
}
.woocommerce-pagination ul.page-numbers{
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}
.woocommerce-pagination .page-numbers li{
	list-style: none;
}
.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	font-family: var(--font-sans);
	font-size: 0.85rem;
	color: var(--c-ink);
	border: 1px solid transparent;
}
.woocommerce-pagination .page-numbers a:hover{
	border-color: var(--c-line);
}
.woocommerce-pagination .page-numbers .current{
	background: var(--c-ink);
	color: var(--c-cream);
}
