/* =====================================================================
   PhoneRanked — brand page (v1.0): /phones/{brand}/
   Loaded by /wp-content/mu-plugins/phoneranked-brands.php only on brand pages.
   Colors = GeneratePress global colors. Cards = the same card as Home / chipset pages.
   ===================================================================== */

/* ---------- 1. Base ---------- */
.pr-brand-page{
	--pr-ink:#0E1726; --pr-text:#2A3342; --pr-muted:#5B6475; --pr-meta:#6B7587; --pr-faint:#A9B4C8;
	--pr-border:#DEE3EC; --pr-line:#E9EDF3;
	--pr-accent:#1F5EFF; --pr-accent-hover:#1747C9; --pr-tint:#EEF3FF;
	--pr-green:#0B7F3E; --pr-amber:#E8A317; --pr-red:#C93434;
	--pr-metal:linear-gradient(150deg,#fff 0%,#f5f7fa 40%,#e9edf3 100%);
	flex:1 1 100%;
	min-width:0;
	width:100%;
	padding:20px 0 64px;
	color:var(--pr-text);
	font-size:16px;
	line-height:1.55;
	font-variant-numeric:tabular-nums;
}
.pr-brand-page *,
.pr-brand-page *::before,
.pr-brand-page *::after{box-sizing:border-box}
.pr-brand-page h1,
.pr-brand-page h2,
.pr-brand-page h3{margin:0;color:var(--pr-ink);line-height:1.25}
.pr-brand-page :where(p){margin:0}
.pr-brand-page :where(ul,ol,dl,dd){margin:0;padding:0;list-style:none}
.pr-brand-page :where(li){margin:0}
.pr-brand-page img{max-width:100%;height:auto}
.pr-brand-page [hidden]{display:none!important}
.pr-brand-page :focus-visible{outline:3px solid var(--pr-accent);outline-offset:2px}
.pr-brand-page .pr-crumbs ol{margin:0 0 22px}

/* ---------- 2. Hero: text | logo tile ---------- */
.bd-hero{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:48px;align-items:center}
.bd-intro{display:flex;flex-direction:column;gap:12px;max-width:760px}
.pr-brand-page .bd-title{font-size:clamp(32px,4.6vw,46px);font-weight:800;letter-spacing:-.02em;line-height:1.05}
.bd-lead{color:var(--pr-muted);font-size:17px;line-height:1.65}
.bd-lead p + p{margin-top:10px}
.bd-lead a{color:var(--pr-accent)}

.bd-logo{
	position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;
	width:200px;aspect-ratio:1/1;border:1px solid var(--pr-border);border-radius:24px;background:var(--pr-metal);
	box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 18px 40px -26px rgba(14,23,38,.45);
}
.bd-logo img{display:block;flex:none;width:calc(var(--w,80%) * .82);max-width:none;transform:translateY(var(--y,0))}
.bd-logo.is-text span{color:var(--pr-ink);font-size:34px;font-weight:800;letter-spacing:-.02em}
@media (max-width:767px){
	.bd-hero{grid-template-columns:minmax(0,1fr);gap:18px}
	.bd-logo{order:-1;width:88px;border-radius:18px}
	.bd-logo.is-text span{font-size:18px}
}

/* ---------- 3. Key numbers ---------- */
.bd-stats{
	display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin-top:28px;
	border:1px solid var(--pr-border);border-radius:18px;background:#fff;overflow:hidden;
}
.bd-stats > div{display:flex;flex-direction:column;gap:6px;min-width:0;padding:16px 20px;border-left:1px solid var(--pr-line)}
.bd-stats > div:first-child{border-left:0}
.bd-stats dt{color:var(--pr-meta);font-size:12.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.bd-stats dd{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
.bd-stats dd strong{color:var(--pr-ink);font-size:24px;font-weight:800;letter-spacing:-.01em;line-height:1.2;font-variant-numeric:normal}
.bd-stats dd span,
.bd-stats dd a{min-width:0;color:var(--pr-muted);font-size:14px;line-height:1.35}
.bd-stats dd a{color:var(--pr-ink);font-weight:700;text-decoration:none}
.bd-stats dd a:hover{color:var(--pr-accent)}
.bd-stats .bd-stat-score{padding:1px 10px;border-radius:9px;background:var(--pr-red);color:#fff;font-size:21px}
.bd-stats .bd-stat-score.is-high{background:var(--pr-green)}
.bd-stats .bd-stat-score.is-mid{background:var(--pr-amber);color:var(--pr-ink)}
@media (max-width:1023px){
	.bd-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
	.bd-stats > div:nth-child(odd){border-left:0}
	.bd-stats > div:nth-child(n+3){border-top:1px solid var(--pr-line)}
}
@media (max-width:479px){
	.bd-stats > div{padding:12px 14px}
	.bd-stats dd strong{font-size:20px}
	.bd-stats dd span,.bd-stats dd a{font-size:13px}
}

/* ---------- 4. Sections ---------- */
.bd-sec{margin-top:52px}
.bd-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px;margin-bottom:20px}
.pr-brand-page .bd-h2{font-size:clamp(24px,2.6vw,30px);font-weight:800;letter-spacing:-.015em}
.bd-sub{margin-top:4px;color:var(--pr-muted);font-size:15px}
.bd-headlink{color:var(--pr-accent);font-size:15px;font-weight:700;text-decoration:none}
.bd-headlink:hover{color:var(--pr-accent-hover);text-decoration:underline}
.bd-empty{max-width:680px;padding:18px 20px;border:1px solid var(--pr-border);border-radius:16px;background:var(--pr-metal);color:var(--pr-muted)}
.bd-empty a{color:var(--pr-accent)}

/* Sorting: segmented control */
.bd-sort{display:inline-flex;padding:4px;border:1px solid var(--pr-border);border-radius:12px;background:#fff}
.pr-brand-page .bd-sort button{
	min-height:36px;margin:0;padding:6px 14px;border:0;border-radius:9px;background:transparent;
	color:var(--pr-muted);font:inherit;font-size:14px;font-weight:700;line-height:1.2;letter-spacing:normal;text-transform:none;cursor:pointer;
	transition:background-color .15s ease,color .15s ease;
}
.pr-brand-page .bd-sort button:hover{color:var(--pr-ink)}
.pr-brand-page .bd-sort button[aria-pressed="true"]{background:var(--pr-ink);color:#fff}

/* ---------- 5. Phone cards ---------- */
.bd-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
@media (max-width:1023px){.bd-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:767px){.bd-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
.bd-card{
	position:relative;display:flex;flex-direction:column;min-width:0;padding:14px;
	border:1px solid var(--pr-border);border-radius:16px;background:var(--pr-metal);
	transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.bd-card:hover{transform:translateY(-3px);border-color:#cdd5e1;box-shadow:0 12px 28px -16px rgba(14,23,38,.35)}
.bd-card-img{display:grid;place-items:center;height:184px;margin:10px 0 14px}
.bd-card-img img{max-height:184px;width:auto;object-fit:contain;mix-blend-mode:multiply;transition:transform .25s ease}
.bd-card:hover .bd-card-img img{transform:scale(1.03)}
.bd-noimg{display:block;width:34%;aspect-ratio:1/2;border-radius:10px;background:#E9EDF3;border:2px dashed #B9C4D6}
.bd-score{
	position:absolute;top:12px;right:12px;min-width:40px;padding:4px 8px;border-radius:9px;
	background:var(--pr-red);color:#fff;font-size:14px;font-weight:800;text-align:center;line-height:1.3;
}
.bd-score.is-high{background:var(--pr-green)}
.bd-score.is-mid{background:var(--pr-amber);color:var(--pr-ink)}
.bd-status{
	position:absolute;top:12px;left:12px;padding:3px 9px;border-radius:999px;
	background:var(--pr-ink);color:#fff;font-size:12px;font-weight:700;line-height:1.4;
}
.bd-status.is-announced{background:var(--pr-accent)}
.bd-status.is-discontinued{background:#fff;border:1px solid var(--pr-border);color:var(--pr-muted)}
.bd-card-meta{margin-bottom:3px;overflow:hidden;color:var(--pr-meta);font-size:12.5px;font-weight:600;white-space:nowrap;text-overflow:ellipsis}
.pr-brand-page .bd-card-name{margin:0 0 6px;font-size:17px;font-weight:800;line-height:1.25}
.bd-card-name a{color:var(--pr-ink);text-decoration:none}
.bd-card-name a::after{content:"";position:absolute;inset:0;border-radius:16px}
.bd-card-name a:hover{color:var(--pr-accent)}
.bd-card-name a:focus-visible{outline:none}
.bd-card:has(.bd-card-name a:focus-visible){outline:3px solid var(--pr-accent);outline-offset:2px}
.bd-pre{color:var(--pr-meta);font-weight:700}
.bd-card-specs{margin-bottom:12px;color:var(--pr-muted);font-size:13px;line-height:1.45}
.bd-card-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:12px;border-top:1px solid var(--pr-border)}
.bd-price{color:var(--pr-muted);font-size:13px}
.bd-price strong{color:var(--pr-ink);font-size:16px;font-weight:800}
.bd-price .is-none{color:var(--pr-meta)}
.pr-brand-page .bd-cmp{
	position:relative;z-index:2;display:inline-flex;align-items:center;min-height:34px;padding:6px 11px;
	border:1px solid var(--pr-border);border-radius:10px;background:#fff;color:var(--pr-accent);
	font-size:13px;font-weight:800;text-decoration:none;white-space:nowrap;
}
.pr-brand-page .bd-cmp:hover{border-color:var(--pr-accent);color:var(--pr-accent-hover)}
.pr-brand-page .bd-cmp.is-added{border-color:#0b7f3e;background:#e6f4ec;color:#0b7f3e}
@media (max-width:599px){
	.bd-card{padding:10px}
	.bd-card-img{height:128px;margin:22px 0 8px}
	.bd-card-img img{max-height:128px}
	.pr-brand-page .bd-card-name{font-size:15px}
	.bd-card-foot{flex-direction:column;align-items:stretch}
	.pr-brand-page .bd-cmp{justify-content:center}
}

/* Buttons under the cards */
.bd-more{display:flex;justify-content:center;margin-top:20px}
.bd-next{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.pr-brand-page .bd-btn{
	display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin:0;padding:10px 18px;
	border:1px solid transparent;border-radius:12px;font:inherit;font-size:15px;font-weight:800;line-height:1.2;
	text-decoration:none;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease;
}
.pr-brand-page .bd-btn-main{background:var(--pr-accent);color:#fff}
.pr-brand-page .bd-btn-main:hover{background:var(--pr-accent-hover);color:#fff}
.pr-brand-page .bd-btn-ghost{border-color:var(--pr-border);background:#fff;color:var(--pr-ink)}
.pr-brand-page .bd-btn-ghost:hover{border-color:var(--pr-accent);color:var(--pr-accent)}

/* ---------- 6. FAQ (same accordion as the rest of the site) ---------- */
.bd-faq .bd-h2{margin-bottom:18px}
.bd-faq-list{display:grid;gap:10px;max-width:860px}
.bd-faq-item{background:#fff;border:1px solid var(--pr-border);border-radius:14px;overflow:hidden;transition:border-color .2s ease}
.bd-faq-item[open]{border-color:#cdd5e1}
.bd-faq-item summary{
	display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;
	color:var(--pr-ink);font-size:17px;font-weight:700;line-height:1.4;list-style:none;cursor:pointer;
}
.bd-faq-item summary::-webkit-details-marker{display:none}
.bd-faq-item summary::after{content:"+";flex:0 0 auto;color:var(--pr-accent);font-size:20px;font-weight:600;line-height:1}
.bd-faq-item[open] summary::after{content:"\2212"}
.bd-faq-item summary:hover{color:var(--pr-accent)}
.bd-faq-a{padding:0 22px 18px;color:#3a4560;font-size:16.5px;line-height:1.7}
.bd-faq-a a{color:var(--pr-accent);text-underline-offset:2px}
@media (max-width:600px){
	.bd-faq-item summary{padding:15px 16px;font-size:16px}
	.bd-faq-a{padding:0 16px 16px;font-size:16px}
}

/* ---------- 7. More phone brands ---------- */
.bd-brands{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
@media (max-width:1023px){.bd-brands{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:479px){.bd-brands{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
.bd-brand{
	position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;height:100%;padding:12px 10px 14px;overflow:hidden;
	border:1px solid var(--pr-border);border-radius:16px;background:var(--pr-metal);color:var(--pr-ink);text-decoration:none;
	transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.bd-brand:hover{transform:translateY(-3px);border-color:#cdd5e1;box-shadow:0 12px 28px -16px rgba(14,23,38,.35)}
.bd-brand-logo{display:flex;align-items:center;justify-content:center;width:100%;height:86px;overflow:hidden}
.bd-brand-logo img{display:block;flex:none;width:calc(var(--w,80%) * .8);max-width:none;transform:translateY(var(--y,0))}
.bd-brand-logo span{font-size:24px;font-weight:800;letter-spacing:-.02em}
.bd-brand-name{font-size:14px;font-weight:800}
.bd-brand-note{color:var(--pr-meta);font-size:12.5px}
.bd-brand:hover .bd-brand-name{color:var(--pr-accent)}

@media (prefers-reduced-motion:reduce){
	.bd-card,.bd-brand,.bd-card-img img{transition:none}
	.bd-card:hover,.bd-brand:hover{transform:none}
	.bd-card:hover .bd-card-img img{transform:none}
}
