/* PickWise core components. Themes may override the --pw-* variables. */
:root {
	--pw-primary: #2b59ff;
	--pw-primary-ink: #ffffff;
	--pw-accent: #00a37a;
	--pw-danger: #d92d20;
	--pw-warn: #b54708;
	--pw-ink: #101828;
	--pw-muted: #5b6474;
	--pw-line: #e4e7ec;
	--pw-bg: #ffffff;
	--pw-soft: #f5f7fb;
	--pw-radius: 14px;
	--pw-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
}
.pw-container { max-width: 1200px; margin: 0 auto; padding: 16px; }
.pw-narrow { max-width: 820px; }
.pw-muted { color: var(--pw-muted); }
.pw-note { color: var(--pw-muted); font-size: .85rem; }
.pw-warn { color: var(--pw-warn); }
.pw-error { color: var(--pw-danger); font-weight: 600; }
.pw-empty { padding: 24px; background: var(--pw-soft); border-radius: var(--pw-radius); color: var(--pw-muted); text-align: center; }
.pw-notice { padding: 10px 14px; border-radius: 10px; background: #ecfdf3; color: #05603a; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.pw-btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--pw-primary); background: var(--pw-primary); color: var(--pw-primary-ink); font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform .05s, box-shadow .15s, background .15s; }
.pw-btn:hover { box-shadow: 0 4px 14px rgba(43, 89, 255, .28); color: var(--pw-primary-ink); }
.pw-btn:active { transform: translateY(1px); }
.pw-btn--ghost { background: transparent; color: var(--pw-primary); }
.pw-btn--ghost:hover { color: var(--pw-primary); background: rgba(43, 89, 255, .06); box-shadow: none; }
.pw-btn--ghost.is-saved, .pw-btn--ghost.is-active { background: rgba(43, 89, 255, .1); }
.pw-btn--buy { background: var(--pw-accent); border-color: var(--pw-accent); }
.pw-btn--buy:hover { box-shadow: 0 4px 14px rgba(0, 163, 122, .3); }
.pw-btn--lg { padding: 13px 22px; font-size: 1.05rem; }
.pw-btn--danger { background: var(--pw-danger); border-color: var(--pw-danger); }
.pw-btn--disabled { opacity: .5; cursor: not-allowed; background: var(--pw-soft); color: var(--pw-muted); border-color: var(--pw-line); }
.pw-btn--google { background: #fff; color: #1f1f1f; border-color: #dadce0; width: 100%; }
.pw-btn[disabled] { opacity: .6; }
.pw-link { background: none; border: 0; padding: 0; color: var(--pw-primary); cursor: pointer; text-decoration: underline; font: inherit; }

/* Chips, badges */
.pw-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--pw-soft); border: 1px solid var(--pw-line); font-size: .8rem; color: var(--pw-ink); text-decoration: none; margin: 2px 2px 2px 0; cursor: pointer; }
.pw-chip--drop { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.pw-chip--deal { background: #fff6ed; border-color: #fddcab; color: #b93815; }
.pw-chip--best { background: var(--pw-accent); border-color: var(--pw-accent); color: #fff; }
.pw-score-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 26px; padding: 0 8px; border-radius: 8px; background: var(--pw-ink); color: #fff; font-weight: 700; font-size: .85rem; }
.pw-rating { color: #b54708; font-weight: 600; font-size: .9rem; }
.pw-rating small { color: var(--pw-muted); font-weight: 400; }
.pw-mock-badge { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #fef0c7; color: #93370d; font-size: .7rem; font-weight: 700; letter-spacing: .03em; }
.pw-demo-banner { padding: 10px 14px; border-radius: 10px; background: #fef0c7; color: #93370d; font-weight: 600; margin-bottom: 16px; }
.pw-config-required { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #fef3f2; color: var(--pw-danger); font-weight: 700; font-size: .75rem; }
.pw-fresh { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.pw-fresh--fresh { background: #ecfdf3; color: #067647; }
.pw-fresh--recent { background: #eff8ff; color: #175cd3; }
.pw-fresh--stale { background: #fef0c7; color: #93370d; }
.pw-fresh--unavailable { background: #f2f4f7; color: #475467; }
.pw-checked { display: block; color: var(--pw-muted); font-size: .8rem; margin-top: 4px; }

/* Best price */
.pw-best { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.pw-best__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--pw-muted); }
.pw-best__price { font-size: 1.5rem; font-weight: 800; color: var(--pw-ink); }
.pw-card .pw-best__price { font-size: 1.2rem; }
.pw-best__merchant { color: var(--pw-muted); font-size: .9rem; }
.pw-best__cond { font-size: .82rem; color: #175cd3; }
.pw-best__cond em { color: var(--pw-muted); font-style: normal; }
.pw-best--none { color: var(--pw-muted); font-size: .9rem; }

/* Grid + cards */
.pw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pw-card { position: relative; display: flex; flex-direction: column; background: var(--pw-bg); border: 1px solid var(--pw-line); border-radius: var(--pw-radius); overflow: hidden; box-shadow: var(--pw-shadow); transition: transform .15s; }
.pw-card:hover { transform: translateY(-2px); }
.pw-card__rank { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--pw-ink); color: #fff; border-radius: 8px; padding: 2px 8px; font-weight: 800; font-size: .85rem; }
.pw-card__media { display: block; aspect-ratio: 4 / 3; background: var(--pw-soft); }
.pw-card__media img, .pw-img--empty { width: 100%; height: 100%; object-fit: contain; padding: 12px; box-sizing: border-box; }
.pw-img--empty { background: linear-gradient(135deg, var(--pw-soft), #e8edf7); }
.pw-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pw-card__meta { font-size: .8rem; color: var(--pw-muted); }
.pw-card__title { font-size: 1rem; margin: 0; line-height: 1.3; }
.pw-card__title a { color: var(--pw-ink); text-decoration: none; }
.pw-card__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pw-card__actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pw-card__actions .pw-btn { padding: 8px 12px; font-size: .88rem; }
.pw-reasons, .pw-caveats { margin: 4px 0; padding-left: 18px; font-size: .85rem; }
.pw-reasons li::marker { content: '✓ '; color: var(--pw-accent); }
.pw-caveats { color: var(--pw-warn); }

/* Ranked list */
.pw-ranked { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pw-ranked__item { display: grid; grid-template-columns: 34px 72px 1fr; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--pw-line); border-radius: var(--pw-radius); background: var(--pw-bg); }
.pw-ranked__n { font-size: 1.4rem; font-weight: 800; color: var(--pw-primary); text-align: center; }
.pw-ranked__media img, .pw-ranked__media .pw-img--empty { width: 72px; height: 72px; object-fit: contain; padding: 0; border-radius: 10px; background: var(--pw-soft); }
.pw-ranked__body h3 { margin: 0 0 4px; font-size: 1rem; }
.pw-ranked__body h3 a { color: var(--pw-ink); text-decoration: none; }
.pw-ranked__body p { margin: 4px 0 0; font-size: .85rem; }
.pw-ranked__price { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
@media (min-width: 720px) {
	.pw-ranked__item { grid-template-columns: 40px 88px 1fr 240px; }
	.pw-ranked__price { grid-column: auto; flex-direction: column; align-items: flex-end; }
	.pw-ranked__media img, .pw-ranked__media .pw-img--empty { width: 88px; height: 88px; }
}

/* Tables */
.pw-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pw-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pw-table th, .pw-table td { padding: 10px; border-bottom: 1px solid var(--pw-line); text-align: left; vertical-align: top; }
.pw-table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--pw-muted); background: var(--pw-soft); }
.pw-table tr.is-best { background: #f0fdf9; }
.pw-table td.is-best { background: #f0fdf9; }
.pw-table--specs th { width: 38%; color: var(--pw-muted); font-weight: 600; }
.pw-merchant-logo { max-height: 24px; max-width: 90px; vertical-align: middle; }
.pw-fresh-row--stale td { opacity: .7; }
@media (max-width: 760px) {
	.pw-offers__table thead { display: none; }
	.pw-offers__table, .pw-offers__table tbody, .pw-offers__table tr, .pw-offers__table td { display: block; width: 100%; box-sizing: border-box; }
	.pw-offers__table tr { border: 1px solid var(--pw-line); border-radius: 12px; margin-bottom: 12px; padding: 6px 4px; }
	.pw-offers__table td { border: 0; padding: 6px 10px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
	.pw-offers__table td::before { content: attr(data-label); color: var(--pw-muted); font-weight: 600; text-align: left; }
	.pw-offers__table td:last-child::before { content: none; }
	.pw-offers__table td:last-child .pw-btn { width: 100%; }
}

/* Sections */
.pw-section { margin: 28px 0; }
.pw-section h2 { font-size: 1.3rem; margin: 0 0 12px; }
.pw-two { display: grid; gap: 24px; }
@media (min-width: 960px) { .pw-two { grid-template-columns: 1fr 360px; } }
.pw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pw-stats div { background: var(--pw-soft); border-radius: 12px; padding: 10px 12px; }
.pw-stats span { display: block; font-size: .75rem; color: var(--pw-muted); }
.pw-stats strong { font-size: 1.05rem; }
.pw-range { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.pw-range__btn { border: 1px solid var(--pw-line); background: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-weight: 600; }
.pw-range__btn.is-active { background: var(--pw-ink); color: #fff; border-color: var(--pw-ink); }
.pw-chart svg { width: 100%; height: auto; display: block; }
.pw-chart .l { fill: none; stroke: var(--pw-primary); stroke-width: 2.5; }
.pw-chart .a { fill: rgba(43, 89, 255, .08); }
.pw-chart circle { fill: var(--pw-primary); }
.pw-chart .g { stroke: var(--pw-line); }
.pw-chart text { font-size: 11px; fill: var(--pw-muted); }
.pw-scorebox { background: var(--pw-soft); padding: 16px; border-radius: var(--pw-radius); }
.pw-score-big { color: var(--pw-primary); }
.pw-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pw-bars li { display: grid; grid-template-columns: 100px 1fr 34px; gap: 8px; align-items: center; font-size: .88rem; }
.pw-bar { height: 8px; border-radius: 99px; background: #dfe5f2; overflow: hidden; }
.pw-bar i { display: block; height: 100%; background: var(--pw-primary); border-radius: 99px; }
.pw-proscons { display: grid; gap: 16px; }
@media (min-width: 640px) { .pw-proscons { grid-template-columns: 1fr 1fr; } }
.pw-pros ul li::marker { content: '+ '; color: var(--pw-accent); font-weight: 800; }
.pw-cons ul li::marker { content: '− '; color: var(--pw-danger); font-weight: 800; }
.pw-features { padding-left: 18px; }
.pw-features li { margin: 3px 0; }
.pw-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pw-tags li, .pw-tags a { padding: 4px 10px; border-radius: 999px; background: var(--pw-soft); font-size: .85rem; text-decoration: none; color: var(--pw-ink); }
.pw-alertbox { border: 1px solid var(--pw-line); border-radius: var(--pw-radius); padding: 16px; }
.pw-disclosure { font-size: .8rem; color: var(--pw-muted); border-top: 1px dashed var(--pw-line); padding-top: 10px; margin-top: 24px; }

/* Product page */
.pw-product__top { display: grid; gap: 24px; }
@media (min-width: 860px) { .pw-product__top { grid-template-columns: 1fr 1fr; align-items: start; } }
.pw-product__img { width: 100%; max-height: 460px; object-fit: contain; background: var(--pw-soft); border-radius: var(--pw-radius); padding: 16px; box-sizing: border-box; }
.pw-product__gallery .pw-img--empty { aspect-ratio: 1; border-radius: var(--pw-radius); }
.pw-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.pw-thumbs img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--pw-line); border-radius: 8px; }
.pw-product__brand { color: var(--pw-muted); font-weight: 600; }
.pw-product__title { font-size: clamp(1.4rem, 3vw, 2rem); margin: 4px 0 8px; line-height: 1.2; }
.pw-product__actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.pw-anchors { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; background: var(--pw-bg); padding: 8px 0; border-bottom: 1px solid var(--pw-line); }
.pw-anchors a { white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--pw-soft); text-decoration: none; color: var(--pw-ink); font-size: .88rem; }

/* Breadcrumbs */
.pw-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; font-size: .85rem; }
.pw-crumbs li + li::before { content: '›'; margin-right: 6px; color: var(--pw-muted); }
.pw-crumbs a { color: var(--pw-muted); text-decoration: none; }

/* Layout with filters */
.pw-layout { display: grid; gap: 20px; }
@media (min-width: 960px) { .pw-layout { grid-template-columns: 260px 1fr; } }
.pw-filters { display: grid; gap: 10px; background: var(--pw-soft); padding: 14px; border-radius: var(--pw-radius); }
.pw-filters details > summary { font-weight: 700; cursor: pointer; margin-bottom: 8px; }
.pw-filters label, .pw-form label { display: grid; gap: 4px; font-size: .88rem; font-weight: 600; margin-bottom: 8px; }
.pw-filters input, .pw-filters select, .pw-form input, .pw-form select, .pw-form textarea { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--pw-line); border-radius: 9px; font: inherit; background: #fff; }
.pw-range-inputs { border: 0; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pw-range-inputs legend { font-size: .88rem; font-weight: 600; margin-bottom: 4px; }
.pw-check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px; font-weight: 500 !important; }
.pw-check input { width: auto !important; }
.pw-count { color: var(--pw-muted); margin: 0 0 10px; }
.pw-search-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pw-inline-form { display: inline; }
.pw-pager { display: flex; gap: 6px; justify-content: center; margin: 20px 0; }
.pw-pager a, .pw-pager span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--pw-line); text-decoration: none; }
.pw-pager .is-current { background: var(--pw-ink); color: #fff; }

/* Search */
.pw-search { position: relative; display: flex; gap: 8px; }
.pw-search input { flex: 1; padding: 13px 14px; border: 1px solid var(--pw-line); border-radius: 12px; font-size: 1rem; min-width: 0; }
.pw-suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--pw-line); border-radius: 12px; box-shadow: var(--pw-shadow); }
.pw-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--pw-ink); }
.pw-suggest a:hover { background: var(--pw-soft); }
.pw-suggest img { width: 36px; height: 36px; object-fit: contain; }
.pw-suggest span { flex: 1; }
.pw-suggest__type { flex: 0 0 auto !important; font-size: .7rem; text-transform: uppercase; color: var(--pw-muted); width: 64px; }

/* Compare */
.pw-compare__table th, .pw-compare__table td { min-width: 160px; }
.pw-compare__table thead img { width: 80px; height: 80px; object-fit: contain; }
.pw-compare-tray { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 100; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--pw-ink); color: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.pw-compare-tray__items { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; font-size: .85rem; }
.pw-compare-tray__items span { background: rgba(255, 255, 255, .12); padding: 3px 8px; border-radius: 8px; }
.pw-compare-tray button { background: none; border: 0; color: #fff; cursor: pointer; }
.pw-compare-tray .pw-link { color: #c7d2fe; }
.pw-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 120; background: var(--pw-ink); color: #fff; padding: 10px 16px; border-radius: 10px; }

/* AI boxes */
.pw-ai-box { background: linear-gradient(135deg, #eef2ff, #f0fdf9); border: 1px solid #dbe3ff; border-radius: 18px; padding: 20px; }
.pw-ai-box h2 small { font-weight: 500; color: var(--pw-muted); font-size: .9rem; }
.pw-examples { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 12px; }
.pw-examples .pw-chip { background: #fff; }
.pw-form--grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pw-form--grid { grid-template-columns: 1fr 1fr; } .pw-form--grid button { grid-column: 1 / -1; } }
.pw-reco-results { margin-top: 16px; }
.pw-understood { background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: .92rem; }
.pw-loading { color: var(--pw-muted); }
.pw-loading::after { content: ' ⏳'; }
.pw-clarify { background: #fffaeb; border-radius: 10px; padding: 10px 12px; }
.pw-clarify-form { display: flex; gap: 8px; margin-top: 8px; }

/* Account */
.pw-tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--pw-line); margin-bottom: 16px; padding-bottom: 8px; }
.pw-tabs a { white-space: nowrap; padding: 7px 12px; border-radius: 9px; text-decoration: none; color: var(--pw-ink); }
.pw-tabs a.is-active { background: var(--pw-ink); color: #fff; }
.pw-tiles-front { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pw-tiles-front a { display: flex; flex-direction: column; padding: 16px; border-radius: var(--pw-radius); background: var(--pw-soft); text-decoration: none; color: var(--pw-ink); }
.pw-tiles-front strong { font-size: 1.6rem; }
.pw-list { list-style: none; padding: 0; }
.pw-list li { padding: 10px 0; border-bottom: 1px solid var(--pw-line); }
.pw-login .pw-form { max-width: 420px; }
.pw-or { text-align: center; color: var(--pw-muted); max-width: 420px; }

/* Categories */
.pw-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pw-cat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border: 1px solid var(--pw-line); border-radius: var(--pw-radius); text-decoration: none; color: var(--pw-ink); background: #fff; text-align: center; font-weight: 600; font-size: .9rem; }
.pw-cat img { width: 48px; height: 48px; object-fit: contain; }
.pw-cat__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--pw-soft); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--pw-primary); font-size: 1.3rem; }
.pw-block-title { font-size: 1.3rem; }
.pw-more a { font-weight: 600; text-decoration: none; }

/* Cookie */
.pw-cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 110; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; background: #fff; border: 1px solid var(--pw-line); border-radius: 14px; box-shadow: var(--pw-shadow); font-size: .88rem; }
.pw-cookie p { margin: 0; flex: 1; min-width: 200px; }
