/* Kit Detail Page Styles */
.kit-detail-page {
    padding-bottom: 5rem;
}

.kit-hero {
    background: rgba(255, 255, 255, 0.03);
    padding: 3rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin-bottom: 3rem;
}

.kit-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 900px) {
    .kit-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.kit-hero-primary-actions {
    margin-top: 2rem;
}

.btn-subtext {
    font-size: 0.85rem;
    color: var(--text-muted, #6b7280);
    margin-top: 0.5rem;
}

.setup-mini-card {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    color: #374151; /* Explicitly set text color to dark grey */
}

.setup-mini-card h3 {
    background: none;
    -webkit-text-fill-color: initial;
    -webkit-background-clip: initial;
    color: var(--text-main, #111827);
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    width: auto;
}

.setup-mini-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
}

.setup-mini-card a {
    color: var(--primary, #4f46e5);
    font-weight: 600;
}

.setup-header {
    margin-bottom: 0.75rem;
}

.setup-mini-actions {
    margin-bottom: 1rem;
}

.copy-link-box {
    display: flex;
    background: #1e1e1e;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.copy-link-box code {
    color: #9cdcfe;
    font-family: var(--font-code);
    font-size: 0.85rem;
}

.copy-link-btn {
    background: none;
    border: none;
    color: #858585;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.copy-link-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.copy-link-btn.copied {
    color: #10b981;
}

.setup-mini-actions a {
    font-size: 0.85rem;
    color: var(--primary, #4f46e5);
    text-decoration: none;
    font-weight: 600;
}

.setup-mini-actions a:hover {
    text-decoration: underline;
}

.kit-desc {
    font-size: 1.1rem;
    color: var(--text-muted, #6b7280);
    line-height: 1.6;
}

.kit-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.kit-tags .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: var(--bg-body, #ffffff);
    border: 1px solid var(--border-light, #e5e7eb);
    color: var(--text-muted, #6b7280);
    text-decoration: none;
    transition: all 0.2s;
}

.kit-tags .tag:hover {
    background: var(--primary, #4f46e5);
    color: white;
    border-color: var(--primary, #4f46e5);
}

.kit-tags .style-tag {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary, #4f46e5);
    border-color: rgba(79, 70, 229, 0.2);
    font-weight: 600;
}

/* Sidebar Metadata */
.kit-metadata {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light, #e5e7eb);
}

.kit-stats {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
}

.btn-primary {
    display: inline-block;
    background: var(--primary, #4f46e5);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark, #4338ca);
}

.kit-main-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 3rem;
    min-width: 0; /* Prevents grid from blowing out */
}


/* Sidebar */
.kit-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
    z-index: 10;
}

.kit-nav h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #6b7280);
    margin: 1.5rem 0 0.75rem;
}

.kit-nav h3:first-child {
    margin-top: 0;
}

.kit-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kit-nav li {
    margin-bottom: 0.25rem;
}

.kit-nav a {
    display: block;
    padding: 0.4rem 0.75rem;
    color: var(--text-muted, #9ca3af);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.kit-nav a:hover {
    background: var(--bg-surface-hover, rgba(255, 255, 255, 0.05));
    color: var(--text-main, #ffffff);
}

/* Sections */
.kit-section {
    margin-bottom: 4rem;
}

.kit-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-main, #ffffff);
    text-decoration: none;
    overflow: visible;
    line-height: normal;
    padding-bottom: 5px;
}

.section-divider {
    display: none;
}

/* Setup Card */
.setup-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 12px;
    padding: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .setup-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

.setup-info p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--text-main, #374151);
}

.code-label {
    font-size: 0.85rem;
    color: var(--text-muted, #6b7280);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.code-snippet {
    background: #1e1e1e;
    padding: 1rem;
    border-radius: 8px;
}

.code-snippet code {
    color: #9cdcfe;
    font-family: var(--font-code);
    font-size: 0.9rem;
}

/* Colors */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.color-swatch {
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-surface, #ffffff);
}

.color-box {
    height: 100px;
    width: 100%;
}

.color-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
}

.color-info strong {
    font-size: 0.9rem;
    color: var(--text-main, #111827);
}

.color-info span {
    font-size: 0.8rem;
    color: var(--text-muted, #6b7280);
    font-family: monospace;
    text-transform: uppercase;
}

/* Typography */
.type-row {
    margin-bottom: 2rem;
}

.type-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted, #6b7280);
    margin-bottom: 0.5rem;
    display: block;
}

.type-sample {
    padding: 1.5rem;
    background: var(--bg-surface, #f9fafb);
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 8px;
}

.type-name {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--primary, #4f46e5);
    margin-bottom: 1rem;
}

.type-sample h2 {
    margin: 0;
    border: none;
    padding: 0 0 5px 0;
    line-height: 1.4;
    overflow: visible;
}

.type-sample p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    padding: 0 0 5px 0;
    overflow: visible;
}

/* Component Block Placeholder (actual styles handled in component-preview) */
.component-block {
    margin-bottom: 3rem;
}

.component-header {
    margin-bottom: 1rem;
}

.component-header h3 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-main, #111827);
}

@media (max-width: 1024px) {
    .kit-main-layout {
        gap: 2rem;
        grid-template-columns: 200px minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .kit-main-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    .kit-sidebar {
        position: relative !important;
        top: 0 !important;
        margin-bottom: 2rem;
        border-bottom: 1px solid var(--border-light, #e5e7eb);
        padding-bottom: 1rem;
    }

    .kit-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .kit-nav h3 {
        margin-top: 1rem;
    }

    .kit-nav h3:first-child {
        margin-top: 0;
    }
}
