/*
 * Guide page components (inc/guide-components.php, template-guide.php)
 * Palette: #ffd23f yellow, #e63968 raspberry, #ff6b35 orange, #3d2e2c brown, #fff6f0 cream.
 * Prefix gp- (guide page). Nothing here targets .product-card or other theme components.
 */

/* ── Shared ─────────────────────────────────────────────── */
.gp { margin: 28px 0; }
.gp-img { width: auto; max-width: 100%; height: auto; display: block; }
.gp-badge {
    display: inline-block; background: #e63968; color: #fff;
    font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    padding: 5px 10px; border-radius: 999px; line-height: 1;
}
.gp-badge--sm { font-size: 9px; padding: 3px 7px; vertical-align: middle; margin-left: 4px; }
.gp-note { font-size: 13px; color: #7a6a66; margin: 10px 0 0; }

.gp-btn, .article-section .gp-btn, .article-section .gp .btn-buy {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #ffd23f; color: #000; font-size: 14px; font-weight: 800; line-height: 1;
    padding: 12px 18px; border-radius: 999px; text-decoration: none; white-space: nowrap;
    width: auto; transition: background .2s, color .2s; letter-spacing: -.01em;
}
.gp-btn svg { flex: 0 0 auto; transition: transform .2s; }
.gp-btn:hover, .article-section .gp-btn:hover, .article-section .gp .btn-buy:hover { background: #e63968; color: #fff !important; text-decoration: none; }
.gp-btn:hover svg { transform: translateX(3px); }
.gp-btn:focus-visible { outline: 3px solid #e63968; outline-offset: 2px; }
.gp-btn--primary, .article-section .gp-btn--primary { background: #e63968; color: #fff; }
.gp-btn--primary:hover, .article-section .gp-btn--primary:hover { background: #ffd23f; color: #000 !important; }
.gp-btn--full { width: 100%; }
.gp-btn--lg { font-size: 16px; padding: 16px 26px; }
.gp-btn--sm, .article-section .gp .gp-btn--sm { font-size: 12px; padding: 8px 12px; }
/* Theme sets .btn-buy mobile rules with !important; keep ours readable. */
@media (max-width: 767px) {
    .article-section .gp .btn-buy { font-size: 14px !important; padding: 12px 18px !important; }
    .article-section .gp .gp-btn--sm { font-size: 13px !important; padding: 10px 14px !important; }
}

/* ── Hero (template-guide.php) ──────────────────────────── */
.guide-hero { background: #fff6f0; padding: 110px 0 24px !important; }
.guide-hero__inner { display: flex; align-items: center; gap: 20px; }
.guide-hero__text { flex: 1 1 auto; min-width: 0; }
.guide-hero__kicker { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #e63968; margin: 0 0 8px; }
.guide-hero__title { font-size: 30px; font-weight: 900; letter-spacing: -.02em; line-height: 1.08; color: #3d2e2c; margin: 0 0 12px; }
.guide-hero__intro { font-size: 16px; line-height: 1.5; color: #3d2e2c; margin: 0 0 18px; max-width: 640px; }
.guide-hero__cta { margin: 0; }
.guide-hero__media { flex: 0 0 128px; width: 128px; }
.guide-hero__media img { width: 100%; height: auto; display: block; border-radius: 12px; }
.guide-hero--no-image .guide-hero__inner { display: block; }
@media (min-width: 768px) {
    .guide-hero { padding: 130px 0 32px !important; }
    .guide-hero__inner { gap: 40px; }
    .guide-hero__title { font-size: 42px; }
    .guide-hero__intro { font-size: 18px; }
    .guide-hero__media { flex: 0 0 260px; width: 260px; }
}
@media (min-width: 1024px) {
    .guide-hero__title { font-size: 50px; }
    .guide-hero__media { flex: 0 0 300px; width: 300px; }
}
.guide-body.article-section { padding-top: 24px; }
.guide-body .entry-content > .gp:first-child { margin-top: 0; }
.guide-body .entry-content { font-size: 18px; line-height: 1.6; }
.guide-body .entry-content > p { margin-bottom: 24px; }
.guide-body .entry-content h2 { font-size: 22px; font-weight: 900; margin: 44px 0 16px; letter-spacing: -.02em; line-height: 1.15; }
@media (min-width: 768px) { .guide-body .entry-content h2 { font-size: 26px; } }
@media (min-width: 1024px) { .guide-body .entry-content h2 { font-size: 28px; } }

/* ── Top picks ──────────────────────────────────────────── */
.gp-picks { scroll-margin-top: 90px; }
.article-section .gp-picks__title, .gp-picks__title { font-size: 22px; font-weight: 900; margin: 0 0 16px; letter-spacing: -.02em; }
.gp-picks__grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.gp-pick {
    position: relative; background: #fff; border: 1px solid #ffd23f; border-radius: 14px;
    padding: 18px 16px 16px; display: flex; flex-direction: column; align-items: center; text-align: center;
    box-shadow: 0 4px 8px 3px rgba(0,0,0,.03);
}
.gp-pick .gp-badge { position: absolute; top: 12px; left: 12px; }
.gp-pick__img { height: 140px; display: flex; align-items: center; justify-content: center; margin: 14px 0 12px; }
.gp-pick__img img { max-height: 140px; width: auto; }
.article-section .gp-pick__name, .gp-pick__name { font-size: 16px; font-weight: 800; margin: 0 0 6px; line-height: 1.25; padding: 0; letter-spacing: -.01em; }
.gp-pick__price { font-size: 22px; font-weight: 900; color: #3d2e2c; margin: 0 0 4px; line-height: 1; }
.gp-pick__price small { font-size: 12px; font-weight: 600; color: #7a6a66; }
.gp-pick__meta { font-size: 13px; color: #7a6a66; margin: 0 0 14px; }
.gp-pick .gp-btn { margin-top: auto; }
@media (min-width: 600px) { .gp-picks__grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Comparison table ───────────────────────────────────── */
.article-section .gp-table__title, .gp-table__title { font-size: 22px; font-weight: 900; margin: 0 0 16px; letter-spacing: -.02em; }
.gp-table-wrap { background: #fff; border: 1px solid #ffd23f; border-radius: 14px; box-shadow: 0 4px 8px 3px rgba(0,0,0,.03); overflow: hidden; }
.gp-table-wrap .gp-table__title { padding: 18px 16px 0; }
.gp-table-wrap .gp-note { padding: 10px 16px 14px; margin: 0; border-top: 1px solid #f5ece6; }
.gp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.gp-table th { text-align: left; padding: 14px 12px; font-size: 11px; font-weight: 800; color: #7a6a66; text-transform: uppercase; letter-spacing: .05em; border-bottom: 2px solid #ffd23f; white-space: nowrap; }
.gp-table td { padding: 12px; vertical-align: middle; border-bottom: 1px solid #f5ece6; }
.gp-table tbody tr:last-child td { border-bottom: 0; }
.gp-table tbody tr:hover { background: #fffdf5; }
.gp-table__pcell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.gp-table__img { flex: 0 0 48px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.gp-table__img img { max-width: 48px; max-height: 48px; width: auto; height: auto; border-radius: 6px; }
.gp-table__name { font-weight: 800; line-height: 1.25; }
.gp-table__price { font-weight: 900; white-space: nowrap; }
.gp-table__cta { text-align: right; }

/* Mobile: rows become cards, no horizontal scroll. */
@media (max-width: 767px) {
    .gp-table thead { display: none; }
    .gp-table, .gp-table tbody, .gp-table tr, .gp-table td { display: block; width: 100%; }
    .gp-table tr { padding: 14px 14px 16px; border-bottom: 1px solid #f5ece6; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
    .gp-table tbody tr:last-child { border-bottom: 0; }
    .gp-table td { padding: 0; border: 0; font-size: 14px; }
    .gp-table td[data-label]:not(.gp-table__product)::before { content: attr(data-label); display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #7a6a66; margin-bottom: 2px; }
    .gp-table__product, .gp-table__cta { grid-column: 1 / -1; }
    .gp-table__product { margin-bottom: 6px; }
    .gp-table__cta { text-align: left; margin-top: 8px; }
    .gp-table__cta .gp-btn { width: 100%; }
    .gp-table__img, .gp-table__img img { width: 56px; max-width: 56px; height: 56px; max-height: 56px; flex-basis: 56px; }
}

/* ── Product card ───────────────────────────────────────── */
.gp-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid #ffd23f; border-radius: 14px;
    box-shadow: 0 4px 8px 3px rgba(0,0,0,.03); overflow: visible; margin: 22px 0; scroll-margin-top: 90px;
}
.gp-card__media { position: relative; display: flex; align-items: center; justify-content: center; padding: 22px 18px 6px; }
.gp-card__media img { max-height: 200px; width: auto; }
.gp-card__media .gp-badge { position: absolute; top: 12px; left: 12px; }
.gp-card__body { padding: 10px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.article-section .gp-card__title, .gp-card__title { font-size: 19px; font-weight: 900; margin: 0; padding: 0; line-height: 1.2; letter-spacing: -.01em; }
.gp-card__meta { font-size: 13px; color: #7a6a66; margin: 0; }
.gp-card__desc { font-size: 15px; line-height: 1.55; margin: 0; }
.gp-card__best { font-size: 15px; line-height: 1.5; margin: 0; }
.gp-card__buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; padding-top: 12px; border-top: 1px solid #f5ece6; }
.gp-card__price { font-size: 24px; font-weight: 900; line-height: 1; color: #3d2e2c; }
.gp-card__price small { font-size: 13px; font-weight: 600; color: #7a6a66; }
@media (min-width: 640px) {
    .gp-card { flex-direction: row; align-items: stretch; }
    .gp-card__media { flex: 0 0 220px; padding: 22px 12px 22px 22px; }
    .gp-card__media img { max-height: 220px; }
    .gp-card__body { flex: 1 1 auto; padding: 22px 22px 22px 14px; min-width: 0; }
}
@media (max-width: 639px) {
    .gp-card__buy .gp-btn { width: 100%; }
}

/* ── CTA block ──────────────────────────────────────────── */
.gp-cta {
    display: flex; flex-direction: column; gap: 16px; background: #fff6f0; border: 1px solid #ffd23f; border-radius: 14px; padding: 22px 20px;
}
.article-section .gp-cta__title, .gp-cta__title { font-size: 20px; font-weight: 900; margin: 0 0 6px; letter-spacing: -.02em; }
.gp-cta__text p { margin: 0; font-size: 15px; line-height: 1.5; }
.gp-cta__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.gp-cta__link, .article-section .gp-cta__link { font-size: 14px; font-weight: 700; color: #e63968; text-decoration: underline; }
@media (min-width: 768px) {
    .gp-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 26px 28px; }
    .gp-cta__actions { align-items: flex-end; flex: 0 0 auto; }
}

/* ── Sticky CTA (mobile) ────────────────────────────────── */
.gp-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); border-top: 1px solid #ffd23f; box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.gp-sticky[hidden] { display: none; }
.gp-sticky__main { flex: 1 1 auto; }
.gp-sticky__alt { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: #3d2e2c; text-decoration: underline; white-space: nowrap; }
body.gp-has-sticky { padding-bottom: 72px; }
@media (min-width: 768px) { .gp-sticky { display: none !important; } body.gp-has-sticky { padding-bottom: 0; } }

/* Theme link rules inside .article-section underline every <a>; keep buttons clean. */
.article-section .gp-btn, .article-section .gp .btn-buy { text-decoration: none; }
.gp-picks .gp-badge, .gp-card .gp-badge { pointer-events: none; }
