/* ==========================================================================
   «المتجر» mega menu (includes/mega-menu.php) on top of the header plugin's panel:
   categories listed vertically on the RIGHT (RTL start), product cards / photo on the left (2 × 2), price under each name,
   «عرض» badge for sale items, and a «كل منتجات القسم» photo card that opens the category.
   ========================================================================== */

@media (min-width: 1024px) {
	/* The store panel is wider than the plugin's default (list + 2 × 2 cards side by side). */
	html body .ofh[data-open="mega"] .ofh-d__panels,
	html body .ofh[data-open="mega"] .ofh-d__bg { width: min(1180px, calc(100vw - 64px)); }

	/* RTL: the heading + category list sit on the right (inline start), the cards/photo on the left. */

	/* The categories column keeps room for the heading + the list side by side (the plugin lets it shrink). */
	html body .ofh-mega__nav { flex: 0 0 auto; min-width: 400px; }
	html body .ofh-mega__row { gap: 28px; }
	html body .ofh-mega__heading { font-size: 28px; line-height: 1.2; }
	.ofh-mega__cats { gap: 6px; }
	html body .ofh .ofh-mega__cats .ofh-link {
		padding: 10px 14px;
		border-radius: 100px;
		font-size: 17px;
		transition: color .2s, background-color .2s;
	}
	html body .ofh .ofh-mega__cats .ofh-link:hover,
	html body .ofh .ofh-mega__cats .ofh-link[aria-pressed="true"] { background: rgba(2, 88, 162, .08); color: var(--yn-primary, #0258A2); }
	html body .ofh .ofh-mega__cats .ofh-link__line { display: none; }

	/* ---------- Cards: the store's product-card look (product-cards.css) ---------- */
	html body .ofh-mega__tiles { flex: 0 0 min(560px, 42vw); display: flex; flex-direction: column; }
	/* Service links at the bottom of the cards column (bottom-left), as in the reference. */
	html body .ofh-mega__tiles .ofh-service { margin-top: auto; padding-top: 22px; }
	html body .ofh-mega__tiles .ofh-service__heading { display: block; margin-bottom: 10px; color: var(--yn-orange, #FF7515); font-size: 17px; font-weight: 800; }
	html body .ofh-mega__tiles .ofh-service__groups { display: flex; gap: 40px; }
	html body .ofh-mega__tiles .ofh-service__group { display: flex; flex-direction: column; gap: 6px; }
	html body .ofh-mega__tiles .ofh-service__link { color: var(--yn-heading, #1E293B); font-size: 15px; font-weight: 400; line-height: 1.5; text-decoration: none; transition: color .2s; }
	html body .ofh-mega__tiles .ofh-service__link:hover { color: var(--yn-primary, #0258A2); }
	.ofh-tiles { gap: 12px; }
	.ofh-tiles > li { display: flex; min-width: 0; }
	html body .ofh-tiles > li > .ofh-tile { width: 100%; }
	html body .ofh-tile {
		display: flex;
		flex-direction: column;
		align-items: center;
		aspect-ratio: auto;
		padding: 14px 0 14px;
		border-radius: 1.5rem;
		background: #FFFFFC;
		color: var(--yn-heading, #1E293B);
		text-align: center;
		isolation: isolate;
		box-shadow: 0 1px 0 rgba(30, 41, 59, .04), 0 14px 30px -22px rgba(2, 88, 162, .35);
		transition: box-shadow .4s ease;
	}
	/* Blue fill rising from the bottom with the store cards' circular edge. */
	html body .ofh-tile::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 0;
		background: var(--yn-primary, #0258A2);
		transform: translateY(100%);
		clip-path: circle(0% at 50% 50%);
		transition: transform .55s cubic-bezier(.7, 0, .84, 0), clip-path .55s cubic-bezier(.7, 0, .84, 0);
		pointer-events: none;
	}
	html body .ofh-tile__media {
		position: relative;
		inset: auto;
		z-index: 1;
		width: 78%;
		aspect-ratio: 1 / 1;
		margin: 0 auto 8px;
		border-radius: 1.25rem;
		overflow: hidden;
		background: #FFFFFC;
		transform: none;
		transition: box-shadow .6s ease;
	}
	html body .ofh-tile__media img { object-fit: cover; padding: 0; transform: scale(1); transition: transform .55s cubic-bezier(.7, 0, .84, 0); }
	html body .ofh-tile__content { position: relative; z-index: 1; height: auto; padding: 0 12px; justify-content: flex-start; align-items: center; }
	html body .ofh-tile__title {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
		min-height: 2.7em;
		font-size: 16px;
		font-weight: 700;
		line-height: 1.35;
		transition: color .45s ease;
	}
	html body .ofh-tile__chev { display: none; }
	html body .ofh-tile__subtitle { margin-top: 4px; color: var(--yn-primary, #0258A2); font-size: 15px; font-weight: 700; line-height: 1.3; transition: color .45s ease; }

	@media (hover: hover) {
		html body .ofh-tile:hover { box-shadow: 0 18px 40px -20px rgba(2, 88, 162, .45); }
		html body .ofh-tile:hover::before { transform: translateY(0); clip-path: circle(150% at 50% 50%); transition-timing-function: cubic-bezier(.33, 1, .68, 1); }
		html body .ofh-tile:hover .ofh-tile__media { transform: none; box-shadow: 0 14px 30px rgba(15, 23, 42, .25); }
		html body .ofh-tile:hover .ofh-tile__media img { transform: scale(1.1); transition: transform 1s cubic-bezier(.33, 1, .68, 1); }
		html body .ofh-tile:hover .ofh-tile__title,
		html body .ofh-tile:hover .ofh-tile__subtitle { color: #FFFFFC; }
	}

	/* «عرض» badge, as on the store cards. */
	html body .ofh-tile[data-badge]::after {
		content: attr(data-badge);
		position: absolute;
		top: 22px;
		inset-inline-start: 8%;
		z-index: 2;
		padding: 3px 10px;
		border-radius: 100px;
		background: var(--yn-orange, #FF7515);
		color: #FFFFFC;
		font-size: 12px;
		font-weight: 700;
		line-height: 1.4;
	}

	/* «كل منتجات القسم»: lifestyle photo card, blue at rest, label on the photo. */
	html body .ofh-tile--all { padding: 0; min-height: 260px; background: var(--yn-primary, #0258A2); color: #FFFFFC; justify-content: flex-end; }
	html body .ofh-tile--all::before { display: none; }
	html body .ofh-tile--all .ofh-tile__media { position: absolute; inset: 0; width: 100%; aspect-ratio: auto; margin: 0; border-radius: 0; background: var(--yn-primary, #0258A2); }
	html body .ofh-tile--all .ofh-tile__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(2, 40, 80, .85), rgba(2, 40, 80, 0) 60%); }
	html body .ofh-tile--all .ofh-tile__content { padding: 18px 16px; min-height: 100%; justify-content: flex-end; }
	html body .ofh-tile--all .ofh-tile__title { min-height: 0; color: #FFFFFC; font-size: 17px; }
	html body .ofh-tile--all .ofh-tile__chev { display: inline-block; }
	html body .ofh-tile--all .ofh-tile__subtitle { color: rgba(255, 255, 252, .85); font-weight: 400; }
	html body .ofh-tile--all:hover .ofh-tile__media { box-shadow: none; }
}

/* «خدمة العملاء» heading in brand orange everywhere it appears (desktop panel and phone menu). */
html body .ofh .ofh-service__heading { color: var(--yn-orange, #FF7515); }
