/* P2B Storefront — self-owned design system. RTL-first via logical properties. Mobile-first. */
:root {
	--p2b-bg: #ffffff; --p2b-ink: #101828; --p2b-muted: #667085; --p2b-line: #EAECF0;
	--p2b-soft: #F8FAFC; --p2b-accent: #2563EB; --p2b-accent-d: #1D4ED8;
	--p2b-radius: 14px; --p2b-shadow: 0 4px 20px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.p2b-store {
	font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--p2b-ink); background: var(--p2b-bg); line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Header */
.p2b-store__hdr {
	position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px;
	padding: 14px clamp(14px, 4vw, 40px); background: rgba(255,255,255,.92);
	backdrop-filter: blur(8px); border-block-end: 1px solid var(--p2b-line);
}
.p2b-store__logo { font-size: 22px; font-weight: 800; letter-spacing: -.5px; display: inline-flex; align-items: center; }
.p2b-store__logo::first-letter { color: var(--p2b-accent); }
/* Real logo image: bigger + crisp on the island headers (overrides the inline 40px from P2B_Brand). */
.p2b-store__logo img { height: 56px !important; width: auto !important; max-width: 220px; }
@media ( max-width: 600px ) { .p2b-store__logo img { height: 46px !important; } }
.p2b-store__nav { display: flex; gap: 18px; font-size: 14px; font-weight: 600; }
.p2b-store__nav a:hover { color: var(--p2b-accent); }
.p2b-store__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.p2b-store__act {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; border-radius: 999px; background: var(--p2b-soft); font-size: 17px; font-weight: 700;
}
.p2b-store__act:hover { background: var(--p2b-line); }
.p2b-store__badge {
	position: absolute; inset-block-start: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 4px;
	border-radius: 999px; background: var(--p2b-accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}
@media (max-width: 640px) { .p2b-store__nav { display: none; } }

/* Layout */
.p2b-store__main { max-width: 1180px; margin: 0 auto; padding: clamp(16px, 3vw, 34px); }
.p2b-store__wrap { max-width: 1180px; margin: 0 auto; }
.p2b-store__narrow { max-width: 480px; }
.p2b-store__h2 { font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif; font-size: clamp(20px, 3vw, 26px); font-weight: 800; margin: 24px 0 14px; letter-spacing: -.3px; }
.p2b-store__empty { text-align: center; color: var(--p2b-muted); padding: 60px 0; }

/* Hero */
.p2b-hero { text-align: center; padding: clamp(28px, 6vw, 64px) 0 24px; }
.p2b-hero h1 { font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif; font-size: clamp(28px, 6vw, 52px); font-weight: 800; margin: 0 0 10px; letter-spacing: -1px; }
.p2b-hero p { font-size: clamp(15px, 2.5vw, 19px); color: var(--p2b-muted); margin: 0; }

/* Category chips */
.p2b-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0 8px; }
.p2b-chips a { padding: 8px 16px; border-radius: 999px; background: var(--p2b-soft); font-size: 13px; font-weight: 700; border: 1px solid var(--p2b-line); }
.p2b-chips a:hover { background: var(--p2b-accent); color: #fff; border-color: var(--p2b-accent); }

/* Product grid + card */
.p2b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: clamp(12px, 2vw, 22px); }
.p2b-card { display: flex; flex-direction: column; border-radius: var(--p2b-radius); overflow: hidden; background: #fff; border: 1px solid var(--p2b-line); transition: transform .15s ease, box-shadow .15s ease; }
.p2b-card:hover { transform: translateY(-3px); box-shadow: var(--p2b-shadow); }
.p2b-card__img { aspect-ratio: 1; background: var(--p2b-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p2b-card__img img { width: 100%; height: 100%; object-fit: cover; }
.p2b-card__ph { font-size: 40px; opacity: .4; }
.p2b-card__body { padding: 12px 14px; }
.p2b-card__name { font-size: 15px; font-weight: 700; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p2b-card__price { font-size: 16px; font-weight: 800; color: var(--p2b-ink); margin: 0; font-variant-numeric: tabular-nums; }
.p2b-card__tag { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; color: #1D4ED8; background: #EFF4FF; padding: 3px 8px; border-radius: 999px; }

/* Product page */
.p2b-pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 4vw, 48px); margin-top: 16px; }
@media (max-width: 820px) { .p2b-pdp { grid-template-columns: 1fr; } }
.p2b-pdp__main { border-radius: var(--p2b-radius); overflow: hidden; background: var(--p2b-soft); aspect-ratio: 1; }
.p2b-pdp__main img { width: 100%; height: 100%; object-fit: cover; }
.p2b-pdp__thumbs { display: flex; gap: 8px; margin-top: 10px; }
.p2b-pdp__thumbs img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--p2b-line); }
.p2b-pdp__info h1 { font-size: clamp(22px, 3.5vw, 30px); font-weight: 800; margin: 0 0 8px; }
.p2b-pdp__seller { font-size: 14px; color: var(--p2b-muted); margin: 0 0 10px; }
.p2b-pdp__seller a { color: var(--p2b-accent); font-weight: 700; }
.p2b-pdp__price { font-size: 26px; font-weight: 800; color: var(--p2b-ink); margin: 0 0 14px; font-variant-numeric: tabular-nums; }
.p2b-pdp__desc { color: var(--p2b-ink); margin-bottom: 20px; }
.p2b-pdp__hint { font-size: 13px; color: var(--p2b-muted); margin-top: 8px; }

/* Vendor directory */
.p2b-hero--sub { padding-block: clamp(22px, 4vw, 44px) 18px; }
.p2b-search {
	margin-top: 16px; width: min(420px, 100%); padding: 12px 18px; border: 1px solid var(--p2b-line);
	border-radius: 999px; font: inherit; background: var(--p2b-soft);
}
.p2b-search:focus { outline: 2px solid var(--p2b-accent); background: #fff; }
.p2b-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: clamp(12px, 2vw, 22px); margin-top: 10px; }
.p2b-vcard {
	display: flex; flex-direction: column; border-radius: var(--p2b-radius); overflow: hidden;
	background: #fff; border: 1px solid var(--p2b-line); transition: transform .15s ease, box-shadow .15s ease;
}
.p2b-vcard:hover { transform: translateY(-3px); box-shadow: var(--p2b-shadow); }
.p2b-vcard__strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--p2b-soft); aspect-ratio: 3 / 1.1; }
.p2b-vcard__strip img { width: 100%; height: 100%; object-fit: cover; }
.p2b-vcard__ph { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; font-size: 34px; opacity: .35; }
.p2b-vcard__body { display: flex; align-items: center; gap: 10px; padding: 12px 14px 4px; }
.p2b-vcard__avatar {
	width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center;
	justify-content: center; background: var(--p2b-accent); color: #fff; font-weight: 800; font-size: 17px;
	margin-top: -30px; border: 3px solid #fff; box-shadow: var(--p2b-shadow);
}
.p2b-vcard__name { font-weight: 800; font-size: 15px; }
.p2b-vcard__count { margin-inline-start: auto; font-size: 12px; color: var(--p2b-muted); }
.p2b-vcard__cta { padding: 6px 14px 14px; font-size: 13px; font-weight: 700; color: var(--p2b-accent); }
.p2b-vendors-join { text-align: center; margin: 50px 0 10px; padding: 34px 20px; background: var(--p2b-soft); border-radius: var(--p2b-radius); }
.p2b-vendors-join h2 { margin: 0 0 6px; font-size: clamp(19px, 3vw, 24px); font-weight: 800; }
.p2b-vendors-join p { margin: 0 0 16px; color: var(--p2b-muted); }

/* Individual vendor store */
.p2b-vendor-head { text-align: center; padding: 24px 0 20px; }
.p2b-vendor-head__avatar {
	width: 68px; height: 68px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
	background: var(--p2b-accent); color: #fff; font-weight: 800; font-size: 28px; margin-bottom: 10px;
}
.p2b-vendor-head h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin: 0 0 4px; }
.p2b-vendor-head__meta { color: var(--p2b-accent); font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.p2b-vendor-head__bio { color: var(--p2b-muted); margin: 0 auto; max-width: 560px; }

/* Buttons */
.p2b-btn { display: inline-block; padding: 13px 26px; border-radius: 10px; background: var(--p2b-soft); border: 1px solid var(--p2b-line); font: inherit; font-weight: 700; cursor: pointer; text-align: center; }
.p2b-btn--primary { background: var(--p2b-accent); color: #fff; border-color: var(--p2b-accent); }
.p2b-btn--primary:hover { background: var(--p2b-accent-d); }
.p2b-btn:disabled { opacity: .5; cursor: not-allowed; }
.p2b-pdp__add { margin: 0; }

/* Catalog filter bar */
.p2b-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 18px; padding: 12px 14px; background: var(--p2b-soft); border: 1px solid var(--p2b-line); border-radius: var(--p2b-radius); }
.p2b-filter__q { flex: 1 1 200px; min-width: 140px; padding: 10px 16px; border: 1px solid var(--p2b-line); border-radius: 999px; font: inherit; background: #fff; }
.p2b-filter__q:focus, .p2b-filter input:focus, .p2b-filter select:focus { outline: 2px solid var(--p2b-accent); }
.p2b-filter__price { display: inline-flex; align-items: center; gap: 6px; color: var(--p2b-muted); }
.p2b-filter__price input { width: 78px; padding: 10px 10px; border: 1px solid var(--p2b-line); border-radius: 10px; font: inherit; background: #fff; }
.p2b-filter__sort { padding: 10px 14px; border: 1px solid var(--p2b-line); border-radius: 10px; font: inherit; background: #fff; cursor: pointer; }
.p2b-filter__go { padding: 10px 22px; }
.p2b-filter__clear { font-size: 13px; font-weight: 700; color: var(--p2b-muted); padding: 6px 10px; }
.p2b-filter__clear:hover { color: var(--p2b-accent); }
@media (max-width: 640px) { .p2b-filter__go { flex: 1 1 100%; } }

@media (max-width: 640px) {
	body.p2b-store { overflow-x: hidden; }
	.p2b-store__hdr {
		gap: 10px;
		padding: 10px 12px;
	}
	.p2b-store__main {
		padding: 14px 12px;
	}
	.p2b-store__actions { gap: 6px; }
	.p2b-store__act,
	.p2b-btn,
	.p2b-filter__sort,
	.p2b-filter__go,
	.p2b-filter__q,
	.p2b-filter__price input {
		min-height: 44px;
	}
	.p2b-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.p2b-card__body { padding: 10px; }
	.p2b-card__name { font-size: 13.5px; min-height: 3.1em; }
	.p2b-pdp {
		gap: 16px;
		margin-top: 8px;
	}
	.p2b-pdp__main {
		aspect-ratio: 4 / 5;
		border-radius: 12px;
	}
	.p2b-pdp__thumbs {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
	}
	.p2b-pdp__thumbs img {
		width: 60px;
		height: 60px;
		flex: 0 0 auto;
	}
	.p2b-pdp__info h1 {
		font-size: 22px;
		line-height: 1.35;
	}
	.p2b-pdp__price { font-size: 24px; }
	.p2b-pdp__add,
	.p2b-btn--primary {
		width: 100%;
	}
	.p2b-filter {
		align-items: stretch;
		padding: 10px;
	}
	.p2b-filter__q,
	.p2b-filter__sort,
	.p2b-filter__clear {
		flex: 1 1 100%;
	}
	.p2b-filter__price {
		flex: 1 1 100%;
	}
	.p2b-filter__price input {
		flex: 1;
		width: auto;
	}
}

/* Pagination */
.p2b-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 30px 0 6px; }
.p2b-pager__page { font-size: 13px; font-weight: 700; color: var(--p2b-muted); }

/* Footer */
.p2b-store__ftr { border-block-start: 1px solid var(--p2b-line); margin-top: 50px; padding: 30px clamp(16px,4vw,40px); text-align: center; color: var(--p2b-muted); font-size: 13px; }
.p2b-store__ftr-links { margin-top: 6px; }
.p2b-store__ftr-links a { color: var(--p2b-accent); font-weight: 700; }

/* 2.3.49 — Island header menu (song poster, wall art, bottles, design, track…). It shrinks and scrolls sideways
   instead of overflowing, and below 640px — where it used to be hidden — it becomes a scrollable row of chips under
   the logo, so every store page keeps its menu on phones. */
.p2b-store__hdr .p2b-store__nav { min-width: 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.p2b-store__hdr .p2b-store__nav::-webkit-scrollbar { display: none; }
.p2b-store__hdr .p2b-store__nav a { flex: 0 0 auto; }
@media (max-width: 640px) {
	.p2b-store__hdr { flex-wrap: wrap; row-gap: 8px; }
	.p2b-store__hdr .p2b-store__nav { display: flex; order: 10; flex: 1 1 100%; gap: 8px; padding-block-end: 2px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
	.p2b-store__hdr .p2b-store__nav a { padding: 7px 12px; font-size: 13px; font-weight: 600; border-radius: 999px; background: var(--p2b-soft); border: 1px solid var(--p2b-line); }
}
@media (min-width: 641px) and (max-width: 1199.98px) {
	.p2b-store__hdr .p2b-store__nav { gap: 12px; }
}
