/**
 * ToyBin Landing Page Styles
 *
 * FILE: /includes/css/pages/toybin.css
 * UPDATED: 2026-01-21 (fixed header/footer + scoped styling)
 *
 * GOALS:
 * - Fixed header and footer (stationary)
 * - Scrollable content area between header and footer
 * - Scope styles to the ToyBin landing page only (no global overrides)
 * - Metro tile grids with consistent spacing
 * - Hooks for per-tile custom background images/graphics
 * - Center ONLY the two section headers discussed (Hero + Features)
 * - Remain compatible with existing site header/footer and global CSS
 */

/* =============================================================================
   STICKY HEADER (KEEPS HEADER IN PLACE AT ALL TIMES)
   ============================================================================= */

.navbar,
header,
.site-header,
nav[role="navigation"] {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
}

body {
    padding-top: 56px;
}

/* =============================================================================
   PAGE LAYOUT VARIABLES
   ============================================================================= */

:root {
    --tb-header-h: 56px;
    --tb-footer-h: 80px;
}

/* =============================================================================
   FIXED FOOTER + SCROLLABLE CONTENT AREA
   ============================================================================= */

html, body {
    height: 100%;
}

body {
    overflow: hidden;
}

footer,
.site-footer,
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1020;
    height: var(--tb-footer-h);
}

/* =============================================================================
   MAIN PAGE CONTAINER - SCROLLABLE AREA BETWEEN HEADER AND FOOTER
   ============================================================================= */

.toybin-page {
    position: fixed;
    top: var(--tb-header-h);
    left: 0;
    right: 0;
    bottom: var(--tb-footer-h);

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    isolation: isolate;
    min-height: auto;
    padding-top: 0;
    padding-bottom: 2rem;

    /* Design tokens */
    --tb-gap: 1.25rem;                 /* 20px */
    --tb-radius: 18px;
    --tb-shadow: 0 10px 30px rgba(0,0,0,0.10);
    --tb-shadow-hover: 0 14px 40px rgba(0,0,0,0.14);
    --tb-tile-min-h: 240px;

    --tb-tile-bg: rgba(255,255,255,0.74);
    --tb-tile-border: rgba(255,255,255,0.55);

    --tb-text: #0f172a;
    --tb-muted: #475569;

    /* Use a darker subtitle color than default "blue-ish" */
    --tb-subtitle: rgba(15, 23, 42, 0.80);

    --tb-cta-a: #059669;
    --tb-cta-b: #0ea5e9;

    /* Header offset for fixed background layers */
    --tb-header-offset: 56px;
}

@media (max-width: 768px) {
    .toybin-page {
        --tb-gap: 1rem;
        --tb-tile-min-h: 220px;
    }
}

/* =============================================================================
   PAGE BACKGROUND (ToyBin page only)
   - Uses fixed pseudo-elements behind content
   - Positioned below header and above footer
   ============================================================================= */

/* Fixed background - stays in place while content scrolls, positioned below header */
.toybin-page::before {
    content: "";
    position: fixed;
    top: var(--tb-header-h);
    left: 0;
    right: 0;
    bottom: var(--tb-footer-h);
    z-index: -2;
    pointer-events: none;

    background-image: url('/assets/images/backgrounds/toybin_background.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;

    filter: blur(2px) saturate(0.92) contrast(0.92) brightness(1.05);
    opacity: 1;
}

/* Fixed overlay - stays in place while content scrolls, positioned below header */
.toybin-page::after {
    content: "";
    position: fixed;
    top: var(--tb-header-h);
    left: 0;
    right: 0;
    bottom: var(--tb-footer-h);
    z-index: -1;
    pointer-events: none;

    background:
        linear-gradient(90deg,
            rgba(246,236,222,0.42) 0%,
            rgba(246,236,222,0.22) 22%,
            rgba(246,236,222,0.08) 44%,
            rgba(246,236,222,0.00) 65%),
        linear-gradient(180deg,
            rgba(248,242,234,0.60) 0%,
            rgba(248,242,234,0.20) 40%,
            rgba(248,242,234,0.10) 70%,
            rgba(248,242,234,0.00) 100%),
        rgba(246,236,222,0.12);
}

/* Container hook (safe, no override of global .container) */
.toybin-page .toybin-container {
    width: 100%;
}

/* =============================================================================
   HERO (Section-isolated centering)
   Only affects: .toybin-hero inside .toybin-page
   ============================================================================= */

.toybin-page .toybin-hero {
    padding: 3.25rem 0 2rem 0;
    background: transparent;
}

/* Center only hero header block content */
.toybin-page .toybin-hero .toybin-hero__content {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.toybin-page .toybin-hero .toybin-hero__title {
    margin: 0 0 0.6rem 0;
    font-size: clamp(1.8rem, 2.2vw + 1rem, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--tb-text);
    text-shadow: 2px 2px 6px rgba(255,255,255,0.85);
}

.toybin-page .toybin-hero .toybin-hero__subtitle {
    margin: 0;
    font-size: 1.05rem;
    color: var(--tb-subtitle);
    text-shadow: 1px 1px 4px rgba(255,255,255,0.85);
}

/* Optional: make the icon spacing consistent without affecting other pages */
.toybin-page .toybin-hero .toybin-hero__title i {
    margin-right: 0.35rem;
}

/* =============================================================================
   METRO GRIDS (Categories + Features)
   ============================================================================= */

.toybin-page .toybin-metro-grid {
    display: grid;
    gap: var(--tb-gap);
    align-items: stretch;
}

/* 4-up grid */
@media (min-width: 1200px) {
    .toybin-page .toybin-metro-grid--four {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .toybin-page .toybin-metro-grid--four {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 768px) and (max-width: 991px) {
    .toybin-page .toybin-metro-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .toybin-page .toybin-metro-grid--four {
        grid-template-columns: 1fr;
    }
}

/* 3-up grid */
@media (min-width: 992px) {
    .toybin-page .toybin-metro-grid--three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 768px) and (max-width: 991px) {
    .toybin-page .toybin-metro-grid--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .toybin-page .toybin-metro-grid--three {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   CATEGORY TILES
   ============================================================================= */

.toybin-page .toybin-categories {
    padding: 1.75rem 0 2.25rem 0;
}

.toybin-page .toybin-category-card {
    position: relative;
    border-radius: var(--tb-radius);
    overflow: hidden;
    min-height: var(--tb-tile-min-h);

    background: var(--tb-tile-bg);
    border: 1px solid var(--tb-tile-border);
    box-shadow: var(--tb-shadow);

    display: flex;
    flex-direction: column;
    padding: 1.25rem;

    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.toybin-page .toybin-category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tb-shadow-hover);
}

/* Hook for custom per-tile background images */
.toybin-page .toybin-category-card__image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.16;
    filter: saturate(1.05) blur(0.2px);
    transform: scale(1.03);
    pointer-events: none;
}

/* Default watermark layer */
.toybin-page .toybin-category-card__watermark {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.16;
    background-repeat: no-repeat;
    background-position: right -10px bottom -10px;
    background-size: 220px 220px;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.10));
}

@media (max-width: 767px) {
    .toybin-page .toybin-category-card__watermark {
        background-size: 180px 180px;
    }
}

.toybin-page .toybin-category-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;

    background: rgba(15, 23, 42, 0.10);
    color: rgba(15, 23, 42, 0.92);

    position: relative;
    z-index: 2;
}

.toybin-page .toybin-category-card__icon i {
    font-size: 1.2rem;
}

.toybin-page .toybin-category-card__content {
    position: relative;
    z-index: 2;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.toybin-page .toybin-category-card__title {
    margin: 0 0 0.35rem 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--tb-text);
}

.toybin-page .toybin-category-card__description {
    margin: 0;
    color: var(--tb-muted);
    font-size: 0.95rem;
    line-height: 1.35;
    max-width: 36ch;
}

.toybin-page .toybin-user-progress {
    margin-top: 0.85rem;
    font-size: 0.92rem;
    color: rgba(15, 23, 42, 0.90);
    opacity: 0.92;
}

.toybin-page .toybin-category-card__stats {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.toybin-page .toybin-stat-item {
    background: rgba(255,255,255,0.40);
    border: 1px solid rgba(255,255,255,0.50);
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
}

.toybin-page .toybin-stat-item__value {
    font-weight: 900;
    font-size: 1.15rem;
    line-height: 1.05;
    color: rgba(15, 23, 42, 0.92);
}

.toybin-page .toybin-stat-item__label {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: rgba(71, 85, 105, 0.95);
}

.toybin-page .toybin-category-card__action {
    margin-top: auto;
    padding-top: 1.05rem;
    white-space: nowrap;
}

/* =============================================================================
   DEFAULT WATERMARK GRAPHICS (safe, generic silhouettes)
   - Map by slug modifier class: .toybin-category-card--<slug>
   ============================================================================= */

.toybin-page .toybin-category-card--video-games .toybin-category-card__watermark {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22256%22%20height=%22256%22%20viewBox=%220%200%20256%20256%22%3E%3Crect%20x=%2236%22%20y=%22104%22%20width=%22184%22%20height=%2288%22%20rx=%2244%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%2280%22%20y=%22132%22%20width=%2248%22%20height=%2212%22%20rx=%226%22%20fill=%22white%22%20opacity=%220.35%22/%3E%3Crect%20x=%2298%22%20y=%22114%22%20width=%2212%22%20height=%2248%22%20rx=%226%22%20fill=%22white%22%20opacity=%220.35%22/%3E%3Ccircle%20cx=%22170%22%20cy=%22136%22%20r=%2210%22%20fill=%22white%22%20opacity=%220.33%22/%3E%3Ccircle%20cx=%22192%22%20cy=%22154%22%20r=%2210%22%20fill=%22white%22%20opacity=%220.28%22/%3E%3C/svg%3E");
}

.toybin-page .toybin-category-card--action-figures .toybin-category-card__watermark {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22256%22%20height=%22256%22%20viewBox=%220%200%20256%20256%22%3E%3Ccircle%20cx=%22128%22%20cy=%2268%22%20r=%2228%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%2288%22%20y=%2296%22%20width=%2280%22%20height=%2284%22%20rx=%2228%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%2264%22%20y=%22120%22%20width=%2232%22%20height=%2276%22%20rx=%2216%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%22160%22%20y=%22120%22%20width=%2232%22%20height=%2276%22%20rx=%2216%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%2296%22%20y=%22176%22%20width=%2228%22%20height=%2270%22%20rx=%2214%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%22132%22%20y=%22176%22%20width=%2228%22%20height=%2270%22%20rx=%2214%22%20fill=%22%230f172a%22/%3E%3C/svg%3E");
}

.toybin-page .toybin-category-card--lego .toybin-category-card__watermark {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22256%22%20height=%22256%22%20viewBox=%220%200%20256%20256%22%3E%3Crect%20x=%2248%22%20y=%2296%22%20width=%22160%22%20height=%22112%22%20rx=%2222%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%2272%22%20y=%2264%22%20width=%2240%22%20height=%2240%22%20rx=%2218%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%22112%22%20y=%2256%22%20width=%2240%22%20height=%2240%22%20rx=%2218%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%22152%22%20y=%2264%22%20width=%2240%22%20height=%2240%22%20rx=%2218%22%20fill=%22%230f172a%22/%3E%3C/svg%3E");
}

.toybin-page .toybin-category-card--toys-to-life .toybin-category-card__watermark {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22256%22%20height=%22256%22%20viewBox=%220%200%20256%20256%22%3E%3Cpath%20d=%22M128%2040c-30%200-54%2024-54%2054v58c0%2034%2024%2056%2054%2056s54-22%2054-56V94c0-30-24-54-54-54z%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%2292%22%20y=%22184%22%20width=%2272%22%20height=%2220%22%20rx=%2210%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%2280%22%20y=%22204%22%20width=%2296%22%20height=%2216%22%20rx=%228%22%20fill=%22%230f172a%22%20opacity=%220.95%22/%3E%3C/svg%3E");
}

.toybin-page .toybin-category-card--trading-cards .toybin-category-card__watermark {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22256%22%20height=%22256%22%20viewBox=%220%200%20256%20256%22%3E%3Crect%20x=%2274%22%20y=%2252%22%20width=%22120%22%20height=%22160%22%20rx=%2218%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%2262%22%20y=%2264%22%20width=%22120%22%20height=%22160%22%20rx=%2218%22%20fill=%22%230f172a%22%20opacity=%220.85%22/%3E%3Crect%20x=%2286%22%20y=%2282%22%20width=%2284%22%20height=%2240%22%20rx=%2212%22%20fill=%22white%22%20opacity=%220.20%22/%3E%3C/svg%3E");
}

.toybin-page .toybin-category-card--cards .toybin-category-card__watermark {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22256%22%20height=%22256%22%20viewBox=%220%200%20256%20256%22%3E%3Crect%20x=%2274%22%20y=%2252%22%20width=%22120%22%20height=%22160%22%20rx=%2218%22%20fill=%22%230f172a%22/%3E%3Crect%20x=%2262%22%20y=%2264%22%20width=%22120%22%20height=%22160%22%20rx=%2218%22%20fill=%22%230f172a%22%20opacity=%220.85%22/%3E%3Crect%20x=%2286%22%20y=%2282%22%20width=%2284%22%20height=%2240%22%20rx=%2212%22%20fill=%22white%22%20opacity=%220.20%22/%3E%3C/svg%3E");
}

/* =============================================================================
   FEATURES (Section-isolated centering)
   Only affects: .toybin-features inside .toybin-page
   ============================================================================= */

.toybin-page .toybin-features {
    padding: 2.25rem 0 2.75rem 0;
    background: transparent;
}

/* Center only the features header block */
.toybin-page .toybin-features .toybin-features__header {
    margin-bottom: 1.25rem;
    text-align: center;
}

.toybin-page .toybin-features .toybin-features__title {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--tb-text);
    text-shadow: 2px 2px 6px rgba(255,255,255,0.85);
}

.toybin-page .toybin-features .toybin-features__subtitle {
    margin: 0.35rem 0 0 0;
    color: var(--tb-subtitle);
}

/* Feature tiles */
.toybin-page .toybin-feature {
    position: relative;
    border-radius: var(--tb-radius);
    overflow: hidden;

    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: var(--tb-shadow);

    padding: 1.6rem 1.4rem;
    min-height: 200px;

    transition: transform 140ms ease, box-shadow 140ms ease;
}

.toybin-page .toybin-feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--tb-shadow-hover);
}

.toybin-page .toybin-feature::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;
    background:
        radial-gradient(circle at 80% 90%, rgba(14,165,233,0.35), transparent 60%),
        radial-gradient(circle at 20% 10%, rgba(5,150,105,0.35), transparent 55%);
}

.toybin-page .toybin-feature__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.10);
    color: rgba(15, 23, 42, 0.90);
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
    position: relative;
    z-index: 2;
}

.toybin-page .toybin-feature__icon i {
    font-size: 1.35rem;
}

.toybin-page .toybin-feature__title {
    margin: 1rem 0 0.35rem 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--tb-text);
    position: relative;
    z-index: 2;
}

.toybin-page .toybin-feature__description {
    margin: 0;
    color: var(--tb-muted);
    line-height: 1.4;
    position: relative;
    z-index: 2;
}

/* =============================================================================
   CTA SECTION
   ============================================================================= */

.toybin-page .toybin-cta {
    padding: 2rem 0 2.1rem 0;
    margin: 0;
    background: linear-gradient(135deg, var(--tb-cta-a) 0%, var(--tb-cta-b) 100%);
    color: #fff;
}

.toybin-page .toybin-cta__content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.toybin-page .toybin-cta__title {
    margin: 0 0 0.75rem 0;
    font-size: 2rem;
    font-weight: 800;
}

.toybin-page .toybin-cta__description {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

.toybin-page .toybin-cta-box {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem auto;
    max-width: 600px;
}

.toybin-page .toybin-cta-box__title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.toybin-page .toybin-cta-box__text {
    margin: 0 0 1rem 0;
    opacity: 0.9;
}

.toybin-page .toybin-cta__actions {
    margin-top: 1.5rem;
}

.toybin-page .toybin-cta__login {
    margin-top: 1rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.toybin-page .toybin-cta__login-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

.toybin-page .toybin-cta__login-link:hover {
    opacity: 0.8;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.toybin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 140ms ease;
}

.toybin-btn--primary {
    background: var(--tb-cta-a);
    color: #fff;
}

.toybin-btn--primary:hover {
    background: #048658;
    transform: translateY(-1px);
}

.toybin-btn--light {
    background: #fff;
    color: var(--tb-cta-a);
}

.toybin-btn--light:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

.toybin-btn--lg {
    padding: 0.85rem 1.75rem;
    font-size: 1.05rem;
}

/* =============================================================================
   GUEST REMINDER
   ============================================================================= */

.toybin-guest-reminder {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    text-align: center;
}

.toybin-guest-reminder i {
    color: #f59e0b;
    margin-right: 0.5rem;
}

.toybin-guest-reminder__link {
    color: var(--tb-cta-a);
    font-weight: 600;
    text-decoration: underline;
}

.toybin-guest-reminder__link:hover {
    color: #048658;
}

/* =============================================================================
   HERO STATS (for logged-in users)
   ============================================================================= */

.toybin-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .toybin-hero__stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.toybin-stat {
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.70);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--tb-shadow);
}

.toybin-stat__value {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--tb-text);
    line-height: 1;
}

.toybin-stat__label {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--tb-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =============================================================================
   UTILITY / SAFETY
   ============================================================================= */

.toybin-page img {
    max-width: 100%;
    height: auto;
}