/* ============================================================================
   print2buy Storefront 2.0 — design system.
   RTL-first (logical properties), mobile-first, app-like. Fonts: Alexandria
   (display) + IBM Plex Sans Arabic (body). Everything renders client-side;
   this file owns 100% of the look.
   ========================================================================== */

:root {
	/* Brand system extracted from the print2buy logo: blue gradient mark + near-black wordmark. */
	--bg: #ffffff;
	--paper: #F3F5F7;
	--ink: #101828;          /* wordmark near-black */
	--ink-2: #344054;
	--muted: #667085;        /* 4.6:1 on white — AA */
	--line: #EAECF0;
	--line-strong: #D0D5DD;
	--accent: #2563EB;       /* logo blue — actions, links, active states ONLY */
	--accent-hot: #3B82F6;   /* logo gradient light end */
	--accent-deep: #1D4ED8;  /* hover / pressed */
	--accent-soft: #EFF4FF;  /* washes, chips, hover tints */
	--grad: linear-gradient(135deg, #4E8DFB 0%, #2563EB 55%, #1E40AF 100%); /* the logo ramp */
	--ok: #12B76A;
	--err: #D92D20;
	--r-sm: 14px;
	--r-md: 20px;
	--r-lg: 28px;
	--shadow-1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
	--shadow-2: 0 4px 6px -2px rgba(16, 24, 40, .05), 0 12px 16px -4px rgba(16, 24, 40, .1);
	--ring: 0 0 0 4px rgba(37, 99, 235, .16);
	--font-display: "IBM Plex Sans Arabic", Inter, system-ui, sans-serif;
	--font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
	--dur: .18s;
	--ease: cubic-bezier(.2, .8, .25, 1);
}

/* Catalog discovery: the same controls serve the marketplace and each merchant. */
.p2b-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.p2b-discovery { margin-block:24px 12px; border:1px solid var(--line); border-radius:var(--r-lg); background:var(--paper); padding:24px; }
.p2b-discovery__heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.p2b-discovery__heading h2 { font-size:20px; margin:0; line-height:1.4; }
.p2b-discovery__heading p { margin:5px 0 0; color:var(--muted); font-size:14px; }
.p2b-filter-reset { color:var(--accent-deep); border:1px solid var(--line-strong); border-radius:var(--r-sm); padding:10px 14px; background:var(--bg); font-size:13px; min-height:44px; flex-shrink:0; }
.p2b-discovery .p2b-toolbar { display:flex; align-items:flex-end; gap:16px; padding:0; margin:0; flex-wrap:wrap; }
.p2b-discovery .p2b-search { min-width:200px; flex:1 1 250px; background:var(--bg); min-height:48px; }
.p2b-discovery .p2b-price-band { display:flex; gap:10px; border:0; background:none; padding:0; }
.p2b-discovery .p2b-price-band label, .p2b-sort-label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--ink-2); font-weight:600; }
.p2b-discovery .p2b-price-band input { width:120px; min-height:48px; border:1px solid var(--line-strong); border-radius:var(--r-sm); background:var(--bg); padding:10px 12px; color:var(--ink); font-size:15px; font-variant-numeric:tabular-nums; }
.p2b-discovery .p2b-select { min-height:48px; border-color:var(--line-strong); background-color:var(--bg); font-size:14px; }
.p2b-facets { display:flex; flex-wrap:wrap; gap:10px 18px; margin-top:18px; align-items:center; }
.p2b-facet { display:flex; align-items:center; gap:8px; min-height:44px; padding:8px 12px; border:1px solid var(--line-strong); border-radius:var(--r-sm); background:var(--bg); font-size:14px; cursor:pointer; }
.p2b-facet:has(input:checked) { background:var(--accent-soft); border-color:var(--accent); color:var(--accent-deep); }
.p2b-facet input { width:18px; height:18px; accent-color:var(--accent); }
.p2b-rating-label { display:flex; align-items:center; gap:8px; font-size:13px; margin-inline-start:auto; }
.p2b-filter-error { color:var(--err); margin:14px 0 0; font-size:14px; }
.p2b-results-bar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-block:12px 20px; min-height:44px; }
.p2b-results-bar > p { margin:0; color:var(--ink-2); font-size:14px; font-variant-numeric:tabular-nums; }
.p2b-active-filters { display:flex; flex-wrap:wrap; gap:6px; }
.p2b-active-filter { border:1px solid var(--line-strong); border-radius:24px; background:var(--bg); padding:9px 14px; font-size:13px; min-height:44px; color:var(--ink-2); overflow-wrap:anywhere; }
@media(max-width:650px) {
 .p2b-discovery { padding:16px; }
 .p2b-discovery__heading { align-items:flex-start; }
 .p2b-discovery__heading h2 { font-size:18px; }
 .p2b-discovery__heading p { font-size:13px; }
 .p2b-discovery .p2b-search { min-width:0; flex-basis:100%; }
 .p2b-discovery .p2b-price-band { flex:1 1 100%; }
 .p2b-discovery .p2b-price-band label { flex:1; min-width:0; }
 .p2b-discovery .p2b-price-band input { width:100%; }
 .p2b-sort-label, .p2b-sort-label select { width:100%; }
 .p2b-rating-label { margin-inline-start:0; flex-wrap:wrap; }
 .p2b-discovery input, .p2b-discovery select { font-size:16px !important; }
}

/* Keyboard focus is always visible, on-brand, and never removed. */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body.p2b-app-body {
	font-family: var(--font-body);
	background: var(--bg);
	color: var(--ink);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	padding-bottom: 96px; /* floating bottom nav clearance (mobile) */
}
@media (min-width: 900px) { body.p2b-app-body { padding-bottom: 0; } }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea, button { max-width: 100%; }

/* ---------------------------------------------------------------- skeleton */
@keyframes p2b-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk {
	border-radius: var(--r-md);
	background: linear-gradient(90deg, #EEF2F6 25%, #F8FAFC 50%, #EEF2F6 75%);
	background-size: 200% 100%;
	animation: p2b-shimmer 1.4s linear infinite;
}
.p2b-boot-skeleton { max-width: 1200px; margin: 0 auto; padding: 18px; }
.sk-bar { height: 56px; margin-bottom: 22px; }
.sk-hero { height: 200px; margin-bottom: 22px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.sk-card { aspect-ratio: 4 / 5.4; }

/* ------------------------------------------------------------------ header */
.p2b-hdr {
	position: sticky; top: 0; z-index: 90;
	display: flex; align-items: center; gap: 14px;
	padding: 12px clamp(14px, 4vw, 40px);
	background: rgba(255, 255, 255, .86);
	backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	border-block-end: 1px solid var(--line);
}
.p2b-hdr__logo {
	font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.5px;
	display: inline-flex; align-items: center; gap: 8px;
	direction: ltr; unicode-bidi: isolate; /* the brand is LTR — RTL layout must not reorder it to "buy 2 print" */
}
.p2b-hdr__logo .dot { color: var(--accent); }
.p2b-hdr__nav { display: none; gap: 4px; }
@media (min-width: 900px) { .p2b-hdr__nav { display: flex; } }
.p2b-hdr__nav a {
	padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2);
	transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.p2b-hdr__nav a:hover { background: var(--paper); }
.p2b-hdr__nav a.is-active { background: var(--ink); color: #fff; }
.p2b-hdr__spacer { flex: 1; }
.p2b-iconbtn {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 999px; border: none; background: var(--paper); color: var(--ink);
	transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.p2b-iconbtn:hover { background: var(--line); }
.p2b-iconbtn:active { transform: scale(.92); }
.p2b-iconbtn svg { width: 20px; height: 20px; }
.p2b-iconbtn .badge {
	position: absolute; inset-block-start: -3px; inset-inline-end: -3px;
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
	background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
	transition: transform var(--dur) var(--ease);
}
.p2b-iconbtn .badge[hidden] { display: none; }
.p2b-iconbtn .badge.pop { animation: p2b-pop .4s var(--ease); }
@keyframes p2b-pop { 40% { transform: scale(1.5); } }
.p2b-langbtn {
	border: 1.5px solid var(--line); background: transparent; border-radius: 999px;
	padding: 8px 14px; font-weight: 700; font-size: 13px; font-family: var(--font-display);
	transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.p2b-langbtn:hover { border-color: var(--ink); }

/* --------------------------------------------------------------- app frame */
.p2b-view { max-width: 1200px; margin: 0 auto; padding: clamp(14px, 3vw, 30px) clamp(14px, 4vw, 40px); }
@keyframes p2b-view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.p2b-view { animation: p2b-view-in .28s var(--ease); }
@media (prefers-reduced-motion: reduce) {
	.p2b-view, .sk { animation: none; }
	* { transition-duration: 0s !important; }
}

/* -------------------------------------------------------------------- hero */
.p2b-hero {
	position: relative; overflow: hidden; text-align: center;
	padding: clamp(34px, 7vw, 76px) 18px clamp(26px, 5vw, 54px);
	border-radius: var(--r-lg); background: var(--paper); margin-bottom: 20px;
}
.p2b-hero::before, .p2b-hero::after {
	content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
	filter: blur(70px); opacity: .5; pointer-events: none;
}
.p2b-hero::before { background: #DBEAFE; inset-block-start: -140px; inset-inline-start: -80px; }
.p2b-hero::after { background: #E0EAFF; inset-block-end: -160px; inset-inline-end: -60px; }
.p2b-hero h1 {
	position: relative; z-index: 1; font-family: var(--font-display); font-weight: 800;
	font-size: clamp(30px, 6.5vw, 60px); line-height: 1.2; letter-spacing: -1px; margin: 0 0 10px;
}
.p2b-hero h1 .grad {
	background: var(--grad);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.p2b-hero p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: clamp(15px, 2.4vw, 18px); }

/* ------------------------------------------------------------------- chips */
.p2b-chips {
	display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 0 6px;
	scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.p2b-chips::-webkit-scrollbar { display: none; }
.p2b-chip {
	flex: none; padding: 9px 18px; border-radius: 999px; background: var(--paper);
	border: 1.5px solid transparent; font-size: 13.5px; font-weight: 600; white-space: nowrap;
	transition: all var(--dur) var(--ease);
}
.p2b-chip:hover { border-color: var(--ink); }
.p2b-chip.is-active { background: var(--ink); color: #fff; }

/* -------------------------------------------------------------- search/filter */
.p2b-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 20px; }
.p2b-search {
	flex: 1 1 240px; display: flex; align-items: center; gap: 10px;
	background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 8px 4px 18px;
	transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
[dir="rtl"] .p2b-search { padding: 4px 18px 4px 8px; }
.p2b-search:focus-within { border-color: var(--accent); background: #fff; box-shadow: var(--ring); }
.p2b-search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.p2b-search input {
	flex: 1; border: none; background: transparent; font: inherit; font-size: 15px; padding: 9px 0; outline: none; min-width: 0;
}
.p2b-select {
	appearance: none; border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px;
	padding: 11px 18px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.p2b-price-band { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.p2b-price-band input {
	width: 84px; border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px;
	padding: 10px 14px; font: inherit; font-size: 13.5px; outline: none;
}
.p2b-price-band input:focus { border-color: var(--accent); background: #fff; }

/* -------------------------------------------------------------------- grid */
.p2b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: clamp(12px, 2vw, 20px); }
@media (min-width: 700px) { .p2b-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
@keyframes p2b-card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.p2b-card {
	display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden;
	background: #fff; border: 1px solid var(--line);
	transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
	animation: p2b-card-in .34s var(--ease) backwards;
}
.p2b-card:nth-child(-n+12) { animation-delay: calc(var(--i, 0) * 30ms); }
.p2b-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.p2b-card__img { position: relative; aspect-ratio: 4 / 5; background: var(--paper); overflow: hidden; }
.p2b-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.p2b-card:hover .p2b-card__img img { transform: scale(1.04); }
.p2b-card__badge {
	position: absolute; inset-block-start: 10px; inset-inline-start: 10px; z-index: 1;
	background: rgba(255, 255, 255, .94); color: var(--accent-deep); font-size: 11px; font-weight: 700;
	padding: 5px 11px; border-radius: 999px; border: 1px solid #DBE6FE;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .08); backdrop-filter: blur(4px);
}
.p2b-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p2b-card__name {
	font-size: 14px; font-weight: 500; margin: 0; color: var(--ink-2); line-height: 1.5;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.p2b-card__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; }
.p2b-card__price { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.p2b-card__vendor { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------- load more / pager */
.p2b-more { display: flex; justify-content: center; margin: 28px 0 8px; }
.p2b-empty { text-align: center; color: var(--muted); padding: 70px 16px; }
.p2b-empty .big { font-size: 44px; margin-bottom: 8px; }

/* ----------------------------------------------------------------- buttons */
.p2b-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 24px; border-radius: 999px; border: 1px solid var(--line-strong);
	background: #fff; color: var(--ink); font-weight: 600; font-size: 14.5px;
	white-space: nowrap; /* "Add to cart" must never stack vertically */
	box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
	transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
		box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.p2b-btn:hover { border-color: var(--ink); background: var(--paper); }
.p2b-btn:active { transform: scale(.98); }
.p2b-btn:focus-visible { box-shadow: var(--ring); }
.p2b-btn--primary {
	background: var(--accent); color: #fff; border-color: var(--accent);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
.p2b-btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); box-shadow: 0 6px 14px -3px rgba(37, 99, 235, .4); }
.p2b-btn--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.p2b-btn--sm { padding: 9px 18px; font-size: 13px; }
.p2b-btn[disabled] { opacity: .45; pointer-events: none; }
.p2b-btn .spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: p2b-rot .7s linear infinite; }
@keyframes p2b-rot { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------- PDP */
.p2b-pdp { display: grid; grid-template-columns: 1fr; gap: clamp(18px, 4vw, 46px); }
@media (min-width: 860px) { .p2b-pdp { grid-template-columns: 1.05fr 1fr; } }
.p2b-pdp__main { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--paper); aspect-ratio: 1; cursor: zoom-in; }
.p2b-pdp__main img { width: 100%; height: 100%; object-fit: contain; }
/* Hover magnification. A shopper judges a print by its detail, and a click-only lightbox makes them
   commit before they can look. The scale is capped at the image's own resolution by JS, so the zoom
   never turns into an upscaled blur; the lightbox stays for the full-screen view. */
@media (hover: hover) and (pointer: fine) {
	.p2b-pdp__main img { transition: transform .18s var(--ease); will-change: transform; }
	.p2b-pdp__main.is-zooming img { transform: scale(var(--p2b-zoom, 2.2)); transition: none; }
	.p2b-pdp__main.p2b-has-zoom::after {
		content: ''; position: absolute; inset-block-end: 12px; inset-inline-end: 12px;
		width: 34px; height: 34px; border-radius: 999px; pointer-events: none;
		background: rgba(255, 255, 255, .92) center / 17px no-repeat
			url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23344054' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5M11 8v6M8 11h6'/%3E%3C/svg%3E");
		box-shadow: var(--shadow-1, 0 1px 3px rgba(16,24,40,.12)); opacity: .92;
		transition: opacity .15s var(--ease);
	}
	.p2b-pdp__main.is-zooming::after { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.p2b-pdp__main img { transition: none; }
}
.p2b-pdp__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.p2b-pdp__thumbs img {
	width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; flex: none;
	border: 2px solid transparent; cursor: pointer; transition: border-color var(--dur) var(--ease);
}
.p2b-pdp__thumbs img.is-active { border-color: var(--accent); }
.p2b-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(16, 24, 40, .82); display: flex; align-items: center; justify-content: center; padding: 22px; cursor: zoom-out; }
.p2b-lightbox img { max-width: min(1120px, 96vw); max-height: 92vh; object-fit: contain; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-2); }
.p2b-lightbox button { position: fixed; inset-block-start: 18px; inset-inline-end: 18px; width: 42px; height: 42px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.p2b-pdp__info h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 3.4vw, 32px); line-height: 1.3; margin: 0 0 10px; }
.p2b-pdp__vendor { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.p2b-pdp__vendor a { color: var(--accent); font-weight: 700; }
.p2b-pdp__price { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 4vw, 34px); color: var(--ink); margin: 0 0 16px; font-variant-numeric: tabular-nums; }
.p2b-pdp__price del { color: var(--muted); font-weight: 500; font-size: .6em; margin-inline-end: 10px; }
.p2b-pdp__desc { color: var(--ink-2); font-size: 14.5px; margin-bottom: 20px; }
.p2b-pdp__desc img { border-radius: var(--r-md); }
.p2b-pdp__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.p2b-pdp__hint { font-size: 13px; color: var(--muted); }
.p2b-attr { margin-bottom: 14px; }
.p2b-attr label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.p2b-attr .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.p2b-attr .opt {
	padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
	font-size: 13.5px; font-weight: 600; transition: all var(--dur) var(--ease);
}
.p2b-attr .opt.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.p2b-qty { display: inline-flex; align-items: center; gap: 2px; border: 1.5px solid var(--line); border-radius: 999px; }
.p2b-qty button { width: 38px; height: 42px; border: none; background: transparent; font-size: 18px; font-weight: 700; color: var(--ink); }
.p2b-qty span { min-width: 34px; text-align: center; font-weight: 700; }

@media (max-width: 640px) {
	.p2b-view {
		padding-inline: 12px;
		overflow-x: hidden;
	}
	.p2b-hdr {
		gap: 8px;
		padding: 10px 12px;
	}
	.p2b-iconbtn,
	.p2b-langbtn,
	.p2b-btn,
	.p2b-chip,
	.p2b-select,
	.p2b-price-band input,
	.p2b-attr .opt {
		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.2em;
	}
	.p2b-card__meta {
		align-items: flex-start;
		flex-direction: column;
		gap: 2px;
	}
	.p2b-card__vendor {
		max-width: 100%;
	}
	.p2b-toolbar {
		align-items: stretch;
	}
	.p2b-search,
	.p2b-select,
	.p2b-price-band {
		flex: 1 1 100%;
	}
	.p2b-price-band input {
		flex: 1;
		width: auto;
	}
	.p2b-pdp {
		gap: 16px;
	}
	.p2b-pdp__main {
		border-radius: 14px;
		aspect-ratio: 4 / 5;
	}
	.p2b-pdp__thumbs {
		padding-bottom: 4px;
		-webkit-overflow-scrolling: touch;
	}
	.p2b-pdp__thumbs img {
		width: 62px;
		height: 62px;
	}
	.p2b-pdp__info h1 {
		font-size: 22px;
		line-height: 1.35;
	}
	.p2b-pdp__cta {
		align-items: stretch;
	}
	.p2b-pdp__cta .p2b-btn,
	.p2b-pdp__cta .p2b-qty {
		flex: 1 1 100%;
	}
	.p2b-qty {
		justify-content: space-between;
		min-height: 46px;
	}
	.p2b-qty button {
		width: 48px;
		height: 46px;
	}
	.p2b-attr .opts {
		gap: 8px;
	}
	.p2b-attr .opt {
		flex: 1 1 calc(50% - 8px);
		text-align: center;
	}
	.p2b-crow {
		align-items: flex-start;
	}
	.p2b-crow img,
	.p2b-crow__ph {
		width: 64px;
		height: 64px;
	}
	.p2b-couponbar {
		flex-direction: column;
	}
	.p2b-couponbar input {
		max-width: none;
		min-height: 44px;
	}
	.p2b-carttotals {
		position: static;
		padding: 16px;
	}
}

/* ------------------------------------------------------------------ vendors */
.p2b-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: clamp(12px, 2vw, 20px); }
.p2b-vcard {
	border-radius: var(--r-md); overflow: hidden; background: #fff; border: 1px solid var(--line);
	transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
	animation: p2b-card-in .34s var(--ease) backwards;
}
.p2b-vcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.p2b-vcard__strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--paper); aspect-ratio: 3 / 1.15; }
.p2b-vcard__strip img { width: 100%; height: 100%; object-fit: cover; }
.p2b-vcard__strip .ph { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.p2b-vcard__strip .ph svg { width: 34px; height: 34px; opacity: .5; }
.p2b-vcard__body { display: flex; align-items: center; gap: 10px; padding: 12px 14px 14px; }
.p2b-avatar {
	width: 44px; height: 44px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
	background: var(--grad); color: #fff;
	font-family: var(--font-display); font-weight: 800; font-size: 18px;
}
.p2b-vcard__body .p2b-avatar { margin-top: -34px; border: 3px solid #fff; box-shadow: var(--shadow-1); }
.p2b-vcard__name { font-weight: 700; font-size: 15px; }
.p2b-vcard__count { margin-inline-start: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.p2b-vhead { text-align: center; padding: 18px 0 26px; }
.p2b-vhead .p2b-avatar { width: 76px; height: 76px; font-size: 30px; margin-bottom: 12px; }
.p2b-vhead h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 4vw, 36px); margin: 0 0 4px; }
.p2b-vhead .meta { color: var(--accent); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.p2b-vhead .bio { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 14px; }
.p2b-join {
	text-align: center; margin: 46px 0 8px; padding: clamp(26px, 5vw, 44px) 20px;
	background: var(--grad); color: #fff; border-radius: var(--r-lg); position: relative; overflow: hidden;
}
.p2b-join::before {
	content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
	background: rgba(255, 255, 255, .35); filter: blur(90px); opacity: .8; inset-block-start: -120px; inset-inline-end: -80px;
}
.p2b-join h2 { position: relative; font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 3.4vw, 30px); margin: 0 0 8px; }
.p2b-join p { position: relative; color: rgba(255, 255, 255, .85); margin: 0 0 18px; }

/* ------------------------------------------------------------- cart drawer */
.p2b-scrim {
	position: fixed; inset: 0; z-index: 200; background: rgba(16, 24, 40, .45);
	backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease);
}
.p2b-scrim.is-open { opacity: 1; pointer-events: auto; }
.p2b-drawer {
	position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 201; width: min(420px, 92vw);
	background: #fff; display: flex; flex-direction: column;
	transform: translateX(calc(var(--drawer-dir, 1) * 105%));
	transition: transform .3s var(--ease); box-shadow: var(--shadow-2);
}
[dir="rtl"] .p2b-drawer { --drawer-dir: -1; }
.p2b-drawer.is-open { transform: none; }
.p2b-drawer__hd { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-block-end: 1px solid var(--line); }
.p2b-drawer__hd h2 { font-family: var(--font-display); font-size: 18px; font-weight: 800; margin: 0; }
.p2b-drawer__items { flex: 1; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 14px; }
.p2b-citem { display: flex; gap: 12px; align-items: center; }
.p2b-citem img { width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; background: var(--paper); flex: none; }
.p2b-citem__body { flex: 1; min-width: 0; }
.p2b-citem__name { font-size: 13.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p2b-citem__price { font-size: 13px; color: var(--accent); font-weight: 700; }
.p2b-citem .p2b-qty { transform: scale(.86); transform-origin: var(--tx-origin, left); }
[dir="rtl"] .p2b-citem .p2b-qty { --tx-origin: right; }
.p2b-citem__rm { border: none; background: transparent; color: var(--muted); font-size: 17px; padding: 6px; }
.p2b-citem__rm:hover { color: var(--accent); }
.p2b-drawer__ft { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-block-start: 1px solid var(--line); }
.p2b-drawer__total { display: flex; justify-content: space-between; font-family: var(--font-display); font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.p2b-drawer__ft .p2b-btn { width: 100%; }

/* --------------------------------------------------------------- cart page */
.p2b-cartgrid { display: grid; grid-template-columns: 1fr; gap: clamp(16px, 3vw, 30px); align-items: start; }
@media (min-width: 900px) { .p2b-cartgrid { grid-template-columns: 1.6fr 1fr; } }
.p2b-cartlist { display: flex; flex-direction: column; gap: 12px; }
.p2b-crow {
	display: flex; align-items: center; gap: 14px; padding: 14px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
}
.p2b-crow img, .p2b-crow__ph { width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; background: var(--paper); flex: none; }
.p2b-crow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.p2b-crow__name { font-size: 14px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p2b-crow__name:hover { color: var(--accent); }
.p2b-crow__price { font-size: 12.5px; color: var(--muted); }
.p2b-crow__line { font-family: var(--font-display); font-weight: 700; color: var(--accent); white-space: nowrap; }
@media (max-width: 560px) { .p2b-crow { flex-wrap: wrap; } .p2b-crow__line { margin-inline-start: auto; } }
.p2b-couponbar { display: flex; gap: 8px; margin-top: 8px; }
.p2b-couponbar input {
	flex: 1; max-width: 260px; border: 1.5px solid var(--line); background: var(--paper);
	border-radius: 999px; padding: 11px 18px; font: inherit; font-size: 13.5px; outline: none;
}
.p2b-couponbar input:focus { border-color: var(--accent); background: #fff; }
.p2b-carttotals {
	position: sticky; top: 84px; background: var(--paper); border: 1px solid var(--line);
	border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
.p2b-carttotals .row { display: flex; justify-content: space-between; font-size: 14px; }
.p2b-carttotals .row.is-discount { color: var(--ok); font-weight: 700; }
.p2b-carttotals .row.is-total { font-family: var(--font-display); font-weight: 800; font-size: 18px; border-block-start: 1px solid var(--line); padding-block-start: 12px; }
.p2b-carttotals .p2b-btn { width: 100%; }
.p2b-carttotals__back { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.p2b-carttotals__back:hover { color: var(--accent); }
.p2b-drawer__viewcart { display: block; text-align: center; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.p2b-drawer__viewcart:hover { color: var(--accent); }

/* ------------------------------------------------------------------- toast */
.p2b-toast {
	position: fixed; inset-block-end: 104px; inset-inline-start: 50%; transform: translateX(-50%) translateY(20px);
	z-index: 300; background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
	font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
	transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
	max-width: 90vw; text-align: center; box-shadow: var(--shadow-2);
}
[dir="rtl"] .p2b-toast { transform: translateX(50%) translateY(20px); }
.p2b-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
[dir="rtl"] .p2b-toast.is-on { transform: translateX(50%) translateY(0); }
@media (min-width: 900px) { .p2b-toast { inset-block-end: 30px; } }

/* -------------------------------------------------------------- bottom nav */
.p2b-bnav {
	position: fixed; inset-block-end: 14px; inset-inline: 14px; z-index: 100;
	display: flex; justify-content: space-around; align-items: stretch;
	background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
	border: 1px solid var(--line); border-radius: 999px; padding: 6px;
	box-shadow: 0 8px 24px -6px rgba(16, 24, 40, .18);
	padding-bottom: max(6px, env(safe-area-inset-bottom));
}
@media (min-width: 900px) { .p2b-bnav { display: none; } }
.p2b-bnav a, .p2b-bnav button {
	position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
	padding: 8px 4px; border: none; background: transparent; color: var(--muted);
	font-size: 10.5px; font-weight: 600; border-radius: 999px; transition: color var(--dur) var(--ease);
}
.p2b-bnav svg { width: 21px; height: 21px; }
.p2b-bnav .is-active { color: var(--accent-deep); }
.p2b-bnav .is-active::before {
	content: ""; position: absolute; inset-block-start: 2px; width: 26px; height: 3px; border-radius: 3px;
	background: linear-gradient(90deg, var(--accent), var(--accent-hot));
}
.p2b-bnav .badge {
	position: absolute; inset-block-start: 2px; inset-inline-end: calc(50% - 20px);
	min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
	background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px;
}
.p2b-bnav .badge[hidden] { display: none; }

/* ------------------------------------------------------------------ footer */
.p2b-ftr { background: var(--paper); border-block-start: 1px solid var(--line); margin-top: 54px; padding: 34px 18px 44px; text-align: center; color: var(--muted); font-size: 13px; }
.p2b-ftr a { color: var(--ink-2); font-weight: 600; } .p2b-ftr a:hover { color: var(--accent); }
.p2b-ftr .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 8px; }
.p2b-ftr__social { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; }
.p2b-ftr .p2b-ftr__social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-2); background: #fff; }
.p2b-ftr .p2b-ftr__social a:hover, .p2b-ftr .p2b-ftr__social a:focus-visible { color: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------------ section head */
.p2b-h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(19px, 3vw, 26px); margin: 26px 0 14px; letter-spacing: -.3px; }
.p2b-h2 small { font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: 13px; margin-inline-start: 10px; }

/* On the gradient join panel the CTA inverts: white button, brand text. */
.p2b-join .p2b-btn--primary { background: #fff; color: var(--accent-deep); border-color: #fff; }
.p2b-join .p2b-btn--primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); box-shadow: 0 6px 14px -3px rgba(16, 24, 40, .25); }
/* Icon buttons pick up a brand wash on hover. */
.p2b-iconbtn:hover { background: var(--accent-soft); color: var(--accent-deep); }

/* Operator brand logo (HQ-configurable) in the app header. */
.p2b-hdr__logoimg { height: 40px; width: auto; display: block; }
@media (max-width: 480px) { .p2b-hdr__logoimg { height: 34px; } }

/* ---- Behavioral storefront (v0.45.0) — honest-data mechanics only ---- */
.p2b-card__new {
	position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
	background: #101828; color: #fff; font-size: 11px; font-weight: 800;
	padding: 3px 10px; border-radius: 999px; letter-spacing: .3px;
}
.p2b-card__proof { display: block; font-size: 11.5px; font-weight: 700; color: #B54708; margin: 2px 0 4px; }
.p2b-pdp__proof { font-size: 13.5px; font-weight: 800; color: #B54708; margin: 4px 0 0; }
.p2b-pdp__deliv, .p2b-drawer__deliv {
	font-size: 13px; font-weight: 700; color: #067647; background: #ECFDF3;
	border-radius: 10px; padding: 8px 12px; margin: 10px 0 0;
}
.p2b-drawer__deliv { margin: 8px 0; font-size: 12px; }
.p2b-pdp__trust { font-size: 12.5px; color: #667085; font-weight: 600; margin: 12px 0 0; line-height: 1.8; }
.p2b-ship { padding: 10px 18px 4px; font-size: 12.5px; font-weight: 700; color: #1D4ED8; }
.p2b-ship.is-ok { color: #067647; padding-bottom: 10px; }
.p2b-ship__bar { display: block; height: 6px; background: #EAECF0; border-radius: 999px; margin-top: 6px; overflow: hidden; }
.p2b-ship__bar b { display: block; height: 100%; background: linear-gradient(90deg, #4E8DFB, #2563EB); border-radius: 999px; transition: width .4s ease; }
.p2b-rail { margin: 22px 0 6px; }
.p2b-rail h2 { font-family: Alexandria, sans-serif; font-size: 18px; font-weight: 800; margin: 0 0 10px; }
.p2b-rail__track { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.p2b-rail__track .p2b-card { min-width: 175px; max-width: 175px; flex: 0 0 auto; scroll-snap-align: start; }
.p2b-rail__track::-webkit-scrollbar { height: 6px; }
.p2b-rail__track::-webkit-scrollbar-thumb { background: #D0D5DD; border-radius: 999px; }
#p2b-pdp-rails { margin-top: 26px; }

/* ---- Behavioral Wave 2 (v0.46.0): reviews, FBT, trust ---- */
.p2b-pdp__stars { font-size: 14.5px; font-weight: 800; color: #101828; margin: 2px 0 0; }
.p2b-pdp__stars .st { color: #F59E0B; letter-spacing: 1px; }
.p2b-trusted { font-size: 11.5px; font-weight: 800; color: #067647; background: #ECFDF3; border-radius: 999px; padding: 2px 10px; margin-inline-start: 6px; }
.p2b-revs { margin: 22px 0 6px; }
.p2b-revs h2 { font-family: Alexandria, sans-serif; font-size: 18px; font-weight: 800; margin: 0 0 10px; }
.p2b-revs__track { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.p2b-rev { flex: 0 0 auto; width: 220px; background: #fff; border: 1px solid #EAECF0; border-radius: 14px; padding: 12px; }
.p2b-rev img { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.p2b-rev__stars { color: #F59E0B; font-size: 15px; letter-spacing: 1px; }
.p2b-rev p { font-size: 12.5px; color: #344054; margin: 6px 0; line-height: 1.6; max-height: 4.8em; overflow: hidden; }
.p2b-rev__by { font-size: 11.5px; color: #98A2B3; }
.p2b-rev__by b { color: #067647; }
.p2b-fbt { padding: 4px 18px 8px; border-top: 1px solid #EAECF0; }
.p2b-fbt h3 { font-size: 13px; font-weight: 800; color: #667085; margin: 10px 0 8px; }
.p2b-fbt__row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.p2b-fbt__row img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: #F8FAFC; }
.p2b-fbt__row .nm { flex: 1; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p2b-fbt__row .pr { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.p2b-btn--sm { padding: 6px 14px; font-size: 12.5px; }

/* Vendor store themes + white-label (v0.56.0) */
.p2b-vhead.is-themed { border-radius: var(--r-lg, 18px); padding: 26px 22px; }
.p2b-vlogo { height: 64px; max-width: 230px; object-fit: contain; background: #fff; border-radius: 14px; padding: 8px 14px; display: inline-block; box-shadow: 0 4px 14px rgba(16,24,40,.12); }
/* A plain purchase reuses the existing quantity/cart component beside the custom path. */
.p2b-pdp__cta.p2b-purchase-paths{display:grid;grid-template-columns:1fr;gap:16px;align-items:stretch;width:100%}
.p2b-purchase-path{padding:20px;border:1px solid var(--line,#e5e7eb);border-radius:14px;background:var(--srf,#fff);min-width:0}
.p2b-purchase-path--plain{background:var(--srf-2,#f8fafc)}
.p2b-purchase-path__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.p2b-purchase-path__head h2{font-size:15px;line-height:1.6;font-weight:700;margin:0;max-width:65%}
.p2b-purchase-path__head .p2b-pdp__price,.p2b-purchase-path__price{font-size:16px!important;font-weight:700;margin:0!important;line-height:1.6;text-align:end}
.p2b-purchase-path__hint{font-size:12.5px;line-height:1.8;color:var(--muted,#667085);margin:8px 0 14px}
.p2b-purchase-path>.p2b-btn{width:100%;margin-top:8px}
.p2b-purchase-path__buy{display:flex;gap:12px;align-items:center}
.p2b-purchase-path__buy>.p2b-btn{flex:1}
.p2b-plain-attr{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:600;margin-block:12px}
.p2b-plain-attr select{font:inherit;background:#fff;border:1px solid var(--line,#e5e7eb);color:inherit;border-radius:8px;min-height:44px;padding:8px 12px;width:100%}
.p2b-plain-badge{display:block;font-size:12px;color:var(--muted,#667085);margin-block:5px}
@media(max-width:420px){.p2b-purchase-path{padding:15px}.p2b-purchase-path__buy{flex-wrap:wrap}.p2b-purchase-path__buy>.p2b-btn{flex-basis:100%}.p2b-purchase-path__head{gap:10px}.p2b-purchase-path__head h2{max-width:60%}}
/* Wall art: a size the artwork's resolution cannot print (Printful-style per-size gate). */
.p2b-attr .opt.is-unavailable{opacity:.38;text-decoration:line-through;cursor:not-allowed;pointer-events:none}
.p2b-attr .opt.is-combo-off{opacity:.45;text-decoration:line-through}

/* 2.3.35 — Buy now + flat-shipping banner */
.p2b-btn--buy{width:100%;margin-top:10px;background:#0F172A;color:#fff;border-color:#0F172A;font-weight:700}
.p2b-btn--buy:disabled{opacity:.5}
.p2b-ship-banner[hidden]{display:none!important}

/* 2.3.49 — Header menu. It no longer overflows when it holds more links than fit (it shrinks and scrolls sideways),
   and below 900px — where it used to be hidden — it becomes a scrollable row of chips under the logo, so phone
   visitors can reach wall art, song posters, bottles, the design studio and order tracking from the store pages. */
.p2b-hdr .p2b-hdr__nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.p2b-hdr .p2b-hdr__nav::-webkit-scrollbar { display: none; }
.p2b-hdr .p2b-hdr__nav a { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 899.98px) {
	.p2b-hdr { flex-wrap: wrap; row-gap: 6px; }
	.p2b-hdr .p2b-hdr__nav { display: flex; order: 10; flex: 1 1 100%; gap: 6px; padding-block-end: 2px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
	.p2b-hdr .p2b-hdr__nav a { padding: 7px 12px; font-size: 13px; border-radius: 999px; background: var(--paper); }
}
/* Laptops (900–1439px): tighter links so all ten fit on one row from 1280px up. */
@media (min-width: 900px) and (max-width: 1439.98px) {
	.p2b-hdr .p2b-hdr__nav { gap: 2px; }
	.p2b-hdr .p2b-hdr__nav a { padding: 8px 7px; font-size: 13px; }
}
