/* =========================================================================
   GCG Blocks — front-end styles
   Uses theme.json CSS variables where available, with safe fallbacks so the
   blocks look right even outside the Gaming Chair Guide theme.
   ========================================================================= */
:root {
	--gcg-ink: var(--wp--preset--color--ink, #0f1620);
	--gcg-ink-soft: var(--wp--preset--color--ink-soft, #4b5563);
	--gcg-line: var(--wp--preset--color--line, #e6e9ef);
	--gcg-surface: var(--wp--preset--color--surface, #ffffff);
	--gcg-muted: var(--wp--preset--color--muted, #f5f7fa);
	--gcg-accent: var(--wp--preset--color--accent, #1f6feb);
	--gcg-accent-2: var(--wp--preset--color--accent-2, #12b886);
	--gcg-cta: var(--wp--preset--color--cta, #ff3b30);
	--gcg-cta-ink: #ffffff;
	--gcg-star: #ff9f0a;
	--gcg-radius: 16px;
	--gcg-shadow: 0 6px 24px rgba(15, 22, 32, .08);
	--gcg-shadow-lg: 0 18px 50px rgba(15, 22, 32, .14);
}

/* ---- Stars ---- */
.gcg-stars { display: inline-flex; line-height: 1; letter-spacing: 1px; }
.gcg-star { color: #d7dbe3; }
.gcg-star.is-full { color: var(--gcg-star); }
.gcg-star.is-half { position: relative; color: #d7dbe3; }
.gcg-star.is-half::before { content: "★"; position: absolute; left: 0; width: 50%; overflow: hidden; color: var(--gcg-star); }

/* ---- Section titles ---- */
.gcg-section-title { font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 800; letter-spacing: -.01em; margin: 0 0 1rem; color: var(--gcg-ink); }
.gcg-section-title--center { text-align: center; }

/* ---- Price ---- */
.gcg-price { display: flex; align-items: baseline; gap: .5rem; margin: .35rem 0; }
.gcg-price__current { font-size: 1.6rem; font-weight: 800; color: var(--gcg-ink); }
.gcg-price--sm .gcg-price__current { font-size: 1.15rem; }
.gcg-price__original { font-size: 1rem; color: var(--gcg-ink-soft); text-decoration: line-through; }

/* ---- Buy button ---- */
.gcg-buy-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--gcg-cta); color: var(--gcg-cta-ink); font-weight: 700; padding: .8rem 1.4rem; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, filter .2s ease; box-shadow: 0 8px 20px rgba(255, 59, 48, .28); }
.gcg-buy-btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 12px 26px rgba(255, 59, 48, .36); color: #fff; }
.gcg-buy-btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }
.gcg-buy-btn--sm { padding: .55rem 1rem; font-size: .9rem; box-shadow: none; }
.gcg-buy-btn--alt { background: var(--gcg-ink); box-shadow: none; }
.gcg-buy-btn--alt:hover { background: #000; }
.gcg-buy-wrap { text-align: center; margin: 1.5rem 0; }

/* ---- Compare button ---- */
.gcg-compare-btn { display: inline-flex; align-items: center; gap: .35rem; background: transparent; color: var(--gcg-accent); border: 1.5px solid var(--gcg-accent); border-radius: 999px; padding: .7rem 1.2rem; font-weight: 700; cursor: pointer; transition: all .15s ease; }
.gcg-compare-btn:hover { background: var(--gcg-accent); color: #fff; }
.gcg-compare-btn.is-active { background: var(--gcg-accent-2); border-color: var(--gcg-accent-2); color: #fff; }
.gcg-compare-btn--sm { padding: .5rem .9rem; font-size: .85rem; }

/* ---- Hero (single chair top) ---- */
.gcg-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; background: var(--gcg-surface); border: 1px solid var(--gcg-line); border-radius: var(--gcg-radius); padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--gcg-shadow); }
.gcg-hero__media { position: relative; border-radius: 14px; overflow: hidden; background: var(--gcg-muted); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.gcg-hero__media img { width: 100%; height: 100%; object-fit: contain; }
.gcg-hero__badge, .gcg-card__badge { position: absolute; top: 12px; left: 12px; background: var(--gcg-ink); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .35rem .7rem; border-radius: 999px; }
.gcg-hero__brand, .gcg-card__brand { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--gcg-accent); margin-bottom: .4rem; }
.gcg-hero__title { font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .5rem; color: var(--gcg-ink); }
.gcg-hero__tagline { font-size: 1.05rem; color: var(--gcg-ink-soft); margin: 0 0 .9rem; }
.gcg-hero__rating { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.gcg-hero__rating-num { font-weight: 800; }
.gcg-hero__rating-count { color: var(--gcg-ink-soft); font-size: .9rem; }
.gcg-hero__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }

/* ---- Pros & Cons ---- */
.gcg-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 2rem 0; }
.gcg-proscons__col { border-radius: var(--gcg-radius); padding: 1.25rem 1.4rem; border: 1px solid var(--gcg-line); }
.gcg-proscons__col--pro { background: rgba(18, 184, 134, .07); border-color: rgba(18, 184, 134, .25); }
.gcg-proscons__col--con { background: rgba(255, 59, 48, .05); border-color: rgba(255, 59, 48, .2); }
.gcg-proscons__head { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; font-weight: 800; margin: 0 0 .75rem; }
.gcg-proscons ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.gcg-proscons li { position: relative; padding-left: 1.6rem; line-height: 1.45; }
.gcg-proscons__col--pro li::before { content: "✔"; position: absolute; left: 0; color: var(--gcg-accent-2); font-weight: 800; }
.gcg-proscons__col--con li::before { content: "✕"; position: absolute; left: 0; color: var(--gcg-cta); font-weight: 800; }

/* ---- Specs table ---- */
.gcg-specs { margin: 2rem 0; }
.gcg-specs__table { width: 100%; border-collapse: collapse; border: 1px solid var(--gcg-line); border-radius: var(--gcg-radius); overflow: hidden; }
.gcg-specs__table th, .gcg-specs__table td { text-align: left; padding: .85rem 1.1rem; border-bottom: 1px solid var(--gcg-line); }
.gcg-specs__table tr:last-child th, .gcg-specs__table tr:last-child td { border-bottom: 0; }
.gcg-specs__table th { width: 40%; background: var(--gcg-muted); font-weight: 700; color: var(--gcg-ink); }
.gcg-specs__table tr:nth-child(even) td { background: rgba(0,0,0,.015); }

/* ---- Review box ---- */
.gcg-reviewbox { display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 3vw, 2rem); align-items: center; background: var(--gcg-ink); color: #fff; border-radius: var(--gcg-radius); padding: clamp(1.25rem, 3vw, 2rem); margin: 2rem 0; }
.gcg-reviewbox__score { text-align: center; }
.gcg-reviewbox__num { font-size: 3.4rem; font-weight: 900; line-height: 1; background: linear-gradient(120deg, var(--gcg-accent), var(--gcg-accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gcg-reviewbox__outof { opacity: .6; font-weight: 700; }
.gcg-reviewbox__label { margin-top: .3rem; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; opacity: .8; }
.gcg-reviewbox__bars { display: flex; flex-direction: column; gap: .7rem; }
.gcg-bar { display: grid; grid-template-columns: 130px 1fr 42px; align-items: center; gap: .8rem; }
.gcg-bar__label { font-size: .9rem; opacity: .9; }
.gcg-bar__track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; }
.gcg-bar__fill { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gcg-accent), var(--gcg-accent-2)); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.gcg-bar__fill.is-in { width: var(--gcg-pct); }
.gcg-bar__num { font-weight: 800; text-align: right; }

/* ---- Verdict ---- */
.gcg-verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 2rem 0; }
.gcg-verdict__card { border-radius: var(--gcg-radius); padding: 1.4rem; border: 1px solid var(--gcg-line); }
.gcg-verdict__card h3 { margin: 0 0 .6rem; font-size: 1.05rem; }
.gcg-verdict__card--buy { background: rgba(31,111,235,.06); border-color: rgba(31,111,235,.22); }
.gcg-verdict__card--skip { background: var(--gcg-muted); }

/* ---- Reviews ---- */
.gcg-reviews { margin: 2.5rem 0; }
.gcg-reviews__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.gcg-reviews__summary { display: flex; align-items: center; gap: .5rem; color: var(--gcg-ink-soft); }
.gcg-reviews__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.gcg-review { border: 1px solid var(--gcg-line); border-radius: var(--gcg-radius); padding: 1.1rem 1.2rem; background: var(--gcg-surface); }
.gcg-review__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.gcg-review__name { font-weight: 700; }
.gcg-review__title { font-weight: 700; margin-bottom: .3rem; }
.gcg-review__body { margin: 0 0 .5rem; color: var(--gcg-ink-soft); line-height: 1.5; }
.gcg-review__date { font-size: .8rem; color: var(--gcg-ink-soft); opacity: .8; }
.gcg-reviews__disclaimer { font-size: .8rem; color: var(--gcg-ink-soft); margin-top: 1rem; }

/* ---- Card + grid ---- */
.gcg-grid { display: grid; grid-template-columns: repeat(var(--gcg-cols, 3), 1fr); gap: 1.25rem; }
.gcg-card { display: flex; flex-direction: column; background: var(--gcg-surface); border: 1px solid var(--gcg-line); border-radius: var(--gcg-radius); overflow: hidden; transition: transform .15s ease, box-shadow .2s ease; }
.gcg-card:hover { transform: translateY(-4px); box-shadow: var(--gcg-shadow-lg); }
.gcg-card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--gcg-muted); }
.gcg-card__media img { width: 100%; height: 100%; object-fit: contain; }
.gcg-card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.gcg-card__title { font-size: 1.05rem; font-weight: 700; line-height: 1.25; margin: 0; }
.gcg-card__title a { color: var(--gcg-ink); text-decoration: none; }
.gcg-card__title a:hover { color: var(--gcg-accent); }
.gcg-card__rating { display: flex; align-items: center; gap: .4rem; font-size: .9rem; }
.gcg-card__actions { display: flex; gap: .5rem; margin-top: auto; padding-top: .6rem; flex-wrap: wrap; }

/* ---- Brands ---- */
.gcg-brands { display: grid; grid-template-columns: repeat(var(--gcg-cols, 4), 1fr); gap: 1rem; }
.gcg-brand { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.5rem 1rem; border: 1px solid var(--gcg-line); border-radius: var(--gcg-radius); background: var(--gcg-surface); text-decoration: none; color: var(--gcg-ink); transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
.gcg-brand:hover { transform: translateY(-4px); box-shadow: var(--gcg-shadow); border-color: var(--gcg-accent); }
.gcg-brand__logo { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--gcg-muted); font-size: 1.6rem; font-weight: 800; color: var(--gcg-accent); overflow: hidden; }
.gcg-brand__logo img { width: 100%; height: 100%; object-fit: contain; }
.gcg-brand__name { font-weight: 700; }
.gcg-brand__count { font-size: .8rem; color: var(--gcg-ink-soft); }

/* ---- Compare tray ---- */
.gcg-tray { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 200%); display: flex; align-items: center; gap: 1rem; background: var(--gcg-ink); color: #fff; padding: .8rem 1.2rem; border-radius: 999px; box-shadow: var(--gcg-shadow-lg); z-index: 999; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.gcg-tray.is-visible { transform: translate(-50%, 0); }
.gcg-tray__count { font-weight: 700; font-size: .9rem; }
.gcg-tray__go { color: #fff; text-decoration: none; font-weight: 800; background: var(--gcg-cta); padding: .5rem 1rem; border-radius: 999px; }
.gcg-tray__clear { background: transparent; border: 0; color: rgba(255,255,255,.7); cursor: pointer; font-size: .85rem; }

/* ---- Compare table ---- */
.gcg-compare__empty { text-align: center; padding: 3rem 1rem; }
.gcg-compare__table-wrap { overflow-x: auto; }
.gcg-compare__table { width: 100%; border-collapse: collapse; min-width: 640px; }
.gcg-compare__table th, .gcg-compare__table td { padding: 1rem; border: 1px solid var(--gcg-line); vertical-align: top; text-align: left; }
.gcg-compare__rowhead { background: var(--gcg-muted); font-weight: 700; width: 150px; position: sticky; left: 0; }
.gcg-compare__cardhead { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; position: relative; }
.gcg-compare__cardhead img { width: 120px; height: 120px; object-fit: contain; }
.gcg-compare__name { font-weight: 700; color: var(--gcg-ink); text-decoration: none; }
.gcg-compare__remove { background: transparent; border: 0; color: var(--gcg-cta); cursor: pointer; font-size: .8rem; }
.gcg-compare__list { margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.gcg-compare__list--pro li::marker { color: var(--gcg-accent-2); }
.gcg-compare__list--con li::marker { color: var(--gcg-cta); }

.gcg-empty { padding: 2rem; text-align: center; color: var(--gcg-ink-soft); background: var(--gcg-muted); border-radius: var(--gcg-radius); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
	.gcg-hero { grid-template-columns: 1fr; }
	.gcg-proscons, .gcg-verdict { grid-template-columns: 1fr; }
	.gcg-reviewbox { grid-template-columns: 1fr; text-align: center; }
	.gcg-bar { grid-template-columns: 100px 1fr 38px; }
}
@media (max-width: 680px) {
	.gcg-grid { grid-template-columns: repeat(2, 1fr); }
	.gcg-brands { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
	.gcg-grid { grid-template-columns: 1fr; }
}
