/*!
 * Baly Digital — design kit (shared).
 * Ports the canonical design tokens (baly-design-system/colors_and_type.css)
 * and the shared chrome from digital.css, scoped under .bdg so the prototype
 * class names (.dg-wrap, .card, .faq, .trust-band, .catnav …) used by the
 * Home / Service Listing / Product pages can be ported faithfully without
 * leaking into or colliding with the host theme.
 *
 * Every Baly Digital page shortcode wraps its output in
 *   <div class="bdg bdg--{page}" dir="rtl">…</div>
 * so these custom properties resolve by inheritance.
 */

.bdg {
	/* Brand */
	--color-brand: #0043FF;
	--color-brand-hover: #0039E0;
	--color-brand-active: #002FBF;
	--color-brand-light: #B8C9FF;
	--color-brand-lighter: #E6ECFF;
	--color-brand-10: rgba(0, 67, 255, 0.10);
	--color-brand-20: rgba(0, 67, 255, 0.20);

	/* Neutrals */
	--color-black: #0A0A0A;
	--color-grey-900: #1A1A1A;
	--color-grey-800: #2E2E2E;
	--color-grey-700: #4A4A4A;
	--color-grey-600: #666666;
	--color-grey-500: #8A8A8A;
	--color-grey-400: #ADADAD;
	--color-grey-300: #CCCCCC;
	--color-grey-200: #E5E5E5;
	--color-grey-100: #F5F5F7;
	--color-grey-50: #FAFAFA;
	--color-white: #FFFFFF;

	/* Semantic */
	--color-success: #00A845;
	--color-success-light: #DFF5E7;
	--color-error: #D92D20;
	--color-error-light: #FEE9E7;
	--color-warning: #E08A00;
	--color-warning-light: #FFF3DB;

	/* Roles */
	--fg-primary: var(--color-black);
	--fg-secondary: var(--color-grey-600);
	--fg-tertiary: var(--color-grey-400);
	--fg-brand: var(--color-brand);
	--bg-primary: var(--color-white);
	--bg-secondary: var(--color-grey-100);
	--border-default: var(--color-grey-200);
	--border-subtle: var(--color-grey-100);

	/* Shadows */
	--shadow-1: 0 1px 4px rgba(0,0,0,0.06);
	--shadow-2: 0 2px 12px rgba(0,0,0,0.10);
	--shadow-3: 0 8px 32px rgba(0,0,0,0.14);
	--shadow-brand: 0 4px 20px rgba(0, 67, 255, 0.25);

	/* Radii */
	--radius-xs: 4px;
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--radius-xl: 20px;
	--radius-2xl: 28px;
	--radius-pill: 999px;

	/* Spacing */
	--space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
	--space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
	--space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;

	/* Type */
	--font-family: "Graphikarabic3", "GraphikArabic", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--font-regular: 400; --font-medium: 500; --font-semibold: 600;
	--font-bold: 700; --font-black: 900; --font-super: 950;
	--text-xs: 12px; --text-sm: 14px; --text-base: 16px; --text-md: 18px;
	--text-lg: 22px; --text-xl: 28px; --text-2xl: 36px; --text-3xl: 48px; --text-4xl: 64px;

	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);

	/* Layout */
	--dg-max: 1240px;
	--dg-gutter: clamp(16px, 4vw, 48px);

	font-family: var(--font-family);
	color: var(--fg-primary);
	direction: rtl;
	text-align: right;
	-webkit-font-smoothing: antialiased;
}

.bdg, .bdg *, .bdg *::before, .bdg *::after { box-sizing: border-box; }
.bdg img { display: block; max-width: 100%; }
.bdg a { color: inherit; text-decoration: none; }
.bdg button { font-family: inherit; cursor: pointer; border: 0; background: none; }
.bdg h1, .bdg h2, .bdg h3, .bdg h4, .bdg p { margin: 0; }

.bdg .dg-wrap { max-width: var(--dg-max); margin-inline: auto; padding-inline: var(--dg-gutter); }

/* ── Buttons ─────────────────────────────────────────────── */
.bdg .dg-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: var(--radius-pill); font-weight: var(--font-semibold); transition: all .15s; white-space: nowrap; font-family: var(--font-family); }
.bdg .dg-btn--primary { background: var(--color-brand); color: #fff; padding: 14px 28px; font-size: var(--text-base); box-shadow: var(--shadow-brand); border: none; }
.bdg .dg-btn--primary:hover { background: var(--color-brand-hover); transform: translateY(-1px); }
.bdg .dg-btn--ghost { background: var(--color-white); color: var(--fg-primary); padding: 13px 26px; border: 1px solid var(--border-default); }
.bdg .dg-btn--ghost:hover { border-color: var(--color-brand); color: var(--fg-brand); }

/* ── Badges ──────────────────────────────────────────────── */
.bdg .dg-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--font-semibold); }
.bdg .dg-badge--sale { background: var(--color-error); color: #fff; }
.bdg .dg-badge--excl { background: #7C2C8F; color: #fff; }
.bdg .dg-badge--new { background: var(--color-success); color: #fff; }

/* Hot-deal / catalog badge palette (aligned with the design DBadge). */
.bdg .hd-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--font-bold); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.14); }
.bdg .hd-pill--disc { background: var(--color-brand); }
.bdg .hd-pill--low { background: var(--color-error); }
.bdg .hd-pill--value { background: var(--color-success); }
.bdg .hd-pill--excl { background: #7C2C8F; }

/* ── Trust band (Home + Listing) ─────────────────────────── */
.bdg .trust-band { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-2xl); padding: 18px; box-shadow: var(--shadow-1); }
.bdg .trust-band__item { display: flex; align-items: center; gap: 13px; padding: 4px 18px; }
.bdg .trust-band__item + .trust-band__item { border-inline-start: 1px solid var(--border-subtle); }
.bdg .trust-band__ic { flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--color-brand-lighter); display: grid; place-items: center; }
.bdg .trust-band__ic svg { width: 23px; height: 23px; color: var(--color-brand); }
.bdg .trust-band__t b { display: block; font-size: 15.5px; font-weight: var(--font-bold); letter-spacing: -0.01em; color: var(--color-black); }
.bdg .trust-band__t span { font-size: 12.5px; color: var(--fg-secondary); }

/* ── Category nav circles (Home bento + Listing catnav) ──── */
.bdg .catnav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; justify-items: center; }
.bdg .catnav__item { display: flex; flex-direction: column; align-items: center; gap: 13px; background: transparent; text-align: center; }
.bdg .catnav__ic { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; transition: transform .22s var(--ease-out), box-shadow .22s; }
.bdg .catnav__item:hover .catnav__ic { transform: translateY(-4px) scale(1.04); box-shadow: 0 18px 30px -16px var(--acc-sh, rgba(0,67,255,.4)); }
.bdg .catnav__ic svg { width: 44px; height: 44px; }
.bdg .catnav__lbl { font-size: 15px; font-weight: var(--font-bold); color: var(--color-black); }

/* ── About / SEO copy (Listing + Product) ────────────────── */
.bdg .pd-about { margin-top: var(--space-12); padding: 34px 36px; border-radius: var(--radius-2xl); background: var(--color-grey-50); border: 1px solid var(--border-subtle); }
.bdg .pd-about h2 { font-size: var(--text-lg); font-weight: var(--font-bold); margin: 0 0 14px; letter-spacing: -0.01em; color: var(--fg-primary); }
.bdg .pd-about p { max-width: 820px; margin: 0; font-size: var(--text-base); line-height: 1.95; color: var(--fg-secondary); }
.bdg .pd-about p + p { margin-top: 16px; }
.bdg .pd-about bdi { font-weight: var(--font-semibold); color: var(--fg-primary); }

/* ── FAQ accordion (Listing + Product) ───────────────────── */
.bdg .faq { margin-top: var(--space-12); }
.bdg .faq__head { margin-bottom: 18px; }
.bdg .faq__head h2 { font-size: var(--text-xl); font-weight: var(--font-bold); margin: 0; letter-spacing: -0.01em; }
.bdg .faq__list { display: flex; flex-direction: column; gap: 10px; }
.bdg .faq__item { border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.bdg .faq__item[open] { border-color: var(--color-brand-light); box-shadow: var(--shadow-1); }
.bdg .faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; font-size: var(--text-base); font-weight: var(--font-semibold); color: var(--fg-primary); }
.bdg .faq__item summary::-webkit-details-marker { display: none; }
.bdg .faq__chev { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--color-grey-100); color: var(--fg-secondary); display: grid; place-items: center; transition: transform .2s, background .2s, color .2s; }
.bdg .faq__item[open] .faq__chev { transform: rotate(180deg); background: var(--color-brand-lighter); color: var(--color-brand); }
.bdg .faq__chev svg { width: 13px; height: 13px; }
.bdg .faq__a { padding: 0 20px 18px; font-size: var(--text-sm); line-height: 1.75; color: var(--fg-secondary); max-width: 840px; }
.bdg .faq__a bdi { font-weight: var(--font-semibold); color: var(--fg-primary); }

/* ── Brand grid card (Listing grid + Home rails) ─────────── */
.bdg .card { position: relative; background: #fff; border-radius: var(--radius-xl); padding: 14px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 11px; box-shadow: var(--shadow-1); transition: transform .16s, box-shadow .16s; }
.bdg .card:hover { box-shadow: var(--shadow-3); transform: translateY(-3px); }
.bdg .card__art { width: 104px; height: 104px; border-radius: var(--radius-lg); overflow: hidden; background: #fff; border: 1px solid var(--color-grey-100); display: grid; place-items: center; color: #fff; font-weight: var(--font-black); font-size: 24px; }
.bdg .card__art--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bdg .card__name { font-size: var(--text-sm); font-weight: var(--font-bold); letter-spacing: -0.01em; line-height: 1.25; color: var(--color-black); }
.bdg .card__price { width: 100%; padding-top: 9px; border-top: 1px dashed var(--border-default); display: flex; align-items: baseline; justify-content: center; gap: 5px; white-space: nowrap; font-size: 10.5px; font-weight: var(--font-semibold); color: var(--fg-tertiary); }
.bdg .card__price b { font-size: 13px; font-weight: var(--font-black); color: var(--color-brand); }
.bdg .card__badge { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3; }

.bdg .dg-notice { padding: 18px 20px; border-radius: var(--radius-lg); background: var(--color-brand-lighter); color: var(--color-grey-800); font-weight: 600; }

@media (max-width: 760px) {
	.bdg .trust-band { grid-template-columns: 1fr 1fr; gap: 14px 8px; padding: 14px; }
	.bdg .trust-band__item { padding: 0 6px; }
	.bdg .trust-band__item + .trust-band__item { border-inline-start: none; }
	.bdg .catnav { grid-template-columns: repeat(3, 1fr); gap: 22px 8px; }
	.bdg .catnav__ic { width: 84px; height: 84px; }
	.bdg .catnav__ic svg { width: 36px; height: 36px; }
}
@media (max-width: 640px) { .bdg .pd-about { padding: 24px 20px; } }
