/* =====================================================================
 * TIOB classic product card 3.7.0 (listing_img_title.php / listing_img_desc.php)
 * Your original card design (club 2.x) + badges, star rating, description,
 * and grid ↔ list mode for HikaShop's "Table switcher".
 * Scoped to article.tiob-card – the product page is not touched.
 * ===================================================================== */
article.tiob-card {
	--ti-i-cart: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 4h2l2.4 10.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.5L21 8H6.2%22/%3E%3Ccircle cx=%2210%22 cy=%2220%22 r=%221.4%22/%3E%3Ccircle cx=%2217%22 cy=%2220%22 r=%221.4%22/%3E%3C/svg%3E");
	--ti-i-trash: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6%22/%3E%3C/svg%3E");
	--ti-i-heart: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 20s-7-4.4-9-9a5 5 0 0 1 9-3 5 5 0 0 1 9 3c-2 4.6-9 9-9 9z%22/%3E%3C/svg%3E");
	--ti-i-heartf: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath fill=%22%23000%22 d=%22M12 20s-7-4.4-9-9a5 5 0 0 1 9-3 5 5 0 0 1 9 3c-2 4.6-9 9-9 9z%22/%3E%3C/svg%3E");
	--ti-i-ext: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5%22/%3E%3C/svg%3E");
	--ti-i-help: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.7.3-1 .9-1 1.7M12 17h.01%22/%3E%3C/svg%3E");
	--ti-i-ban: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M6 6l12 12%22/%3E%3C/svg%3E");
	--ti-i-check: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 12.5l4.5 4.5L19 7.5%22/%3E%3C/svg%3E");
	--ti-i-eye: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%223%22/%3E%3C/svg%3E");
	--ti-i-download: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 4v11M7 10l5 5 5-5M5 20h14%22/%3E%3C/svg%3E");
	--ti-i-lock: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%225%22 y=%2211%22 width=%2214%22 height=%229%22 rx=%222%22/%3E%3Cpath d=%22M8 11V8a4 4 0 0 1 8 0v3%22/%3E%3C/svg%3E");
	--ti-i-file: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z%22/%3E%3Cpath d=%22M14 3v5h5%22/%3E%3C/svg%3E");
	--ti-i-send: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 3L3 10.5l7 3 3 7z%22/%3E%3Cpath d=%22M10 13.5L21 3%22/%3E%3C/svg%3E");
	--ti-i-star: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath fill=%22%23000%22 d=%22M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9z%22/%3E%3C/svg%3E");
	--tc-pri: var(--hk-pri,#4f46e5);
	--tc-pri-s: var(--hk-pri-l,#eef2ff);
	--tc-acc: var(--hk-ok,#10b981);
	--tc-acc-d: var(--hk-ok-d,#059669);
	--tc-red: var(--hk-bad,#ef4444);
	--tc-ink: var(--hk-ink,#0f172a);
	--tc-mut: var(--hk-mut,#64748b);
	--tc-line: var(--hk-line,#e5e7eb);
	--tc-bg: var(--hk-bg,#f8fafc);
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	margin: 0;
	direction: rtl;
	background: var(--hk-card, #fff);
	border: 1px solid var(--tc-line);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px rgba(15, 23, 42, .05);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
article.tiob-card *,
article.tiob-card *::before,
article.tiob-card *::after { box-sizing: border-box; }
article.tiob-card:hover {
	transform: translateY(-4px);
	border-color: var(--hk-pri-b,#c7d2fe);
	box-shadow: 0 18px 40px rgba(79, 70, 229, .14);
}

/* order: image → title → info */
article.tiob-card .tiob-card-top { display: contents; }
article.tiob-card .tiob-card-image { order: 1; }
article.tiob-card .tiob-card-title-wrap { order: 2; }
article.tiob-card .tiob-card-info { order: 3; }

/* image */
article.tiob-card .tiob-card-image {
	position: relative;
	display: block;
	background: var(--tc-bg);
	text-decoration: none;
	overflow: hidden;
}
article.tiob-card .tiob-image-wrap {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}
article.tiob-card .tiob-image-wrap img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}
article.tiob-card:hover .tiob-image-wrap img { transform: scale(1.06); }
article.tiob-card .tiob-image-wrap::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 40%;
	background: linear-gradient(0deg, rgba(15, 23, 42, .28), transparent);
	pointer-events: none;
}
article.tiob-card .tiob-discount-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: baseline;
	gap: 3px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--tc-red);
	color: #fff;
	font-size: 13px;
	font-weight: 900;
	box-shadow: 0 6px 14px rgba(239, 68, 68, .3);
}
article.tiob-card .tiob-discount-badge small { font-size: 11px; font-weight: 600; }
article.tiob-card .tiob-rating {
	position: absolute;
	bottom: 10px;
	left: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .94);
	color: var(--tc-ink);
	font-size: 12px;
	font-weight: 800;
	box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}
article.tiob-card .tiob-rating-star { color: #f59e0b; font-size: 13px; }
article.tiob-card .tiob-votes { color: var(--tc-mut); font-weight: 600; }

/* title */
article.tiob-card .tiob-card-title-wrap { padding: 14px 16px 0; }
article.tiob-card .tiob-card-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--tc-ink);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.7;
	text-decoration: none;
	transition: color .2s;
}
article.tiob-card .tiob-card-title:hover { color: var(--tc-pri); }
article.tiob-card .tiob-card-subtitle {
	margin-top: 2px;
	color: var(--tc-mut);
	font-size: 13px;
	line-height: 1.7;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* info */
article.tiob-card .tiob-card-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
	padding: 10px 16px 16px;
}
article.tiob-card .tiob-meta { display: flex; flex-wrap: wrap; gap: 6px; }
article.tiob-card .tiob-meta:empty { display: none; }
article.tiob-card .tiob-meta-row {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--tc-pri-s);
	font-size: 12px;
}
article.tiob-card .tiob-meta-label { color: var(--tc-mut); }
article.tiob-card .tiob-meta-label::after { content: ":"; }
article.tiob-card .tiob-meta-value { color: var(--tc-pri); font-weight: 800; }

article.tiob-card .tiob-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px dashed var(--tc-line);
}
article.tiob-card .tiob-current-price { color: var(--tc-ink); font-size: 17px; font-weight: 900; }
article.tiob-card .tiob-old-price { color: var(--tc-mut); font-size: 13px; text-decoration: line-through; text-decoration-color: var(--tc-red); }
article.tiob-card .tiob-free-price {
	display: inline-flex;
	padding: 2px 12px;
	border-radius: 999px;
	background: var(--hk-ok-l,#ecfdf5);
	color: var(--tc-acc-d);
	font-size: 14px;
	font-weight: 900;
}

/* actions */
article.tiob-card .tiob-actions {
	display: grid;
	grid-template-columns: 1fr 44px 44px;
	gap: 8px;
}
article.tiob-card .tiob-action {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0;
	border: 1px solid var(--tc-line);
	border-radius: 12px;
	background: var(--hk-card, #fff);
	color: var(--tc-ink);
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
article.tiob-card .tiob-action:hover { transform: translateY(-1px); }
article.tiob-card .tiob-action:focus-visible { outline: 3px solid rgba(79, 70, 229, .35); outline-offset: 2px; }
article.tiob-card .tiob-cart-action {
	gap: 8px;
	border-color: transparent;
	background: linear-gradient(135deg, var(--tc-pri), var(--hk-pri-2,#6366f1));
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	box-shadow: 0 8px 18px rgba(79, 70, 229, .25);
}
article.tiob-card .tiob-cart-action::after { content: "افزودن به سبد"; }
article.tiob-card .tiob-cart-action.is-active {
	background: var(--hk-card, #fff);
	border-color: #fecaca;
	color: var(--tc-red);
	box-shadow: none;
}
article.tiob-card .tiob-cart-action.is-active::after { content: "حذف از سبد"; }
article.tiob-card .tiob-wishlist-action:hover,
article.tiob-card .tiob-wishlist-action.is-active { background: #fdf2f8; border-color: #fbcfe8; color: #db2777; }
article.tiob-card .tiob-quickview-action:hover { background: var(--tc-pri-s); border-color: var(--hk-pri-b,#c7d2fe); color: var(--tc-pri); }

article.tiob-card .tiob-action-icon {
	position: relative;
	display: inline-block;
	width: 19px;
	height: 19px;
	flex: none;
	font-size: 0;
}
article.tiob-card .tiob-action-icon::before {
	content: "";
	position: absolute;
	inset: 0;
	background: currentColor;
	-webkit-mask: var(--ti-i-cart) center / contain no-repeat;
	mask: var(--ti-i-cart) center / contain no-repeat;
}
article.tiob-card .tiob-action-icon::after { content: none; }
article.tiob-card .tiob-cart-action.is-active .tiob-action-icon::before { -webkit-mask-image: var(--ti-i-trash); mask-image: var(--ti-i-trash); }
article.tiob-card .tiob-heart-icon::before { -webkit-mask-image: var(--ti-i-heart); mask-image: var(--ti-i-heart); }
article.tiob-card .tiob-wishlist-action.is-active .tiob-heart-icon::before { -webkit-mask-image: var(--ti-i-heartf); mask-image: var(--ti-i-heartf); }
article.tiob-card .tiob-view-icon::before { -webkit-mask-image: var(--ti-i-eye); mask-image: var(--ti-i-eye); }
article.tiob-card .tiob-action.is-loading { pointer-events: none; opacity: .8; }
article.tiob-card .tiob-action.is-loading .tiob-action-icon::before {
	-webkit-mask: none;
	mask: none;
	background: transparent;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: tiob-card-spin .7s linear infinite;
}
@keyframes tiob-card-spin { to { transform: rotate(360deg); } }


/* ---- mobile 2.1.0 ---- */
@media (max-width: 640px) {
	article.tiob-card:hover { transform: none; }
	article.tiob-card .tiob-discount-badge { top: 8px; right: 8px; padding: 2px 8px; font-size: 12px; }
	article.tiob-card .tiob-rating { bottom: 6px; left: 6px; padding: 2px 8px; font-size: 11px; }
	article.tiob-card .tiob-card-subtitle { display: none; }
	article.tiob-card .tiob-meta-row { padding: 2px 8px; font-size: 11px; }
}
@media (hover: none) {
	article.tiob-card:hover, article.tiob-card .tiob-action:hover { transform: none; }
	article.tiob-card:hover .tiob-image-wrap img { transform: none; }
}

/* 2.7.3: on phones the product cards look like the compact listing_title.php module cards */
@media (max-width: 767px) {
	html body article.tiob-card { border-radius: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.05); }
	html body article.tiob-card .tiob-image-wrap { aspect-ratio: 1 / 1; }
	html body article.tiob-card .tiob-rating,
	html body article.tiob-card .tiob-meta,
	html body article.tiob-card .tiob-card-subtitle,
	html body article.tiob-card .tiob-old-price { display: none !important; }
	html body article.tiob-card .tiob-card-title-wrap { padding: 8px 8px 0; text-align: center; }
	html body article.tiob-card .tiob-card-title { font-size: 13px; font-weight: 700; line-height: 1.55; min-height: 3.1em; }
	html body article.tiob-card .tiob-card-info { gap: 6px; padding: 2px 8px 8px; }
	html body article.tiob-card .tiob-price { justify-content: center; padding-top: 6px; border-top: 1px dashed var(--hk-line,#e5e7eb); }
	html body article.tiob-card .tiob-current-price { font-size: 13px; }
	html body article.tiob-card .tiob-actions { grid-template-columns: 1fr 1fr 1fr !important; gap: 4px; }
	html body article.tiob-card .tiob-action { min-height: 30px !important; border-radius: 8px; }
	html body article.tiob-card .tiob-cart-action::after { content: none !important; }
	html body article.tiob-card .tiob-action-icon { width: 15px; height: 15px; }
}
@media (max-width: 539px) {
	html body article.tiob-card .tiob-actions { grid-template-columns: 1fr 1fr !important; }
	html body article.tiob-card .tiob-quickview-action { display: none !important; }
}

/* =====================================================================
 * 3.7.0 additions
 * ===================================================================== */
/* placeholder when the product has no picture */
article.tiob-card .tiob-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--hk-pri-l, #eef2ff), var(--tc-bg)); color: var(--hk-pri-b, #c7d2fe); }
article.tiob-card .tiob-noimg svg { width: 34%; height: 34%; }

/* badges: stacked on the left top corner (the discount stays on the right) */
article.tiob-card .tiob-badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; pointer-events: none; }
article.tiob-card .tiob-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; line-height: 1.6; color: #fff; background: var(--tc-pri); box-shadow: 0 4px 12px rgba(15, 23, 42, .18); white-space: nowrap; }
article.tiob-card .tiob-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
article.tiob-card .tiob-badge-featured { background: linear-gradient(135deg, var(--hk-star, #f59e0b), var(--hk-warn, #d97706)); }
article.tiob-card .tiob-badge-new { background: var(--tc-acc-d); }
article.tiob-card .tiob-badge-upd { background: var(--hk-info, #2563eb); }
article.tiob-card .tiob-badge-hot { background: var(--hk-pink, #db2777); }
article.tiob-card .tiob-badge-free { background: var(--tc-acc); }
article.tiob-card .tiob-badge-out { background: var(--tc-ink); }
article.tiob-card.is-featured { border-color: color-mix(in srgb, var(--hk-star, #f59e0b) 45%, transparent); }
article.tiob-card.is-soldout .tiob-image-wrap img { filter: grayscale(.85); opacity: .75; }
article.tiob-card .tiob-action[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* star rating (5 stars filled by --tiob-rate) */
article.tiob-card .tiob-stars { position: relative; display: inline-block; width: 64px; height: 12px; flex: none;
	background: linear-gradient(90deg, var(--hk-star, #f59e0b) var(--tiob-rate, 0%), #d1d5db var(--tiob-rate, 0%));
	-webkit-mask: var(--ti-i-star) 0 0 / 12.8px 12px repeat-x; mask: var(--ti-i-star) 0 0 / 12.8px 12px repeat-x; }
html[dir="rtl"] article.tiob-card .tiob-stars, article.tiob-card[dir="rtl"] .tiob-stars { transform: scaleX(-1); }
article.tiob-card .tiob-score { color: var(--tc-ink); }

/* short description (listing_img_desc.php) */
article.tiob-card .tiob-card-desc { margin: 0; color: var(--tc-mut); font-size: 13px; line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
article.tiob-card--desc .tiob-card-subtitle { -webkit-line-clamp: 2; }

/* ---------------------------------------------------------------------
 * Grid ↔ list ("Table switcher"): HikaShop adds display_list, our
 * listing_switch.js adds .tiob-list-mode to the listing.
 * --------------------------------------------------------------------- */
.tiob-switch { display: flex; justify-content: flex-end; gap: 6px; margin: 0 0 12px; direction: rtl; }
.tiob-switch-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--hk-line, #e5e7eb); border-radius: 10px; background: var(--hk-card, #fff); color: var(--hk-txt2, #475569); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.tiob-switch-btn svg { width: 18px; height: 18px; }
.tiob-switch-btn:hover { border-color: var(--hk-pri-b, #c7d2fe); color: var(--hk-pri, #4f46e5); }
.tiob-switch-btn.is-active { background: var(--hk-pri, #4f46e5); border-color: var(--hk-pri, #4f46e5); color: #fff; }
.tiob-switch-btn:focus-visible { outline: none; box-shadow: var(--hk-ring, 0 0 0 3px rgba(99, 102, 241, .25)); }

html body .tiob-list-mode .hk-row-fluid { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 14px !important; }
html body .tiob-list-mode .hk-row-fluid > .hikashop_product,
html body .tiob-list-mode .hk-row-fluid > [class*="hkc-"] { grid-column: 1 / -1 !important; width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }

.tiob-list-mode article.tiob-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: auto 1fr; height: auto; }
.tiob-list-mode article.tiob-card:hover { transform: translateY(-2px); }
.tiob-list-mode article.tiob-card .tiob-card-image { grid-column: 1; grid-row: 1 / 3; height: 100%; }
.tiob-list-mode article.tiob-card .tiob-image-wrap { height: 100%; min-height: 190px; aspect-ratio: auto; }
.tiob-list-mode article.tiob-card .tiob-image-wrap img { position: absolute; inset: 0; }
.tiob-list-mode article.tiob-card .tiob-card-title-wrap { grid-column: 2; grid-row: 1; padding: 16px 20px 0; }
.tiob-list-mode article.tiob-card .tiob-card-title { font-size: 17px; -webkit-line-clamp: 1; }
.tiob-list-mode article.tiob-card .tiob-card-info { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "meta meta" "desc desc" "price actions"; align-items: end; gap: 10px 16px; padding: 8px 20px 18px; }
.tiob-list-mode article.tiob-card .tiob-meta { grid-area: meta; }
.tiob-list-mode article.tiob-card .tiob-card-desc { grid-area: desc; -webkit-line-clamp: 2; }
.tiob-list-mode article.tiob-card .tiob-price { grid-area: price; margin: 0; padding: 0; border: 0; }
.tiob-list-mode article.tiob-card .tiob-actions { grid-area: actions; grid-template-columns: 170px 44px 44px; }
@media (max-width: 767px) {
	html body .tiob-list-mode .hk-row-fluid { gap: 10px !important; }
	html body .tiob-list-mode article.tiob-card { grid-template-columns: 116px minmax(0, 1fr); border-radius: 14px; }
	html body .tiob-list-mode article.tiob-card .tiob-image-wrap { min-height: 116px; aspect-ratio: auto; }
	html body .tiob-list-mode article.tiob-card .tiob-card-title-wrap { padding: 10px 12px 0; text-align: right; }
	html body .tiob-list-mode article.tiob-card .tiob-card-title { font-size: 13.5px; min-height: 0; -webkit-line-clamp: 2; }
	html body .tiob-list-mode article.tiob-card .tiob-card-info { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "price actions"; gap: 6px; padding: 6px 12px 10px; }
	html body .tiob-list-mode article.tiob-card .tiob-meta,
	html body .tiob-list-mode article.tiob-card .tiob-card-desc { display: none !important; }
	html body .tiob-list-mode article.tiob-card .tiob-price { justify-content: flex-start; border: 0; padding: 0; }
	html body .tiob-list-mode article.tiob-card .tiob-actions { grid-template-columns: 36px 36px !important; }
	html body .tiob-list-mode article.tiob-card .tiob-quickview-action { display: none !important; }
	html body .tiob-list-mode article.tiob-card .tiob-badges { bottom: 6px; left: 6px; }
}

/* phones (grid): smaller badges, keep at most two */
@media (max-width: 767px) {
	html body article.tiob-card .tiob-badges { top: auto; bottom: 6px; left: 6px; gap: 3px; }
	html body article.tiob-card .tiob-badge { padding: 1px 7px; font-size: 10px; box-shadow: none; }
	html body article.tiob-card .tiob-badge::before { display: none; }
	html body 	html body article.tiob-card .tiob-card-desc { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	article.tiob-card, article.tiob-card * { transition: none !important; animation: none !important; }
}

/* 3.7.1 equal-height cards + 2-line subtitle (grid mode) */
html body .hk-row-fluid:has(article.tiob-card) { display: flex; flex-wrap: wrap; }
html body .hk-row-fluid > .hikashop_product:has(article.tiob-card) { display: flex; }
html body .hikashop_product:has(article.tiob-card) > .hikashop_container,
html body .hikashop_product:has(article.tiob-card) .hikashop_subcontainer { flex: 1 1 auto; display: flex; flex-direction: column; height: auto !important; min-height: 0; }
html body .hikashop_product article.tiob-card { flex: 1 1 auto; }
article.tiob-card .tiob-card-title-wrap { display: flex; flex-direction: column; }
article.tiob-card .tiob-card-title { min-height: 3.4em; }
article.tiob-card .tiob-card-subtitle { -webkit-line-clamp: 2; line-height: 1.7; min-height: 3.4em; margin-top: 4px; }
article.tiob-card .tiob-card-info { margin-top: auto; }
.tiob-list-mode article.tiob-card .tiob-card-title { min-height: 0; }
.tiob-list-mode article.tiob-card .tiob-card-subtitle { min-height: 0; }
.tiob-list-mode article.tiob-card .tiob-card-subtitle.is-empty { display: none; }

/* TIOB Digital 1.2.22: "in cart" state like the template's own buttons – green with a check, hover shows remove */
article.tiob-card .tiob-cart-action.is-active { background: var(--tb-ok, #059669); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(5, 150, 105, .22); }
article.tiob-card .tiob-cart-action.is-active::after { content: var(--tb-incart-t, "در سبد خرید"); }
article.tiob-card .tiob-cart-action.is-active .tiob-action-icon::before { -webkit-mask-image: var(--ti-i-check); mask-image: var(--ti-i-check); }
article.tiob-card .tiob-cart-action.is-active .tiob-action-icon { animation: tiobInPop .35s ease; }
@media (hover: hover) {
	article.tiob-card .tiob-cart-action.is-active:hover { background: #fef2f2; border-color: #fecaca; color: var(--tc-red, #dc2626); box-shadow: none; }
	article.tiob-card .tiob-cart-action.is-active:hover::after { content: "حذف از سبد"; }
	article.tiob-card .tiob-cart-action.is-active:hover .tiob-action-icon::before { -webkit-mask-image: var(--ti-i-trash); mask-image: var(--ti-i-trash); }
}
article.tiob-card .tiob-wishlist-action.is-active { background: #fff1f5; border-color: #f9c4d2; color: #e11d48; }
article.tiob-card .tiob-wishlist-action.is-active .tiob-action-icon { animation: tiobInPop .35s ease; }
@keyframes tiobInPop { 0% { transform: scale(.4); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { article.tiob-card .tiob-action-icon { animation: none !important; } }
html[data-theme="dark"] article.tiob-card .tiob-wishlist-action.is-active { background: rgba(225, 29, 72, .16); border-color: transparent; }
html[data-theme="dark"] article.tiob-card .tiob-cart-action.is-active:hover { background: rgba(220, 38, 38, .14); border-color: transparent; }
