/**
 * تصفية — واجهة عامة (مستقلة عن ثيم Dolibarr)
 * Mobile-first · RTL · IBM Plex Sans Arabic
 */

:root {
	--tfy-bg: #fcf8f9;
	--tfy-bg-accent: #f9f2f4;
	--tfy-surface: #fffefe;
	--tfy-surface-soft: #fcf5f7;
	--tfy-ink: #14121a;
	--tfy-muted: #625d69;
	--tfy-accent: #e62117;
	--tfy-accent-soft: #fdeceb;
	--tfy-warn: #f59e0b;
	--tfy-warn-bg: #fff7e6;
	--tfy-wa: #22c55e;
	--tfy-wa-hover: #16a34a;
	--tfy-line: rgba(20, 18, 26, 0.08);
	--tfy-radius: 14px;
	--tfy-radius-sm: 9px;
	--tfy-shadow: 0 10px 24px rgba(20, 18, 26, 0.06);
	--tfy-shadow-hover: 0 14px 34px rgba(172, 131, 144, 0.12);
	--tfy-font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
	--tfy-max: 1000px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	font-size: 14px;
	-webkit-text-size-adjust: 100%;
}

body.tfy {
	margin: 0;
	min-height: 100vh;
	font-family: var(--tfy-font);
	background:
		radial-gradient(circle at top right, rgba(230, 33, 23, 0.06), transparent 0 24%),
		linear-gradient(180deg, #fcf8f9 0%, #f9f3f5 100%);
	color: var(--tfy-ink);
	line-height: 1.5;
}

.tfy-shell {
	max-width: var(--tfy-max);
	margin: 0 auto;
	padding: 0 0.8rem 1.7rem;
	min-height: calc(100vh - 72px);
	display: flex;
	flex-direction: column;
}

/* Top nav (Amazon-ish) */
.tfy-topnav {
	position: sticky;
	top: 0;
	z-index: 20;
	margin: 0 -0.9rem 0.85rem;
	padding: 0.65rem 0.9rem;
	background: rgba(247, 244, 246, 0.95);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--tfy-line);
	box-shadow: 0 10px 30px rgba(20, 18, 26, 0.06);
}

.tfy-topnav__inner {
	max-width: var(--tfy-max);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.tfy-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	color: var(--tfy-ink);
	font-weight: 900;
	font-size: 0.96rem;
	letter-spacing: -0.01em;
}

.tfy-brand__dot {
	width: 9px;
	height: 9px;
	border-radius: 999px;
	background: var(--tfy-accent);
	box-shadow: 0 0 0 5px rgba(217, 70, 110, 0.10);
}

.tfy-navlinks {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.tfy-navlink {
	text-decoration: none;
	font-weight: 800;
	font-size: 0.82rem;
	color: var(--tfy-ink);
	padding: 0.42rem 0.65rem;
	border-radius: 999px;
	border: 1px solid var(--tfy-line);
	background: rgba(255, 255, 255, 0.82);
	box-shadow: 0 1px 2px rgba(20, 18, 26, 0.04);
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.tfy-navlink:hover {
	background: var(--tfy-accent-soft);
	border-color: rgba(230, 33, 23, 0.28);
	transform: translateY(-1px);
}

.tfy-navlink--active {
	background: linear-gradient(135deg, rgba(230, 33, 23, 0.14), rgba(230, 33, 23, 0.05));
	color: var(--tfy-accent);
	border-color: rgba(230, 33, 23, 0.24);
	box-shadow: 0 8px 18px rgba(230, 33, 23, 0.12);
}

.tfy-navbadge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	margin-inline-start: 0.3rem;
	background: var(--tfy-accent);
	color: #fff;
	font-weight: 900;
	font-size: 0.72rem;
}

.tfy-navlink--iconmenu {
	padding: 0.22rem;
	border-radius: 999px;
	background: transparent;
	border-color: transparent;
	box-shadow: none;
}

.tfy-navlink--iconmenu:hover,
.tfy-navlink--iconmenu.tfy-navlink--active {
	background: rgba(230, 33, 23, 0.08);
	border-color: rgba(230, 33, 23, 0.16);
}

.tfy-usermenu {
	position: relative;
	margin-inline-start: 0.35rem;
}

.tfy-usermenu summary {
	list-style: none;
	cursor: pointer;
}

.tfy-usermenu summary::-webkit-details-marker {
	display: none;
}

.tfy-usermenu__caret {
	font-size: 0.68rem;
	opacity: 0.75;
	transition: transform 0.15s ease;
}

.tfy-usermenu[open] .tfy-usermenu__caret {
	transform: rotate(180deg);
}

.tfy-usermenu__menu {
	position: absolute;
	inset-inline-end: 0;
	top: calc(100% + 0.45rem);
	min-width: 230px;
	padding: 0.55rem;
	border-radius: 14px;
	border: 1px solid var(--tfy-line);
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 0 18px 40px rgba(20, 18, 26, 0.12);
	display: grid;
	gap: 0.38rem;
}

.tfy-usermenu__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.68rem 0.78rem;
	border-radius: 10px;
	text-decoration: none;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--tfy-ink);
}

.tfy-langcode {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	padding: 0.15rem 0.4rem;
	border-radius: 999px;
	background: #f3f4f6;
	font-size: 0.72rem;
	font-weight: 900;
	color: #475569;
}

.tfy-usermenu__item:hover {
	background: var(--tfy-accent-soft);
	color: var(--tfy-accent);
}

.tfy-usermenu__item.is-current {
	background: rgba(230, 33, 23, 0.08);
	color: var(--tfy-accent);
}

.tfy-usermenu__item--logout {
	color: #b91c1c;
}

.tfy-usermenu__item--logout:hover {
	background: #fff1f2;
	color: #b91c1c;
}

@media (max-width: 640px) {
	.tfy-usermenu__menu {
		min-width: 185px;
	}
}

/* Hero — مظهر لوحة إعلانات حديثة */
.tfy-welcome {
	margin: 0 0 0.85rem;
	padding: 0.62rem 0.86rem;
	border-radius: 12px;
	background: linear-gradient(90deg, rgba(230, 33, 23, 0.1), rgba(230, 33, 23, 0.03));
	border: 1px solid rgba(230, 33, 23, 0.18);
	box-shadow: 0 6px 18px rgba(20, 18, 26, 0.04);
	font-weight: 600;
	font-size: 0.85rem;
	color: #b42318;
	text-align: center;
}

.tfy-footer__auth {
	margin: 0.5rem 0 0;
}

.tfy-footer__auth a {
	color: #e11d48;
	font-weight: 600;
	text-decoration: none;
}

.tfy-footer__auth a:hover {
	text-decoration: underline;
}

.tfy-hero {
	margin: 0 -0.8rem 1.2rem;
	padding: 1.25rem 1.2rem 1.5rem;
	background: linear-gradient(135deg, #b91c1c 0%, #e62117 54%, #ff6b6b 100%);
	color: #fff;
	border-radius: 0 0 22px 22px;
	position: relative;
	overflow: hidden;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tfy-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 15% 30%, rgba(255, 255, 255, 0.10), transparent 50%),
		radial-gradient(circle at 90% 70%, rgba(255, 255, 255, 0.06), transparent 40%);
	pointer-events: none;
}

.tfy-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 32rem;
	margin-inline: auto;
	text-align: center;
}

.tfy-eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.9;
}

.tfy-hero__title {
	margin: 0.1rem 0 0.6rem;
	font-size: clamp(1.75rem, 5vw, 2.4rem);
	font-weight: 900;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	background: transparent !important;
	color: #ffffff !important;
}

.tfy-hero__lead {
	margin: 0 auto;
	max-width: 30rem;
	font-size: 0.92rem;
	opacity: 0.88;
	line-height: 1.6;
}

/* Toolbar */
.tfy-toolbar {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin-bottom: 1.1rem;
}

@media (min-width: 560px) {
	.tfy-toolbar {
		flex-direction: row;
		align-items: stretch;
		gap: 0.7rem;
	}
}

.tfy-search {
	flex: 1;
	min-width: 0;
}

.tfy-input {
	width: 100%;
	padding: 0.65rem 0.85rem;
	border: 1px solid rgba(20, 18, 26, 0.1);
	border-radius: 12px;
	font: inherit;
	background: var(--tfy-surface-soft);
	color: var(--tfy-ink);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tfy-input:focus {
	outline: none;
	border-color: var(--tfy-accent);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.tfy-input--search {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235e5a66' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 0.85rem 50%;
	background-size: 1rem;
	padding-inline-start: 2.35rem;
}

/* Grid */
.tfy-main {
	min-height: 40vh;
	flex: 1;
}

.tfy-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.85rem;
}

@media (min-width: 520px) {
	.tfy-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 900px) {
	.tfy-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1200px) {
	.tfy-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (min-width: 1500px) {
	.tfy-grid {
		grid-template-columns: repeat(5, 1fr);
	}
}

/* Card — أسلوب إعلانات */
.tfy-card {
	background: #ffffff;
	border-radius: var(--tfy-radius);
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	border: 1px solid rgba(209, 32, 47, 0.12);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tfy-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 32px rgba(209, 32, 47, 0.15);
}

.tfy-card.is-hidden {
	display: none;
}

.tfy-card__media {
	position: relative;
	height: 156px;
	background: linear-gradient(145deg, #ece8e2, #ddd8d0);
	overflow: hidden;
}

.tfy-card__media--empty {
	background: linear-gradient(145deg, #e8e4de, #d4cfc7);
}

.tfy-card__media--empty .tfy-card__img {
	display: none;
}

.tfy-card__media--empty::after {
	content: "بدون صورة";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--tfy-muted);
}

.tfy-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tfy-card__body {
	padding: 0.72rem 0.78rem 0.8rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.28rem;
	background: transparent;
}

.tfy-badge {
	display: inline-flex;
	align-self: flex-start;
	padding: 0.18rem 0.5rem;
	border-radius: 999px;
	font-size: 0.66rem;
	font-weight: 700;
}

.tfy-badge--urgent {
	background: #fff4ed;
	color: #c05612;
	border: 1px solid rgba(248, 151, 61, 0.5);
}

.tfy-badge--verified {
	background: #f0f9ff;
	color: #0369a1;
	border: 1px solid rgba(56, 189, 248, 0.4);
}

.tfy-card__title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.35;
	color: inherit;
	background: transparent !important;
}

.tfy-card__titlelink {
	text-decoration: none;
	color: inherit !important;
	display: inline-block;
	background: transparent !important;
}

.tfy-card__detaillink {
	display: block;
	text-decoration: none;
	color: inherit;
}

.tfy-card__ref {
	margin: 0;
	font-size: 0.68rem;
	color: #625d69;
	font-weight: 500;
}

.tfy-card__desc {
	margin: 0.2rem 0 0.45rem;
	font-size: 0.82rem;
	color: var(--tfy-muted);
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
    line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tfy-card__meta {
	margin: 0;
	font-size: 0.72rem;
	color: #4b5563;
}

.tfy-card__price-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.45rem;
	margin-top: auto;
	padding-top: 0.25rem;
}

.tfy-card__price {
	font-size: clamp(0.95rem, 2.7vw, 1.12rem);
	font-weight: 800;
	color: #d1202f;
	letter-spacing: -0.02em;
}

.tfy-pill {
	font-size: 0.66rem;
	font-weight: 600;
	padding: 0.22rem 0.5rem;
	border-radius: 999px;
	background: #ecfdf5;
	color: #047857;
}

.tfy-countdown {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem;
	font-size: 0.74rem;
	margin-top: 0.2rem;
}

.tfy-countdown__label {
	color: #625d69;
	font-weight: 500;
}

.tfy-countdown__value {
	font-weight: 700;
	color: #d1202f;
}

.tfy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 0.5rem;
	padding: 0.62rem 0.85rem;
	border: none;
	border-radius: 12px;
	font: inherit;
	font-weight: 700;
	font-size: 0.88rem;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 8px 18px rgba(20, 18, 26, 0.06);
	transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.tfy-btn--wa {
	background: var(--tfy-wa);
	color: #fff;
}

.tfy-btn--cartlink {
	background: #ffffff;
	color: var(--tfy-accent);
	border: 1px solid rgba(230, 33, 23, 0.35);
}

.tfy-btn--cartlink:hover {
	background: var(--tfy-accent-soft);
	color: var(--tfy-accent);
}

.tfy-btn--cart {
	background: linear-gradient(135deg, #ff3b30, #e62117);
	color: #fff;
	border: 1px solid rgba(230, 33, 23, 0.42);
}

.tfy-btn--cart:hover {
	background: linear-gradient(135deg, #e62117, #c41c13);
	color: #fff;
}

.tfy-btn.is-added,
.tfy-btn--cart.is-added,
.tfy-btn-add.is-added {
	background: linear-gradient(135deg, #22c55e, #16a34a) !important;
	border-color: rgba(22, 163, 74, 0.45) !important;
	color: #fff !important;
	box-shadow: 0 12px 24px rgba(34, 197, 94, 0.22) !important;
}

/* Cart (Mobile-First Layout) */
.tfy-cart-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.tfy-cart-items {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.tfy-cart-summary {
	background: #fff;
	border: 1px solid rgba(20, 18, 26, 0.06);
	border-radius: var(--tfy-radius);
	box-shadow: var(--tfy-shadow);
	padding: 1rem;
}

.tfy-cart-summary__box {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.tfy-cart-item {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	position: relative;
}

.tfy-stretched-link {
	position: absolute;
	inset: 0;
	border-radius: var(--tfy-radius);
	z-index: 2;
	text-decoration: none;
}

.tfy-cart-item__row {
	display: flex;
	gap: 1rem;
	align-items: stretch;
	position: relative;
	z-index: 3;
}

.tfy-cart-item__img {
	width: 90px;
	flex: 0 0 90px;
	border-radius: 12px;
	overflow: hidden;
	background: linear-gradient(145deg, #ece8e2, #ddd8d0);
	border: 1px solid rgba(20, 18, 26, 0.06);
}

.tfy-cart-item__imgel {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tfy-cart-item__core {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.tfy-cart-item__title {
	margin: 0 0 0.25rem;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.35;
	color: var(--tfy-ink);
}

.tfy-cart-item__imglink {
	text-decoration: none;
	display: block;
}

.tfy-cart-item__titlelink {
	color: inherit;
	text-decoration: none;
}

.tfy-cart-item__titlelink:hover {
	color: var(--tfy-accent);
	text-decoration: underline;
}

.tfy-cart-item__prices {
	margin-top: 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.tfy-cart-item__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(20, 18, 26, 0.06);
	position: relative;
	z-index: 3;
}

.tfy-cart-qtyform {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: 1;
	min-width: 160px;
}

.tfy-cart-qtyinput {
	width: 80px;
	padding: 0.5rem;
	border-radius: 10px;
	border: 1px solid rgba(20, 18, 26, 0.12);
	background: #fff;
	font: inherit;
	font-weight: 800;
	text-align: center;
}

.tfy-cart-qtyinput:focus {
	outline: none;
	border-color: var(--tfy-accent);
	box-shadow: 0 0 0 3px var(--tfy-accent-soft);
}

.tfy-btn--cartcontrol {
	width: auto;
	padding: 0.45rem 1rem;
	font-size: 0.85rem;
	border-radius: 10px;
	background: #f4f2ee;
	color: var(--tfy-ink);
	border: 1px solid rgba(20, 18, 26, 0.1);
}

.tfy-btn--cartcontrol:hover {
	background: #e9e7e2;
}

.tfy-btn--cartremove {
	width: auto;
	padding: 0.45rem 1rem;
	font-size: 0.85rem;
	border-radius: 10px;
	background: #fff1f2;
	color: #e11d48;
	border: 1px solid rgba(225, 29, 72, 0.25);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
}

.tfy-btn--cartremove:hover {
	background: #ffe4e9;
}

@media (min-width: 600px) {
	.tfy-cart-item {
		padding: 1.25rem;
	}
	.tfy-cart-item__row {
		align-items: center;
	}
	.tfy-cart-item__img {
		width: 110px;
		flex: 0 0 110px;
	}
}

@media (min-width: 900px) {
	.tfy-cart-layout {
		grid-template-columns: 1.45fr 0.55fr;
		align-items: start;
	}
}

.tfy-btn--wa:hover {
	background: var(--tfy-wa-hover);
	color: #fff;
}

.tfy-btn--wa:active {
	transform: scale(0.98);
}

.tfy-empty {
	text-align: center;
	padding: 2rem 1rem;
	color: var(--tfy-muted);
	font-size: 0.95rem;
}

.tfy-empty--hidden {
	display: none;
}

.tfy-footer {
	display: none !important;
}

.tfy-footer p,
.tfy-footer__simple,
.tfy-footer::before,
.tfy-footer::after {
	display: none !important;
	content: none;
}

.tfy-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.product-details-modern {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.product-top-link {
    margin-bottom: 18px;
    text-align: right;
}

.product-top-link a {
    color: #d94b3d;
    font-weight: 700;
    text-decoration: none;
}

.product-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.product-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.status-badge.verified {
    background: #e8f8ee;
    color: #28a745;
    border: 1px solid #98dfaf;
}

.status-badge.urgent {
    background: #fff1f0;
    color: #d93025;
    border: 1px solid #f1b2ad;
}

.countdown-text {
    color: #d93025;
    font-weight: 700;
    font-size: 15px;
}

.product-seller {
    font-size: 20px;
    font-weight: 800;
    color: #7c2d12;
}

.product-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    align-items: start;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.info-box {
    background: #fff;
    border: 1px solid #e6eaf0;
    border-radius: 16px;
    padding: 16px 18px;
    min-height: 84px;
}

.full-box {
    margin-bottom: 12px;
}

.info-label {
    font-size: 15px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 6px;
}

.info-value {
    font-size: 15px;
    color: #111827;
    line-height: 1.7;
}

.product-image-side {
    display: flex;
    justify-content: center;
}

.product-image-box {
    width: 100%;
    min-height: 260px;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}

.product-image-box img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    display: block;
}

.whatsapp-btn-main {
    display: block;
    width: 100%;
    text-align: center;
    background: #22c55e;
    color: #fff;
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    margin-top: 10px;
}

.product-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-cart-outline,
.btn-cart-dark {
    padding: 14px 24px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 800;
    font-size: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cart-outline {
    background: #fff;
    color: #d93025;
    border: 2px solid #f2b4b0;
}

.btn-cart-dark {
    background: #0f172a;
    color: #fff;
    border: none;
}

@media (max-width: 900px) {
    .product-layout {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .product-actions {
        justify-content: center;
    }
}
.buy-box {
    margin-top: 22px;
    padding: 0;
}

.buy-box__form {
    margin: 0;
}

.buy-box__top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.buy-box__qty {
    width: 170px;
    height: 52px;
    border: 1px solid #d8dce3;
    border-radius: 18px;
    background: #fff;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    color: #000;
    outline: none;
}

.buy-box__update {
    height: 52px;
    padding: 0 28px;
    border: none;
    border-radius: 18px;
    background: #f1f1f1;
    color: #000;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
}

.buy-box__prices {
    text-align: right;
    line-height: 2;
    font-size: 18px;
    color: #1f3b63;
    margin-bottom: 16px;
}

.buy-box__line strong {
    font-weight: 500;
}

.buy-box__actions {
    display: flex;
    justify-content: flex-end;
}

.buy-box__cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    height: 54px;
    padding: 0 22px;
    border-radius: 18px;
    border: 2px solid #f2b7b7;
    background: #fff;
    color: #d64242;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
}

.buy-box__cart-btn:hover {
    background: #fff7f7;
}

/* ========================================================================= */
/* TASFIYA FOURNISSEUR STYLES */
/* ========================================================================= */

.tfy-hero--supplier {
	background: linear-gradient(135deg, #1c1424 0%, #3d1f35 48%, #7f1d3a 100%);
}

.tfy-navlink--supplier {
	background: transparent;
	color: var(--tfy-accent);
	border-color: rgba(225, 29, 72, 0.25);
}
.tfy-navlink--supplier:hover {
	background: var(--tfy-accent-soft);
	color: var(--tfy-accent);
}

.tfy-alert {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border-radius: 12px;
	font-weight: 600;
	font-size: 0.95rem;
}
.tfy-alert--err {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}
.tfy-alert--ok {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.supplier-section {
	background: var(--tfy-surface);
	border-radius: var(--tfy-radius);
	padding: 1.5rem;
	border: 1px solid rgba(20, 18, 26, 0.08);
	box-shadow: var(--tfy-shadow);
	margin-bottom: 2rem;
}

.supplier-section__title {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	color: var(--tfy-ink);
	font-weight: 800;
}

/* FOrmulaire */
.supplier-form__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin-bottom: 1rem;
}

@media (min-width: 640px) {
	.supplier-form__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.supplier-form__field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.supplier-form__field--full {
	margin-bottom: 1rem;
}

.supplier-form__field label {
	font-size: 0.85rem;
	font-weight: 700;
	color: #374151;
}

.supplier-form__field .req {
	color: var(--tfy-accent);
}

.supplier-form__field input,
.supplier-form__field select,
.supplier-form__field textarea {
	padding: 0.75rem 1rem;
	border: 1px solid #d1d5db;
	border-radius: 12px;
	background: #f9fafb;
	font: inherit;
	transition: all 0.2s ease;
}

.supplier-form__field input:focus,
.supplier-form__field select:focus,
.supplier-form__field textarea:focus {
	outline: none;
	border-color: var(--tfy-accent);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.supplier-form__hint {
	font-size: 0.75rem;
	color: var(--tfy-muted);
}

.tfy-btn--supplier {
	background: var(--tfy-accent);
	color: #fff;
	width: auto;
	padding: 0.8rem 2rem;
}

.tfy-btn--supplier:hover {
	background: #be123c;
}

/* Produits liste */
.supplier-products {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 768px) {
	.supplier-products {
		grid-template-columns: repeat(2, 1fr);
	}
}

.supplier-product-card {
	display: flex;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 1rem;
	gap: 1rem;
}

.supplier-product-card__img {
	width: 100px;
	height: 100px;
	flex-shrink: 0;
	border-radius: 10px;
	background: #f3f4f6;
	overflow: hidden;
}

.supplier-product-card__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.supplier-product-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.supplier-product-card__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 0.25rem;
}

.supplier-product-card__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
}

.supplier-status {
	font-size: 0.7rem;
	font-weight: 700;
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
	white-space: nowrap;
}

.supplier-status--ok {
	background: #dcfce7;
	color: #166534;
}

.supplier-status--pending {
	background: #fef9c3;
	color: #854d0e;
}

.supplier-status--refused {
	background: #fee2e2;
	color: #991b1b;
}

.supplier-product-card__ref {
	margin: 0 0 0.5rem;
	font-size: 0.8rem;
	color: #6b7280;
}

.supplier-product-card__details {
	display: flex;
	gap: 1rem;
	margin-bottom: 0.5rem;
	font-size: 0.85rem;
	color: #374151;
}

.supplier-btn-delete {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 600;
	color: #ef4444;
	text-decoration: none;
	padding: 0.35rem 0.75rem;
	border-radius: 8px;
	background: #fef2f2;
	transition: background 0.2s;
}

.supplier-btn-delete:hover {
	background: #fee2e2;
}

.tfy-card__minseuil {
	color: #854d0e;
	font-weight: 600;
	background: #fef9c3;
	padding: 0.2rem 0.5rem;
	border-radius: 8px;
	display: inline-block;
	margin: 0.25rem 0 0 !important;
}

.tfy-cart-minseuil-hint {
	font-size: 0.8rem;
	color: #854d0e;
	margin: 0.25rem 0 0;
	font-weight: 600;
}

/* ========================================================================= */
/* PRODUCT DETAILS PAGE (product.php) */
/* ========================================================================= */

.tfy-product-page {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	max-width: 920px;
	margin: 0 auto 1.2rem;
	background: linear-gradient(180deg, #fffdfd 0%, #f9f3f6 100%);
	border-radius: var(--tfy-radius);
	padding: 0.95rem;
	box-shadow: var(--tfy-shadow);
	border: 1px solid var(--tfy-line);
}

@media (min-width: 768px) {
	.tfy-product-page {
		grid-template-columns: 0.95fr 1fr;
		padding: 1.2rem;
		gap: 1.3rem;
	}
}

.tfy-product-image {
	background: #f6f4f5;
	border-radius: var(--tfy-radius-sm);
	overflow: hidden;
	aspect-ratio: 16/11;
	max-height: 350px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(20, 18, 26, 0.05);
}

.tfy-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tfy-product-info {
	display: flex;
	flex-direction: column;
}

.tfy-product-tags {
	display: flex;
	gap: 0.3rem;
	flex-wrap: wrap;
	margin-bottom: 0.65rem;
}

.tfy-product-price {
	font-size: clamp(1.1rem, 2.8vw, 1.55rem);
	font-weight: 800;
	color: var(--tfy-accent);
	margin-bottom: 0.8rem;
}

.tfy-product-meta-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7rem;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(20, 18, 26, 0.08);
}

.tfy-meta-item {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.tfy-meta-label {
	font-size: 0.72rem;
	color: var(--tfy-muted);
	font-weight: 600;
}

.tfy-meta-value {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--tfy-ink);
}

.tfy-meta-value.name {
	color: var(--tfy-accent);
}

.tfy-meta-sub {
	font-size: 0.78rem;
	color: var(--tfy-muted);
}

.tfy-product-description {
	margin-bottom: 1rem;
}

.tfy-desc-title {
	font-size: 0.95rem;
	font-weight: 800;
	margin: 0 0 0.45rem;
}

.tfy-desc-content {
	font-size: 0.86rem;
	line-height: 1.55;
	color: #374151;
}

.tfy-product-actions {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin-top: auto;
}

@media (min-width: 640px) {
	.tfy-product-actions {
		flex-direction: row;
	}
}

.tfy-btn-add {
	width: 100%;
	background: var(--tfy-ink);
	color: #fff;
	font-size: 0.88rem;
	padding: 0.72rem;
	justify-content: center;
}
.tfy-btn-add:hover {
	background: #374151;
}

.tfy-btn-whatsapp {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	flex: 1;
	background: #25D366;
	color: #fff;
	text-decoration: none;
	font-size: 0.88rem;
	padding: 0.72rem;
}
.tfy-btn-whatsapp:hover {
	background: #1da851;
	color: #fff;
}

/* ========================================================================= */
/* USER PROFILE & AVATAR */
/* ========================================================================= */

.tfy-navlink--profile {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border-color: transparent;
    padding-inline: 0.15rem;
}

.tfy-navlink--profile:hover {
    background: transparent;
    border-color: transparent;
}

.tfy-avatar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6d8e2, #f9e7ee);
    color: #b8325a;
    font-size: 0.88rem;
    font-weight: 900;
    border: 1px solid rgba(217, 70, 110, 0.18);
    box-shadow: 0 8px 18px rgba(217, 70, 110, 0.10);
}

.tfy-profile-name {
    display: none;
}

html[dir="rtl"] .tfy-hero__title,
html[dir="rtl"] .tfy-card__title,
/* ========================================================================= */
/* PRODUCT DETAILS PAGE (product.php) */
/* ========================================================================= */

.tfy-product-page {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	max-width: 920px;
	margin: 0 auto 1.2rem;
	background: linear-gradient(180deg, #fffdfd 0%, #f9f3f6 100%);
	border-radius: var(--tfy-radius);
	padding: 0.95rem;
	box-shadow: var(--tfy-shadow);
	border: 1px solid var(--tfy-line);
}

@media (min-width: 768px) {
	.tfy-product-page {
		grid-template-columns: 0.95fr 1fr;
		padding: 1.2rem;
		gap: 1.3rem;
	}
}

.tfy-product-image {
	background: #f6f4f5;
	border-radius: var(--tfy-radius-sm);
	overflow: hidden;
	aspect-ratio: 16/11;
	max-height: 350px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(20, 18, 26, 0.05);
}

.tfy-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tfy-product-info {
	display: flex;
	flex-direction: column;
}

.tfy-product-tags {
	display: flex;
	gap: 0.3rem;
	flex-wrap: wrap;
	margin-bottom: 0.65rem;
}

.tfy-product-price {
	font-size: clamp(1.1rem, 2.8vw, 1.55rem);
	font-weight: 800;
	color: var(--tfy-accent);
	margin-bottom: 0.8rem;
}

.tfy-product-meta-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7rem;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(20, 18, 26, 0.08);
}

.tfy-meta-item {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.tfy-meta-label {
	font-size: 0.72rem;
	color: var(--tfy-muted);
	font-weight: 600;
}

.tfy-meta-value {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--tfy-ink);
}

.tfy-meta-value.name {
	color: var(--tfy-accent);
}

.tfy-meta-sub {
	font-size: 0.78rem;
	color: var(--tfy-muted);
}

.tfy-product-description {
	margin-bottom: 1rem;
}

.tfy-desc-title {
	font-size: 0.95rem;
	font-weight: 800;
	margin: 0 0 0.45rem;
}

.tfy-desc-content {
	font-size: 0.86rem;
	line-height: 1.55;
	color: #374151;
}

.tfy-product-actions {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin-top: auto;
}

@media (min-width: 640px) {
	.tfy-product-actions {
		flex-direction: row;
	}
}

.tfy-btn-add {
	width: 100%;
	background: var(--tfy-ink);
	color: #fff;
	font-size: 0.88rem;
	padding: 0.72rem;
	justify-content: center;
}
.tfy-btn-add:hover {
	background: #374151;
}

.tfy-btn-whatsapp {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	flex: 1;
	background: #25D366;
	color: #fff;
	text-decoration: none;
	font-size: 0.88rem;
	padding: 0.72rem;
}
.tfy-btn-whatsapp:hover {
	background: #1da851;
	color: #fff;
}

/* ========================================================================= */
/* USER PROFILE & AVATAR */
/* ========================================================================= */

.tfy-navlink--profile {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border-color: transparent;
    padding-inline: 0.15rem;
}

.tfy-navlink--profile:hover {
    background: transparent;
    border-color: transparent;
}

.tfy-avatar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6d8e2, #f9e7ee);
    color: #b8325a;
    font-size: 0.88rem;
    font-weight: 900;
    border: 1px solid rgba(217, 70, 110, 0.18);
    box-shadow: 0 8px 18px rgba(217, 70, 110, 0.10);
}

.tfy-profile-name {
    display: none;
}

html[dir="rtl"] .tfy-hero__title,
html[dir="rtl"] .tfy-card__title,
html[dir="rtl"] .tfy-cart-item__title,
html[dir="rtl"] .supplier-section__title,
html[dir="rtl"] .tfy-meta-value,
html[dir="rtl"] .tfy-desc-title,
html[dir="rtl"] .tfy-btn {
	font-weight: 800;
}

/* ==========================================================
   Dark Mode Overrides
========================================================== */
[data-theme="dark"] {
	--tfy-bg: #0f0f11;
	--tfy-bg-accent: #17171a;
	--tfy-surface: #17171a;
	--tfy-surface-soft: #1c1c1f;
	--tfy-ink: #f3f4f6;
	--tfy-muted: #9ca3af;
	--tfy-accent: #f87171;
	--tfy-accent-soft: rgba(225, 29, 72, 0.15);
	--tfy-warn: #fbbf24;
	--tfy-warn-bg: rgba(245, 158, 11, 0.1);
	--tfy-wa: #34d399;
	--tfy-line: rgba(255, 255, 255, 0.1);
	--tfy-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
	--tfy-shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] body.tfy {
    background: var(--tfy-bg);
}

[data-theme="dark"] .tfy-topnav {
    background: rgba(23, 23, 26, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .tfy-toolbar,
[data-theme="dark"] .ck-panel {
    background: var(--tfy-surface);
	border-color: var(--tfy-line);
}

[data-theme="dark"] .tfy-input,
[data-theme="dark"] .ck-input,
[data-theme="dark"] .ck-select {
    background: #1e1e24;
	color: var(--tfy-ink);
	border-color: var(--tfy-line);
}

[data-theme="dark"] .tfy-input:focus,
[data-theme="dark"] .ck-input:focus,
[data-theme="dark"] .ck-select:focus {
    background: #25252b;
}

[data-theme="dark"] .tfy-card {
    background: var(--tfy-surface);
}

[data-theme="dark"] .tfy-usermenu__menu {
    background: var(--tfy-surface);
    border: 1px solid var(--tfy-line);
}

[data-theme="dark"] .tfy-usermenu__item {
    color: var(--tfy-ink);
}

[data-theme="dark"] .tfy-usermenu__item:hover {
    background: var(--tfy-bg-accent);
}

[data-theme="dark"] .ck-summary-box {
    background: var(--tfy-surface-soft);
	border-color: var(--tfy-line);
}

[data-theme="dark"] .ck-total {
    border-color: var(--tfy-line);
}

[data-theme="dark"] .tfy-cart-item {
    background: var(--tfy-surface);
    border-color: var(--tfy-line);
}

[data-theme="dark"] .tfy-search::before {
    color: var(--tfy-muted);
}

/* --- Dark mode: global background & text --- */
[data-theme="dark"] body.tfy {
    background: #0f0f11;
    color: var(--tfy-ink);
}

/* --- Dark mode: hero section --- */
[data-theme="dark"] .tfy-hero {
    background: linear-gradient(135deg, #3a0a08 0%, #1a0605 100%);
}

[data-theme="dark"] .tfy-hero__title,
[data-theme="dark"] .tfy-hero__lead,
[data-theme="dark"] .tfy-eyebrow {
    color: #f9fafb;
}

/* --- Dark mode: navlinks (pill style) --- */
[data-theme="dark"] .tfy-navlink {
    background: rgba(30, 30, 35, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
}

[data-theme="dark"] .tfy-navlink:hover {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.3);
    color: #f87171;
}

[data-theme="dark"] .tfy-navlink--active {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.35);
    color: #f87171;
}

/* --- Dark mode: theme toggle button --- */
[data-theme="dark"] .tfy-theme-toggle {
    background: rgba(30, 30, 35, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 999px !important;
    padding: 0.4rem !important;
    color: #f3f4f6 !important;
}

/* --- Dark mode: product cards --- */
[data-theme="dark"] .tfy-card {
    background: #1c1c22;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .tfy-card__body {
    background: #1c1c22;
}

[data-theme="dark"] .tfy-card__title,
[data-theme="dark"] .tfy-card__titlelink {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .tfy-card__ref {
    color: #9ca3af;
}

[data-theme="dark"] .tfy-card__meta {
    color: #9ca3af;
}

[data-theme="dark"] .tfy-card__media {
    background: #2a2a32;
}

[data-theme="dark"] .tfy-card__media--empty {
    background: #252530;
}

[data-theme="dark"] .tfy-pill {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d5db;
}

/* --- Dark mode: badges --- */
[data-theme="dark"] .tfy-badge--verified {
    background: rgba(56, 189, 248, 0.1);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.25);
}

[data-theme="dark"] .tfy-badge--urgent {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

/* --- Dark mode: toolbar & search --- */
[data-theme="dark"] .tfy-toolbar {
    background: #17171a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .tfy-input {
    background: #1e1e24;
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .tfy-input::placeholder {
    color: #6b7280;
}

[data-theme="dark"] .tfy-input:focus {
    background: #25252d;
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

/* --- Dark mode: buttons --- */
[data-theme="dark"] .tfy-btn:not(.tfy-btn--cart):not(.tfy-btn-add):not(.tfy-btn-whatsapp) {
    background: #2d2d35;
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .tfy-btn--cart {
    background: var(--tfy-accent);
    color: #fff;
}

/* --- Dark mode: empty/muted text --- */
[data-theme="dark"] .tfy-empty {
    color: #6b7280;
}

/* --- Dark mode: supplier section --- */
[data-theme="dark"] .supplier-section {
    background: #17171a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .supplier-section__title {
    color: #f3f4f6;
}

[data-theme="dark"] .supplier-form__field label,
[data-theme="dark"] .supplier-form__field input,
[data-theme="dark"] .supplier-form__field textarea,
[data-theme="dark"] .supplier-form__field select {
    background: #1e1e24;
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.12);
}

/* --- Dark mode: countdown --- */
[data-theme="dark"] .tfy-countdown {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

/* --- Dark mode: avatar initial badge --- */
[data-theme="dark"] .tfy-avatar-icon {
    background: linear-gradient(135deg, #3a1a1f, #2a1015);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
}

/* --- Smooth transition on theme change --- */
body.tfy,
.tfy-topnav,
.tfy-card,
.tfy-card__body,
.tfy-toolbar,
.tfy-input,
.tfy-navlink,
.tfy-hero {
    transition: background 0.3s ease, color 0.2s ease, border-color 0.2s ease;
}

/* ============================================
   CORRECTIONS RESPONSIVES PRIORITAIRES
   ============================================ */

/* Correction de la largeur globale pour mobile */
@media (max-width: 768px) {
    body.tfy {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    .tfy-shell {
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding: 0 0.8rem 1rem !important;
    }
    
    /* Correction du hero (bannière rouge) */
    .tfy-hero {
        margin: 0 -0.8rem 1rem !important;
        padding: 1rem 0.8rem 1.2rem !important;
        border-radius: 0 0 20px 20px !important;
        width: calc(100% + 1.6rem) !important;
    }
    
    .tfy-hero__inner {
        padding: 0 0.5rem !important;
    }
    
    .tfy-hero__title {
        font-size: 1.4rem !important;
        word-break: break-word !important;
    }
    
    .tfy-hero__lead {
        font-size: 0.85rem !important;
        word-break: break-word !important;
    }
    
    /* Correction de la toolbar (filtres) */
    .tfy-toolbar {
        flex-direction: column !important;
        gap: 0.6rem !important;
    }
    
    .tfy-search {
        width: 100% !important;
    }
    
    .tfy-input {
        width: 100% !important;
        font-size: 0.85rem !important;
        padding: 0.6rem 0.8rem !important;
    }
    
    /* Correction de la grille des produits */
    .tfy-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Correction des cartes produits */
    .tfy-card {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .tfy-card__media {
        height: 180px !important;
    }
    
    .tfy-card__body {
        padding: 0.8rem !important;
    }
    
    .tfy-card__title {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    
    .tfy-card__ref {
        font-size: 0.7rem !important;
    }
    
    .tfy-card__price {
        font-size: 1.1rem !important;
    }
    
    .tfy-card__meta {
        font-size: 0.7rem !important;
    }
    
    /* Correction des badges */
    .tfy-badge {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.45rem !important;
    }
    
    /* Correction des boutons */
    .tfy-btn {
        width: 100% !important;
        padding: 0.6rem 0.8rem !important;
        font-size: 0.85rem !important;
        text-align: center !important;
    }
    
    /* Correction du footer */
    .tfy-footer {
        margin-top: 1.5rem !important;
        padding: 1rem !important;
        font-size: 0.7rem !important;
    }
}

/* Pour les écrans entre 480px et 768px (tablettes petites) */
@media (min-width: 480px) and (max-width: 768px) {
    .tfy-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }
    
    .tfy-toolbar {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
    
    .tfy-search {
        flex: 1 !important;
        min-width: 150px !important;
    }
}

/* Pour les très petits téléphones (moins de 380px) */
@media (max-width: 380px) {
    .tfy-hero__title {
        font-size: 1.2rem !important;
    }
    
    .tfy-card__media {
        height: 150px !important;
    }
    
    .tfy-card__title {
        font-size: 0.9rem !important;
    }
    
    .tfy-card__body {
        padding: 0.65rem !important;
    }
    
    .tfy-btn {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.8rem !important;
    }
}

/* Correction spécifique pour les images des produits */
@media (max-width: 768px) {
    .tfy-card__img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* Correction pour la page produit */
    .tfy-product-page {
        flex-direction: column !important;
        padding: 0.8rem !important;
    }
    
    .tfy-product-image {
        max-height: 250px !important;
    }
    
    .tfy-product-meta-grid {
        grid-template-columns: 1fr !important;
        gap: 0.6rem !important;
    }
    
    /* Correction pour le panier */
    .tfy-cart-item__row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .tfy-cart-item__img {
        width: 80px !important;
        height: 80px !important;
    }
    
    .tfy-cart-item__actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .tfy-cart-qtyform {
        width: 100% !important;
        flex-wrap: wrap !important;
    }
    
    .tfy-cart-qtyinput {
        flex: 1 !important;
        min-width: 80px !important;
    }
}

/* ============================================
   CORRECTIONS URGENTES POUR MOBILE
   ============================================ */

/* Correction du débordement horizontal */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
}

body.tfy {
    overflow-x: hidden !important;
    width: 100% !important;
}

.tfy-shell {
    max-width: 100% !important;
    overflow-x: hidden !important;
    padding: 0 0.8rem 1rem !important;
    width: 100% !important;
}

/* Correction de la grille - FORCER 1 SEULE COLONNE sur mobile */
@media (max-width: 768px) {
    .tfy-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
    }
    
    .tfy-card {
        width: 100% !important;
        margin: 0 !important;
        display: block !important;
    }
    
    /* Correction du hero */
    .tfy-hero {
        width: 100% !important;
        margin: 0 0 1rem 0 !important;
        padding: 1rem !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }
    
    .tfy-hero__inner {
        width: 100% !important;
        padding: 0 !important;
    }
    
    .tfy-hero__title {
        font-size: 1.3rem !important;
        word-wrap: break-word !important;
    }
    
    .tfy-hero__lead {
        font-size: 0.8rem !important;
        word-wrap: break-word !important;
    }
    
    /* Correction de la toolbar (filtres) */
    .tfy-toolbar {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.6rem !important;
    }
    
    .tfy-search {
        width: 100% !important;
    }
    
    .tfy-input {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Correction des cartes produits */
    .tfy-card__media {
        width: 100% !important;
        height: 180px !important;
    }
    
    .tfy-card__body {
        width: 100% !important;
        padding: 0.8rem !important;
        box-sizing: border-box !important;
    }
    
    .tfy-card__title {
        font-size: 0.95rem !important;
        word-wrap: break-word !important;
    }
    
    /* Correction des badges */
    .tfy-badge {
        font-size: 0.6rem !important;
        padding: 0.15rem 0.4rem !important;
    }
    
    /* Correction de tous les conteneurs */
    .tfy-main {
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Éviter que rien ne dépasse */
    img, iframe, video {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Correction du header */
    .tfy-topnav {
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .tfy-topnav__inner {
        flex-wrap: wrap !important;
        width: 100% !important;
    }
    
    .tfy-navlinks {
        flex-wrap: wrap !important;
        gap: 0.4rem !important;
    }
    
    /* Correction des boutons */
    .tfy-btn {
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
}

/* Pour les écrans entre 480px et 768px - 2 colonnes si assez large */
@media (min-width: 480px) and (max-width: 768px) {
    .tfy-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }
}

/* Pour les très petits téléphones (moins de 400px) */
@media (max-width: 400px) {
    .tfy-hero__title {
        font-size: 1.1rem !important;
    }
    
    .tfy-card__title {
        font-size: 0.85rem !important;
    }
    
    .tfy-card__price {
        font-size: 0.9rem !important;
    }
    
    .tfy-card__media {
        height: 150px !important;
    }
    
    .tfy-card__body {
        padding: 0.6rem !important;
    }
}

/* Correction pour la page produit sur mobile */
@media (max-width: 768px) {
    .tfy-product-page {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 0.8rem !important;
    }
    
    .tfy-product-image {
        width: 100% !important;
        max-height: 250px !important;
    }
    
    .tfy-product-info {
        width: 100% !important;
    }
    
    .tfy-product-meta-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    
    .tfy-product-actions {
        flex-direction: column !important;
    }
}

/* Correction pour le panier sur mobile */
@media (max-width: 768px) {
    .tfy-cart-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .tfy-cart-item {
        width: 100% !important;
        padding: 0.8rem !important;
    }
    
    .tfy-cart-item__row {
        flex-direction: column !important;
    }
    
    .tfy-cart-item__actions {
        flex-direction: column !important;
    }
    
    .tfy-cart-qtyform {
        width: 100% !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .tfy-cart-qtyinput {
        width: 100% !important;
    }
    
    .tfy-btn--cartcontrol,
    .tfy-btn--cartremove {
        width: 100% !important;
    }
}