/* ==========================================================================
   Youdh Shop Grid
   ========================================================================== */

.youdh-shop {
	--youdh-navy: #16223c;
	--youdh-gold: #b3822d;
	--youdh-gold-badge: #a9822f;
	--youdh-green: #1c5c47;
	--youdh-cream: #f6f1e7;
	--youdh-card: #fdfbf5;
	--youdh-chip: #ede4d2;
	--youdh-border: #e3dccb;
	--youdh-text: #1c2333;
	--youdh-muted: #8a8578;
	--youdh-star: #c99a3a;
	--youdh-star-empty: #d8d0c0;

	color: var(--youdh-text);
	font-family: inherit;
	max-width: 1280px;
	margin: 0 auto;
	box-sizing: border-box;
}

.youdh-shop *,
.youdh-shop *::before,
.youdh-shop *::after {
	box-sizing: border-box;
}

/* ------- Toolbar ------- */
.youdh-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 6px;
}

.youdh-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.youdh-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 1px solid var(--youdh-border);
	border-radius: 999px;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .2px;
	color: var(--youdh-text);
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
	line-height: 1;
}

.youdh-shop .youdh-pill:hover {
	border-color: var(--youdh-gold) !important;
	color: var(--youdh-gold) !important;
	background: transparent !important;
}

.youdh-shop .youdh-pill.is-active:hover {
	color: #fff !important;
	background: var(--youdh-navy) !important;
	border-color: var(--youdh-navy) !important;
}

.youdh-pill.is-active {
	background: var(--youdh-navy);
	border-color: var(--youdh-navy);
	color: #fff;
}

.youdh-pill-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .07);
	font-size: 12px;
	font-weight: 700;
}

.youdh-pill.is-active .youdh-pill-count {
	background: rgba(255, 255, 255, .2);
	color: #fff;
}

.youdh-sort {
	display: flex;
	align-items: center;
	gap: 10px;
}

.youdh-sort label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--youdh-muted);
}

.youdh-sort-select {
	appearance: none;
	-webkit-appearance: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2316223c' d='M6 8 0 2l1.4-1.4L6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E") no-repeat right 14px center;
	border: 1px solid var(--youdh-border);
	border-radius: 8px;
	padding: 11px 40px 11px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--youdh-text);
	cursor: pointer;
	min-width: 180px;
}

.youdh-count {
	margin: 4px 0 22px;
	font-size: 14px;
	color: var(--youdh-muted);
}

/* ------- Banner ------- */
.youdh-banner {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	background: #f3ead3;
	border-left: 5px solid var(--youdh-gold-badge);
	padding: 18px 24px;
	margin-bottom: 30px;
	font-size: 16px;
}

.youdh-banner-prefix {
	font-style: italic;
	color: var(--youdh-text);
	margin-right: 6px;
}

.youdh-banner a,
.youdh-banner strong {
	color: var(--youdh-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 700;
}

/* ------- Grid ------- */
.youdh-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.youdh-card {
	display: flex;
	flex-direction: column;
	background: var(--youdh-card);
	border: 1px solid var(--youdh-border);
	transition: box-shadow .18s ease, transform .18s ease;
}

.youdh-card:hover {
	box-shadow: 0 10px 30px rgba(22, 34, 60, .1);
	transform: translateY(-2px);
}

.youdh-card-media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	text-decoration: none;
}

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

.youdh-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	padding: 7px 12px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1.2px;
	color: #fff;
	line-height: 1;
}

.youdh-badge--dark  { background: var(--youdh-navy); }
.youdh-badge--gold  { background: var(--youdh-gold); }
.youdh-badge--green { background: var(--youdh-green); }
.youdh-badge--sale  { background: var(--youdh-gold-badge); }

.youdh-card-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px 22px 24px;
	border-top: 1px solid var(--youdh-border);
	flex: 1;
}

/* ------- Tag chips (from product tags) ------- */
.youdh-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.youdh-tag {
	background: var(--youdh-chip);
	color: var(--youdh-text);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .6px;
	padding: 5px 12px;
	border-radius: 999px;
}

.youdh-card-title {
	margin: 0;
	font-size: 19px;
	line-height: 1.3;
	font-weight: 600;
}

.youdh-card-title a {
	color: var(--youdh-text);
	text-decoration: none;
}

.youdh-card-title a:hover {
	color: var(--youdh-gold);
}

/* ------- Rating ------- */
.youdh-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.youdh-stars {
	font-size: 16px;
	letter-spacing: 2px;
	line-height: 1;
	background: linear-gradient(90deg, var(--youdh-star) var(--pct, 0%), var(--youdh-star-empty) var(--pct, 0%));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.youdh-rating-value {
	font-weight: 700;
}

.youdh-rating-count {
	color: var(--youdh-muted);
}

/* ------- Price ------- */
.youdh-price {
	font-size: 20px;
	font-weight: 700;
	color: var(--youdh-text);
	margin-top: auto;
}

.youdh-price ins {
	text-decoration: none;
	color: var(--youdh-gold);
}

.youdh-price del {
	color: var(--youdh-muted);
	font-weight: 500;
	font-size: 16px;
	margin-left: 8px;
}

.youdh-price .woocommerce-Price-amount {
	font-weight: 700;
}

/* ------- Add to cart ------- */
.youdh-cta .button,
.youdh-cta a.button,
.youdh-cta .added_to_cart {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	background: var(--youdh-navy);
	color: var(--youdh-gold);
	border: none;
	border-radius: 0;
	padding: 15px 18px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.youdh-cta .button::after,
.youdh-cta a.button::after {
	content: "→";
	font-weight: 400;
}

.youdh-cta .button:hover,
.youdh-cta a.button:hover {
	background: #0f1830;
	color: #fff;
}

.youdh-cta .added_to_cart {
	margin-top: 8px;
	background: transparent;
	color: var(--youdh-navy);
	border: 1px solid var(--youdh-navy);
}

.youdh-cta .added_to_cart::after {
	content: "";
}

/* ------- States ------- */
.youdh-card[hidden] { display: none; }

.youdh-empty {
	text-align: center;
	padding: 40px 0;
	color: var(--youdh-muted);
	font-size: 16px;
}

/* ------- Responsive ------- */
@media (max-width: 1100px) {
	.youdh-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
	.youdh-grid { grid-template-columns: repeat(2, 1fr); }
	.youdh-toolbar { flex-direction: column; align-items: flex-start; }
	.youdh-sort { width: 100%; justify-content: space-between; }
}

@media (max-width: 480px) {
	.youdh-grid { grid-template-columns: 1fr; }
}
