/* =========================================================
   AppTirana Product Cards v2.2 – sipas dizajnit Figma
   Ngjyra & fonte direkt nga vars.css i Figma-s
   ========================================================= */

.apptirana-product-card {
	/* Design tokens nga Figma */
	--at-teal: #0290a2;       /* color-ok */
	--at-teal-dark: #027e8e;
	--at-blue: #7bc5d9;       /* color-4 */
	--at-blue-dark: #69b6cc;
	--at-black: #3e3e3e;      /* gri */
	--at-grey: #838b9c;       /* blue-gray */
	--at-bg: #f0f0f0;
	--at-star: #fac23e;       /* secondary */
	--at-radius: 15px;
	--at-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
	--at-font-title: "Ubuntu", sans-serif;
	--at-font-body: "Cabin", sans-serif;
}

/* ---------- GRID ---------- */
ul.products.apptirana-products-grid {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: auto;
	align-items: start;
	gap: 28px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
	width: 100%;
}

ul.products.apptirana-products-grid li.product {
	float: none !important;
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: block;
	background: none !important;
	box-shadow: none !important;
	border: none !important;
	overflow: visible !important;
}

/* RRJETË SIGURIE: fsheh çdo element që tema fut brenda li.product
   përveç kartës sonë (karta e vjetër, quick view, wishlist etj.) */
ul.products.apptirana-products-grid li.product > *:not(.apptirana-product-card) {
	display: none !important;
}

@media (max-width: 1200px) {
	ul.products.apptirana-products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
	ul.products.apptirana-products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	ul.products.apptirana-products-grid { grid-template-columns: 1fr; }
}

/* ---------- KARTA ---------- */
.apptirana-product-card {
	container-type: inline-size;
	background: #ffffff;
	border-radius: var(--at-radius);
	box-shadow: var(--at-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: auto;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.apptirana-product-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}
@media (prefers-reduced-motion: reduce) {
	.apptirana-product-card,
	.apptirana-product-card:hover { transition: none; transform: none; }
}

/* ---------- IMAZHI ---------- */
.apptirana-card-media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--at-bg);
	height: 281px;
	border-radius: var(--at-radius) var(--at-radius) 0 0;
	text-decoration: none;
	overflow: hidden;
}
.apptirana-card-media img.apptirana-card-img,
.apptirana-card-media img {
	max-width: 92% !important;
	max-height: 88% !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain;
	margin: 0 !important;
	mix-blend-mode: multiply;
}

/* ---------- RATING BADGE (lart majtas) ---------- */
.apptirana-rating-badge {
	position: absolute;
	top: 14px;
	left: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #ffffff;
	border-radius: 5px;
	padding: 3px 8px;
	box-shadow: var(--at-shadow);
	font-family: var(--at-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	color: var(--at-black);
}
.apptirana-rating-badge .apptirana-star {
	display: block;
	width: 14px;
	height: 14px;
}

/* ---------- SALE BADGE (i ngjitur në qoshen lart djathtas) ---------- */
.apptirana-sale-badge {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	background: var(--at-teal);
	color: #ffffff;
	font-family: var(--at-font-title);
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	padding: 10px;
	border-radius: 0 0 0 10px;
}

/* ---------- PËRMBAJTJA ---------- */
.apptirana-card-body {
	padding: 14px 15px 16px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	border-radius: 0 0 var(--at-radius) var(--at-radius);
	background: #ffffff;
}

.apptirana-card-title {
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--at-font-title);
	font-size: 18.5px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--at-black);
}
.apptirana-card-title a {
	color: inherit;
	text-decoration: none;
	font-family: inherit;
	font-weight: inherit;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
}
.apptirana-card-title a:hover { color: var(--at-teal); }

/* ---------- ÇMIMET ---------- */
.apptirana-card-price {
	font-family: var(--at-font-body);
	font-size: 16.8px;
	font-weight: 400;
	line-height: 25px;
	color: var(--at-teal); /* çmimi aktual */
	display: flex;
	align-items: baseline;
	gap: 9px;
	flex-wrap: wrap;
}
.apptirana-card-price del {
	color: var(--at-grey);
	text-decoration: line-through;
	opacity: 1;
	font-weight: 400;
}
.apptirana-card-price del .woocommerce-Price-amount { color: var(--at-grey); }
.apptirana-card-price ins {
	text-decoration: none;
	color: var(--at-teal);
	background: none;
	font-weight: 400;
}
.apptirana-card-price .woocommerce-Price-amount { color: inherit; }

/* ---------- BUTONAT: WhatsApp majtas, Shporta djathtas ---------- */
.apptirana-card-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
}

.apptirana-btn,
a.apptirana-btn.button {
	flex: 1;
	min-width: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	height: 38px;
	padding: 0 13px;
	border: none !important;
	border-radius: 999px !important;
	font-family: var(--at-font-body);
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	color: #ffffff !important;
	text-decoration: none !important;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease;
}
.apptirana-btn svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

/* Bli në WhatsApp */
.apptirana-btn-whatsapp { background: var(--at-blue) !important; }
.apptirana-btn-whatsapp:hover { background: var(--at-blue-dark) !important; color: #fff !important; }

/* Shto në shportë */
.apptirana-btn-cart,
a.apptirana-btn-cart.button { background: var(--at-teal) !important; }
.apptirana-btn-cart:hover,
a.apptirana-btn-cart.button:hover { background: var(--at-teal-dark) !important; color: #fff !important; }

/* Loading/added nga AJAX i WooCommerce */
.apptirana-btn-cart.loading { opacity: 0.7; pointer-events: none; }
.apptirana-card-actions .added_to_cart { display: none !important; }

/* Pa stok */
.apptirana-btn-cart.is-disabled {
	background: #c8c5c5 !important;
	cursor: not-allowed;
	pointer-events: none;
}

/* Aksesueshmëria */
.apptirana-btn:focus-visible {
	outline: 3px solid rgba(2, 144, 162, 0.4);
	outline-offset: 2px;
}

/* ---------- PËRSHTATJE SIPAS GJERËSISË SË KARTËS ---------- */
@container (max-width: 340px) {
	.apptirana-btn,
	a.apptirana-btn.button { font-size: 12px; padding: 0 10px; gap: 4px; }
	.apptirana-btn svg { width: 16px; height: 16px; }
	.apptirana-card-title { font-size: 17px; }
}

/* Kartë shumë e ngushtë: butonat njëri mbi tjetrin */
@container (max-width: 260px) {
	.apptirana-card-actions { flex-direction: column; align-items: stretch; }
	.apptirana-btn, a.apptirana-btn.button { height: 40px; }
}

/* Fallback pa container queries */
@media (max-width: 360px) {
	.apptirana-card-actions { flex-wrap: wrap; }
}
