/* ==========================================================================
   Your Pet Hamster — products.css
   Product boxes, comparison rail, sticky CTA, related products.
   ========================================================================== */

/* =========== PRODUCTS SECTION =========== */
.yph-products { background: var(--yph-bg); }
.yph-products__grid {
	display: grid; gap: 24px;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	margin-bottom: 40px;
}
.yph-products__lists { background: var(--yph-bg-alt); padding: 28px; border-radius: var(--yph-radius); }
.yph-products__lists-title { text-align: center; font-size: 1.2rem; margin: 0 0 18px; }
.yph-products__chips {
	display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.yph-products__chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 8px 16px; border-radius: 999px;
	background: #fff;
	color: var(--yph-text);
	font-family: var(--yph-font-ui); font-weight: 600; font-size: .85rem;
	box-shadow: 0 4px 14px -10px rgba(76,46,28,.3);
	transition: transform .15s, background .15s, color .15s;
}
.yph-products__chip:hover { background: var(--yph-primary); color: #fff; transform: translateY(-2px); }

/* =========== PRODUCT BOX — base ========== */
.yph-product {
	background: #fff;
	border-radius: var(--yph-radius);
	overflow: hidden;
	box-shadow: 0 10px 30px -22px rgba(76,46,28,.4);
	display: flex; flex-direction: column;
	transition: transform .2s ease, box-shadow .2s ease;
	position: relative;
}
.yph-product:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -22px rgba(76,46,28,.5); }
.yph-product__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, var(--yph-bg-alt), color-mix(in srgb, var(--yph-wood) 40%, var(--yph-bg-alt)));
}
.yph-product__media img { width: 100%; height: 100%; object-fit: cover; }
.yph-product__placeholder {
	height: 100%; display: flex; align-items: center; justify-content: center;
}
.yph-product__badge {
	position: absolute; top: 12px; left: 12px;
	background: var(--yph-primary); color: #fff;
	padding: 5px 12px; border-radius: 999px;
	font-family: var(--yph-font-ui); font-weight: 800; font-size: .72rem;
	letter-spacing: .05em; text-transform: uppercase;
	box-shadow: 0 4px 14px -6px var(--yph-primary);
}
.yph-product__body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.yph-product__head { display: flex; flex-direction: column; gap: 6px; }
.yph-product__title { font-size: 1.1rem; margin: 0; }
.yph-product__bestfor {
	display: inline-flex; align-items: center; gap: 4px;
	font-family: var(--yph-font-ui); font-weight: 700; font-size: .78rem;
	color: var(--yph-secondary);
	margin: 0;
}
.yph-product__bestfor svg { color: #4a7c3a; }
.yph-product__rating {
	display: inline-flex; align-items: center; gap: 8px;
}
.yph-product__rating-num {
	font-weight: 800; font-size: 1.1rem; color: var(--yph-primary);
	background: color-mix(in srgb, var(--yph-accent) 18%, transparent);
	padding: 2px 10px; border-radius: 999px;
}
.yph-product__rating-stars { color: #f5a623; letter-spacing: 2px; font-size: 1rem; }
.yph-product__rating-label { color: var(--yph-muted); font-size: .78rem; }
.yph-product__desc { color: var(--yph-muted); font-size: .9rem; margin: 0; }
.yph-product__species { font-size: .8rem; color: var(--yph-text); margin: 0; }
.yph-product__procons {
	display: grid; gap: 6px;
	grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 380px) {
	.yph-product__procons { grid-template-columns: 1fr 1fr; }
}
.yph-product__pros, .yph-product__cons {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-direction: column; gap: 4px;
	font-size: .82rem;
}
.yph-product__pros li, .yph-product__cons li {
	display: flex; gap: 6px; line-height: 1.35;
}
.yph-product__pros li span { color: #4a7c3a; font-weight: 800; }
.yph-product__cons li span { color: #b85a1a; font-weight: 800; }
.yph-product__foot {
	display: flex; gap: 8px; flex-wrap: wrap;
	margin-top: auto; padding-top: 8px;
}
.yph-product__foot .yph-btn { flex: 1; }
.yph-product__updated { color: var(--yph-muted); font-size: .75rem; margin: 4px 0 0; }
.yph-compare-add {
	flex: 0 0 auto; min-width: 110px;
}

/* Variants */
.yph-product--minimalist .yph-product__media { aspect-ratio: 5 / 3; }
.yph-product--minimalist .yph-product__procons { display: none; }
.yph-product--minimalist .yph-product__rating { display: none; }
.yph-product--minimalist .yph-product__body { padding: 18px; }

.yph-product--compare {
	flex-direction: column;
}
.yph-product--compare .yph-product__media { aspect-ratio: 1; }

.yph-product--sidebar {
	flex-direction: row;
}
.yph-product--sidebar .yph-product__media { width: 110px; aspect-ratio: 1; flex-shrink: 0; }
.yph-product--sidebar .yph-product__body { padding: 14px 18px; gap: 6px; }
.yph-product--sidebar .yph-product__title { font-size: .95rem; }
.yph-product--sidebar .yph-product__procons { display: none; }
.yph-product--sidebar .yph-product__desc { display: none; }
.yph-product--sidebar .yph-product__badge { font-size: .65rem; padding: 3px 8px; }

.yph-product--mobile { flex-direction: column; }

/* =========== Related products =========== */
.yph-related-products { margin: 60px 0; }
.yph-related-products .yph-section-title { font-size: 1.4rem; margin-bottom: 18px; }
.yph-product-grid {
	display: grid; gap: 18px;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* =========== Compare drawer =========== */
.yph-compare-drawer {
	position: fixed; top: 0; right: -100%;
	width: min(100%, 460px); height: 100vh; z-index: 100;
	background: #fff;
	box-shadow: -10px 0 30px -10px rgba(0,0,0,.2);
	transition: right .25s ease;
	display: flex; flex-direction: column;
	overflow: hidden;
}
.yph-compare-drawer.is-open { right: 0; }
.yph-compare-drawer__inner { display: flex; flex-direction: column; height: 100%; }
.yph-compare-drawer__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--yph-bg-alt);
}
.yph-compare-drawer__head h2 { font-size: 1.2rem; margin: 0; }
.yph-compare-drawer__close {
	background: none; border: 0; font-size: 1.6rem; cursor: pointer;
	color: var(--yph-text); padding: 4px 10px;
}
.yph-compare-drawer__body {
	flex: 1; overflow-y: auto; padding: 18px 24px;
	display: flex; flex-direction: column; gap: 14px;
}
.yph-compare-drawer__empty {
	text-align: center; padding: 40px 0;
	color: var(--yph-muted); font-size: .95rem;
}
.yph-compare-drawer__item {
	display: flex; gap: 12px;
	background: var(--yph-bg-alt);
	border-radius: var(--yph-radius-sm);
	padding: 12px;
	align-items: center;
}
.yph-compare-drawer__item img {
	width: 56px; height: 56px; border-radius: 8px; object-fit: cover;
	background: var(--yph-bg);
}
.yph-compare-drawer__item-body { flex: 1; min-width: 0; }
.yph-compare-drawer__item-name { font-weight: 700; font-size: .95rem; margin: 0; line-height: 1.3; }
.yph-compare-drawer__item-meta { color: var(--yph-muted); font-size: .8rem; margin: 4px 0 6px; }
.yph-compare-drawer__item-actions { display: flex; gap: 6px; }
.yph-compare-drawer__remove {
	background: none; border: 0; color: var(--yph-muted); cursor: pointer;
	font-size: 1.2rem;
}
.yph-compare-drawer__remove:hover { color: #b03a3a; }
.yph-compare-drawer__foot {
	padding: 16px 24px;
	border-top: 1px solid var(--yph-bg-alt);
	display: flex; gap: 10px; justify-content: space-between;
}

/* =========== Compare FAB =========== */
.yph-compare-fab {
	position: fixed; bottom: 100px; right: 20px;
	z-index: 45;
	display: none; align-items: center; justify-content: center;
	width: 54px; height: 54px;
	background: var(--yph-primary); color: #fff;
	border: 0; border-radius: 50%;
	box-shadow: 0 14px 30px -14px var(--yph-primary);
	cursor: pointer;
}
@media (min-width: 769px) {
	.yph-compare-fab { display: inline-flex; }
}
.yph-compare-fab__count {
	position: absolute; top: -4px; right: -4px;
	min-width: 22px; height: 22px;
	background: var(--yph-accent); color: #fff;
	border-radius: 999px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: .75rem; font-weight: 800;
	padding: 0 5px;
}

/* =========== Sticky bottom CTA on mobile (article pages) =========== */
.yph-sticky-cta {
	position: sticky; bottom: 70px; z-index: 30;
	background: rgba(255,255,255,.97);
	border: 1px solid color-mix(in srgb, var(--yph-wood) 30%, transparent);
	box-shadow: 0 -8px 20px -10px rgba(76,46,28,.25);
	border-radius: var(--yph-radius);
	margin: 30px 0;
	padding: 14px 18px;
	display: flex; gap: 12px; align-items: center;
}
.yph-sticky-cta strong { flex: 1; font-size: .95rem; }
@media (min-width: 769px) {
	.yph-sticky-cta { position: static; bottom: auto; box-shadow: none; }
}

/* =========== Compare grid (shortcode) =========== */
.yph-compare-grid {
	display: grid; gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin: 26px 0;
}
