/* ============================================
   BrickManuals Theme — SuperchargedToys.com
   ============================================ */

:root {
    --yellow: #F2CD37;
    --yellow-dark: #D4AF1A;
    --red: #E24B4A;
    --green: #1D9E75;
    --bg: #FAFAF8;
    --card-bg: #FFFFFF;
    --text: #2C2C2A;
    --text-muted: #888780;
    --text-light: #B4B2A9;
    --border: rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --font: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---- HEADER ---- */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.logo:hover { text-decoration: none; }

.logo img,
.logo-img {
    width: 42px !important;
    height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

.nav-link.active {
    background: var(--yellow);
    color: #412402;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

/* ---- HERO ---- */
.hero {
    background: var(--yellow);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero-inner {
    max-width: 640px;
}

.hero-badge {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #412402;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.hero-tagline {
    color: #633806;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-search {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font);
    background: rgba(255,255,255,0.95);
    outline: none;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(226,75,74,0.3);
}

.search-btn {
    padding: 12px 24px;
    background: var(--red);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #c93e3d;
}

/* ---- FILTER BAR ---- */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-pill:hover {
    border-color: var(--text-light);
    color: var(--text);
}

.filter-pill.active {
    background: var(--yellow);
    color: #412402;
    border-color: var(--yellow);
}

/* ---- SETS GRID ---- */
.sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 2rem;
}

.set-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--text);
    display: block;
}

.set-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    text-decoration: none;
}

.set-card-image {
    position: relative;
    height: 160px;
    background: #F5F4F0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.set-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.set-card-placeholder {
    font-size: 3.5rem;
    opacity: 0.3;
}

.set-card-placeholder.large {
    font-size: 5rem;
}

.difficulty-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.set-card-image .difficulty-badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

.difficulty-badge.simple {
    background: var(--green);
    color: white;
}

.difficulty-badge.advanced {
    background: var(--red);
    color: white;
}

.set-card-info {
    padding: 12px 14px;
}

.set-card-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

/* ---- SET DETAIL PAGE ---- */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
}

.breadcrumb a { color: var(--red); }
.breadcrumb .sep { margin: 0 6px; }

.set-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.set-main-image {
    width: 300px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: #F5F4F0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.set-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.set-info {
    flex: 1;
    min-width: 250px;
}

.set-info h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 8px 0 12px;
    letter-spacing: -0.5px;
}

.set-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.set-description p { margin-bottom: 0.75rem; }

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--yellow);
    color: #412402;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.download-btn:hover {
    background: var(--yellow-dark);
    text-decoration: none;
}

/* Gallery */
.gallery-section { margin-bottom: 2rem; }
.gallery-section h2,
.video-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.gallery-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.gallery-thumb {
    width: 150px;
    height: 110px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--yellow);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* YouTube */
.video-section { margin-bottom: 2rem; }

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    border-radius: var(--radius);
    overflow: hidden;
    background: #F5F4F0;
}

.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ---- RESOURCES ---- */
.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 2rem;
}

.resource-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: box-shadow 0.2s;
}

.resource-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.resource-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.resource-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.resource-body p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 8px;
}

.resource-body a {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---- CONTACT ---- */
.contact-wrapper {
    max-width: 540px;
    padding-top: 1.5rem;
}

.contact-wrapper h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

/* Grav form styling */
.form-field {
    margin-bottom: 1rem;
}

.form-label, .form-field > label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.form-input, .form-data,
input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font);
    background: var(--card-bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--yellow-dark);
    box-shadow: 0 0 0 3px rgba(242,205,55,0.2);
}

textarea { resize: vertical; min-height: 100px; }

button[type="submit"], .form-btn, .button {
    padding: 12px 28px;
    background: var(--yellow);
    color: #412402;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

button[type="submit"]:hover, .form-btn:hover, .button:hover {
    background: var(--yellow-dark);
}

/* ---- GENERIC PAGE ---- */
.page-content {
    max-width: 720px;
    padding: 1.5rem 0 2rem;
}

.page-content h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.page-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.page-content ul, .page-content ol {
    margin: 0 0 1rem 1.5rem;
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.empty-state a { color: var(--red); font-weight: 600; }

/* ---- LIGHTBOX ---- */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    z-index: 1001;
}

.lightbox-close:hover { color: var(--yellow); }

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 0 16px;
    z-index: 1001;
    transition: color 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover { color: var(--yellow); }

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

/* ---- FOOTER ---- */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    padding: 1.5rem 0;
    text-align: center;
}

.site-footer p {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }

    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0; right: 0;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px 16px;
        gap: 4px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }

    .main-nav.open { display: flex; }

    .hero h1 { font-size: 1.5rem; }
    .hero-search { flex-direction: column; }
    .search-btn { width: 100%; }

    .sets-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .set-card-image { height: 120px; }

    .set-header { flex-direction: column; }
    .set-main-image { width: 100%; min-height: 200px; }

    .resources-grid {
        grid-template-columns: 1fr;
    }
}
