/* =========================================================================
   Bashe — custom product card (woocommerce/content-product.php)
   Colors and sizes taken from the Figma export.
   ========================================================================= */

:root {
	--bashe-dark: #162621;                    /* Dark Green / Primary */
	--bashe-dark-secondary: rgba(22, 38, 33, 0.64); /* Dark Green / Secondary */
	--bashe-border: rgba(22, 38, 33, 0.16);
	--bashe-cream: #F4F0E4;                   /* Light Brown — icon buttons background */
	--bashe-star: #474E19;                    /* rating star color */
	--bashe-thumb-height: 200px;

	/* exact SVG icons from Figma (Material Symbols), uploaded to the media library */
	--bashe-icon-wishlist: url("https://bash.ge/wp-content/uploads/2026/06/favorite_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24-1.svg");
	--bashe-icon-cart: url("https://bash.ge/wp-content/uploads/2026/06/add_shopping_cart_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24-1.svg");
}

/* ---------- wrapper / grid ---------- */

.products .product.bashe-card {
	height: 100%; /* so the card stretches to the full height of the grid row */
}

.bashe-card-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #FFFFFF;
	border: 1px solid var(--bashe-border);
	border-radius: 8px;
	overflow: hidden; /* keep the image from overflowing the rounded corners */
	text-align: left; /* explicitly fixed so we never inherit text-align:center from the theme */
	transition: box-shadow .25s ease, transform .25s ease;
}

.bashe-card-inner:hover {
	box-shadow: 0 12px 32px rgba(22, 38, 33, 0.12);
	transform: translateY(-2px);
}

/* ---------- thumbnail ---------- */

.bashe-card-thumb {
	position: relative;
	display: block;
	flex: none;
	width: 100%;
	height: var(--bashe-thumb-height);
	background: var(--bashe-cream);
	overflow: hidden;
}

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

/* ---------- card body ---------- */

.bashe-card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	gap: 24px;
	padding: 24px;
}

.bashe-card-info {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	gap: 16px;
}

/* title + rating on the same row */

.bashe-card-heading {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.bashe-card-title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.6;
	color: var(--bashe-dark);
}

.bashe-card-title a {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: inherit;
	text-decoration: none;
}

.bashe-card-title a:hover {
	opacity: .75;
}

/* rating: own simple markup — star + number + (review count) */

.bashe-card-rating {
	display: flex;
	align-items: center;
	flex: none;
	gap: 4px;
	white-space: nowrap;
}

.bashe-card-star {
	font-family: "woodmart-font";
	font-size: 18px;
	line-height: 1;
	color: var(--bashe-star);
}

.bashe-card-star::before {
	content: "\f148"; /* the same filled star glyph the theme uses */
}

.bashe-card-rating-value {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--bashe-dark);
}

.bashe-card-reviews-count {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--bashe-dark-secondary);
	text-decoration: none;
}

.bashe-card-reviews-count:hover {
	text-decoration: underline;
}

/* description (product short description, already trimmed to 15 words in functions.php) */

.bashe-card-desc {
	flex: 1 1 auto;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--bashe-dark-secondary);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

/* ---------- bottom row: price + actions ---------- */

.bashe-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: none;
	gap: 16px;
	margin-top: auto;
}

.bashe-card-price {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--bashe-dark);
}

.bashe-card-price del {
	margin-inline-end: 4px;
	font-size: .85em;
	font-weight: 400;
	opacity: .55;
	text-decoration: line-through;
}

.bashe-card-price ins {
	font-weight: 500;
	text-decoration: none;
}

.bashe-card-actions {
	display: flex;
	align-items: center;
	flex: none;
	gap: 8px;
}

/* icon buttons (wishlist / add to cart) — reusing WoodMart's own
   wd-action-btn.wd-style-icon classes, just recoloring/resizing for the design */

.wd-action-btn.wd-style-icon.bashe-card-btn {
	--wd-action-icon-color: var(--bashe-dark);
	--wd-action-icon-color-hover: var(--bashe-dark);
}

/*
 * Two selectors are needed here on purpose: WoodMart's wishlist button wraps
 * the <a> in an outer <div class="wd-action-btn">, while the add-to-cart
 * template puts those same classes directly on the <a> itself (no wrapper).
 * So ">  a" matches the wishlist case, and "a.wd-action-btn..." matches the
 * add-to-cart case.
 */
.wd-action-btn.wd-style-icon.bashe-card-btn > a,
a.wd-action-btn.wd-style-icon.bashe-card-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	background: var(--bashe-cream);
	border-radius: 4px;
	transition: background-color .2s ease;
}

/* hide the add-to-cart text label — these buttons are icon-only by design */
.wd-action-btn.wd-style-icon.bashe-card-btn .wd-action-text {
	display: none;
}

.wd-action-btn.wd-style-icon.bashe-card-btn > a:hover,
a.wd-action-btn.wd-style-icon.bashe-card-btn:hover {
	background: #ECE6D6;
}

/* swap the woodmart-font glyph icons for the exact SVGs from Figma */

.wd-wishlist-icon.bashe-card-btn {
	--bashe-mask-icon: var(--bashe-icon-wishlist);
}

.wd-add-cart-icon.bashe-card-btn {
	--bashe-mask-icon: var(--bashe-icon-cart);
}

.wd-action-btn.wd-style-icon.bashe-card-btn .wd-action-icon:before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 22px;
	background-color: var(--wd-action-icon-color);
	-webkit-mask-image: var(--bashe-mask-icon);
	mask-image: var(--bashe-mask-icon);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.wd-action-btn.wd-style-icon.bashe-card-btn > a:hover .wd-action-icon:before,
a.wd-action-btn.wd-style-icon.bashe-card-btn:hover .wd-action-icon:before {
	background-color: var(--wd-action-icon-color-hover);
}

/* "ნახვა" / "View" button — links to the product page */

.bashe-card-view-btn {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 24px;
	background: var(--bashe-dark);
	border-radius: 4px;
	color: #FFFFFF;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.6;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color .2s ease;
}

.bashe-card-view-btn:hover {
	background: #0E1A15;
	color: #FFFFFF;
}

/* keyboard accessibility */

.bashe-card-thumb:focus-visible,
.bashe-card-title a:focus-visible,
.bashe-card-view-btn:focus-visible,
.wd-action-btn.bashe-card-btn > a:focus-visible,
a.wd-action-btn.bashe-card-btn:focus-visible {
	outline: 2px solid var(--bashe-dark);
	outline-offset: 2px;
}

/* ---------- mobile ---------- */

@media (max-width: 480px) {
	:root {
		--bashe-thumb-height: 160px;
	}

	.bashe-card-body {
		padding: 16px;
		gap: 16px;
	}

	.bashe-card-heading {
		gap: 12px;
	}

	.bashe-card-title {
		font-size: 18px;
	}
}
/* ---------- Force 1 Product Per Line on Mobile ---------- */

@media (max-width: 768px) {
	/* 1. If Woodmart is using its native CSS Grid system */
	.products,
	.wd-products {
		grid-template-columns: 1fr !important;
		row-gap: 24px !important; /* Force a uniform vertical space between rows *
	}

	/* 2. If Woodmart is using a Flexbox/Percentage layout system */
	.products .product.bashe-card {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}
}